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/lib/ldb/ldb_ildap/ldb_ildap.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source4/lib/ldb/ldb_ildap/ldb_ildap.c') diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index a4abd4d151..567fe4bd5f 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -452,7 +452,7 @@ static int ildb_search(struct ldb_module *module, struct ldb_request *req) if (req->op.search.base == NULL) { msg->r.SearchRequest.basedn = talloc_strdup(msg, ""); } else { - msg->r.SearchRequest.basedn = ldb_dn_linearize(msg, req->op.search.base); + msg->r.SearchRequest.basedn = ldb_dn_alloc_linearized(msg, req->op.search.base); } if (msg->r.SearchRequest.basedn == NULL) { ldb_set_errstring(module->ldb, "Unable to determine baseDN"); @@ -504,7 +504,7 @@ static int ildb_add(struct ldb_module *module, struct ldb_request *req) msg->type = LDAP_TAG_AddRequest; - msg->r.AddRequest.dn = ldb_dn_linearize(msg, req->op.add.message->dn); + msg->r.AddRequest.dn = ldb_dn_alloc_linearized(msg, req->op.add.message->dn); if (msg->r.AddRequest.dn == NULL) { talloc_free(msg); return LDB_ERR_INVALID_DN_SYNTAX; @@ -554,7 +554,7 @@ static int ildb_modify(struct ldb_module *module, struct ldb_request *req) msg->type = LDAP_TAG_ModifyRequest; - msg->r.ModifyRequest.dn = ldb_dn_linearize(msg, req->op.mod.message->dn); + msg->r.ModifyRequest.dn = ldb_dn_alloc_linearized(msg, req->op.mod.message->dn); if (msg->r.ModifyRequest.dn == NULL) { talloc_free(msg); return LDB_ERR_INVALID_DN_SYNTAX; @@ -602,7 +602,7 @@ static int ildb_delete(struct ldb_module *module, struct ldb_request *req) msg->type = LDAP_TAG_DelRequest; - msg->r.DelRequest.dn = ldb_dn_linearize(msg, req->op.del.dn); + msg->r.DelRequest.dn = ldb_dn_alloc_linearized(msg, req->op.del.dn); if (msg->r.DelRequest.dn == NULL) { talloc_free(msg); return LDB_ERR_INVALID_DN_SYNTAX; @@ -632,7 +632,7 @@ static int ildb_rename(struct ldb_module *module, struct ldb_request *req) } msg->type = LDAP_TAG_ModifyDNRequest; - msg->r.ModifyDNRequest.dn = ldb_dn_linearize(msg, req->op.rename.olddn); + msg->r.ModifyDNRequest.dn = ldb_dn_alloc_linearized(msg, req->op.rename.olddn); if (msg->r.ModifyDNRequest.dn == NULL) { talloc_free(msg); return LDB_ERR_INVALID_DN_SYNTAX; @@ -648,8 +648,7 @@ static int ildb_rename(struct ldb_module *module, struct ldb_request *req) } msg->r.ModifyDNRequest.newsuperior = - ldb_dn_linearize(msg, - ldb_dn_get_parent(msg, req->op.rename.newdn)); + ldb_dn_alloc_linearized(msg, ldb_dn_get_parent(msg, req->op.rename.newdn)); if (msg->r.ModifyDNRequest.newsuperior == NULL) { talloc_free(msg); return LDB_ERR_INVALID_DN_SYNTAX; -- cgit