diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-10 18:32:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:15 -0500 |
commit | 5f224c2c265faa50e5495cc738f1a62c6aa70d56 (patch) | |
tree | 9004681145c263d06fca6b9b7bbb18c564d861f7 /source3/smbd | |
parent | 47a11f8a4c6156965163fd89bef668cd6612b70c (diff) | |
download | samba-5f224c2c265faa50e5495cc738f1a62c6aa70d56.tar.gz samba-5f224c2c265faa50e5495cc738f1a62c6aa70d56.tar.bz2 samba-5f224c2c265faa50e5495cc738f1a62c6aa70d56.zip |
r14170: Paranioa fix for sesssetup.
Fix Coverity bug #26. Guard against NULL ref.
Jeremy.
(This used to be commit c0f906ac8de850f4566b6b3be4e3c7d245e6e252)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/sesssetup.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index d32ff9fa14..fcb778d1fe 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -1079,6 +1079,11 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, return ERROR_NT(nt_status_squash(nt_status)); } + /* Ensure we can't possible take a code path leading to a null defref. */ + if (!server_info) { + return ERROR_NT(NT_STATUS_LOGON_FAILURE); + } + nt_status = create_local_token(server_info); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(10, ("create_local_token failed: %s\n", |