diff options
author | Stanislav Brabec | 2019-01-10 01:28:54 +0100 |
---|---|---|
committer | Karel Zak | 2019-01-10 12:26:38 +0100 |
commit | 86f42e5a2a9d8a483ad0ca85fdf090172fb4d385 (patch) | |
tree | 084902943111cabee7202c09b391b4348acf527c /login-utils/su-common.c | |
parent | su-common.c: prefer /etc/default/su over login.defs (diff) | |
download | kernel-qcow2-util-linux-86f42e5a2a9d8a483ad0ca85fdf090172fb4d385.tar.gz kernel-qcow2-util-linux-86f42e5a2a9d8a483ad0ca85fdf090172fb4d385.tar.xz kernel-qcow2-util-linux-86f42e5a2a9d8a483ad0ca85fdf090172fb4d385.zip |
su-common.c: prefer ENV_SUPATH over ENV_ROOTPATH
ENV_SUPATH and ENV_ROOTPATH are equivalent and ENV_ROOTPATH takes
precedence in both login and su. It makes no sense. More logical would be
precedence of ENV_SUPATH in su and ENV_ROOTPATH in login.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'login-utils/su-common.c')
-rw-r--r-- | login-utils/su-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 19074247c..0e44eb87c 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -989,8 +989,8 @@ static void setenv_path(const struct passwd *pw) if (pw->pw_uid) rc = logindefs_setenv("PATH", "ENV_PATH", _PATH_DEFPATH); - else if ((rc = logindefs_setenv("PATH", "ENV_ROOTPATH", NULL)) != 0) - rc = logindefs_setenv("PATH", "ENV_SUPATH", _PATH_DEFPATH_ROOT); + else if ((rc = logindefs_setenv("PATH", "ENV_SUPATH", NULL)) != 0) + rc = logindefs_setenv("PATH", "ENV_ROOTPATH", _PATH_DEFPATH_ROOT); if (rc) err(EXIT_FAILURE, _("failed to set the PATH environment variable")); |