summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-24 13:46:59 +0100
committerVolker Lendecke <vl@samba.org>2010-01-24 14:52:33 +0100
commit185815a6472a7a09602b3c51198e20257241dfa7 (patch)
treee190f9f5fbd59191ba263ba455c190eb04a2e744 /source3/auth
parent96b12e0d59b27913e915ea28b3edaa7023b765c5 (diff)
downloadsamba-185815a6472a7a09602b3c51198e20257241dfa7.tar.gz
samba-185815a6472a7a09602b3c51198e20257241dfa7.tar.bz2
samba-185815a6472a7a09602b3c51198e20257241dfa7.zip
s3: Remove some calls to memset -- reduces text size by some bytes for me
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index de552cf57e..46b7af4d87 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1267,7 +1267,7 @@ static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **ser
struct samu *sampass = NULL;
DOM_SID guest_sid;
bool ret;
- char zeros[16];
+ static const char zeros[16] = {0, };
fstring tmp;
if ( !(sampass = samu_new( NULL )) ) {
@@ -1302,7 +1302,6 @@ static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **ser
/* 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));
@@ -1622,7 +1621,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info **server_info,
struct netr_SamInfo3 *info3)
{
- char zeros[16];
+ static const char zeros[16] = {0, };
NTSTATUS nt_status = NT_STATUS_OK;
char *found_username = NULL;
@@ -1838,8 +1837,6 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
/* ensure we are never given NULL session keys */
- ZERO_STRUCT(zeros);
-
if (memcmp(info3->base.key.key, zeros, sizeof(zeros)) == 0) {
result->user_session_key = data_blob_null;
} else {
@@ -1873,7 +1870,7 @@ NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
const struct wbcAuthUserInfo *info,
struct auth_serversupplied_info **server_info)
{
- char zeros[16];
+ static const char zeros[16] = {0, };
NTSTATUS nt_status = NT_STATUS_OK;
char *found_username = NULL;
@@ -2083,8 +2080,6 @@ NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
/* ensure we are never given NULL session keys */
- ZERO_STRUCT(zeros);
-
if (memcmp(info->user_session_key, zeros, sizeof(zeros)) == 0) {
result->user_session_key = data_blob_null;
} else {