1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Only set the password if there is one

This commit is contained in:
Volker Lendecke 2009-06-24 12:39:21 +02:00
parent 46167c1d1b
commit e3fb71dac8

View File

@ -267,12 +267,16 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
"%s", pdb_get_fullname(sam)); "%s", pdb_get_fullname(sam));
blob = data_blob_const(pdb_get_nt_passwd(sam), NT_HASH_LEN); blob = data_blob_const(pdb_get_nt_passwd(sam), NT_HASH_LEN);
if (blob.data != NULL) {
ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE, ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
"unicodePwd", 1, &blob); "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);
if (blob.data != NULL) {
ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE, ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
"dBCSPwd", 1, &blob); "dBCSPwd", 1, &blob);
}
ret &= tldap_make_mod_fmt( ret &= tldap_make_mod_fmt(
existing, mem_ctx, pnum_mods, pmods, "userAccountControl", existing, mem_ctx, pnum_mods, pmods, "userAccountControl",