From: Jouke Witteveen Date: Fri, 6 Dec 2019 10:06:03 +0000 (+0100) Subject: su: silence a useless warning X-Git-Tag: v2.35-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c788737d74d43e726842a76ed195191946929ca;p=thirdparty%2Futil-linux.git 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 --- diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 9bf0971b29..e671d822b0 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