From: Volker Lendecke Date: Sat, 28 Jan 2017 20:20:59 +0000 (+0000) Subject: winbind: Pass up args from winbind_dual_SamLogon X-Git-Tag: tdb-1.3.13~637 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a6a7b53af48853508c31394ca8b1d22b2df1811;p=thirdparty%2Fsamba.git winbind: Pass up args from winbind_dual_SamLogon We'll need to pass "authoritative" back to the winbind client Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index 7b97f33effe..763ebb88840 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -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; } diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index aad1ee394d1..a8bc34eae9b 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -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; diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index 46fb60038e6..09be4b2ff3c 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -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 */