g->cleartext_utf16->length);
}
- if (g->cleartext_utf8 &&
- lp_lanman_auth(ldb_get_opaque(ldb, "loadparm"))) {
+ if (g->cleartext_utf8) {
struct samr_Password *lm_hash;
lm_hash = talloc(io->ac, struct samr_Password);
return ret;
}
- ret = setup_lm_fields(io);
- if (ret != LDB_SUCCESS) {
- return ret;
+ if (lp_lanman_auth(ldb_get_opaque(ldb, "loadparm"))) {
+ ret = setup_lm_fields(io);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ } else {
+ io->g.lm_hash = NULL;
+ io->g.lm_history_len = 0;
}
ret = setup_supplemental_field(io);