OpenBSD: unveil the log directory specifically

The call to logOpen() will have already created the directory. Still
use dataMkdir() as a convenient way to get the created path.
master
C. McEnroe 2021-06-28 09:55:54 -04:00
parent cbc9545cb3
commit ca50352169
1 changed files with 1 additions and 1 deletions

2
chat.c
View File

@ -283,7 +283,7 @@ int main(int argc, char *argv[]) {
#ifdef __OpenBSD__ #ifdef __OpenBSD__
if (self.restricted && log) { if (self.restricted && log) {
const char *logdir = dataMkdir(""); const char *logdir = dataMkdir("log");
int error = unveil(logdir, "wc"); int error = unveil(logdir, "wc");
if (error) err(EX_OSERR, "unveil"); if (error) err(EX_OSERR, "unveil");
} }