diff options
author | Volker Lendecke <vl@samba.org> | 2007-12-28 17:02:34 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2007-12-28 17:02:34 +0100 |
commit | 533d6f617efc4dfe1e145785cb9736df07671bdf (patch) | |
tree | aeb094fb712cead751b1e3aa10d85c830a5d931d /source3/libsmb | |
parent | 4cdce5b50e286aab457611d2c634cb79990795fd (diff) | |
download | samba-533d6f617efc4dfe1e145785cb9736df07671bdf.tar.gz samba-533d6f617efc4dfe1e145785cb9736df07671bdf.tar.bz2 samba-533d6f617efc4dfe1e145785cb9736df07671bdf.zip |
Remove static zeros
(This used to be commit dbcc213710a9af31b6094d4741a6f68f573dcdad)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/ntlm_check.c | 5 | ||||
-rw-r--r-- | source3/libsmb/ntlmssp.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/source3/libsmb/ntlm_check.c b/source3/libsmb/ntlm_check.c index f8ed044f8a..ae10d7373d 100644 --- a/source3/libsmb/ntlm_check.c +++ b/source3/libsmb/ntlm_check.c @@ -182,7 +182,10 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, DATA_BLOB *user_sess_key, DATA_BLOB *lm_sess_key) { - static const unsigned char zeros[8] = { 0, }; + unsigned char zeros[8]; + + ZERO_STRUCT(zeros); + if (nt_pw == NULL) { DEBUG(3,("ntlm_password_check: NO NT password stored for user %s.\n", username)); diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index ed08e8102b..35c20ed647 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -823,7 +823,8 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state, session_key.data); DEBUG(10,("ntlmssp_server_auth: Created NTLM session key.\n")); } else { - static const uint8 zeros[24] = { 0, }; + uint8 zeros[24]; + ZERO_STRUCT(zeros); session_key = data_blob_talloc( ntlmssp_state->mem_ctx, NULL, 16); if (session_key.data == NULL) { @@ -1066,9 +1067,11 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state, } if (!ntlmssp_state->nt_hash || !ntlmssp_state->lm_hash) { - static const uchar zeros[16] = { 0, }; + uchar zeros[16]; /* do nothing - blobs are zero length */ + ZERO_STRUCT(zeros); + /* session key is all zeros */ session_key = data_blob_talloc(ntlmssp_state->mem_ctx, zeros, 16); |