summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-11-01 23:31:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:44 -0500
commitb7774527faf095f612eb1de48efacec6bd710a87 (patch)
tree0fb414c1c07d45504d04818dccd6918444ceedb8 /source4/ldap_server
parentd046e8d0ccdcd5c288b42e8ecb7ab2394a5841d7 (diff)
downloadsamba-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/ldap_server')
-rw-r--r--source4/ldap_server/ldap_backend.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index 9e26f1c6eb..8e102139fe 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -31,7 +31,7 @@
#define VALID_DN_SYNTAX(dn,i) do {\
if (!(dn)) {\
return NT_STATUS_NO_MEMORY;\
- } else if ((dn)->comp_num < (i)) {\
+ } else if (ldb_dn_get_comp_num(dn) < (i)) {\
result = LDAP_INVALID_DN_SYNTAX;\
errstr = "Invalid DN (" #i " components needed for '" #dn "')";\
goto reply;\
@@ -641,7 +641,7 @@ static NTSTATUS ldapsrv_ModifyDNRequest(struct ldapsrv_call *call)
goto reply;
}
- if (newrdn->comp_num > 1) {
+ if (ldb_dn_get_comp_num(newrdn) > 1) {
result = LDAP_NAMING_VIOLATION;
errstr = "Error new RDN invalid";
goto reply;
@@ -652,7 +652,7 @@ static NTSTATUS ldapsrv_ModifyDNRequest(struct ldapsrv_call *call)
VALID_DN_SYNTAX(parentdn, 0);
DEBUG(10, ("ModifyDNRequest: newsuperior: [%s]\n", req->newsuperior));
- if (parentdn->comp_num < 1) {
+ if (ldb_dn_get_comp_num(parentdn) < 1) {
result = LDAP_AFFECTS_MULTIPLE_DSAS;
errstr = "Error new Superior DN invalid";
goto reply;
@@ -664,7 +664,10 @@ static NTSTATUS ldapsrv_ModifyDNRequest(struct ldapsrv_call *call)
NT_STATUS_HAVE_NO_MEMORY(parentdn);
}
- newdn = ldb_dn_make_child(local_ctx, ldb_dn_get_rdn(local_ctx, newrdn), parentdn);
+ newdn = ldb_dn_build_child(local_ctx,
+ ldb_dn_get_rdn_name(newrdn),
+ (char *)ldb_dn_get_rdn_val(newrdn)->data,
+ parentdn);
NT_STATUS_HAVE_NO_MEMORY(newdn);
reply: