summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-30 10:52:14 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:55 +1100
commit6628588dfba353c3d2948d14de2d24edfafc371d (patch)
treef4aa6b307b1b2e07e44bc0bec3de08cc5ab8253f /source4
parent98d94cca6fdf0f9fbe045fdb213f642244ddc41f (diff)
downloadsamba-6628588dfba353c3d2948d14de2d24edfafc371d.tar.gz
samba-6628588dfba353c3d2948d14de2d24edfafc371d.tar.bz2
samba-6628588dfba353c3d2948d14de2d24edfafc371d.zip
s4-dsdb: added dsdb_set_extended_dn_guid()
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/util.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index ef47079f9f..25d915d0bc 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2795,6 +2795,25 @@ int dsdb_functional_level(struct ldb_context *ldb)
}
/*
+ set a GUID in an extended DN structure
+ */
+int dsdb_set_extended_dn_guid(struct ldb_dn *dn, const struct GUID *guid, const char *component_name)
+{
+ struct ldb_val v;
+ NTSTATUS status;
+ int ret;
+
+ status = GUID_to_ndr_blob(guid, dn, &v);
+ if (!NT_STATUS_IS_OK(status)) {
+ return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
+ }
+
+ ret = ldb_dn_set_extended_component(dn, component_name, &v);
+ data_blob_free(&v);
+ return ret;
+}
+
+/*
return a GUID from a extended DN structure
*/
NTSTATUS dsdb_get_extended_dn_guid(struct ldb_dn *dn, struct GUID *guid, const char *component_name)