[patch] ssh.c load_public_identity_files calls getpwuid twice without

This is a discussion on [patch] ssh.c load_public_identity_files calls getpwuid twice without within the OpenSSH Development forums, part of the Networking and Network Related category; Hi, getpwuid is called as seen in the patch, and is then called again indirectly by tilde_expand_filename without first copying ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-18-2007
Toby Butzon
 
Posts: n/a
Default [patch] ssh.c load_public_identity_files calls getpwuid twice without

Hi,

getpwuid is called as seen in the patch, and is then called again
indirectly by tilde_expand_filename without first copying off the
results from the first call.

This is fatal on MacOSX (and it would seem it should be fatal elsewhere, too).

Please CC me in replies; I'm not a subscriber.

--- openssh-4.4p1/ssh.c 2006-09-01 22:32:40.000000000 -0700
+++ openssh-4.4p1-fix/ssh.c 2007-10-17 10:23:07.000000000 -0700
@@ -1252,6 +1252,7 @@
#endif /* SMARTCARD */
if ((pw = getpwuid(original_real_uid)) == NULL)
fatal("load_public_identity_files: getpwuid failed");
+ pw = pwcopy(pw);
if (gethostname(thishost, sizeof(thishost)) == -1)
fatal("load_public_identity_files: gethostname: %s",
strerror(errno));


--
Toby Butzon
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0