summaryrefslogtreecommitdiff
path: root/source3/pam_smbpass/pam_smb_auth.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-30 05:21:16 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-30 05:21:16 +0000
commit15741d2fe4bafee9100feca2bbf3c133421a2e88 (patch)
tree72aee2a1d542bd78322d19010e374b415b137dd2 /source3/pam_smbpass/pam_smb_auth.c
parent160950ae0ec718a4d6ef9932ae2ff175fc8ebbd6 (diff)
downloadsamba-15741d2fe4bafee9100feca2bbf3c133421a2e88.tar.gz
samba-15741d2fe4bafee9100feca2bbf3c133421a2e88.tar.bz2
samba-15741d2fe4bafee9100feca2bbf3c133421a2e88.zip
Fix up smbpasswd -e/-d so that it doesn't change the password under you any
more. (Previously it set them to 'XXXX' or similar when only the flags were being changed - a bug I must have introduced when I reworked the passdb end of things a few weeks back.) Adds a new local flag: LOCAL_SET_PASSWORD to specify that the password is actually to be changed. Andrew Bartlett (This used to be commit cea6b6cb228c7e1f0c2d45951590e0d8fb8b315c)
Diffstat (limited to 'source3/pam_smbpass/pam_smb_auth.c')
-rw-r--r--source3/pam_smbpass/pam_smb_auth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/pam_smbpass/pam_smb_auth.c b/source3/pam_smbpass/pam_smb_auth.c
index 3126bebb34..8279915077 100644
--- a/source3/pam_smbpass/pam_smb_auth.c
+++ b/source3/pam_smbpass/pam_smb_auth.c
@@ -187,7 +187,7 @@ static int _smb_add_user(pam_handle_t *pamh, unsigned int ctrl,
/* Add the user to the db if they aren't already there. */
if (smb_pwent == NULL) {
- retval = local_password_change( name, LOCAL_ADD_USER,
+ retval = local_password_change( name, LOCAL_ADD_USER|LOCAL_SET_PASSWORD,
pass, err_str,
sizeof(err_str),
msg_str, sizeof(msg_str) );
@@ -209,7 +209,7 @@ static int _smb_add_user(pam_handle_t *pamh, unsigned int ctrl,
/* Change the user's password IFF it's null. */
if (smb_pwent->smb_passwd == NULL && (smb_pwent->acct_ctrl & ACB_PWNOTREQ))
{
- retval = local_password_change( name, 0,
+ retval = local_password_change( name, LOCAL_SET_PASSWORD,
pass, err_str,
sizeof(err_str),
msg_str, sizeof(msg_str) );