summaryrefslogtreecommitdiffstats
path: root/source/pam_smbpass
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-04-06 11:27:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:07 -0500
commit673c3f8bc0343cce293bacbf0773212b53182d1d (patch)
treec4ba63c1a844cf42651c6113e163db55d39d6e15 /source/pam_smbpass
parent70fd78025b04062104fec36691efcd1b01252d03 (diff)
downloadsamba-673c3f8bc0343cce293bacbf0773212b53182d1d.tar.gz
samba-673c3f8bc0343cce293bacbf0773212b53182d1d.tar.xz
samba-673c3f8bc0343cce293bacbf0773212b53182d1d.zip
r75: patch from Cal Heldenbrand <calzplace@yahoo.com> for 'pam_smbpass migrate'
Diffstat (limited to 'source/pam_smbpass')
-rw-r--r--source/pam_smbpass/pam_smb_auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pam_smbpass/pam_smb_auth.c b/source/pam_smbpass/pam_smb_auth.c
index 4452538d32c..d0dca6fa920 100644
--- a/source/pam_smbpass/pam_smb_auth.c
+++ b/source/pam_smbpass/pam_smb_auth.c
@@ -217,10 +217,10 @@ static int _smb_add_user(pam_handle_t *pamh, unsigned int ctrl,
return PAM_IGNORE;
}
else {
- /* Change the user's password IFF it's null. */
- if ((pdb_get_lanman_passwd(sampass) == NULL) && (pdb_get_acct_ctrl(sampass) & ACB_PWNOTREQ))
+ /* mimick 'update encrypted' as long as the 'no pw req' flag is not set */
+ if ( pdb_get_acct_ctrl(sampass) & ~ACB_PWNOTREQ )
{
- retval = local_password_change( name, 0, pass, err_str, sizeof(err_str),
+ retval = local_password_change( name, LOCAL_SET_PASSWORD, pass, err_str, sizeof(err_str),
msg_str, sizeof(msg_str) );
if (!retval && *err_str)
{