aboutsummaryrefslogtreecommitdiffstats
path: root/slowcgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'slowcgi.c')
-rw-r--r--slowcgi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/slowcgi.c b/slowcgi.c
index 63e7c1a..660f95e 100644
--- a/slowcgi.c
+++ b/slowcgi.c
@@ -367,8 +367,10 @@ main(int argc, char *argv[])
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
lerr(1, "unable to revoke privs");
+#ifdef __OpenBSD__
if (pledge("stdio rpath unix proc exec", NULL) == -1)
lerr(1, "pledge");
+#endif
SLIST_INIT(&slowcgi_proc.requests);
event_init();
@@ -932,8 +934,10 @@ exec_cgi(struct request *c)
return;
case 0:
/* Child process */
+#ifdef __OpenBSD__
if (pledge("stdio rpath exec", NULL) == -1)
lerr(1, "pledge");
+#endif
close(s_in[0]);
close(s_out[0]);
close(s_err[0]);