* src/su.c, man/su.1.xml: The default behavior (without -p or
--login) is to copy most of the environment variables. Revert a previous change and update the documentation.
This commit is contained in:
4
src/su.c
4
src/su.c
@ -559,8 +559,7 @@ int main (int argc, char **argv)
|
||||
* (note: in the case of a subsystem, the shell will be restricted,
|
||||
* and this won't be executed on the first pass)
|
||||
*/
|
||||
if (change_environment) {
|
||||
if (fakelogin) {
|
||||
if (change_environment && fakelogin) {
|
||||
/*
|
||||
* The terminal type will be left alone if it is present in
|
||||
* the environment already.
|
||||
@ -610,7 +609,6 @@ int main (int argc, char **argv)
|
||||
if (NULL != cp) {
|
||||
addenv ("XAUTHORITY", cp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (NULL != *envp) {
|
||||
addenv (*envp, NULL);
|
||||
|
Reference in New Issue
Block a user