mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 05:37:10 +08:00
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:
parent
ed5e585684
commit
1cfd055f82
10
env.cpp
10
env.cpp
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user