summaryrefslogtreecommitdiff
path: root/libgpo
diff options
context:
space:
mode:
authorLutz Justen <ljusten@google.com>2017-09-21 10:01:58 -0700
committerKarolin Seeger <kseeger@samba.org>2017-10-25 08:43:04 +0200
commit3e7a1d13e3d80f4aad647799f57535f8fbf7041c (patch)
tree732ad814942def6e0da42fa3aaa77d930774e796 /libgpo
parent9501b007f50e4182ab55e1eb961d1dbb1f04a2ee (diff)
downloadsamba-3e7a1d13e3d80f4aad647799f57535f8fbf7041c.tar.gz
lib: gpo: Changes order to match GPO application order.
The order of GPOs in a gpo_list generated by ads_get_gpo_list did not match the order of application. Since GPOs are pushed to the FRONT of gpo_list, GPOs have to be pushed in the opposite order of application. (Pushing to front is useful to get inheritance blocking right). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13046 Signed-off-by: Lutz Justen <ljusten@google.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> (cherry picked from commit 6a531773b841f6b713226d1166a1e7d4dbc9b282)
Diffstat (limited to 'libgpo')
-rw-r--r--libgpo/gpo_ldap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index 4533d61a1e3..7ede12c3c21 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -812,12 +812,6 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
dump_gplink(&gp_link);
}
- /* block inheritance from now on */
- if (gp_link.gp_opts &
- GPOPTIONS_BLOCK_INHERITANCE) {
- add_only_forced_gpos = true;
- }
-
status = add_gplink_to_gpo_list(ads,
mem_ctx,
gpo_list,
@@ -829,6 +823,12 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
if (!ADS_ERR_OK(status)) {
return status;
}
+
+ /* block inheritance from now on */
+ if (gp_link.gp_opts &
+ GPOPTIONS_BLOCK_INHERITANCE) {
+ add_only_forced_gpos = true;
+ }
}
}
@@ -858,12 +858,6 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
dump_gplink(&gp_link);
}
- /* block inheritance from now on */
- if (gp_link.gp_opts &
- GPOPTIONS_BLOCK_INHERITANCE) {
- add_only_forced_gpos = true;
- }
-
status = add_gplink_to_gpo_list(ads,
mem_ctx,
gpo_list,
@@ -875,6 +869,12 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
if (!ADS_ERR_OK(status)) {
return status;
}
+
+ /* block inheritance from now on */
+ if (gp_link.gp_opts &
+ GPOPTIONS_BLOCK_INHERITANCE) {
+ add_only_forced_gpos = true;
+ }
}
}