From 24cc4d5ac1a44f66322b3e8bfd17f266fcac0e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Tue, 10 Dec 2013 18:26:51 +0100 Subject: [PATCH] libgpo: remove unused loadparm_context from functions. 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.h | 5 ----- libgpo/gpo_fetch.c | 6 ++---- libgpo/gpo_ldap.c | 1 - libgpo/gpo_util.c | 7 ++----- source3/utils/net_ads_gpo.c | 7 +++---- 5 files changed, 7 insertions(+), 19 deletions(-) diff --git a/libgpo/gpo.h b/libgpo/gpo.h index 62e9091156e..6e677c9c4f4 100644 --- a/libgpo/gpo.h +++ b/libgpo/gpo.h @@ -20,7 +20,6 @@ #ifndef __GPO_H__ #define __GPO_H__ -struct loadparm_context; #include "ads.h" enum GPO_LINK_TYPE { @@ -176,7 +175,6 @@ NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx, char **unix_path); NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads, - struct loadparm_context *lp_ctx, const char *cache_dir, struct GROUP_POLICY_OBJECT *gpo); NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx, @@ -255,13 +253,11 @@ ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads, NTSTATUS check_refresh_gpo(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *cache_dir, - struct loadparm_context *lp_ctx, uint32_t flags, struct GROUP_POLICY_OBJECT *gpo); NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *cache_dir, - struct loadparm_context *lp_ctx, uint32_t flags, struct GROUP_POLICY_OBJECT *gpo_list); NTSTATUS gpo_get_unix_path(TALLOC_CTX *mem_ctx, @@ -276,7 +272,6 @@ NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx, const char **filename_out); ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, - struct loadparm_context *lp_ctx, const char *dn, struct security_token **token); diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c index 4e895bf544e..2d550691714 100644 --- a/libgpo/gpo_fetch.c +++ b/libgpo/gpo_fetch.c @@ -118,7 +118,7 @@ static NTSTATUS gpo_prepare_local_store(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } -static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct loadparm_context *lp_ctx, +static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, const char *server, const char *service, void *ret_cli) { NTSTATUS result; @@ -150,7 +150,6 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct loadparm_context *lp_ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads, - struct loadparm_context *lp_ctx, const char *cache_dir, struct GROUP_POLICY_OBJECT *gpo) { @@ -166,10 +165,9 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx, NT_STATUS_NOT_OK_RETURN(result); - result = gpo_connect_server(ads, lp_ctx, server, service, &cli); + result = gpo_connect_server(ads, server, service, &cli); NT_STATUS_NOT_OK_RETURN(result); - result = gpo_prepare_local_store(mem_ctx, cache_dir, unix_path); NT_STATUS_NOT_OK_RETURN(result); diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c index 803e027cd32..d46c48f8f3e 100644 --- a/libgpo/gpo_ldap.c +++ b/libgpo/gpo_ldap.c @@ -21,7 +21,6 @@ #include "libgpo/gpo.h" #include "auth.h" #include "../libcli/security/security.h" -#include "lib/param/loadparm.h" /**************************************************************** parse the raw extension string into a GP_EXT structure diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c index cfb4512aefc..43526eda893 100644 --- a/libgpo/gpo_util.c +++ b/libgpo/gpo_util.c @@ -626,7 +626,6 @@ ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads, NTSTATUS check_refresh_gpo(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *cache_dir, - struct loadparm_context *lp_ctx, uint32_t flags, struct GROUP_POLICY_OBJECT *gpo) { @@ -666,7 +665,7 @@ NTSTATUS check_refresh_gpo(ADS_STRUCT *ads, DEBUG(1,("check_refresh_gpo: need to refresh GPO\n")); - result = gpo_fetch_files(mem_ctx, ads, lp_ctx, cache_dir, gpo); + result = gpo_fetch_files(mem_ctx, ads, cache_dir, gpo); if (!NT_STATUS_IS_OK(result)) { goto out; } @@ -713,7 +712,6 @@ NTSTATUS check_refresh_gpo(ADS_STRUCT *ads, NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *cache_dir, - struct loadparm_context *lp_ctx, uint32_t flags, struct GROUP_POLICY_OBJECT *gpo_list) { @@ -726,7 +724,7 @@ NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads, for (gpo = gpo_list; gpo; gpo = gpo->next) { - result = check_refresh_gpo(ads, mem_ctx, cache_dir, lp_ctx, flags, gpo); + result = check_refresh_gpo(ads, mem_ctx, cache_dir, flags, gpo); if (!NT_STATUS_IS_OK(result)) { goto out; } @@ -834,7 +832,6 @@ NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx, ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, - struct loadparm_context *lp_ctx, const char *dn, struct security_token **token) { diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c index 56451ab11e1..7c397e68a05 100644 --- a/source3/utils/net_ads_gpo.c +++ b/source3/utils/net_ads_gpo.c @@ -78,7 +78,7 @@ static int net_ads_gpo_refresh(struct net_context *c, int argc, const char **arg d_printf(_("* fetching token ")); if (uac & UF_WORKSTATION_TRUST_ACCOUNT) { - status = gp_get_machine_token(ads, mem_ctx, NULL, dn, &token); + status = gp_get_machine_token(ads, mem_ctx, dn, &token); } else { status = ads_get_sid_token(ads, mem_ctx, dn, &token); } @@ -101,7 +101,6 @@ static int net_ads_gpo_refresh(struct net_context *c, int argc, const char **arg d_printf(_("* Refreshing Group Policy Data ")); if (!NT_STATUS_IS_OK(result = check_refresh_gpo_list(ads, mem_ctx, cache_path(GPO_CACHE_DIR), - NULL, flags, gpo_list))) { d_printf(_("failed: %s\n"), nt_errstr(result)); @@ -337,7 +336,7 @@ static int net_ads_gpo_list(struct net_context *c, int argc, const char **argv) argv[0], dn); if (uac & UF_WORKSTATION_TRUST_ACCOUNT) { - status = gp_get_machine_token(ads, mem_ctx, NULL, dn, &token); + status = gp_get_machine_token(ads, mem_ctx, dn, &token); } else { status = ads_get_sid_token(ads, mem_ctx, dn, &token); } @@ -420,7 +419,7 @@ static int net_ads_gpo_apply(struct net_context *c, int argc, const char **argv) argv[0], dn); if (uac & UF_WORKSTATION_TRUST_ACCOUNT) { - status = gp_get_machine_token(ads, mem_ctx, NULL, dn, &token); + status = gp_get_machine_token(ads, mem_ctx, dn, &token); } else { status = ads_get_sid_token(ads, mem_ctx, dn, &token); }