summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ssh-keysign.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bc17d1fe0..9cf5c0313 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,9 @@
13 [ssh-keysign.c ssh.c] 13 [ssh-keysign.c ssh.c]
14 Use permanently_set_uid() in ssh and ssh-keysign for consistency, matches 14 Use permanently_set_uid() in ssh and ssh-keysign for consistency, matches
15 change in Portable; ok markus@ (CVS ID sync only) 15 change in Portable; ok markus@ (CVS ID sync only)
16 - dtucker@cvs.openbsd.org 2004/08/23 14:29:23
17 [ssh-keysign.c]
18 Remove duplicate getuid(), suggested by & ok markus@
16 19
1720040828 2020040828
18 - (dtucker) [openbsd-compat/mktemp.c] Remove superfluous Cygwin #ifdef; from 21 - (dtucker) [openbsd-compat/mktemp.c] Remove superfluous Cygwin #ifdef; from
@@ -1680,4 +1683,4 @@
1680 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 1683 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
1681 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 1684 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
1682 1685
1683$Id: ChangeLog,v 1.3525 2004/08/29 06:31:28 dtucker Exp $ 1686$Id: ChangeLog,v 1.3526 2004/08/29 06:32:59 dtucker Exp $
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);