about summary refs log tree commit diff homepage
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-04 19:47:18 -0500
committerJune McEnroe <june@causal.agency>2019-01-04 19:47:18 -0500
commit96a00130d266a5281cc8706f537074a3e253f1a3 (patch)
tree44e1c425f2db90fb978e9504f62e7cb6c7a4b73c /client.c
parentAdd play to index.html (diff)
downloadtorus-96a00130d266a5281cc8706f537074a3e253f1a3.tar.gz
torus-96a00130d266a5281cc8706f537074a3e253f1a3.zip
Add cap_rights_limit calls to client and server
Diffstat (limited to 'client.c')
-rw-r--r--client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/client.c b/client.c
index 867b4de..32c2022 100644
--- a/client.c
+++ b/client.c
@@ -707,6 +707,11 @@ int main(int argc, char *argv[]) {
 #ifdef __FreeBSD__
 	error = cap_enter();
 	if (error) err(EX_OSERR, "cap_enter");
+
+	cap_rights_t rights;
+	cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_EVENT);
+	error = cap_rights_limit(client, &rights);
+	if (error) err(EX_OSERR, "cap_rights_limit");
 #endif
 
 	struct pollfd fds[2] = {