summaryrefslogtreecommitdiff
path: root/source3/libads
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/libads
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/libads')
-rw-r--r--source3/libads/cldap.c8
-rw-r--r--source3/libads/kerberos_verify.c4
-rw-r--r--source3/libads/krb5_setpw.c2
-rw-r--r--source3/libads/sasl.c18
4 files changed, 16 insertions, 16 deletions
diff --git a/source3/libads/cldap.c b/source3/libads/cldap.c
index 3cb98c59c5..227bbc2a0a 100644
--- a/source3/libads/cldap.c
+++ b/source3/libads/cldap.c
@@ -187,10 +187,10 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply)
{
int ret;
ASN1_DATA data;
- DATA_BLOB blob = data_blob(NULL, 0);
- DATA_BLOB os1 = data_blob(NULL, 0);
- DATA_BLOB os2 = data_blob(NULL, 0);
- DATA_BLOB os3 = data_blob(NULL, 0);
+ DATA_BLOB blob = data_blob_null;
+ DATA_BLOB os1 = data_blob_null;
+ DATA_BLOB os2 = data_blob_null;
+ DATA_BLOB os3 = data_blob_null;
int i1;
/* half the time of a regular ldap timeout, not less than 3 seconds. */
unsigned int al_secs = MAX(3,lp_ldap_timeout()/2);
diff --git a/source3/libads/kerberos_verify.c b/source3/libads/kerberos_verify.c
index 0ec03ef4bf..ca36e6e425 100644
--- a/source3/libads/kerberos_verify.c
+++ b/source3/libads/kerberos_verify.c
@@ -333,8 +333,8 @@ NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
*principal = NULL;
*pac_data = NULL;
- *ap_rep = data_blob(NULL,0);
- *session_key = data_blob(NULL,0);
+ *ap_rep = data_blob_null;
+ *session_key = data_blob_null;
initialize_krb5_error_table();
ret = krb5_init_context(&context);
diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c
index c7a4b982db..4aab09c9f4 100644
--- a/source3/libads/krb5_setpw.c
+++ b/source3/libads/krb5_setpw.c
@@ -88,7 +88,7 @@ static DATA_BLOB encode_krb5_setpw(const char *principal, const char *password)
realm = c;
} else {
/* We must have a realm component. */
- return data_blob(NULL, 0);
+ return data_blob_null;
}
memset(&req, 0, sizeof(req));
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 2fc66bd929..f1f0861535 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -28,10 +28,10 @@
*/
static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
{
- DATA_BLOB msg1 = data_blob(NULL, 0);
- DATA_BLOB blob = data_blob(NULL, 0);
- DATA_BLOB blob_in = data_blob(NULL, 0);
- DATA_BLOB blob_out = data_blob(NULL, 0);
+ DATA_BLOB msg1 = data_blob_null;
+ DATA_BLOB blob = data_blob_null;
+ DATA_BLOB blob_in = data_blob_null;
+ DATA_BLOB blob_out = data_blob_null;
struct berval cred, *scred = NULL;
int rc;
NTSTATUS nt_status;
@@ -54,7 +54,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
return ADS_ERROR_NT(nt_status);
}
- blob_in = data_blob(NULL, 0);
+ blob_in = data_blob_null;
do {
nt_status = ntlmssp_update(ntlmssp_state,
@@ -90,7 +90,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
blob = data_blob(scred->bv_val, scred->bv_len);
ber_bvfree(scred);
} else {
- blob = data_blob(NULL, 0);
+ blob = data_blob_null;
}
} else {
@@ -102,7 +102,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
if ((turn == 1) &&
(rc == LDAP_SASL_BIND_IN_PROGRESS)) {
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = data_blob_null;
/* the server might give us back two challenges */
if (!spnego_parse_challenge(blob, &blob_in,
&tmp_blob)) {
@@ -142,9 +142,9 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
*/
static ADS_STATUS ads_sasl_spnego_krb5_bind(ADS_STRUCT *ads, const char *principal)
{
- DATA_BLOB blob = data_blob(NULL, 0);
+ DATA_BLOB blob = data_blob_null;
struct berval cred, *scred = NULL;
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = data_blob_null;
int rc;
rc = spnego_gen_negTokenTarg(principal, ads->auth.time_offset, &blob, &session_key, 0,