summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_pam.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-05-15 13:40:36 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-05-15 21:12:33 +0200
commite838d8a5c2c0f1c91abb21bca908dbb0b2e2fba4 (patch)
treec2029e574aa85d6b4bc6a8cdf10af908b7bc6b04 /source3/winbindd/winbindd_pam.c
parent8bd67c593da5525a63a1d596e2c7fe38bc7cee57 (diff)
downloadsamba-e838d8a5c2c0f1c91abb21bca908dbb0b2e2fba4.tar.gz
winbind: Fix CID 1435598 Error handling issues (CHECKED_RETURN)
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue May 15 21:12:33 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3/winbindd/winbindd_pam.c')
-rw-r--r--source3/winbindd/winbindd_pam.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index ff40ab54a70..a7e16815ec5 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -989,6 +989,7 @@ static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
struct netr_SamInfo3 *my_info3;
time_t kickoff_time, must_change_time;
bool password_good = false;
+ bool ok;
#ifdef HAVE_KRB5
struct winbindd_tdc_domain *tdc_domain = NULL;
#endif
@@ -1001,11 +1002,14 @@ static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
/* Parse domain and username */
- parse_domain_user(state->request->data.auth.user,
- name_namespace,
- name_domain,
- name_user);
-
+ ok = parse_domain_user(state->request->data.auth.user,
+ name_namespace,
+ name_domain,
+ name_user);
+ if (!ok) {
+ DBG_DEBUG("parse_domain_user failed\n");
+ return NT_STATUS_NO_SUCH_USER;
+ }
if (!lookup_cached_name(name_namespace,
name_domain,