tthrow http error if unveil(2) fails - vote - simple cgi voting system for web and gopher
HTML git clone git://src.adamsgaard.dk/vote
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit f01eecbd79247d95d642b91d732dd5338c944417
DIR parent 4bb5484779e4c0562cbe9393ab9df8caf3f24728
HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 27 Sep 2020 02:20:42 +0200
tthrow http error if unveil(2) fails
Diffstat:
M vote.c | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
---
DIR diff --git a/vote.c b/vote.c
t@@ -79,6 +79,7 @@ main() {
if (unveil(getenv("PWD"), NULL) == -1 || unveil(NULL, NULL) == -1) {
fprintf(stderr, "unveil: %s\n", strerror(errno));
+ die_500();
}
if (pledge("stdio cpath rpath", NULL) == -1) {