summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-14 12:16:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:01 -0500
commitb4a7b7a8889737e2891fc1176feabd4ce47f2737 (patch)
tree6694c445bf83ead4e74cddcaf967a64491b57b4a /source3/auth
parentddf25a79f6a47fc3627f0dfdb74f47c0dffb7ff0 (diff)
downloadsamba-b4a7b7a8889737e2891fc1176feabd4ce47f2737.tar.gz
samba-b4a7b7a8889737e2891fc1176feabd4ce47f2737.tar.bz2
samba-b4a7b7a8889737e2891fc1176feabd4ce47f2737.zip
r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls. (This used to be commit 3d3d61687ef00181f4f04e001d42181d93ac931e)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth.c2
-rw-r--r--source3/auth/auth_compat.c2
-rw-r--r--source3/auth/auth_sam.c4
-rw-r--r--source3/auth/auth_server.c8
-rw-r--r--source3/auth/auth_util.c10
5 files changed, 13 insertions, 13 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index 91a5ac2ff1..eb239d3d7d 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -79,7 +79,7 @@ static struct auth_init_function_entry *auth_find_backend_entry(const char *name
static const uint8 *get_ntlm_challenge(struct auth_context *auth_context)
{
- DATA_BLOB challenge = data_blob(NULL, 0);
+ DATA_BLOB challenge = data_blob_null;
const char *challenge_set_by = NULL;
auth_methods *auth_method;
TALLOC_CTX *mem_ctx;
diff --git a/source3/auth/auth_compat.c b/source3/auth/auth_compat.c
index 13035eece2..65ece50a50 100644
--- a/source3/auth/auth_compat.c
+++ b/source3/auth/auth_compat.c
@@ -96,7 +96,7 @@ return True if the password is correct, False otherwise
BOOL password_ok(char *smb_name, DATA_BLOB password_blob)
{
- DATA_BLOB null_password = data_blob(NULL, 0);
+ DATA_BLOB null_password = data_blob_null;
BOOL encrypted = (global_encrypted_passwords_negotiated && (password_blob.length == 24 || password_blob.length > 46));
if (encrypted) {
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 0fa68cbb87..64556cabd3 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -255,8 +255,8 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
BOOL ret;
NTSTATUS nt_status;
NTSTATUS update_login_attempts_status;
- DATA_BLOB user_sess_key = data_blob(NULL, 0);
- DATA_BLOB lm_sess_key = data_blob(NULL, 0);
+ DATA_BLOB user_sess_key = data_blob_null;
+ DATA_BLOB lm_sess_key = data_blob_null;
BOOL updated_autolock = False, updated_badpw = False;
if (!user_info || !auth_context) {
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index c140ef48f9..e5331893fd 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -226,24 +226,24 @@ static DATA_BLOB auth_get_challenge_server(const struct auth_context *auth_conte
to pass that unencrypted password over */
*my_private_data =
(void *)make_server_security_state(cli);
- return data_blob(NULL, 0);
+ return data_blob_null;
} else if (cli->secblob.length < 8) {
/* We can't do much if we don't get a full challenge */
DEBUG(2,("make_auth_info_server: Didn't receive a full challenge from server\n"));
cli_shutdown(cli);
- return data_blob(NULL, 0);
+ return data_blob_null;
}
if (!(*my_private_data = (void *)make_server_security_state(cli))) {
- return data_blob(NULL,0);
+ return data_blob_null;
}
/* The return must be allocated on the caller's mem_ctx, as our own will be
destoyed just after the call. */
return data_blob_talloc(auth_context->mem_ctx, cli->secblob.data,8);
} else {
- return data_blob(NULL, 0);
+ return data_blob_null;
}
}
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 1795322b55..f66c500943 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -372,11 +372,11 @@ BOOL make_user_info_for_reply(auth_usersupplied_info **user_info,
/* We can't do an NT hash here, as the password needs to be
case insensitive */
- local_nt_blob = data_blob(NULL, 0);
+ local_nt_blob = data_blob_null;
} else {
- local_lm_blob = data_blob(NULL, 0);
- local_nt_blob = data_blob(NULL, 0);
+ local_lm_blob = data_blob_null;
+ local_nt_blob = data_blob_null;
}
ret = make_user_info_map(
@@ -1570,7 +1570,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
/* ensure we are never given NULL session keys */
if (memcmp(info3->user_sess_key, zeros, sizeof(zeros)) == 0) {
- result->user_session_key = data_blob(NULL, 0);
+ result->user_session_key = data_blob_null;
} else {
result->user_session_key = data_blob_talloc(
result, info3->user_sess_key,
@@ -1578,7 +1578,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
}
if (memcmp(info3->lm_sess_key, zeros, 8) == 0) {
- result->lm_session_key = data_blob(NULL, 0);
+ result->lm_session_key = data_blob_null;
} else {
result->lm_session_key = data_blob_talloc(
result, info3->lm_sess_key,