mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
ifdef __OpenBSD__ around pledge().
This commit is contained in:
parent
3e0d31c4e9
commit
7930cb54c0
2 changed files with 4 additions and 0 deletions
2
server.c
2
server.c
|
|
@ -177,9 +177,11 @@ server_start(struct event_base *base, int lockfd, char *lockfile)
|
|||
}
|
||||
close(pair[0]);
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio rpath wpath cpath fattr unix recvfd proc exec tty "
|
||||
"ps", NULL) != 0)
|
||||
fatal("pledge failed");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Must daemonise before loading configuration as the PID changes so
|
||||
|
|
|
|||
2
tmux.c
2
tmux.c
|
|
@ -259,9 +259,11 @@ main(int argc, char **argv)
|
|||
if (shell_cmd != NULL && argc != 0)
|
||||
usage();
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio rpath wpath cpath flock fattr unix sendfd recvfd "
|
||||
"proc exec tty ps", NULL) != 0)
|
||||
err(1, "pledge");
|
||||
#endif
|
||||
|
||||
if (!(flags & CLIENT_UTF8)) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue