about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-10-17 12:36:09 -0400
committerJune McEnroe <june@causal.agency>2021-10-17 12:36:09 -0400
commit36348922b01dcbf2154ab6b97bb78081d8ed3df8 (patch)
tree4995b050f9e5b1f29091338d1d552d55ee1b083a
parentBuild chroot only for OpenBSD, remove rc script (diff)
downloadtorus-36348922b01dcbf2154ab6b97bb78081d8ed3df8.tar.gz
torus-36348922b01dcbf2154ab6b97bb78081d8ed3df8.zip
Remove capsicum support
Diffstat (limited to '')
-rw-r--r--client.c14
-rw-r--r--image.c9
-rw-r--r--server.c18
3 files changed, 0 insertions, 41 deletions
diff --git a/client.c b/client.c
index 03d8486..be43641 100644
--- a/client.c
+++ b/client.c
@@ -33,10 +33,6 @@
 #include <unistd.h>
 #include <wchar.h>
 
-#ifdef __FreeBSD__
-#include <sys/capsicum.h>
-#endif
-
 #include "torus.h"
 #include "help.h"
 
@@ -722,16 +718,6 @@ int main(int argc, char *argv[]) {
 	if (error) err(EX_OSERR, "pledge");
 #endif
 
-#ifdef __FreeBSD__
-	error = cap_enter();
-	if (error) err(EX_OSERR, "cap_enter");
-
-	cap_rights_t rights;
-	cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_EVENT);
-	error = cap_rights_limit(client, &rights);
-	if (error) err(EX_OSERR, "cap_rights_limit");
-#endif
-
 	struct pollfd fds[2] = {
 		{ .fd = STDIN_FILENO, .events = POLLIN },
 		{ .fd = client, .events = POLLIN },
diff --git a/image.c b/image.c
index 8bdce53..584eb4c 100644
--- a/image.c
+++ b/image.c
@@ -27,10 +27,6 @@
 #include <unistd.h>
 #include <zlib.h>
 
-#ifdef __FreeBSD__
-#include <sys/capsicum.h>
-#endif
-
 #ifdef HAVE_KCGI
 #include <sys/types.h>
 #include <stdarg.h>
@@ -290,11 +286,6 @@ int main(int argc, char *argv[]) {
 	}
 #endif
 
-#ifdef __FreeBSD__
-	int error = cap_enter();
-	if (error) err(EX_OSERR, "cap_enter");
-#endif
-
 #ifdef HAVE_KCGI
 	if (kcgi) {
 		worker();
diff --git a/server.c b/server.c
index b57b86a..fc35640 100644
--- a/server.c
+++ b/server.c
@@ -32,10 +32,6 @@
 #include <time.h>
 #include <unistd.h>
 
-#ifdef __FreeBSD__
-#include <sys/capsicum.h>
-#endif
-
 #include "torus.h"
 
 static struct Tile *tiles;
@@ -406,20 +402,6 @@ int main(int argc, char *argv[]) {
 	if (error) err(EX_OSERR, "pledge");
 #endif
 
-#ifdef __FreeBSD__
-	error = cap_enter();
-	if (error) err(EX_OSERR, "cap_enter");
-
-	cap_rights_t rights;
-	cap_rights_init(
-		&rights,
-		CAP_LISTEN, CAP_ACCEPT, CAP_EVENT,
-		CAP_READ, CAP_WRITE, CAP_SETSOCKOPT
-	);
-	error = cap_rights_limit(server, &rights);
-	if (error) err(EX_OSERR, "cap_rights_limit");
-#endif
-
 	error = listen(server, -1);
 	if (error) err(EX_OSERR, "listen");