summaryrefslogtreecommitdiffstats
path: root/source/smbd/chgpasswd.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-29 07:15:51 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-29 07:15:51 +0000
commita8971a5448cf6d203b379c3ed01e331d5263c9ee (patch)
tree35b5fe50170957985266c7457c7b0f7c057888ba /source/smbd/chgpasswd.c
parentd93488b953337890a17de124f88cf2066f733c40 (diff)
downloadsamba-a8971a5448cf6d203b379c3ed01e331d5263c9ee.tar.gz
samba-a8971a5448cf6d203b379c3ed01e331d5263c9ee.tar.xz
samba-a8971a5448cf6d203b379c3ed01e331d5263c9ee.zip
This commit is number 1 of 4.
In particular this commit focusses on: Adding the new 'pass changed now' helper function. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated.
Diffstat (limited to 'source/smbd/chgpasswd.c')
-rw-r--r--source/smbd/chgpasswd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c
index d2ee2f46faa..49f87a4ca11 100644
--- a/source/smbd/chgpasswd.c
+++ b/source/smbd/chgpasswd.c
@@ -682,6 +682,12 @@ BOOL change_lanman_password(SAM_ACCOUNT *sampass, uchar * pass1,
return False; /* We lose the NT hash. Sorry. */
}
+ if (!pdb_set_pass_changed_now (sampass)) {
+ pdb_free_sam(&sampass);
+ /* Not quite sure what this one qualifies as, but this will do */
+ return False;
+ }
+
/* Now flush the sam_passwd struct to persistent storage */
become_root();
ret = pdb_update_sam_account (sampass, False);