summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ildap
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-11-22 02:05:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:22 -0500
commita9e31b33b55a873c2f01db5e348560176adf863d (patch)
tree603f4cb99999eea881f6092fb6cbbbcb8daca184 /source4/lib/ldb/ldb_ildap
parent4889eb9f7aae9349e426d0f6d2217adff67eaebd (diff)
downloadsamba-a9e31b33b55a873c2f01db5e348560176adf863d.tar.gz
samba-a9e31b33b55a873c2f01db5e348560176adf863d.tar.bz2
samba-a9e31b33b55a873c2f01db5e348560176adf863d.zip
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)
Diffstat (limited to 'source4/lib/ldb/ldb_ildap')
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c13
1 files changed, 6 insertions, 7 deletions
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;