From 9b28f3af879290708851ba26ad59c2055b751dac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 8 Jun 2017 17:10:12 +0200 Subject: [PATCH] s3:winbindd: Send flags=0 in netr_LogonSamLogon{WithFlags,Ex}() These extra flags are an [in,out] argument, so we have to initialize them to 0. If we pass NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT or NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP, a Windows Server will just return NT_STATUS_NO_SUCH_USER with authoritative=1 (at least if it is itself a DC of the forest root and the requested domain is the local domain of the DC). Pair-Programmed-With: Andreas Schneider Signed-off-by: Stefan Metzmacher Signed-off-by: Andreas Schneider --- source3/winbindd/winbindd_dual_srv.c | 2 +- source3/winbindd/winbindd_pam.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index 0b17b78bd6b..ff4c93d9221 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -864,7 +864,7 @@ NTSTATUS _winbind_SamLogon(struct pipes_struct *p, struct winbindd_domain *domain; NTSTATUS status; DATA_BLOB lm_response, nt_response; - uint32_t flags; + uint32_t flags = 0; domain = wb_child_domain(); if (domain == NULL) { diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 4d3a7eeb1ba..8abd8f07e02 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -2118,8 +2118,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; + uint8_t authoritative = 0; + uint32_t flags = 0; DATA_BLOB lm_resp, nt_resp; -- 2.47.2