struct samr_CryptPassword *pwbuf = r->in.password;
void *sam_ctx;
const char *user_dn, *domain_dn;
- int ret;
+ int ret, i;
struct ldb_message **res, mod;
const char * const attrs[] = { "objectSid", "lmPwdHash", NULL };
const char *domain_sid;
return status;
}
+ /* mark all the message elements as LDB_FLAG_MOD_REPLACE */
+ for (i=0;i<mod.num_elements;i++) {
+ mod.elements[i].flags = LDB_FLAG_MOD_REPLACE;
+ }
+
/* modify the samdb record */
ret = samdb_modify(sam_ctx, mem_ctx, &mod);
if (ret != 0) {