about summary refs log tree commit diff homepage
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-11-29 12:20:49 -0500
committerJune McEnroe <june@causal.agency>2018-11-29 12:20:49 -0500
commit1e69ed10cfe61c82b58b98d82ecba3c31163b44f (patch)
treeff244c0b12a75851584238e94d964a10f8c43fb2 /client.c
parentFix make clean (diff)
downloadtorus-1e69ed10cfe61c82b58b98d82ecba3c31163b44f.tar.gz
torus-1e69ed10cfe61c82b58b98d82ecba3c31163b44f.zip
Call cap_enter in client and server v2
Diffstat (limited to '')
-rw-r--r--client.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/client.c b/client.c
index 7e41b5f..904ded7 100644
--- a/client.c
+++ b/client.c
@@ -33,6 +33,10 @@
 #include <unistd.h>
 #include <wchar.h>
 
+#ifdef __FreeBSD__
+#include <sys/capsicum.h>
+#endif
+
 #include "torus.h"
 #include "help.h"
 
@@ -694,6 +698,11 @@ int main(int argc, char *argv[]) {
 	int error = connect(client, (struct sockaddr *)&addr, SUN_LEN(&addr));
 	if (error) err(EX_NOINPUT, "%s", sockPath);
 
+#ifdef __FreeBSD__
+	error = cap_enter();
+	if (error) err(EX_OSERR, "cap_enter");
+#endif
+
 	struct pollfd fds[2] = {
 		{ .fd = STDIN_FILENO, .events = POLLIN },
 		{ .fd = client, .events = POLLIN },
ref='/litterbox/commit/scoop.c?h=1.5&id=eef9c0faa89365a9c4a94c13de2fc81cadd24396&follow=1'>Normalize date inputJune McEnroe 2019-12-30Add initial rough version of scoopJune McEnroe 2019-12-30Join with USING wherever possibleJune McEnroe 2019-12-30Add -D flag to prospective scoop manualJune McEnroe 2019-12-30Order results by ID in outer query in litterboxJune McEnroe 2019-12-30Use X macro for Type enumJune McEnroe 2019-12-30Remove scoop -ABCJune McEnroe 2019-12-30Add limit option for litterbox's search query interfaceJune McEnroe