s4:LDB/LDAP - Re-allow renames
[ira/wip.git] / source4 / ldap_server / ldap_backend.c
index 7bbc6795d3fd3fff7ced05188fd5629246c7a564..5f9b8221374d20a7958035681a70dc45b2f0bcb2 100644 (file)
@@ -750,7 +750,7 @@ static NTSTATUS ldapsrv_ModifyDNRequest(struct ldapsrv_call *call)
        DEBUG(10, ("ModifyDNRequest: olddn: [%s]\n", req->dn));
        DEBUG(10, ("ModifyDNRequest: newrdn: [%s]\n", req->newrdn));
 
-       if (ldb_dn_get_comp_num(req->newrdn) != 1) {
+       if (ldb_dn_get_comp_num(newrdn) != 1) {
                result = LDAP_INVALID_DN_SYNTAX;
                map_ldb_error(local_ctx, LDB_ERR_INVALID_DN_SYNTAX, &errstr);
                goto reply;