diff options
author | Simo Sorce <idra@samba.org> | 2006-11-01 23:31:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:24:44 -0500 |
commit | b7774527faf095f612eb1de48efacec6bd710a87 (patch) | |
tree | 0fb414c1c07d45504d04818dccd6918444ceedb8 /source4/dsdb/samdb | |
parent | d046e8d0ccdcd5c288b42e8ecb7ab2394a5841d7 (diff) | |
download | samba-b7774527faf095f612eb1de48efacec6bd710a87.tar.gz samba-b7774527faf095f612eb1de48efacec6bd710a87.tar.bz2 samba-b7774527faf095f612eb1de48efacec6bd710a87.zip |
r19531: Make struct ldb_dn opaque and local to ldb_dn.c
(This used to be commit 889fb983ba1cf8a11424a8b3dc3a5ef76e780082)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 26 |
3 files changed, 15 insertions, 15 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index a38f08e104..d678364b6e 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -316,7 +316,7 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req) ac = talloc_get_type(h->private_data, struct partition_context); /* Search from the base DN */ - if (!req->op.search.base || req->op.search.base->comp_num == 0) { + if (!req->op.search.base || (ldb_dn_get_comp_num(req->op.search.base) == 0)) { return partition_send_all(module, ac, req); } for (i=0; data && data->partitions && data->partitions[i]; i++) { diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 88f5eba2b4..c174ac65a1 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -173,7 +173,7 @@ static int rootdse_search(struct ldb_module *module, struct ldb_request *req) /* see if its for the rootDSE */ if (req->op.search.scope != LDB_SCOPE_BASE || - (req->op.search.base && req->op.search.base->comp_num != 0)) { + (req->op.search.base && ldb_dn_get_comp_num(req->op.search.base) != 0)) { return ldb_next_request(module, req); } diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index fbb5ead537..e86a3bfde4 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -433,7 +433,7 @@ static int samldb_fill_group_object(struct ldb_module *module, const struct ldb_ int ret; const char *name; struct ldb_message *msg2; - struct ldb_dn_component *rdn; + const char *rdn_name; TALLOC_CTX *mem_ctx = talloc_new(msg); const char *errstr; if (!mem_ctx) { @@ -457,10 +457,10 @@ static int samldb_fill_group_object(struct ldb_module *module, const struct ldb_ return ret; } - rdn = ldb_dn_get_rdn(msg2, msg2->dn); + rdn_name = ldb_dn_get_rdn_name(msg2->dn); - if (strcasecmp(rdn->name, "cn") != 0) { - ldb_debug(module->ldb, LDB_DEBUG_FATAL, "samldb_fill_group_object: Bad RDN (%s) for group!\n", rdn->name); + if (strcasecmp(rdn_name, "cn") != 0) { + ldb_debug(module->ldb, LDB_DEBUG_FATAL, "samldb_fill_group_object: Bad RDN (%s) for group!\n", rdn_name); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -496,7 +496,7 @@ static int samldb_fill_user_or_computer_object(struct ldb_module *module, const int ret; char *name; struct ldb_message *msg2; - struct ldb_dn_component *rdn; + const char *rdn_name; TALLOC_CTX *mem_ctx = talloc_new(msg); const char *errstr; if (!mem_ctx) { @@ -556,10 +556,10 @@ static int samldb_fill_user_or_computer_object(struct ldb_module *module, const } } - rdn = ldb_dn_get_rdn(msg2, msg2->dn); + rdn_name = ldb_dn_get_rdn_name(msg2->dn); - if (strcasecmp(rdn->name, "cn") != 0) { - ldb_asprintf_errstring(module->ldb, "Bad RDN (%s=) for user/computer, should be CN=!\n", rdn->name); + if (strcasecmp(rdn_name, "cn") != 0) { + ldb_asprintf_errstring(module->ldb, "Bad RDN (%s=) for user/computer, should be CN=!\n", rdn_name); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -598,7 +598,7 @@ static int samldb_fill_foreignSecurityPrincipal_object(struct ldb_module *module struct ldb_message **ret_msg) { struct ldb_message *msg2; - struct ldb_dn_component *rdn; + const char *rdn_name; struct dom_sid *dom_sid; struct dom_sid *sid; const char *dom_attrs[] = { "name", NULL }; @@ -631,10 +631,10 @@ static int samldb_fill_foreignSecurityPrincipal_object(struct ldb_module *module return ret; } - rdn = ldb_dn_get_rdn(msg2, msg2->dn); + rdn_name = ldb_dn_get_rdn_name(msg2->dn); - if (strcasecmp(rdn->name, "cn") != 0) { - ldb_asprintf_errstring(module->ldb, "Bad RDN (%s=) for ForeignSecurityPrincipal, should be CN=!", rdn->name); + if (strcasecmp(rdn_name, "cn") != 0) { + ldb_asprintf_errstring(module->ldb, "Bad RDN (%s=) for ForeignSecurityPrincipal, should be CN=!", rdn_name); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -643,7 +643,7 @@ static int samldb_fill_foreignSecurityPrincipal_object(struct ldb_module *module * domain SIDs ending up there, it would cause all sorts of * pain */ - sid = dom_sid_parse_talloc(msg2, (const char *)rdn->value.data); + sid = dom_sid_parse_talloc(msg2, (const char *)ldb_dn_get_rdn_val(msg2->dn)->data); if (!sid) { ldb_set_errstring(module->ldb, "No valid found SID in ForeignSecurityPrincipal CN!"); talloc_free(mem_ctx); |