summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2015-11-02 09:59:12 +0000
committerJeremy Allison <jra@samba.org>2015-11-04 22:15:24 +0100
commit89940f39c6d2db03b3a468942d686e762f126f9f (patch)
tree700e5e48527042cac7c1ef20b898f47cfc7f71d0 /source3/rpcclient
parente8fab02773892812f563eea7098847618df76e1b (diff)
downloadsamba-89940f39c6d2db03b3a468942d686e762f126f9f.tar.gz
s3: rpcclient: Prevent null ptr access by returning error if no creds available
Prevent 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>
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_netlogon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index 0a8ab205f8a..744361c4a47 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -800,6 +800,11 @@ static NTSTATUS cmd_netlogon_sam_logon(struct rpc_pipe_client *cli,
if (argc == 6)
sscanf(argv[5], "%x", &logon_param);
+ if (rpcclient_netlogon_creds == NULL) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
/* Perform the sam logon */
result = rpccli_netlogon_password_logon(rpcclient_netlogon_creds,