Ignore non-absolute $HOME when started from native process
* uinfo.cc (cygheap_user::ontherange): Ignore $HOME if it's not starting with a slash (aka, absolute POSIX Path). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -331,8 +331,15 @@ cygheap_user::ontherange (homebodies what, struct passwd *pw)
|
||||
char *p;
|
||||
|
||||
if ((p = getenv ("HOME")))
|
||||
debug_printf ("HOME is already in the environment %s", p);
|
||||
else
|
||||
{
|
||||
debug_printf ("HOME is already in the environment %s", p);
|
||||
if (p[0] != '/')
|
||||
{
|
||||
p = NULL;
|
||||
debug_printf ("discard HOME, no absolute POSIX path");
|
||||
}
|
||||
}
|
||||
if (!p)
|
||||
{
|
||||
if (pw && pw->pw_dir && *pw->pw_dir)
|
||||
{
|
||||
|
Reference in New Issue
Block a user