summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-28 17:02:34 +0100
committerVolker Lendecke <vl@samba.org>2007-12-28 17:02:34 +0100
commit533d6f617efc4dfe1e145785cb9736df07671bdf (patch)
treeaeb094fb712cead751b1e3aa10d85c830a5d931d /source3/auth
parent4cdce5b50e286aab457611d2c634cb79990795fd (diff)
downloadsamba-533d6f617efc4dfe1e145785cb9736df07671bdf.tar.gz
samba-533d6f617efc4dfe1e145785cb9736df07671bdf.tar.bz2
samba-533d6f617efc4dfe1e145785cb9736df07671bdf.zip
Remove static zeros
(This used to be commit dbcc213710a9af31b6094d4741a6f68f573dcdad)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 3f65e6b126..fea1b2d761 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1103,7 +1103,7 @@ static NTSTATUS make_new_server_info_guest(auth_serversupplied_info **server_inf
struct samu *sampass = NULL;
DOM_SID guest_sid;
bool ret;
- static const char zeros[16] = { 0, };
+ char zeros[16];
if ( !(sampass = samu_new( NULL )) ) {
return NT_STATUS_NO_MEMORY;
@@ -1138,6 +1138,7 @@ static NTSTATUS make_new_server_info_guest(auth_serversupplied_info **server_inf
/* annoying, but the Guest really does have a session key, and it is
all zeros! */
+ ZERO_STRUCT(zeros);
(*server_info)->user_session_key = data_blob(zeros, sizeof(zeros));
(*server_info)->lm_session_key = data_blob(zeros, sizeof(zeros));
@@ -1420,7 +1421,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
auth_serversupplied_info **server_info,
NET_USER_INFO_3 *info3)
{
- static const char zeros[16] = { 0, };
+ char zeros[16];
NTSTATUS nt_status = NT_STATUS_OK;
char *found_username = NULL;
@@ -1624,7 +1625,9 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
&(info3->uni_logon_srv));
/* ensure we are never given NULL session keys */
-
+
+ ZERO_STRUCT(zeros);
+
if (memcmp(info3->user_sess_key, zeros, sizeof(zeros)) == 0) {
result->user_session_key = data_blob_null;
} else {