1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libgpo: remove unused loadparm_context from functions.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Günther Deschner 2013-12-10 18:26:51 +01:00 committed by Andreas Schneider
parent b756e02ac4
commit 24cc4d5ac1
5 changed files with 7 additions and 19 deletions

View File

@ -20,7 +20,6 @@
#ifndef __GPO_H__ #ifndef __GPO_H__
#define __GPO_H__ #define __GPO_H__
struct loadparm_context;
#include "ads.h" #include "ads.h"
enum GPO_LINK_TYPE { enum GPO_LINK_TYPE {
@ -176,7 +175,6 @@ NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
char **unix_path); char **unix_path);
NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx, NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
ADS_STRUCT *ads, ADS_STRUCT *ads,
struct loadparm_context *lp_ctx,
const char *cache_dir, const char *cache_dir,
struct GROUP_POLICY_OBJECT *gpo); struct GROUP_POLICY_OBJECT *gpo);
NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx, 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, NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
const char *cache_dir, const char *cache_dir,
struct loadparm_context *lp_ctx,
uint32_t flags, uint32_t flags,
struct GROUP_POLICY_OBJECT *gpo); struct GROUP_POLICY_OBJECT *gpo);
NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads, NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
const char *cache_dir, const char *cache_dir,
struct loadparm_context *lp_ctx,
uint32_t flags, uint32_t flags,
struct GROUP_POLICY_OBJECT *gpo_list); struct GROUP_POLICY_OBJECT *gpo_list);
NTSTATUS gpo_get_unix_path(TALLOC_CTX *mem_ctx, 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); const char **filename_out);
ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
const char *dn, const char *dn,
struct security_token **token); struct security_token **token);

View File

@ -118,7 +118,7 @@ static NTSTATUS gpo_prepare_local_store(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK; 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) const char *server, const char *service, void *ret_cli)
{ {
NTSTATUS result; 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, NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
ADS_STRUCT *ads, ADS_STRUCT *ads,
struct loadparm_context *lp_ctx,
const char *cache_dir, const char *cache_dir,
struct GROUP_POLICY_OBJECT *gpo) struct GROUP_POLICY_OBJECT *gpo)
{ {
@ -166,10 +165,9 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
NT_STATUS_NOT_OK_RETURN(result); 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); NT_STATUS_NOT_OK_RETURN(result);
result = gpo_prepare_local_store(mem_ctx, cache_dir, unix_path); result = gpo_prepare_local_store(mem_ctx, cache_dir, unix_path);
NT_STATUS_NOT_OK_RETURN(result); NT_STATUS_NOT_OK_RETURN(result);

View File

@ -21,7 +21,6 @@
#include "libgpo/gpo.h" #include "libgpo/gpo.h"
#include "auth.h" #include "auth.h"
#include "../libcli/security/security.h" #include "../libcli/security/security.h"
#include "lib/param/loadparm.h"
/**************************************************************** /****************************************************************
parse the raw extension string into a GP_EXT structure parse the raw extension string into a GP_EXT structure

View File

@ -626,7 +626,6 @@ ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
NTSTATUS check_refresh_gpo(ADS_STRUCT *ads, NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
const char *cache_dir, const char *cache_dir,
struct loadparm_context *lp_ctx,
uint32_t flags, uint32_t flags,
struct GROUP_POLICY_OBJECT *gpo) 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")); 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)) { if (!NT_STATUS_IS_OK(result)) {
goto out; goto out;
} }
@ -713,7 +712,6 @@ NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads, NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
const char *cache_dir, const char *cache_dir,
struct loadparm_context *lp_ctx,
uint32_t flags, uint32_t flags,
struct GROUP_POLICY_OBJECT *gpo_list) 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) { 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)) { if (!NT_STATUS_IS_OK(result)) {
goto out; goto out;
} }
@ -834,7 +832,6 @@ NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
const char *dn, const char *dn,
struct security_token **token) struct security_token **token)
{ {

View File

@ -78,7 +78,7 @@ static int net_ads_gpo_refresh(struct net_context *c, int argc, const char **arg
d_printf(_("* fetching token ")); d_printf(_("* fetching token "));
if (uac & UF_WORKSTATION_TRUST_ACCOUNT) { 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 { } else {
status = ads_get_sid_token(ads, mem_ctx, dn, &token); 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 ")); d_printf(_("* Refreshing Group Policy Data "));
if (!NT_STATUS_IS_OK(result = check_refresh_gpo_list(ads, mem_ctx, if (!NT_STATUS_IS_OK(result = check_refresh_gpo_list(ads, mem_ctx,
cache_path(GPO_CACHE_DIR), cache_path(GPO_CACHE_DIR),
NULL,
flags, flags,
gpo_list))) { gpo_list))) {
d_printf(_("failed: %s\n"), nt_errstr(result)); 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); argv[0], dn);
if (uac & UF_WORKSTATION_TRUST_ACCOUNT) { 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 { } else {
status = ads_get_sid_token(ads, mem_ctx, dn, &token); 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); argv[0], dn);
if (uac & UF_WORKSTATION_TRUST_ACCOUNT) { 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 { } else {
status = ads_get_sid_token(ads, mem_ctx, dn, &token); status = ads_get_sid_token(ads, mem_ctx, dn, &token);
} }