source3 smdb: fix null pointer dereference
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 27 Apr 2017 00:39:34 +0000 (12:39 +1200)
committerJeremy Allison <jra@samba.org>
Fri, 28 Apr 2017 05:18:54 +0000 (07:18 +0200)
Fix the null pointer dereference in smbd, introduced in the auth logging
changes.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr 28 07:18:54 CEST 2017 on sn-devel-144

selftest/knownfail
source3/smbd/sesssetup.c

index 44acf76..2cc9c70 100644 (file)
 # We currently don't send referrals for LDAP modify of non-replicated attrs
 ^samba4.ldap.rodc.python\(rodc\).__main__.RodcTests.test_modify_nonreplicated.*
 ^samba4.ldap.rodc_rwdc.python.*.__main__.RodcRwdcTests.test_change_password_reveal_on_demand_kerberos
-# Test to detect null pointer issue in sessetup.c
-^samba.tests.net_join_no_spnego.*
index 2ed5a4c..a44af7f 100644 (file)
@@ -908,9 +908,9 @@ void reply_sesssetup_and_X(struct smb_request *req)
                                                         sconn->local_address,
                                                         "SMB",
                                                         lm_resp, nt_resp);
-               user_info->auth_description = "bare-NTLM";
 
                if (NT_STATUS_IS_OK(nt_status)) {
+                       user_info->auth_description = "bare-NTLM";
                        nt_status = auth_check_password_session_info(negprot_auth_context, 
                                                                     req, user_info, &session_info);
                }