about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--client.c11
-rw-r--r--image.c2
-rw-r--r--merge.c2
-rw-r--r--meta.c2
-rw-r--r--png.h2
-rw-r--r--server.c6
-rw-r--r--torus.h2
7 files changed, 20 insertions, 7 deletions
diff --git a/client.c b/client.c
index de10060..904ded7 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2018  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
@@ -33,6 +33,10 @@
 #include <unistd.h>
 #include <wchar.h>
 
+#ifdef __FreeBSD__
+#include <sys/capsicum.h>
+#endif
+
 #include "torus.h"
 #include "help.h"
 
@@ -694,6 +698,11 @@ int main(int argc, char *argv[]) {
 	int error = connect(client, (struct sockaddr *)&addr, SUN_LEN(&addr));
 	if (error) err(EX_NOINPUT, "%s", sockPath);
 
+#ifdef __FreeBSD__
+	error = cap_enter();
+	if (error) err(EX_OSERR, "cap_enter");
+#endif
+
 	struct pollfd fds[2] = {
 		{ .fd = STDIN_FILENO, .events = POLLIN },
 		{ .fd = client, .events = POLLIN },
diff --git a/image.c b/image.c
index 57e3a38..670dae7 100644
--- a/image.c
+++ b/image.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2018  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
diff --git a/merge.c b/merge.c
index 997f97f..ce5dbef 100644
--- a/merge.c
+++ b/merge.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
diff --git a/meta.c b/meta.c
index 90577d1..ff80bd1 100644
--- a/meta.c
+++ b/meta.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
diff --git a/png.h b/png.h
index 4eb4da1..0df4699 100644
--- a/png.h
+++ b/png.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2018  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
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");
diff --git a/torus.h b/torus.h
index d469014..41c662b 100644
--- a/torus.h
+++ b/torus.h
@@ -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