summaryrefslogtreecommitdiff
path: root/ssh-keysign.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-08-29 16:32:59 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-08-29 16:32:59 +1000
commit34620d6f710f97bddc6f7730cee5c6404c4153ba (patch)
treeed317ac1e6b5f38656ae98d6c799a9ebd3c5bfa0 /ssh-keysign.c
parent27a8f6b05636648367ea373d77d129327eb515a9 (diff)
- 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-keysign.c b/ssh-keysign.c
index 1b1149aad..04597a91d 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: ssh-keysign.c,v 1.17 2004/08/23 14:26:38 dtucker Exp $"); 25RCSID("$OpenBSD: ssh-keysign.c,v 1.18 2004/08/23 14:29:23 dtucker Exp $");
26 26
27#include <openssl/evp.h> 27#include <openssl/evp.h>
28#include <openssl/rand.h> 28#include <openssl/rand.h>
@@ -151,7 +151,8 @@ main(int argc, char **argv)
151 key_fd[0] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY); 151 key_fd[0] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
152 key_fd[1] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY); 152 key_fd[1] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
153 153
154 if ((pw = getpwuid(getuid())) == NULL) 154 original_real_uid = getuid(); /* XXX readconf.c needs this */
155 if ((pw = getpwuid(original_real_uid)) == NULL)
155 fatal("getpwuid failed"); 156 fatal("getpwuid failed");
156 pw = pwcopy(pw); 157 pw = pwcopy(pw);
157 158
@@ -166,7 +167,6 @@ main(int argc, char **argv)
166#endif 167#endif
167 168
168 /* verify that ssh-keysign is enabled by the admin */ 169 /* verify that ssh-keysign is enabled by the admin */
169 original_real_uid = getuid(); /* XXX readconf.c needs this */
170 initialize_options(&options); 170 initialize_options(&options);
171 (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", &options, 0); 171 (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", &options, 0);
172 fill_default_options(&options); 172 fill_default_options(&options);