diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-08-23 14:26:40 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-08-23 14:26:40 +0000 |
commit | 17cb1fbe6399cd5ac99f79899ba1dda706b35037 (patch) | |
tree | 8b02411d6e23f8495acdf962816437d88d4bd9fe /usr.bin/ssh/ssh.c | |
parent | e1419ce8a95888d0d9c7e6a42d394a1414de81c2 (diff) |
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 |