summaryrefslogtreecommitdiff
path: root/libgpo/gpext/gpext.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgpo/gpext/gpext.c')
-rw-r--r--libgpo/gpext/gpext.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index 7c83aa577fa..85f0831a048 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -733,12 +733,12 @@ NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
struct registry_key *root_key,
const struct GROUP_POLICY_OBJECT *deleted_gpo_list,
const struct GROUP_POLICY_OBJECT *changed_gpo_list,
- const char *extension_guid,
- const char *snapin_guid)
+ const char *extension_guid_filter)
{
NTSTATUS status;
struct gp_extension *ext = NULL;
const struct GROUP_POLICY_OBJECT *gpo;
+ struct GUID extension_guid_filter_guid;
status = gpext_init_gp_extensions(mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
@@ -747,11 +747,25 @@ NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
return status;
}
+ if (extension_guid_filter) {
+ status = GUID_from_string(extension_guid_filter,
+ &extension_guid_filter_guid);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+ }
+
for (ext = extensions; ext; ext = ext->next) {
struct GROUP_POLICY_OBJECT *deleted_gpo_list_filtered = NULL;
struct GROUP_POLICY_OBJECT *changed_gpo_list_filtered = NULL;
+ if (extension_guid_filter) {
+ if (!GUID_equal(&extension_guid_filter_guid, ext->guid)) {
+ continue;
+ }
+ }
+
for (gpo = deleted_gpo_list; gpo; gpo = gpo->next) {
bool is_present = false;