diff options
author | 2004-08-23 14:26:38 +0000 | |
---|---|---|
committer | 2004-08-23 14:26:38 +0000 | |
commit | e059ceb3bcea788c1490d5a2ef947f506f469f66 (patch) | |
tree | 0d165e602df6e34ff0d13d6583950d2d885ad24c /usr.bin/ssh/ssh.c | |
parent | clean (diff) | |
download | wireguard-openbsd-e059ceb3bcea788c1490d5a2ef947f506f469f66.tar.xz wireguard-openbsd-e059ceb3bcea788c1490d5a2ef947f506f469f66.zip |
Use permanently_set_uid() in ssh and ssh-keysign for consistency, matches
change in Portable; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 16feada37e1..7c5625b49a1 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.224 2004/07/28 09:40:29 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.225 2004/08/23 14:26:38 dtucker Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -71,6 +71,7 @@ RCSID("$OpenBSD: ssh.c,v 1.224 2004/07/28 09:40:29 markus Exp $"); #include "match.h" #include "msg.h" #include "monitor_fdpass.h" +#include "uidswap.h" #ifdef SMARTCARD #include "scard.h" @@ -633,8 +634,10 @@ again: * user's home directory if it happens to be on a NFS volume where * root is mapped to nobody. */ - seteuid(original_real_uid); - setuid(original_real_uid); + if (original_effective_uid == 0) { + PRIV_START; + permanently_set_uid(pw); + } /* * Now that we are back to our own permissions, create ~/.ssh |