summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_get_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/pdb_get_set.c')
-rw-r--r--source3/passdb/pdb_get_set.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 4a5a5759d4..9248fc1f8f 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -933,7 +933,11 @@ BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, const uint8 pwd[NT_HASH_LEN], enum
data_blob_clear_free(&sampass->private.nt_pw);
- sampass->private.nt_pw = data_blob(pwd, NT_HASH_LEN);
+ if (pwd) {
+ sampass->private.nt_pw = data_blob(pwd, NT_HASH_LEN);
+ } else {
+ sampass->private.nt_pw = data_blob(NULL, 0);
+ }
return pdb_set_init_flags(sampass, PDB_NTPASSWD, flag);
}
@@ -949,7 +953,11 @@ BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, const uint8 pwd[LM_HASH_LEN],
data_blob_clear_free(&sampass->private.lm_pw);
- sampass->private.lm_pw = data_blob(pwd, LM_HASH_LEN);
+ if (pwd) {
+ sampass->private.lm_pw = data_blob(pwd, LM_HASH_LEN);
+ } else {
+ sampass->private.lm_pw = data_blob(NULL, 0);
+ }
return pdb_set_init_flags(sampass, PDB_LMPASSWD, flag);
}