diff options
author | June McEnroe <june@causal.agency> | 2021-09-23 22:23:27 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-09-23 22:23:27 -0400 |
commit | 047184e43a84edffbef611d4225f59c10de126de (patch) | |
tree | 488f142ae992f905f49013342f853029e7e75cd7 /www/temp.causal.agency/up.c | |
parent | Add quick (diff) | |
download | src-047184e43a84edffbef611d4225f59c10de126de.tar.gz src-047184e43a84edffbef611d4225f59c10de126de.zip |
Make up build away from FreeBSD
Diffstat (limited to 'www/temp.causal.agency/up.c')
-rw-r--r-- | www/temp.causal.agency/up.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/www/temp.causal.agency/up.c b/www/temp.causal.agency/up.c index ba6c2bcd..999e4958 100644 --- a/www/temp.causal.agency/up.c +++ b/www/temp.causal.agency/up.c @@ -21,12 +21,15 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/capsicum.h> #include <sys/types.h> #include <sysexits.h> #include <time.h> #include <unistd.h> +#ifdef __FreeBSD__ +#include <sys/capsicum.h> +#endif + #include <kcgi.h> #include <kcgihtml.h> @@ -137,6 +140,7 @@ static void sandbox(void) { cwd = open(".", O_DIRECTORY); if (cwd < 0) err(EX_CONFIG, "."); +#ifdef __FreeBSD__ int error = cap_enter(); if (error) err(EX_OSERR, "cap_enter"); @@ -144,6 +148,7 @@ static void sandbox(void) { cap_rights_init(&rights, CAP_LOOKUP, CAP_CREATE, CAP_PWRITE); error = cap_rights_limit(cwd, &rights); if (error) err(EX_OSERR, "cap_rights_limit"); +#endif } int main(void) { |