diff options
-rw-r--r-- | source3/passdb/pdb_ads.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 0811082e84..4bd0b89d6d 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -258,6 +258,7 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state, struct samu *sam) { bool ret = true; + DATA_BLOB blob; /* TODO: All fields :-) */ @@ -265,13 +266,13 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state, existing, mem_ctx, pnum_mods, pmods, "displayName", "%s", pdb_get_fullname(sam)); - ret &= tldap_make_mod_blob( - existing, mem_ctx, pnum_mods, pmods, "unicodePwd", - data_blob_const(pdb_get_nt_passwd(sam), NT_HASH_LEN)); + 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); - ret &= tldap_make_mod_blob( - existing, mem_ctx, pnum_mods, pmods, "dBCSPwd", - 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); ret &= tldap_make_mod_fmt( existing, mem_ctx, pnum_mods, pmods, "userAccountControl", |