From 01a2ddf3f8d22c58bd8423be69ab0e7843d71652 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 22 Nov 2015 19:41:19 +0000 Subject: [PATCH] Add getpw to pledge, makes tmux work in YP environments, discovered by matthieu, ok deraadt --- server.c | 4 ++-- tmux.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server.c b/server.c index 55a53a40..e17b9356 100644 --- a/server.c +++ b/server.c @@ -175,8 +175,8 @@ server_start(struct event_base *base, int lockfd, char *lockfile) if (debug_level > 3) tty_create_log(); - if (pledge("stdio rpath wpath cpath fattr unix recvfd proc exec tty " - "ps", NULL) != 0) + if (pledge("stdio rpath wpath cpath fattr unix getpw recvfd proc exec " + "tty ps", NULL) != 0) fatal("pledge failed"); RB_INIT(&windows); diff --git a/tmux.c b/tmux.c index 9baa8183..aa827178 100644 --- a/tmux.c +++ b/tmux.c @@ -255,8 +255,8 @@ main(int argc, char **argv) if (shell_cmd != NULL && argc != 0) usage(); - if (pledge("stdio rpath wpath cpath flock fattr unix sendfd recvfd " - "proc exec tty ps", NULL) != 0) + if (pledge("stdio rpath wpath cpath flock fattr unix getpw sendfd " + "recvfd proc exec tty ps", NULL) != 0) err(1, "pledge"); /*