winbind: Pass up args from winbind_dual_SamLogon
authorVolker Lendecke <vl@samba.org>
Sat, 28 Jan 2017 20:20:59 +0000 (20:20 +0000)
committerVolker Lendecke <vl@samba.org>
Tue, 7 Mar 2017 08:15:17 +0000 (09:15 +0100)
We'll need to pass "authoritative" back to the winbind client

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/winbindd_dual_srv.c
source3/winbindd/winbindd_pam.c
source3/winbindd/winbindd_proto.h

index 7b97f33effe3227a0ca9598779288184e04ed2b9..763ebb888403cde1ebb993cf500e17ebadc6cce6 100644 (file)
@@ -860,6 +860,8 @@ NTSTATUS _winbind_SamLogon(struct pipes_struct *p,
        struct winbindd_domain *domain;
        NTSTATUS status;
        DATA_BLOB lm_response, nt_response;
+       uint32_t flags;
+
        domain = wb_child_domain();
        if (domain == NULL) {
                return NT_STATUS_REQUEST_NOT_ACCEPTED;
@@ -883,7 +885,9 @@ NTSTATUS _winbind_SamLogon(struct pipes_struct *p,
                                       r->in.logon.network->identity_info.domain_name.string,
                                       r->in.logon.network->identity_info.workstation.string,
                                       r->in.logon.network->challenge,
-                                      lm_response, nt_response, &r->out.validation.sam3);
+                                      lm_response, nt_response,
+                                      &r->out.authoritative, &flags,
+                                      &r->out.validation.sam3);
        return status;
 }
 
index aad1ee394d104c83955df14929d9f67d67d8c18b..a8bc34eae9b8963725f12cd569b1094dfeb86a0f 100644 (file)
@@ -1950,10 +1950,10 @@ NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
                               const uint8_t chal[8],
                               DATA_BLOB lm_response,
                               DATA_BLOB nt_response,
+                              uint8_t *authoritative,
+                              uint32_t *flags,
                               struct netr_SamInfo3 **info3)
 {
-       uint8_t authoritative = 0;
-       uint32_t flags = 0;
        NTSTATUS result;
 
        if (strequal(name_domain, get_global_sam_name())) {
@@ -1972,6 +1972,8 @@ NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
                 * We need to try the remote NETLOGON server if this is NOT_IMPLEMENTED 
                 */
                if (!NT_STATUS_EQUAL(result, NT_STATUS_NOT_IMPLEMENTED)) {
+                       *authoritative = 1;
+                       *flags = 0;
                        goto process_result;
                }
        }
@@ -1988,8 +1990,8 @@ NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
                                             lm_response,
                                             nt_response,
                                             false, /* interactive */
-                                            &authoritative,
-                                            &flags,
+                                            authoritative,
+                                            flags,
                                             info3);
        if (!NT_STATUS_IS_OK(result)) {
                goto done;
@@ -2053,6 +2055,8 @@ enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
        const char *name_user = NULL;
        const char *name_domain = NULL;
        const char *workstation;
+       uint8_t authoritative;
+       uint32_t flags;
 
        DATA_BLOB lm_resp, nt_resp;
 
@@ -2105,6 +2109,8 @@ enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
                                       state->request->data.auth_crap.chal,
                                       lm_resp,
                                       nt_resp,
+                                      &authoritative,
+                                      &flags,
                                       &info3);
        if (!NT_STATUS_IS_OK(result)) {
                goto done;
index 46fb60038e6d2c647293a284ca72a23c18562bcc..09be4b2ff3c05da5100f7873bfeea651714d42bc 100644 (file)
@@ -452,6 +452,8 @@ NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
                               const uint8_t chal[8],
                               DATA_BLOB lm_response,
                               DATA_BLOB nt_response,
+                              uint8_t *authoritative,
+                              uint32_t *flags,
                               struct netr_SamInfo3 **info3);
 
 /* The following definitions come from winbindd/winbindd_util.c  */