aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2009-09-25 01:50:45 +0200
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2009-09-25 01:50:45 +0200
commitc297ea97e288da16216d5c121ddefa7b61923847 (patch)
treeca20c1e56535f1a623106ae48e059b020ccb2d40 /loginutils
parent21d87d495a78f9207d643a5bf99061d4401370ef (diff)
downloadbusybox-c297ea97e288da16216d5c121ddefa7b61923847.tar.gz
busybox-c297ea97e288da16216d5c121ddefa7b61923847.tar.bz2
login: log PAM errors to syslog, not stderr
By Ian Wienand (ianw AT vmware.com) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-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 */