summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/chat.c b/chat.c
index 71bfb7b..170094f 100644
--- a/chat.c
+++ b/chat.c
@@ -46,6 +46,10 @@
 #include <tls.h>
 #include <unistd.h>
 
+#ifdef __FreeBSD__
+#include <sys/capsicum.h>
+#endif
+
 #include "chat.h"
 
 #ifndef OPENSSL_BIN
@@ -314,6 +318,13 @@ int main(int argc, char *argv[]) {
 	if (error) err(EX_OSERR, "pledge");
 #endif
 
+#ifdef __FreeBSD__
+	if (self.restricted) {
+		int error = cap_enter();
+		if (error) err(EX_OSERR, "cap_enter");
+	}
+#endif
+
 	if (pass) ircFormat("PASS :%s\r\n", pass);
 	if (sasl) ircFormat("CAP REQ :sasl\r\n");
 	ircFormat("CAP LS\r\n");
or make and mdocJune McEnroe 2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe 2021-01-19Don't use a pager if reading standard inputJune McEnroe 2021-01-19Support BSD make syntax and match *.amJune McEnroe These don't really go together, but... 2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe Otherwise it ends up going into Shell state. 2021-01-18Allow matching lexers using first input lineJune McEnroe