about summary refs log tree commit diff homepage
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/server.c b/server.c
index ade834d..a662efd 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2017  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -35,6 +35,7 @@
 
 #ifdef __FreeBSD__
 #include <libutil.h>
+#include <sys/capsicum.h>
 #endif
 
 #include "torus.h"
@@ -396,6 +397,9 @@ int main(int argc, char *argv[]) {
 	if (error) err(EX_CANTCREAT, "%s", sockPath);
 
 #ifdef __FreeBSD__
+	error = cap_enter();
+	if (error) err(EX_OSERR, "cap_enter");
+
 	if (pid) {
 		error = daemon(0, 0);
 		if (error) err(EX_OSERR, "daemon");