aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-25 01:50:45 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-25 01:50:45 +0200
commitc297ea97e288da16216d5c121ddefa7b61923847 (patch)
treeca20c1e56535f1a623106ae48e059b020ccb2d40
parent21d87d495a78f9207d643a5bf99061d4401370ef (diff)
downloadbusybox-c297ea97e288da16216d5c121ddefa7b61923847.tar.gz
login: log PAM errors to syslog, not stderr
By Ian Wienand (ianw AT vmware.com) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--loginutils/login.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 31b25a43e..ed2ab7f80 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -409,7 +409,9 @@ int login_main(int argc UNUSED_PARAM, char **argv)
break; /* success, continue login process */
pam_auth_failed:
- bb_error_msg("pam_%s call failed: %s (%d)", failed_msg,
+ /* syslog, because we don't want potential attacker
+ * to know _why_ login failed */
+ syslog(LOG_WARNING, "pam_%s call failed: %s (%d)", failed_msg,
pam_strerror(pamh, pamret), pamret);
safe_strncpy(username, "UNKNOWN", sizeof(username));
#else /* not PAM */