Clean up if restricted && logEnable, pipe creation
parent
188fc678bd
commit
a8c1f02976
9
chat.c
9
chat.c
|
@ -284,12 +284,10 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
if (self.restricted) {
|
if (self.restricted && logEnable) {
|
||||||
if (logEnable) {
|
|
||||||
dataMkdir("");
|
dataMkdir("");
|
||||||
unveilData("");
|
unveilData("");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
char promises[64] = "stdio tty";
|
char promises[64] = "stdio tty";
|
||||||
char *ptr = &promises[strlen(promises)], *end = &promises[sizeof(promises)];
|
char *ptr = &promises[strlen(promises)], *end = &promises[sizeof(promises)];
|
||||||
|
@ -338,10 +336,7 @@ int main(int argc, char *argv[]) {
|
||||||
fcntl(irc, F_SETFD, FD_CLOEXEC);
|
fcntl(irc, F_SETFD, FD_CLOEXEC);
|
||||||
bool pipes = !self.kiosk && !self.restricted;
|
bool pipes = !self.kiosk && !self.restricted;
|
||||||
if (pipes) {
|
if (pipes) {
|
||||||
int error = pipe(utilPipe);
|
int error = pipe(utilPipe) || pipe(execPipe);
|
||||||
if (error) err(EX_OSERR, "pipe");
|
|
||||||
|
|
||||||
error = pipe(execPipe);
|
|
||||||
if (error) err(EX_OSERR, "pipe");
|
if (error) err(EX_OSERR, "pipe");
|
||||||
|
|
||||||
fcntl(utilPipe[0], F_SETFD, FD_CLOEXEC);
|
fcntl(utilPipe[0], F_SETFD, FD_CLOEXEC);
|
||||||
|
|
Loading…
Reference in New Issue