summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-02 20:17:10 +0000
committerJeremy Allison <jra@samba.org>2002-01-02 20:17:10 +0000
commita6148cb95ed417c5a4d5d6616d697a403c5dc44c (patch)
treea0a172234ec90e2d7ea74a4869549f27d139ffd1
parent28f289a4725b7ba4e5b764765475f8ee3b1b7f29 (diff)
downloadsamba-a6148cb95ed417c5a4d5d6616d697a403c5dc44c.tar.gz
samba-a6148cb95ed417c5a4d5d6616d697a403c5dc44c.tar.xz
samba-a6148cb95ed417c5a4d5d6616d697a403c5dc44c.zip
Ensure last changed times are updated.
Jeremy.
-rw-r--r--source/passdb/passdb.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c
index 027972d4df8..a133f14b55b 100644
--- a/source/passdb/passdb.c
+++ b/source/passdb/passdb.c
@@ -913,6 +913,9 @@ account without a valid local system user.\n", user_name);
}
}
+ /* Remember to set the "last changed time". */
+ pdb_set_pass_last_set_time(sam_pass, time(NULL));
+
if (pdb_add_sam_account(sam_pass)) {
slprintf(msg_str, msg_str_len-1, "Added user %s.\n", user_name);
pdb_free_sam(sam_pass);
@@ -944,7 +947,6 @@ account without a valid local system user.\n", user_name);
pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)&(~ACB_DISABLED));
} else if (local_flags & LOCAL_SET_NO_PASSWORD) {
pdb_set_acct_ctrl (sam_pass, pdb_get_acct_ctrl(sam_pass)|ACB_PWNOTREQ);
-
/* This is needed to preserve ACB_PWNOTREQ in mod_smbfilepwd_entry */
if (!pdb_set_lanman_passwd (sam_pass, NULL)) {
pdb_free_sam(sam_pass);
@@ -1589,6 +1591,9 @@ BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, uint8 *pwd)
if (!sampass)
return False;
+ /* Remember to set the "last changed time". */
+ pdb_set_pass_last_set_time(sampass, time(NULL));
+
if (!pwd) {
/* Allow setting to NULL */
SAFE_FREE(sampass->nt_pw);
@@ -1617,6 +1622,9 @@ BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, uint8 *pwd)
if (!sampass)
return False;
+ /* Remember to set the "last changed time". */
+ pdb_set_pass_last_set_time(sampass, time(NULL));
+
if (!pwd) {
/* Allow setting to NULL */
SAFE_FREE(sampass->lm_pw);