about summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--chat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/chat.c b/chat.c
index 9934fc3..0bdb69c 100644
--- a/chat.c
+++ b/chat.c
@@ -282,12 +282,17 @@ int main(int argc, char *argv[]) {
 	}
 
 #ifdef __OpenBSD__
-	if (self.restricted && log) {
+	if (log) {
 		const char *logdir = dataMkdir("log");
 		int error = unveil(logdir, "wc");
 		if (error) err(EX_OSERR, "unveil");
 	}
 
+	if (!self.restricted) {
+		int error = unveil("/", "x");
+		if (error) err(EX_OSERR, "unveil");
+	}
+
 	char promises[64] = "stdio tty";
 	char *ptr = &promises[strlen(promises)], *end = &promises[sizeof(promises)];
 	if (log) ptr = seprintf(ptr, end, " wpath cpath");