- dtucker@cvs.openbsd.org 2004/08/23 14:29:23
[ssh-keysign.c]
Remove duplicate getuid(), suggested by & ok markus@
diff --git a/ChangeLog b/ChangeLog
index bc17d1f..9cf5c03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,9 @@
[ssh-keysign.c ssh.c]
Use permanently_set_uid() in ssh and ssh-keysign for consistency, matches
change in Portable; ok markus@ (CVS ID sync only)
+ - dtucker@cvs.openbsd.org 2004/08/23 14:29:23
+ [ssh-keysign.c]
+ Remove duplicate getuid(), suggested by & ok markus@
20040828
- (dtucker) [openbsd-compat/mktemp.c] Remove superfluous Cygwin #ifdef; from
@@ -1680,4 +1683,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3525 2004/08/29 06:31:28 dtucker Exp $
+$Id: ChangeLog,v 1.3526 2004/08/29 06:32:59 dtucker Exp $
diff --git a/ssh-keysign.c b/ssh-keysign.c
index 1b1149a..04597a9 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 @@
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 @@
#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);