Bug 4215 - PAM_pwdb formats error message incorrectly
Summary: PAM_pwdb formats error message incorrectly
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pam
Version: 6.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-07-27 11:27 UTC by Göran Uddeborg
Modified: 2008-05-01 15:37 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 1999-08-27 23:11:48 UTC


Attachments (Terms of Use)

Description Göran Uddeborg 1999-07-27 11:27:41 UTC
As reported in bug #3029, it is not possible to log in as a
user with empty password.

Furthermore, the error message printed in this case is
incorrect.  PAM_pwdb uses the function pwdb_strerror() to
format the error message, but the error code is a PAM code,
not a PWDB code, so the correct function is pam_strerror().

I suggest the following patch:

*** support.-c~ Thu Apr  8 03:19:52 1999
--- support.-c  Mon Jul 26 17:14:17 1999
***************
*** 464,470 ****
            retval = pwdb_run_helper_binary(pamh, p);
        } else {
            retval = PAM_AUTHINFO_UNAVAIL;
!           _log_err(LOG_ALERT, "get passwd; %s",
pwdb_strerror(retval));
        }
        (void) pwdb_delete(&pw);
        p = NULL;
--- 464,470 ----
            retval = pwdb_run_helper_binary(pamh, p);
        } else {
            retval = PAM_AUTHINFO_UNAVAIL;
!           _log_err(LOG_ALERT, "get passwd; %s",
pam_strerror(pamh, retval));
        }
        (void) pwdb_delete(&pw);
        p = NULL;

Comment 1 Cristian Gafton 1999-08-27 23:11:59 UTC
This should be fixed in pam-0.68-3 and later


Note You need to log in before you can comment on or make changes to this bug.