diff options
author | dtucker <dtucker> | 2004-08-29 06:32:59 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2004-08-29 06:32:59 +0000 |
commit | 3bb474cd77c5212b225e3cac40d969116bc92b29 (patch) | |
tree | 2d2222e8c8a9f4b11c0e5a7278113e1b038aaf73 /ssh-keysign.c | |
parent | 641baa73064d7d4c6aa1777986c64c8ee4505fc6 (diff) | |
download | openssh-3bb474cd77c5212b225e3cac40d969116bc92b29.tar.gz |
- dtucker@cvs.openbsd.org 2004/08/23 14:29:23
[ssh-keysign.c]
Remove duplicate getuid(), suggested by & ok markus@
Diffstat (limited to 'ssh-keysign.c')
-rw-r--r-- | ssh-keysign.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-keysign.c b/ssh-keysign.c index 1b1149aa..04597a91 100644 --- a/ssh-keysign.c +++ b/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> @@ -151,7 +151,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); @@ -166,7 +167,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); |