From 840160c1c36b7e62596afee536be6caa2832575b Mon Sep 17 00:00:00 2001 From: miod Date: Sat, 24 Oct 2015 19:23:48 +0000 Subject: [PATCH] setusercontext() may still need "getpw" pledge rights; unbreaks doas on yp accounts after 1.43; found the hard way by matthieu@ --- usr.bin/doas/doas.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/usr.bin/doas/doas.c b/usr.bin/doas/doas.c index 3e6d4bbe8b0..9ba5d0b2915 100644 --- a/usr.bin/doas/doas.c +++ b/usr.bin/doas/doas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.c,v 1.44 2015/10/22 12:43:26 tedu Exp $ */ +/* $OpenBSD: doas.c,v 1.45 2015/10/24 19:23:48 miod Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -421,9 +421,6 @@ main(int argc, char **argv, char **envp) if (!pw) errx(1, "no passwd entry for target"); - if (pledge("stdio rpath id exec", NULL) == -1) - err(1, "pledge"); - if (setusercontext(NULL, pw, target, LOGIN_SETGROUP | LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK | LOGIN_SETUSER) != 0) -- 2.20.1