From 1169dd3b50dfefa59b56cd1897bcd0b6c2ffb3be Mon Sep 17 00:00:00 2001 From: Crístian Deives Date: Thu, 19 Nov 2009 16:03:59 -0200 Subject: added new function "ldb_msg_add_dn" a helper function to a DN element to an ldb_msg using ldb_msg_add_string. Signed-off-by: Andrew Tridgell --- source4/lib/ldb/common/ldb_msg.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/lib/ldb/common') diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c index 161a6b1f38..375751262f 100644 --- a/source4/lib/ldb/common/ldb_msg.c +++ b/source4/lib/ldb/common/ldb_msg.c @@ -258,6 +258,15 @@ int ldb_msg_add_steal_string(struct ldb_message *msg, return ldb_msg_add_steal_value(msg, attr_name, &val); } +/* + add a DN element to a message +*/ +int ldb_msg_add_dn(struct ldb_message *msg, const char *attr_name, + struct ldb_dn *dn) +{ + return ldb_msg_add_string(msg, attr_name, ldb_dn_get_linearized(dn)); +} + /* add a printf formatted element to a message */ -- cgit