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@xxxxxxxxx> --- login-utils/su-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 9bf0971b2..e671d822b 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -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 -- 2.24.0