Call unveil() from srv_open() if on OpenBSD.

This commit is contained in:
default 2022-11-14 17:40:31 +01:00
parent 01b2d3c66d
commit 484cfbc800

6
data.c
View File

@ -79,6 +79,12 @@ int srv_open(char *basedir)
if (error != NULL)
srv_log(error);
#ifdef __OpenBSD__
srv_debug(2, xs_fmt("Calling unveil()"));
unveil(basedir, "rwc");
unveil(NULL, NULL);
#endif /* __OpenBSD__ */
return ret;
}