aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-05-08 10:27:32 +0000
committerOmar Polo <op@omarpolo.com>2023-05-08 10:27:32 +0000
commit1e0b974519c8228e271b2b6e677c1b8f9a109b6b (patch)
treede04fa55d4b340cff89e9f8e77dc7b9b6b951e31
parent0b62f4842d7c65b8f64c5f676a0a05333fd7db6f (diff)
send capsicum/landlock/seccomp hack to Valhalla
-rw-r--r--gmid.h3
-rw-r--r--parse.y4
-rw-r--r--sandbox.c4
-rw-r--r--server.c2
4 files changed, 4 insertions, 9 deletions
diff --git a/gmid.h b/gmid.h
index 82d472a..0bf0e63 100644
--- a/gmid.h
+++ b/gmid.h
@@ -196,7 +196,6 @@ struct conf {
/* from command line */
int foreground;
int verbose;
- int can_open_sockets;
/* in the config */
int port;
@@ -367,7 +366,7 @@ void fcgi_error(struct bufferevent *, short, void *);
void fcgi_req(struct client *);
/* sandbox.c */
-void sandbox_server_process(int);
+void sandbox_server_process(void);
void sandbox_logger_process(void);
/* utf8.c */
diff --git a/parse.y b/parse.y
index 88051af..f4d770d 100644
--- a/parse.y
+++ b/parse.y
@@ -1059,8 +1059,6 @@ new_proxy(void)
{
struct proxy *p;
- conf.can_open_sockets = 1;
-
p = xcalloc(1, sizeof(*p));
p->protocols = TLS_PROTOCOLS_DEFAULT;
return p;
@@ -1170,8 +1168,6 @@ fastcgi_conf(const char *path, const char *port)
struct fcgi *f;
int i;
- conf.can_open_sockets = 1;
-
for (i = 0; i < FCGI_MAX; ++i) {
f = &fcgi[i];
diff --git a/sandbox.c b/sandbox.c
index 01dc966..1e95b8e 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -21,7 +21,7 @@
#include <unistd.h>
void
-sandbox_server_process(int can_open_sockets)
+sandbox_server_process(void)
{
struct vhost *h;
struct location *l;
@@ -54,7 +54,7 @@ sandbox_logger_process(void)
#warning "No sandbox method known for this OS"
void
-sandbox_server_process(int can_open_sockets)
+sandbox_server_process(void)
{
return;
}
diff --git a/server.c b/server.c
index ae2ba79..8027b5f 100644
--- a/server.c
+++ b/server.c
@@ -1399,7 +1399,7 @@ loop(struct tls *ctx_, int sock4, int sock6, struct imsgbuf *ibuf)
signal_set(&sigusr2, SIGUSR2, &handle_siginfo, NULL);
signal_add(&sigusr2, NULL);
- sandbox_server_process(conf.can_open_sockets);
+ sandbox_server_process();
event_dispatch();
_exit(0);
}