summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-11-26 15:50:35 +1300
committerKarolin Seeger <kseeger@samba.org>2020-01-21 10:11:38 +0000
commit4c62210098df44c6c4cbd0a3d41734e11286106c (patch)
tree358839420aa6c567ea727f4ff73d46800d1a7d4c /source4
parent520d2ae187e83b1cefb4d0c9bf823a051db6b14f (diff)
downloadsamba-4c62210098df44c6c4cbd0a3d41734e11286106c.tar.gz
CVE-2019-14902 repl_meta_data: Fix issue where inherited Security Descriptors were not replicated.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12497 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 5f29b955a94..c15361cdc1b 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -5634,6 +5634,15 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar)
replmd_ldb_message_sort(msg, ar->schema);
if (!remote_isDeleted) {
+ /*
+ * Ensure any local ACL inheritence is applied from
+ * the parent object.
+ *
+ * This is needed because descriptor is above
+ * repl_meta_data in the module stack, so this will
+ * not be trigered 'naturally' by the flow of
+ * operations.
+ */
ret = dsdb_module_schedule_sd_propagation(ar->module,
ar->objs->partition_dn,
msg->dn, true);
@@ -6335,9 +6344,20 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
}
if (sd_updated && !isDeleted) {
+ /*
+ * This is an existing object, so there is no need to
+ * inherit from the parent, but we must inherit any
+ * incoming changes to our child objects.
+ *
+ * This is needed because descriptor is above
+ * repl_meta_data in the module stack, so this will
+ * not be trigered 'naturally' by the flow of
+ * operations.
+ */
ret = dsdb_module_schedule_sd_propagation(ar->module,
ar->objs->partition_dn,
- msg->dn, true);
+ msg->dn,
+ false);
if (ret != LDB_SUCCESS) {
return ldb_operr(ldb);
}