env.cpp: allow all users to change $USER and $HOME

Closes 1425 (https://github.com/fish-shell/fish-shell/issues/1425)
This commit is contained in:
David Adam 2014-06-28 19:16:29 +08:00
parent ed5e585684
commit 1cfd055f82

10
env.cpp
View file

@ -484,16 +484,6 @@ void env_init(const struct config_paths_t *paths /* or NULL */)
env_read_only.insert(ro_keys[i]);
}
/*
HOME and USER should be writeable by root, since this can be a
convenient way to install software.
*/
if (getuid() != 0)
{
env_read_only.insert(L"HOME");
env_read_only.insert(L"USER");
}
/*
Names of all dynamically calculated variables
*/