summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2015-10-22 12:37:17 +0100
committerJeremy Allison <jra@samba.org>2015-11-04 22:15:24 +0100
commite8fab02773892812f563eea7098847618df76e1b (patch)
tree2edc3138f3b7caf8447de5acac59863a3ec437af
parentaa3cc0b459124c66de0aad8ff41908e1bf261222 (diff)
downloadsamba-e8fab02773892812f563eea7098847618df76e1b.tar.gz
s3: winbind: Prevent null ptr access by returning error if no creds available
Prevent rpccli_netlogon_network_logon/rpccli_netlogon_password_logon being called with 'NULL' credentials BUG: https://bugzilla.samba.org/show_bug.cgi?id=11569 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/winbindd/winbindd_pam.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 0ea146b6804..78b26250543 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -1379,8 +1379,11 @@ static NTSTATUS winbind_samlogon_retry_loop(struct winbindd_domain *domain,
return result;
}
netr_attempts = 0;
-
- if (interactive && username != NULL && password != NULL) {
+ if (domain->conn.netlogon_creds == NULL) {
+ DBG_NOTICE("No security credentials available for "
+ "domain [%s]\n", domainname);
+ result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+ } else if (interactive && username != NULL && password != NULL) {
result = rpccli_netlogon_password_logon(domain->conn.netlogon_creds,
netlogon_pipe->binding_handle,
mem_ctx,