summaryrefslogtreecommitdiff
path: root/source3/lib/tldap_util.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-29 22:11:23 +0200
committerVolker Lendecke <vl@samba.org>2009-07-04 12:54:22 +0200
commitbc1e93cc80874dd89ade863e38effda80a99fd47 (patch)
treec1c0bb2ef1894aa3b47c4f5f8bdfe674a9bef261 /source3/lib/tldap_util.c
parentf169772d9398218d7ef2d9586f254fa4c59fbff0 (diff)
downloadsamba-bc1e93cc80874dd89ade863e38effda80a99fd47.tar.gz
samba-bc1e93cc80874dd89ade863e38effda80a99fd47.tar.bz2
samba-bc1e93cc80874dd89ade863e38effda80a99fd47.zip
Add tldap_pull_guid
Diffstat (limited to 'source3/lib/tldap_util.c')
-rw-r--r--source3/lib/tldap_util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c
index 73ce854651..f9f54aaf4d 100644
--- a/source3/lib/tldap_util.c
+++ b/source3/lib/tldap_util.c
@@ -91,6 +91,17 @@ bool tldap_pull_binsid(struct tldap_message *msg, const char *attribute,
return sid_parse((char *)val.data, val.length, sid);
}
+bool tldap_pull_guid(struct tldap_message *msg, const char *attribute,
+ struct GUID *guid)
+{
+ DATA_BLOB val;
+
+ if (!tldap_get_single_valueblob(msg, attribute, &val)) {
+ return false;
+ }
+ return NT_STATUS_IS_OK(GUID_from_data_blob(&val, guid));
+}
+
static bool tldap_add_blob_vals(TALLOC_CTX *mem_ctx, struct tldap_mod *mod,
int num_newvals, DATA_BLOB *newvals)
{