bin/74929: DES/BLF login.conf classes not working with passwd
Stephen P. Cravey
cravey at gotbrains.org
Sun Jun 26 04:20:20 GMT 2005
The following reply was made to PR bin/74929; it has been noted by GNATS.
From: "Stephen P. Cravey" <cravey at gotbrains.org>
To: "Mahlon E. Smith" <mahlon at martini.nu>
Cc: bug-followup at FreeBSD.org
Subject: Re: bin/74929: DES/BLF login.conf classes not working with passwd
Date: Sat, 25 Jun 2005 23:13:45 -0500
The problem seems to be that the pam_sm_chauthtok function in the
pam_unix module only checks forthe password format for the default login
class (or the first in the file?)
Try this:
cd /usr/src/lib/libpam/modules/pam_unix
fetch http://www.cravey.org/patches/pam_unix.c.diff.200506252305
patch < pam_unix.c.diff.200506252305
make && make install
Then try to use passwd.
Please test as user and as root. Also, make sure that other classed work
against the default properly.
By applying the patch again, 'patch' will assume you want to reverse the
damage and wil revert the source file. then you can re-make and
everything should go back to normal.
This should apply cleanly to (I think) 5.3 and up.
-Stephen
--- pam_unix.c~ Tue Feb 10 04:13:21 2004
+++ pam_unix.c Sat Jun 25 22:34:53 2005
@@ -372,7 +372,7 @@
return (PAM_BUF_ERR);
pwd->pw_change = 0;
- lc = login_getclass(NULL);
+ lc = login_getclass(pwd->pw_class);
if (login_setcryptfmt(lc, password_hash, NULL) == NULL)
openpam_log(PAM_LOG_ERROR,
"can't set password cipher, relying on
default");
More information about the freebsd-bugs
mailing list