winbindd: Print debug if we don't know how to route a wb_irpc_SamLogon() request
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)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_irpc.c

index ccff769170a54e02a31ee499c66af8e94bdbafc5..36076439724c8defca1065de63069945fe027040 100644 (file)
@@ -135,6 +135,7 @@ static NTSTATUS wb_irpc_SamLogon(struct irpc_message *msg,
        struct winbindd_domain *domain;
        struct netr_IdentityInfo *identity_info;
        const char *target_domain_name = NULL;
+       const char *account_name = NULL;
 
        switch (req->in.logon_level) {
        case NetlogonInteractiveInformation:
@@ -169,9 +170,19 @@ static NTSTATUS wb_irpc_SamLogon(struct irpc_message *msg,
        }
 
        target_domain_name = identity_info->domain_name.string;
+       if (target_domain_name == NULL) {
+               target_domain_name = "";
+       }
+
+       account_name = identity_info->account_name.string;
+       if (account_name == NULL) {
+               account_name = "";
+       }
 
        domain = find_auth_domain(0, target_domain_name);
        if (domain == NULL) {
+               DBG_INFO("target_domain[%s] for account[%s] not known\n",
+                       target_domain_name, account_name);
                req->out.result = NT_STATUS_NO_SUCH_USER;
                req->out.authoritative = 0;
                return NT_STATUS_OK;