summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2023-11-28 08:38:19 +0100
committerVincent Douillet <vincent@vdouillet.fr>2023-11-29 15:45:28 +0100
commit43f65c76152017420ce723b4d4ef4230ff072818 (patch)
tree5c981b2d6949ebd5a5bdefe112383f6874d9342a /main.c
parenta8158372e4173f760d893516c0d8aecbb0e737ac (diff)
browse: use khttp_template
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index a9a9c5c..8f2e541 100644
--- a/main.c
+++ b/main.c
@@ -65,7 +65,9 @@ main(void)
kcgi_strerror(parse_err));
/* A bit of security cannot hurt */
- if (-1 == unveil(DATA_DIR, "r") || -1 == unveil(NULL, NULL))
+ if (-1 == unveil(DATA_DIR, "r")
+ || -1 == unveil(TEMPLATE_DIR, "r")
+ || -1 == unveil(NULL, NULL))
http_exit(&r, KHTTP_500, "Unveil failed: %s", strerror(errno));
if (-1 == pledge("stdio rpath wpath cpath", NULL))
http_exit(&r, KHTTP_500, "Pledge failed: %s", strerror(errno));