diff options
author | 2015-10-30 19:45:03 +0000 | |
---|---|---|
committer | 2015-10-30 19:45:03 +0000 | |
commit | 256c532138760dd5fb0d022bc146f089f48da84a (patch) | |
tree | 21bf63fc5971b28feeb6abf1493dc9986c950e9d | |
parent | If a .Bd block has no arguments at all, drop the block and only keep (diff) | |
download | wireguard-openbsd-256c532138760dd5fb0d022bc146f089f48da84a.tar.xz wireguard-openbsd-256c532138760dd5fb0d022bc146f089f48da84a.zip |
Redo 1.69, but correctly, so that this really works for yp setups.
-rw-r--r-- | usr.bin/su/su.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 2be54c32e7a..17eade22247 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.69 2015/10/24 19:47:44 miod Exp $ */ +/* $OpenBSD: su.c,v 1.70 2015/10/30 19:45:03 miod Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -215,6 +215,9 @@ main(int argc, char **argv) fprintf(stderr, "Login incorrect\n"); } + if (pledge("stdio rpath getpw exec id", NULL) == -1) + err(1, "pledge"); + if (!altshell) { if (asme) { /* if asme and non-std target shell, must be root */ @@ -283,9 +286,6 @@ main(int argc, char **argv) auth_err(as, 1, "unable to set environment"); } - if (pledge("stdio rpath exec id", NULL) == -1) - err(1, "pledge"); - np = *argv ? argv : argv - 1; if (iscsh == YES) { if (fastlogin) |