mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Remove compleatly bogus rename test in partitions module.
This commit is contained in:
parent
7d9f18609b
commit
c0240d7835
@ -589,7 +589,6 @@ static int partition_delete(struct ldb_module *module, struct ldb_request *req)
|
|||||||
/* rename */
|
/* rename */
|
||||||
static int partition_rename(struct ldb_module *module, struct ldb_request *req)
|
static int partition_rename(struct ldb_module *module, struct ldb_request *req)
|
||||||
{
|
{
|
||||||
int i, matched = -1;
|
|
||||||
/* Find backend */
|
/* Find backend */
|
||||||
struct dsdb_control_current_partition *backend, *backend2;
|
struct dsdb_control_current_partition *backend, *backend2;
|
||||||
|
|
||||||
@ -619,22 +618,6 @@ static int partition_rename(struct ldb_module *module, struct ldb_request *req)
|
|||||||
return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
|
return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; data && data->partitions && data->partitions[i]; i++) {
|
|
||||||
if (ldb_dn_compare_base(data->partitions[i]->dn, req->op.rename.olddn) == 0) {
|
|
||||||
matched = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (matched > 0) {
|
|
||||||
ldb_asprintf_errstring(module->ldb,
|
|
||||||
"Cannot rename from %s to %s, subtree rename would cross partition %s: %s",
|
|
||||||
ldb_dn_get_linearized(req->op.rename.olddn),
|
|
||||||
ldb_dn_get_linearized(req->op.rename.newdn),
|
|
||||||
ldb_dn_get_linearized(data->partitions[matched]->dn),
|
|
||||||
ldb_strerror(LDB_ERR_AFFECTS_MULTIPLE_DSAS));
|
|
||||||
return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
|
|
||||||
}
|
|
||||||
|
|
||||||
return partition_replicate(module, req, req->op.rename.olddn);
|
return partition_replicate(module, req, req->op.rename.olddn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user