[Bug 623] ssh, ssh-keygen and possibly others do not honour $HOME
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Sun Aug 10 17:19:48 EST 2003
http://bugzilla.mindrot.org/show_bug.cgi?id=623
------- Additional Comments From dtucker at zip.com.au 2003-08-10 17:19 -------
For a start, you don't need to malloc memory for or strdup the result of
getenv, as it just returns a pointer to the environment space. Instead of:
original_user_home_dir=(char *)malloc(sizeof(char)*200);
original_user_home_dir = getenv("HOME");
pw->pw_dir = xstrdup(original_user_home_dir);
you can just have:
pw->pw_dir = getenv("HOME");
I don't know that this patch is a good idea, though (auth.c also uses
tilde_expand_filename and there's probably no environment when it's called and
you shouldn't trust it even if there was).
I do agree that the man page for ssh-keygen is a little misleading.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-bugs
mailing list