TALLOC_CTX *mem_ctx);
bool tldap_pull_binsid(struct tldap_message *msg, const char *attribute,
struct dom_sid *sid);
+bool tldap_pull_guid(struct tldap_message *msg, const char *attribute,
+ struct GUID *guid);
bool tldap_add_mod_blobs(TALLOC_CTX *mem_ctx, struct tldap_mod **pmods,
int mod_op, const char *attrib,
int num_values, DATA_BLOB *values);
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)
{