su: silence a useless warning
When the requested shell matches the restricted shell, there is no reason to issue a warning, since we will be doing precisely as requested. Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
This commit is contained in:
parent
62dc77f3a2
commit
1c788737d7
|
@ -1149,6 +1149,7 @@ int su_main(int argc, char **argv, int mode)
|
|||
shell = getenv("SHELL");
|
||||
|
||||
if (shell
|
||||
&& strcmp(shell, su->pwd->pw_shell)
|
||||
&& getuid() != 0
|
||||
&& is_restricted_shell(su->pwd->pw_shell)) {
|
||||
/* The user being su'd to has a nonstandard shell, and
|
||||
|
|
Loading…
Reference in New Issue