auth3: Avoid some zeros footprint
authorVolker Lendecke <vl@samba.org>
Sat, 31 Dec 2016 13:11:10 +0000 (13:11 +0000)
committerRalph Boehme <slow@samba.org>
Tue, 3 Jan 2017 15:04:28 +0000 (16:04 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/auth/auth_util.c

index 58639a0aba1e7876a31124366a245c5fd9c03fcb..ae6bfb3de41ebca219d39457aa17f9294c4e9157 100644 (file)
@@ -811,7 +811,6 @@ static NTSTATUS get_guest_info3(TALLOC_CTX *mem_ctx,
 
 static NTSTATUS make_new_session_info_guest(struct auth_session_info **session_info, struct auth_serversupplied_info **server_info)
 {
-       static const char zeros[16] = {0};
        const char *guest_account = lp_guest_account();
        const char *domain = lp_netbios_name();
        struct netr_SamInfo3 info3;
@@ -861,7 +860,7 @@ static NTSTATUS make_new_session_info_guest(struct auth_session_info **session_i
 
        /* annoying, but the Guest really does have a session key, and it is
           all zeros! */
-       (*session_info)->session_key = data_blob(zeros, sizeof(zeros));
+       (*session_info)->session_key = data_blob_talloc_zero(NULL, 16);
 
        status = NT_STATUS_OK;
 done: