From a9e31b33b55a873c2f01db5e348560176adf863d Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 22 Nov 2006 02:05:19 +0000 Subject: r19832: better prototypes for the linearization functions: - ldb_dn_get_linearized returns a const string - ldb_dn_alloc_linearized allocs astring with the linearized dn (This used to be commit 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd) --- source4/dsdb/samdb/ldb_modules/extended_dn.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'source4/dsdb/samdb/ldb_modules/extended_dn.c') diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn.c b/source4/dsdb/samdb/ldb_modules/extended_dn.c index 012ac74514..a571857bbb 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn.c @@ -107,11 +107,7 @@ static BOOL inject_extended_dn(struct ldb_message *msg, struct dom_sid *sid; char *object_guid; char *object_sid; - char *new_dn, *dn; - - dn = ldb_dn_linearize(msg, msg->dn); - if (!dn) - return False; + char *new_dn; /* retrieve object_guid */ guid = samdb_result_guid(msg, "objectGUID"); @@ -140,10 +136,12 @@ static BOOL inject_extended_dn(struct ldb_message *msg, case 1: if (object_sid) { new_dn = talloc_asprintf(msg, ";;%s", - object_guid, object_sid, dn); + object_guid, object_sid, + ldb_dn_get_linearized(msg->dn)); } else { new_dn = talloc_asprintf(msg, ";%s", - object_guid, dn); + object_guid, + ldb_dn_get_linearized(msg->dn)); } break; default: -- cgit