=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/doas/doas.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- src/usr.bin/doas/doas.c 2022/02/10 13:06:46 1.94 +++ src/usr.bin/doas/doas.c 2022/02/25 18:29:32 1.95 @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.c,v 1.94 2022/02/10 13:06:46 robert Exp $ */ +/* $OpenBSD: doas.c,v 1.95 2022/02/25 18:29:32 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -452,10 +452,7 @@ if (targpw == NULL) errx(1, "no passwd entry for target"); - if (setusercontext(NULL, targpw, target, LOGIN_SETGROUP | - LOGIN_SETPATH | - LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK | - LOGIN_SETUSER) != 0) + if (setusercontext(NULL, targpw, target, LOGIN_SETALL) == -1) errx(1, "failed to set user context for target"); if (pledge("stdio rpath exec", NULL) == -1)