winbindd: give an IRPC error if wb_irpc_SamLogon() is called without useful routing...
authorStefan Metzmacher <metze@samba.org>
Fri, 21 Jul 2017 10:29:31 +0000 (12:29 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 7 Aug 2017 13:20:04 +0000 (15:20 +0200)
The caller should have checked this already!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_irpc.c

index 87b890b4a3f19d2cb97b3ac87390075d7d3e02f1..fface90cfad3912a64f1c2922601c208a6a33f5d 100644 (file)
@@ -188,6 +188,12 @@ static NTSTATUS wb_irpc_SamLogon(struct irpc_message *msg,
                }
        }
 
+       if (IS_DC && target_domain_name[0] == '\0') {
+               DBG_ERR("target_domain[%s] account[%s]\n",
+                       target_domain_name, account_name);
+               return NT_STATUS_REQUEST_NOT_ACCEPTED;
+       }
+
        domain = find_auth_domain(0, target_domain_name);
        if (domain == NULL) {
                DBG_INFO("target_domain[%s] for account[%s] not known\n",