s3-winbindd: libwbclient: implement secure channel verification for specific domains...
[ira/wip.git] / source3 / winbindd / winbindd_check_machine_acct.c
index e3505cb35238b593b87c87eadd86d16cd8e46cf7..610e9edfaaca30f72c2bdfc343f267892ee26070 100644 (file)
@@ -42,7 +42,16 @@ struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
-       domain = find_our_domain();
+       if (request->domain_name[0] == '0') {
+               /* preserve old behavior, when no domain name is given */
+               domain = find_our_domain();
+       } else {
+               domain = find_domain_from_name(request->domain_name);
+       }
+       if (domain == NULL) {
+               tevent_req_nterror(req, NT_STATUS_NO_SUCH_DOMAIN);
+               return tevent_req_post(req, ev);
+       }
        if (domain->internal) {
                /*
                 * Internal domains are passdb based, we can always