]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)
authorVolker Lendecke <vl@samba.org>
Wed, 12 Feb 2020 14:40:32 +0000 (15:40 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 19 Feb 2020 13:01:32 +0000 (13:01 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ef0350221e194a3dd3350eab02b38baeb32d8fd3)

Autobuild-User(v4-10-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-10-test): Wed Feb 19 13:01:32 UTC 2020 on sn-devel-144

source3/auth/auth_sam.c

index 3e89febb74beadd737ceee7ce2ff0f9836eb5b9b..f9764d87e3c14fcdda2a8abc76a7dbf624763f9e 100644 (file)
@@ -182,12 +182,13 @@ static NTSTATUS auth_sam_netlogon3_auth(const struct auth_context *auth_context,
                                        const struct auth_usersupplied_info *user_info,
                                        struct auth_serversupplied_info **server_info)
 {
-       const char *effective_domain = user_info->mapped.domain_name;
+       const char *effective_domain = NULL;
        bool is_my_domain;
 
        if (!user_info || !auth_context) {
                return NT_STATUS_LOGON_FAILURE;
        }
+       effective_domain = user_info->mapped.domain_name;
 
        if (user_info->mapped.account_name == NULL ||
            user_info->mapped.account_name[0] == '\0')