idiotbox-c

youtube web application in C
git clone git://git.codemadness.org/idiotbox-c
Log | Files | Refs | README | LICENSE

commit 137c5972a0b011aa94756dbc3312b8fb27e106cf
parent 37aa40c8ed1ee081004a1b59f642b902b16927ea
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 28 Jun 2018 20:24:33 +0200

add initial pledge(2)

Diffstat:
main.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -909,6 +909,11 @@ main(void) jsmntok_t *t; char *data, *s; + if (pledge("stdio dns inet rpath", NULL) == -1) { + OUT("Status: 500 Internal Server Error\r\n\r\n"); + exit(1); + } + parsecgi(); if (!rawsearch[0])