summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-10 11:23:20 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-10 17:51:26 +1100
commit08e8988bd850de8050cd05aacdcd0e0f78200c7d (patch)
tree250d384165f551954aa0070fc9942cafaf0f9e44 /source4
parenteffff544265c63c95cf630d426b630bfe4d25aec (diff)
downloadsamba-08e8988bd850de8050cd05aacdcd0e0f78200c7d.tar.gz
samba-08e8988bd850de8050cd05aacdcd0e0f78200c7d.tar.bz2
samba-08e8988bd850de8050cd05aacdcd0e0f78200c7d.zip
s4-dsdb: use GUID_from_ndr_blob() to create dsdb_get_extended_dn_guid()
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/util.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 512230f63c..dceff3643e 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2721,3 +2721,17 @@ int dsdb_functional_level(struct ldb_context *ldb)
return *domainFunctionality;
}
+/*
+ return a GUID from a extended DN structure
+ */
+NTSTATUS dsdb_get_extended_dn_guid(struct ldb_dn *dn, struct GUID *guid)
+{
+ const struct ldb_val *v;
+
+ v = ldb_dn_get_extended_component(dn, "GUID");
+ if (v == NULL) {
+ return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ }
+
+ return GUID_from_ndr_blob(v, guid);
+}