/* Windows 7 sends the domain name in the form the user typed, so we
* have to cope with both the short and long form here */
if (r->in.domain_name != NULL &&
- !lp_is_my_domain_or_realm(dce_call->conn->dce_ctx->lp_ctx,
+ !lp_is_my_domain_or_realm(dce_call->conn->dce_ctx->lp_ctx,
r->in.domain_name)) {
return WERR_NO_SUCH_DOMAIN;
}
ret = gendb_search_dn(sam_ctx, mem_ctx,
domain_dn, &res, attrs);
if (ret != 1) {
+ return WERR_GENERAL_FAILURE;
}
info = talloc(mem_ctx, struct netr_DsRGetDCNameInfo);
ret = gendb_search_dn(sam_ctx, mem_ctx, NULL,
&dom_res, dom_attrs);
- if (ret == -1) {
- return WERR_GENERAL_FAILURE;
- }
if (ret != 1) {
return WERR_GENERAL_FAILURE;
}