summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/ldap/ldap.c5
-rw-r--r--source4/libcli/ldap/ldap_ndr.c12
2 files changed, 3 insertions, 14 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 1a3ab6e0a5..bce3da94ae 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -603,11 +603,8 @@ static void ldap_decode_attrib(TALLOC_CTX *mem_ctx, struct asn1_data *data,
asn1_start_tag(data, ASN1_SET);
while (asn1_peek_tag(data, ASN1_OCTET_STRING)) {
DATA_BLOB blob;
- struct ldb_val value;
asn1_read_OctetString(data, &blob);
- value.data = blob.data;
- value.length = blob.length;
- add_value_to_attrib(mem_ctx, &value, attrib);
+ add_value_to_attrib(mem_ctx, &blob, attrib);
data_blob_free(&blob);
}
asn1_end_tag(data);
diff --git a/source4/libcli/ldap/ldap_ndr.c b/source4/libcli/ldap/ldap_ndr.c
index 720022c6c2..88ca1ece77 100644
--- a/source4/libcli/ldap/ldap_ndr.c
+++ b/source4/libcli/ldap/ldap_ndr.c
@@ -25,14 +25,6 @@
#include "libcli/ldap/ldap.h"
#include "librpc/gen_ndr/ndr_security.h"
-struct ldb_val ldb_blob(DATA_BLOB blob)
-{
- struct ldb_val val;
- val.data = blob.data;
- val.length = blob.length;
- return val;
-}
-
/*
encode a NDR uint32 as a ldap filter element
*/
@@ -59,7 +51,7 @@ const char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, struct dom_sid *sid)
if (!NT_STATUS_IS_OK(status)) {
return NULL;
}
- ret = ldb_binary_encode(mem_ctx, ldb_blob(blob));
+ ret = ldb_binary_encode(mem_ctx, blob);
data_blob_free(&blob);
return ret;
}
@@ -78,7 +70,7 @@ const char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid)
if (!NT_STATUS_IS_OK(status)) {
return NULL;
}
- ret = ldb_binary_encode(mem_ctx, ldb_blob(blob));
+ ret = ldb_binary_encode(mem_ctx, blob);
data_blob_free(&blob);
return ret;
}