summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-02-12 17:52:15 +0000
committerGerald Carter <jerry@samba.org>2004-02-12 17:52:15 +0000
commit9eb5c835f1ba71fb458ea057cc3c79330f69184b (patch)
tree9c8439722479de25b0dff1f8fad56ed07732f675
parent4bfc270e088b8b17f27a162cdcafe9848e54ada0 (diff)
downloadsamba-9eb5c835f1ba71fb458ea057cc3c79330f69184b.tar.gz
samba-9eb5c835f1ba71fb458ea057cc3c79330f69184b.tar.bz2
samba-9eb5c835f1ba71fb458ea057cc3c79330f69184b.zip
abartlet's pdb_set/changed flag fix for NULL passwords
(This used to be commit 3b373cd15d17ab495f86c8b3b219d965b5aff606)
-rw-r--r--source3/passdb/pdb_interface.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 91f790711e..5b97c5fbad 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -61,13 +61,13 @@ static void pdb_force_pw_initialization(SAM_ACCOUNT *pass)
{
lm_pwd = pdb_get_lanman_passwd(pass);
if (lm_pwd)
- pdb_set_lanman_passwd(pass, NULL, PDB_SET);
+ pdb_set_lanman_passwd(pass, NULL, PDB_CHANGED);
}
if (pdb_get_init_flags(pass, PDB_NTPASSWD) != PDB_DEFAULT)
{
nt_pwd = pdb_get_nt_passwd(pass);
if (nt_pwd)
- pdb_set_nt_passwd(pass, NULL, PDB_SET);
+ pdb_set_nt_passwd(pass, NULL, PDB_CHANGED);
}
}
@@ -828,8 +828,7 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT *sam_acct)
acb_flags = pdb_get_acct_ctrl( sam_acct );
if ( !lm_pw && !nt_pw && !(acb_flags&ACB_PWNOTREQ) ) {
acb_flags |= ACB_DISABLED;
- pdb_set_acct_ctrl( sam_acct, acb_flags, PDB_SET );
- pdb_set_init_flags(sam_acct, PDB_ACCTCTRL, PDB_SET);
+ pdb_set_acct_ctrl( sam_acct, acb_flags, PDB_CHANGED );
}
return NT_STATUS_IS_OK(pdb_context->pdb_add_sam_account(pdb_context, sam_acct));
@@ -853,8 +852,7 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT *sam_acct)
acb_flags = pdb_get_acct_ctrl( sam_acct );
if ( !lm_pw && !nt_pw && !(acb_flags&ACB_PWNOTREQ) ) {
acb_flags |= ACB_DISABLED;
- pdb_set_acct_ctrl( sam_acct, acb_flags, PDB_SET );
- pdb_set_init_flags(sam_acct, PDB_ACCTCTRL, PDB_SET);
+ pdb_set_acct_ctrl( sam_acct, acb_flags, PDB_CHANGED );
}
return NT_STATUS_IS_OK(pdb_context->pdb_update_sam_account(pdb_context, sam_acct));