about summary refs log tree commit diff homepage
path: root/server.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-09-24 19:36:47 -0400
committerJune McEnroe <june@causal.agency>2021-09-26 12:16:45 -0400
commit384271528b6315bb2532c1f06e59a84896766901 (patch)
treec6d3fc61853308556ec82d07df0c2b511aacc91e /server.c
parentLink with -lncursesw (diff)
downloadtorus-384271528b6315bb2532c1f06e59a84896766901.tar.gz
torus-384271528b6315bb2532c1f06e59a84896766901.zip
OpenBSD: pledge(2) server
Diffstat (limited to '')
-rw-r--r--server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/server.c b/server.c
index 300322f..ee19ec8 100644
--- a/server.c
+++ b/server.c
@@ -392,6 +392,11 @@ int main(int argc, char *argv[]) {
 		dprintf(pidFile, "%ju", (uintmax_t)getpid());
 	}
 
+#ifdef __OpenBSD__
+	error = pledge("stdio unix", NULL);
+	if (error) err(EX_OSERR, "pledge");
+#endif
+
 #ifdef __FreeBSD__
 	error = cap_enter();
 	if (error) err(EX_OSERR, "cap_enter");
46c7035d07070ac1ebf0c0b44df927358687f&follow=1'>Add support for mime type registration and lookupLars Hjemli 2009-07-25cgit.h: keep config flags sortedLars Hjemli 2009-07-25cgitrc.5.txt: document 'embedded' and 'noheader'Lars Hjemli 2009-07-25Add support for 'noheader' optionLars Hjemli 2009-07-25cgitrc.5.txt: document 'head-include'Lars Hjemli 2009-07-25ui-blob: return 'application/octet-stream' for binary blobsLars Hjemli 2009-07-25ui-plain: Return 'application/octet-stream' for binary files.Remko Tronçon 2009-06-11use cgit_httpscheme() for atom feedDiego Ongaro 2009-06-11add cgit_httpscheme() -> http:// or https://Diego Ongaro 2009-06-07Return http statuscode 404 on unknown branchLars Hjemli 2009-06-07Add head-include configuration option.Mark Lodato 2009-03-15CGIT 0.8.2.1Lars Hjemli 2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli 2009-03-15fix segfault when displaying empty blobsEric Wong 2009-02-19Add support for HEAD requestsLars Hjemli 2009-02-19Add support for ETag in 'plain' viewLars Hjemli 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli 2009-02-12Makefile: add doc-related targetsLars Hjemli