From f6bc2198503463880ce108c554c38884a5b88a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Thu, 19 Dec 2013 17:26:59 +0100 Subject: libgpo: directly call gpext_process_extension() from gpo_process_gpo_list. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Andreas Schneider --- libgpo/gpo_util.c | 46 +++++----------------------------------------- 1 file changed, 5 insertions(+), 41 deletions(-) (limited to 'libgpo') diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c index 2f1c997df65..412ab7a969f 100644 --- a/libgpo/gpo_util.c +++ b/libgpo/gpo_util.c @@ -525,22 +525,10 @@ NTSTATUS gpo_process_gpo_list(TALLOC_CTX *mem_ctx, uint32_t flags) { NTSTATUS status = NT_STATUS_OK; - struct gp_extension *gp_ext_list = NULL; - struct gp_extension *gp_ext = NULL; struct registry_key *root_key = NULL; struct gp_registry_context *reg_ctx = NULL; WERROR werr; - status = gpext_init_gp_extensions(mem_ctx); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - gp_ext_list = gpext_get_gp_extension_list(); - if (!gp_ext_list) { - return NT_STATUS_DLL_INIT_FAILED; - } - /* get the key here */ if (flags & GPO_LIST_FLAG_MACHINE) { werr = gp_init_reg_ctx(mem_ctx, KEY_HKLM, REG_KEY_WRITE, @@ -558,35 +546,11 @@ NTSTATUS gpo_process_gpo_list(TALLOC_CTX *mem_ctx, root_key = reg_ctx->curr_key; - for (gp_ext = gp_ext_list; gp_ext; gp_ext = gp_ext->next) { - - const char *guid_str = NULL; - - guid_str = GUID_string(mem_ctx, gp_ext->guid); - if (!guid_str) { - status = NT_STATUS_NO_MEMORY; - goto done; - } - - if (extensions_guid_filter && - (!strequal(guid_str, extensions_guid_filter))) { - continue; - } - - DEBUG(0,("-------------------------------------------------\n")); - DEBUG(0,("gpo_process_gpo_list: processing ext: %s {%s}\n", - gp_ext->name, guid_str)); - - - status = gpo_process_gpo_list_by_ext(mem_ctx, token, - root_key, gpo_list, - guid_str, flags); - if (!NT_STATUS_IS_OK(status)) { - goto done; - } - } - - done: + status = gpext_process_extension(mem_ctx, + flags, token, root_key, + NULL, + gpo_list, + extensions_guid_filter); talloc_free(reg_ctx); talloc_free(root_key); gpext_free_gp_extensions(); -- cgit v1.2.1