git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
46167c1
)
Only set the password if there is one
author
Volker Lendecke
<vl@samba.org>
Wed, 24 Jun 2009 10:39:21 +0000
(12:39 +0200)
committer
Volker Lendecke
<vl@samba.org>
Wed, 24 Jun 2009 14:30:55 +0000
(16:30 +0200)
source3/passdb/pdb_ads.c
patch
|
blob
|
history
diff --git
a/source3/passdb/pdb_ads.c
b/source3/passdb/pdb_ads.c
index d7a5db6b03d323517d7f266de44f006536217b74..f4ab29984460e1e49a70c990f12f808986a6ed4f 100644
(file)
--- a/
source3/passdb/pdb_ads.c
+++ b/
source3/passdb/pdb_ads.c
@@
-267,12
+267,16
@@
static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
"%s", pdb_get_fullname(sam));
blob = data_blob_const(pdb_get_nt_passwd(sam), NT_HASH_LEN);
"%s", pdb_get_fullname(sam));
blob = data_blob_const(pdb_get_nt_passwd(sam), NT_HASH_LEN);
- ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
- "unicodePwd", 1, &blob);
+ if (blob.data != NULL) {
+ ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
+ "unicodePwd", 1, &blob);
+ }
blob = data_blob_const(pdb_get_lanman_passwd(sam), NT_HASH_LEN);
blob = data_blob_const(pdb_get_lanman_passwd(sam), NT_HASH_LEN);
- ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
- "dBCSPwd", 1, &blob);
+ if (blob.data != NULL) {
+ ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
+ "dBCSPwd", 1, &blob);
+ }
ret &= tldap_make_mod_fmt(
existing, mem_ctx, pnum_mods, pmods, "userAccountControl",
ret &= tldap_make_mod_fmt(
existing, mem_ctx, pnum_mods, pmods, "userAccountControl",