diff options
author | Gerald Carter <jerry@samba.org> | 2004-01-29 20:16:34 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-01-29 20:16:34 +0000 |
commit | 90c2090116606cd1ac817a238b60a8321d67fa5d (patch) | |
tree | f30fef11b7f27cca2ccea594d2090234530d4518 /source3/passdb/pdb_get_set.c | |
parent | 5ef984bd52ad1d467bec9f2b06ebecbba4d2f3ca (diff) | |
download | samba-90c2090116606cd1ac817a238b60a8321d67fa5d.tar.gz samba-90c2090116606cd1ac817a238b60a8321d67fa5d.tar.bz2 samba-90c2090116606cd1ac817a238b60a8321d67fa5d.zip |
merge from 3.0
(This used to be commit 77335cc5bce46ab3498f9401099f110b0e5506c1)
Diffstat (limited to 'source3/passdb/pdb_get_set.c')
-rw-r--r-- | source3/passdb/pdb_get_set.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index 11df0ad56d..869165f1dc 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -925,7 +925,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); } @@ -941,7 +945,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); } |