From 38da6ae394a4b2f18e210369562928dc0e404f54 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 20 Dec 2000 05:15:05 +0000 Subject: Relevant BUGIDs: 126431, 126423 Purpose of commit: new feature / bugfix Commit summary: --------------- This changes the format of pam_unix log messages, per bug 126423. The change is extensive (every call to _log_err() now has an additional argument) but straightforward. These changes to the logging code incidentally fix the problem reported in bug 126431. --- modules/pam_unix/pam_unix_auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/pam_unix/pam_unix_auth.c') diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c index bec9d99f..f08ea515 100644 --- a/modules/pam_unix/pam_unix_auth.c +++ b/modules/pam_unix/pam_unix_auth.c @@ -101,7 +101,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags D(("called.")); - ctrl = _set_ctrl(flags, NULL, argc, argv); + ctrl = _set_ctrl(pamh, flags, NULL, argc, argv); /* Get a few bytes so we can pass our return value to pam_sm_setcred(). */ @@ -118,7 +118,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags * alphanumeric character. */ if (name == NULL || !isalnum(*name)) { - _log_err(LOG_ERR, "bad username [%s]", name); + _log_err(LOG_ERR, pamh, "bad username [%s]", name); retval = PAM_USER_UNKNOWN; AUTH_RETURN } @@ -150,7 +150,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags ,_UNIX_AUTHTOK, &p); if (retval != PAM_SUCCESS) { if (retval != PAM_CONV_AGAIN) { - _log_err(LOG_CRIT, "auth could not identify password for [%s]" + _log_err(LOG_CRIT, pamh, "auth could not identify password for [%s]" ,name); } else { D(("conversation function is not ready yet")); @@ -194,7 +194,7 @@ PAM_EXTERN int pam_sm_setcred(pam_handle_t * pamh, int flags only argument we need is UNIX_LIKE_AUTH: if it was set, pam_get_data will succeed. If it wasn't, it will fail, and we return PAM_SUCCESS. -SRL */ - ctrl = _set_ctrl(flags, NULL, argc, argv); + ctrl = _set_ctrl(pamh, flags, NULL, argc, argv); retval = PAM_SUCCESS; if (on(UNIX_LIKE_AUTH, ctrl)) { -- cgit v1.2.3