mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
s4-ddb: don't create partitions with the UNINSTANT flag set
these partitions and not on the server we are replicating from. Also check for deleted partitions. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
a31c711ba7
commit
5ce1dbf2e3
@ -154,7 +154,20 @@ static int new_partition_add(struct ldb_module *module, struct ldb_request *req)
|
||||
/* This needs to be 'static' to ensure it does not move, and is not on the stack */
|
||||
static const char *no_attrs[] = { NULL };
|
||||
unsigned int instanceType = ldb_msg_find_attr_as_uint(req->op.add.message, "instanceType", 0);
|
||||
if (!(instanceType & INSTANCE_TYPE_IS_NC_HEAD)) {
|
||||
if (!(instanceType & INSTANCE_TYPE_IS_NC_HEAD) ||
|
||||
(instanceType & INSTANCE_TYPE_UNINSTANT)) {
|
||||
return ldb_next_request(module, req);
|
||||
}
|
||||
|
||||
if (instanceType & INSTANCE_TYPE_UNINSTANT) {
|
||||
DEBUG(0,(__location__ ": Skipping uninstantiated partition %s\n",
|
||||
ldb_dn_get_linearized(req->op.add.message->dn)));
|
||||
return ldb_next_request(module, req);
|
||||
}
|
||||
|
||||
if (ldb_msg_find_attr_as_bool(req->op.add.message, "isDeleted", false)) {
|
||||
DEBUG(0,(__location__ ": Skipping deleted partition %s\n",
|
||||
ldb_dn_get_linearized(req->op.add.message->dn)));
|
||||
return ldb_next_request(module, req);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user