1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s4-dsdb: Improve the calculation of system flags according to 3.1.1.5.2.4

This commit is contained in:
Matthieu Patou 2011-07-25 17:31:03 +04:00 committed by Matthieu Patou
parent 5f1f153998
commit 326e2dd681

View File

@ -734,14 +734,15 @@ static int objectclass_do_add(struct oc_context *ac)
} else if (ldb_attr_cmp(objectclass->lDAPDisplayName, "site") == 0
|| ldb_attr_cmp(objectclass->lDAPDisplayName, "serversContainer") == 0
|| ldb_attr_cmp(objectclass->lDAPDisplayName, "nTDSDSA") == 0) {
if (ldb_attr_cmp(objectclass->lDAPDisplayName, "site") == 0)
systemFlags |= (int32_t)(SYSTEM_FLAG_CONFIG_ALLOW_RENAME);
systemFlags |= (int32_t)(SYSTEM_FLAG_DISALLOW_MOVE_ON_DELETE);
} else if (ldb_attr_cmp(objectclass->lDAPDisplayName, "siteLink") == 0
|| ldb_attr_cmp(objectclass->lDAPDisplayName, "subnet") == 0
|| ldb_attr_cmp(objectclass->lDAPDisplayName, "siteLinkBridge") == 0
|| ldb_attr_cmp(objectclass->lDAPDisplayName, "nTDSConnection") == 0) {
systemFlags |= (int32_t)(SYSTEM_FLAG_CONFIG_ALLOW_RENAME);
}
/* TODO: If parent object is site or subnet, also add (SYSTEM_FLAG_CONFIG_ALLOW_RENAME) */
if (el || systemFlags != 0) {