diff options
author | Günther Deschner <gd@samba.org> | 2013-12-19 17:25:37 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-01-07 16:59:38 +0100 |
commit | 685da81365587aacba46bd73d12dadc247614cb2 (patch) | |
tree | a1bbb378962030681c7c0e1da8a4921aff3a39c3 /libgpo | |
parent | bb351dec9b693e387b10bc26d94ada7f0995fa37 (diff) | |
download | samba-685da81365587aacba46bd73d12dadc247614cb2.tar.gz |
libgpo: implement CSE filtering in gpext_process_extension().
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'libgpo')
-rw-r--r-- | libgpo/gpext/gpext.c | 18 | ||||
-rw-r--r-- | libgpo/gpext/gpext.h | 3 | ||||
-rw-r--r-- | libgpo/gpo_util.c | 3 |
3 files changed, 18 insertions, 6 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; diff --git a/libgpo/gpext/gpext.h b/libgpo/gpext/gpext.h index 01368b783f8..600af23d4c9 100644 --- a/libgpo/gpext/gpext.h +++ b/libgpo/gpext/gpext.h @@ -103,8 +103,7 @@ 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); #endif /* __GPEXT_H__ */ diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c index 3edb4a59c72..2f1c997df65 100644 --- a/libgpo/gpo_util.c +++ b/libgpo/gpo_util.c @@ -469,8 +469,7 @@ static NTSTATUS gpo_process_a_gpo(TALLOC_CTX *mem_ctx, ntstatus = gpext_process_extension(mem_ctx, flags, token, root_key, NULL, gpo, - gp_ext->extensions_guid[i], - gp_ext->snapins_guid[i]); + gp_ext->extensions_guid[i]); if (!NT_STATUS_IS_OK(ntstatus)) { return ntstatus; } |