mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
objectclass: Ensure that backlinks are not replicated
Adprep schema adds backlinks, but they do not have the NOT_REPLICATED bit. We need to force this in locally to ensure we have it. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
3257c7f60f
commit
d9c6f47851
@ -405,6 +405,7 @@ static int objectclass_do_add(struct oc_context *ac)
|
||||
}
|
||||
|
||||
if (ac->schema != NULL) {
|
||||
unsigned int linkID = 0;
|
||||
/*
|
||||
* Notice: by the normalization function call in "ldb_request()"
|
||||
* case "LDB_ADD" we have always only *one* "objectClass"
|
||||
@ -606,6 +607,11 @@ static int objectclass_do_add(struct oc_context *ac)
|
||||
}
|
||||
/* TODO: If parent object is site or subnet, also add (SYSTEM_FLAG_CONFIG_ALLOW_RENAME) */
|
||||
|
||||
linkID = ldb_msg_find_attr_as_int(msg, "linkID", 0);
|
||||
if (linkID > 0 && linkID % 2 == 1) {
|
||||
systemFlags |= DS_FLAG_ATTR_NOT_REPLICATED;
|
||||
}
|
||||
|
||||
if (el || systemFlags != 0) {
|
||||
ret = samdb_msg_add_int(ldb, msg, msg, "systemFlags",
|
||||
systemFlags);
|
||||
|
Loading…
Reference in New Issue
Block a user