diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-08-23 14:29:24 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-08-23 14:29:24 +0000 |
commit | 5abfbec5ed651ada4229bafcc83f496b26238724 (patch) | |
tree | f52dc9b2645e33dec56beb49d3415287f1294d1f /usr.bin | |
parent | 3001468d78bd192a78bc260fcd2da291666e44cf (diff) |
Remove duplicate getuid(), suggested by & ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh-keysign.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keysign.c b/usr.bin/ssh/ssh-keysign.c index 204779344bb..e3e4c33ada7 100644 --- a/usr.bin/ssh/ssh-keysign.c +++ b/usr.bin/ssh/ssh-keysign.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: ssh-keysign.c,v 1.17 2004/08/23 14:26:38 dtucker Exp $"); +RCSID("$OpenBSD: ssh-keysign.c,v 1.18 2004/08/23 14:29:23 dtucker Exp $"); #include <openssl/evp.h> #include <openssl/rand.h> @@ -149,7 +149,8 @@ main(int argc, char **argv) key_fd[0] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY); key_fd[1] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY); - if ((pw = getpwuid(getuid())) == NULL) + original_real_uid = getuid(); /* XXX readconf.c needs this */ + if ((pw = getpwuid(original_real_uid)) == NULL) fatal("getpwuid failed"); pw = pwcopy(pw); @@ -160,7 +161,6 @@ main(int argc, char **argv) #endif /* verify that ssh-keysign is enabled by the admin */ - original_real_uid = getuid(); /* XXX readconf.c needs this */ initialize_options(&options); (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", &options, 0); fill_default_options(&options); |