summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtucker <dtucker>2004-08-29 06:32:59 +0000
committerdtucker <dtucker>2004-08-29 06:32:59 +0000
commit3bb474cd77c5212b225e3cac40d969116bc92b29 (patch)
tree2d2222e8c8a9f4b11c0e5a7278113e1b038aaf73
parent641baa73064d7d4c6aa1777986c64c8ee4505fc6 (diff)
downloadopenssh-3bb474cd77c5212b225e3cac40d969116bc92b29.tar.gz
- dtucker@cvs.openbsd.org 2004/08/23 14:29:23
[ssh-keysign.c] Remove duplicate getuid(), suggested by & ok markus@
-rw-r--r--ChangeLog5
-rw-r--r--ssh-keysign.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bc17d1fe..9cf5c031 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 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);