From d86271732828117d32270e9f7b3d128d77e9fa57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B6ren=20Tempel?= Date: Mon, 24 Aug 2015 22:16:48 +0200 Subject: [PATCH] login: don't print motd if .hushlogin exists in users home MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit function old new delta login_main 978 996 +18 Signed-off-by: Sören Tempel Signed-off-by: Denys Vlasenko --- loginutils/login.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loginutils/login.c b/loginutils/login.c index b9d910331..1700cfcb5 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -489,7 +489,8 @@ int login_main(int argc UNUSED_PARAM, char **argv) } #endif - motd(); + if (access(".hushlogin", F_OK) != 0) + motd(); if (pw->pw_uid == 0) syslog(LOG_INFO, "root login%s", fromhost); -- 2.25.1