summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-05-22 11:00:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-05-22 11:00:00 +0000
commit2e379a5a7f6ccf07dc2da92bff26f459e419a072 (patch)
treefd397667ecdd9a87920ec23aad42ec5ea87ca82d /modules
parentafbe3972c4be732565792582171099cf081e41e9 (diff)
pam_localuser: downgrade syslog level for errors related to user input
* modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Downgrade the syslog level for errors related to pam_get_user from LOG_ERR to LOG_NOTICE. Suggested-by: Tomáš Mráz <tmraz@fedoraproject.org>
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_localuser/pam_localuser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/pam_localuser/pam_localuser.c b/modules/pam_localuser/pam_localuser.c
index 97a623f7..a9fbb64e 100644
--- a/modules/pam_localuser/pam_localuser.c
+++ b/modules/pam_localuser/pam_localuser.c
@@ -88,17 +88,17 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
/* Obtain the user name. */
if ((ret = pam_get_user(pamh, &user, NULL)) != PAM_SUCCESS) {
- pam_syslog (pamh, LOG_ERR, "cannot determine user name");
+ pam_syslog(pamh, LOG_NOTICE, "cannot determine user name");
return ret == PAM_CONV_AGAIN ? PAM_INCOMPLETE : ret;
}
if ((user_len = strlen(user)) == 0) {
- pam_syslog (pamh, LOG_ERR, "user name not valid");
+ pam_syslog(pamh, LOG_NOTICE, "user name is not valid");
return PAM_SERVICE_ERR;
}
if (user_len > sizeof(line) - sizeof(":")) {
- pam_syslog (pamh, LOG_ERR, "user name too long");
+ pam_syslog(pamh, LOG_NOTICE, "user name is too long");
return PAM_SERVICE_ERR;
}