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

libgpo: prefix some more calls with gpext_.

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-18 15:43:23 +01:00 committed by Andreas Schneider
parent 69997e2911
commit c39425f14b
6 changed files with 72 additions and 71 deletions

View File

@ -32,7 +32,7 @@ static struct gp_extension *extensions = NULL;
/**************************************************************** /****************************************************************
****************************************************************/ ****************************************************************/
struct gp_extension *get_gp_extension_list(void) struct gp_extension *gpext_get_gp_extension_list(void)
{ {
return extensions; return extensions;
} }
@ -101,7 +101,7 @@ static struct gp_extension_methods *get_methods_by_name(struct gp_extension *be,
/**************************************************************** /****************************************************************
****************************************************************/ ****************************************************************/
NTSTATUS unregister_gp_extension(const char *name) NTSTATUS gpext_unregister_gp_extension(const char *name)
{ {
struct gp_extension *ext; struct gp_extension *ext;
@ -121,7 +121,7 @@ NTSTATUS unregister_gp_extension(const char *name)
/**************************************************************** /****************************************************************
****************************************************************/ ****************************************************************/
NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx, NTSTATUS gpext_register_gp_extension(TALLOC_CTX *gpext_ctx,
int version, int version,
const char *name, const char *name,
const char *guid, const char *guid,
@ -340,7 +340,7 @@ static NTSTATUS gp_ext_info_add_reg_table(TALLOC_CTX *mem_ctx,
/**************************************************************** /****************************************************************
****************************************************************/ ****************************************************************/
NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx, NTSTATUS gpext_info_add_entry(TALLOC_CTX *mem_ctx,
const char *module, const char *module,
const char *ext_guid, const char *ext_guid,
struct gp_extension_reg_table *table, struct gp_extension_reg_table *table,
@ -538,7 +538,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
/**************************************************************** /****************************************************************
****************************************************************/ ****************************************************************/
NTSTATUS shutdown_gp_extensions(void) NTSTATUS gpext_shutdown_gp_extensions(void)
{ {
struct gp_extension *ext = NULL; struct gp_extension *ext = NULL;
@ -554,7 +554,7 @@ NTSTATUS shutdown_gp_extensions(void)
/**************************************************************** /****************************************************************
****************************************************************/ ****************************************************************/
NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx) NTSTATUS gpext_init_gp_extensions(TALLOC_CTX *mem_ctx)
{ {
NTSTATUS status; NTSTATUS status;
WERROR werr; WERROR werr;
@ -564,7 +564,7 @@ NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx)
struct gp_extension *gpext = NULL; struct gp_extension *gpext = NULL;
struct gp_registry_context *reg_ctx = NULL; struct gp_registry_context *reg_ctx = NULL;
if (get_gp_extension_list()) { if (gpext_get_gp_extension_list()) {
return NT_STATUS_OK; return NT_STATUS_OK;
} }
@ -637,7 +637,7 @@ NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx)
/**************************************************************** /****************************************************************
****************************************************************/ ****************************************************************/
NTSTATUS free_gp_extensions(void) NTSTATUS gpext_free_gp_extensions(void)
{ {
struct gp_extension *ext, *ext_next = NULL; struct gp_extension *ext, *ext_next = NULL;
@ -678,8 +678,10 @@ void gpext_debug_header(int lvl,
TALLOC_FREE(flags_str); TALLOC_FREE(flags_str);
} }
NTSTATUS process_gpo_list_with_extension( /****************************************************************
TALLOC_CTX *mem_ctx, ****************************************************************/
NTSTATUS gpext_process_gpo_list_with_extension(TALLOC_CTX *mem_ctx,
uint32_t flags, uint32_t flags,
const struct security_token *token, const struct security_token *token,
struct GROUP_POLICY_OBJECT *gpo_list, struct GROUP_POLICY_OBJECT *gpo_list,
@ -705,9 +707,9 @@ NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
struct GUID guid; struct GUID guid;
bool cse_found = false; bool cse_found = false;
status = init_gp_extensions(mem_ctx); status = gpext_init_gp_extensions(mem_ctx);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DEBUG(1,("init_gp_extensions failed: %s\n", DEBUG(1,("gpext_init_gp_extensions failed: %s\n",
nt_errstr(status))); nt_errstr(status)));
return status; return status;
} }

View File

@ -77,29 +77,28 @@ struct gp_extension_methods {
/* The following definitions come from libgpo/gpext/gpext.c */ /* The following definitions come from libgpo/gpext/gpext.c */
struct gp_extension *get_gp_extension_list(void); struct gp_extension *gpext_get_gp_extension_list(void);
NTSTATUS unregister_gp_extension(const char *name); NTSTATUS gpext_unregister_gp_extension(const char *name);
NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx, NTSTATUS gpext_register_gp_extension(TALLOC_CTX *gpext_ctx,
int version, int version,
const char *name, const char *name,
const char *guid, const char *guid,
struct gp_extension_methods *methods); struct gp_extension_methods *methods);
NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx, NTSTATUS gpext_info_add_entry(TALLOC_CTX *mem_ctx,
const char *module, const char *module,
const char *ext_guid, const char *ext_guid,
struct gp_extension_reg_table *table, struct gp_extension_reg_table *table,
struct gp_extension_reg_info *info); struct gp_extension_reg_info *info);
NTSTATUS shutdown_gp_extensions(void); NTSTATUS gpext_shutdown_gp_extensions(void);
NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx); NTSTATUS gpext_init_gp_extensions(TALLOC_CTX *mem_ctx);
NTSTATUS free_gp_extensions(void); NTSTATUS gpext_free_gp_extensions(void);
void gpext_debug_header(int lvl, void gpext_debug_header(int lvl,
const char *name, const char *name,
uint32_t flags, uint32_t flags,
struct GROUP_POLICY_OBJECT *gpo, struct GROUP_POLICY_OBJECT *gpo,
const char *extension_guid, const char *extension_guid,
const char *snapin_guid); const char *snapin_guid);
NTSTATUS process_gpo_list_with_extension( NTSTATUS gpext_process_gpo_list_with_extension(TALLOC_CTX *mem_ctx,
TALLOC_CTX *mem_ctx,
uint32_t flags, uint32_t flags,
const struct security_token *token, const struct security_token *token,
struct GROUP_POLICY_OBJECT *gpo_list, struct GROUP_POLICY_OBJECT *gpo_list,

View File

@ -549,12 +549,12 @@ NTSTATUS gpo_process_gpo_list(TALLOC_CTX *mem_ctx,
struct gp_registry_context *reg_ctx = NULL; struct gp_registry_context *reg_ctx = NULL;
WERROR werr; WERROR werr;
status = init_gp_extensions(mem_ctx); status = gpext_init_gp_extensions(mem_ctx);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
return status; return status;
} }
gp_ext_list = get_gp_extension_list(); gp_ext_list = gpext_get_gp_extension_list();
if (!gp_ext_list) { if (!gp_ext_list) {
return NT_STATUS_DLL_INIT_FAILED; return NT_STATUS_DLL_INIT_FAILED;
} }
@ -607,7 +607,7 @@ NTSTATUS gpo_process_gpo_list(TALLOC_CTX *mem_ctx,
done: done:
talloc_free(reg_ctx); talloc_free(reg_ctx);
talloc_free(root_key); talloc_free(root_key);
free_gp_extensions(); gpext_free_gp_extensions();
return status; return status;
} }

View File

@ -329,7 +329,7 @@ static NTSTATUS registry_get_reg_config(TALLOC_CTX *mem_ctx,
info = talloc_zero(mem_ctx, struct gp_extension_reg_info); info = talloc_zero(mem_ctx, struct gp_extension_reg_info);
NT_STATUS_HAVE_NO_MEMORY(info); NT_STATUS_HAVE_NO_MEMORY(info);
status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, status = gpext_info_add_entry(mem_ctx, GP_EXT_NAME,
GP_EXT_GUID_REGISTRY, GP_EXT_GUID_REGISTRY,
table, info); table, info);
NT_STATUS_NOT_OK_RETURN(status); NT_STATUS_NOT_OK_RETURN(status);
@ -354,7 +354,7 @@ static NTSTATUS registry_shutdown(void)
{ {
NTSTATUS status; NTSTATUS status;
status = unregister_gp_extension(GP_EXT_NAME); status = gpext_unregister_gp_extension(GP_EXT_NAME);
if (NT_STATUS_IS_OK(status)) { if (NT_STATUS_IS_OK(status)) {
return status; return status;
} }
@ -384,7 +384,7 @@ NTSTATUS gpext_registry_init(void)
ctx = talloc_init("gpext_registry_init"); ctx = talloc_init("gpext_registry_init");
NT_STATUS_HAVE_NO_MEMORY(ctx); NT_STATUS_HAVE_NO_MEMORY(ctx);
status = register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION, status = gpext_register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION,
GP_EXT_NAME, GP_EXT_GUID_REGISTRY, GP_EXT_NAME, GP_EXT_GUID_REGISTRY,
&registry_methods); &registry_methods);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {

View File

@ -65,7 +65,7 @@ static NTSTATUS scripts_get_reg_config(TALLOC_CTX *mem_ctx,
info = talloc_zero(mem_ctx, struct gp_extension_reg_info); info = talloc_zero(mem_ctx, struct gp_extension_reg_info);
NT_STATUS_HAVE_NO_MEMORY(info); NT_STATUS_HAVE_NO_MEMORY(info);
status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, status = gpext_info_add_entry(mem_ctx, GP_EXT_NAME,
GP_EXT_GUID_SCRIPTS, GP_EXT_GUID_SCRIPTS,
table, info); table, info);
NT_STATUS_NOT_OK_RETURN(status); NT_STATUS_NOT_OK_RETURN(status);
@ -412,7 +412,7 @@ static NTSTATUS scripts_shutdown(void)
{ {
NTSTATUS status; NTSTATUS status;
status = unregister_gp_extension(GP_EXT_NAME); status = gpext_unregister_gp_extension(GP_EXT_NAME);
if (NT_STATUS_IS_OK(status)) { if (NT_STATUS_IS_OK(status)) {
return status; return status;
} }
@ -442,7 +442,7 @@ NTSTATUS gpext_scripts_init(void)
ctx = talloc_init("gpext_scripts_init"); ctx = talloc_init("gpext_scripts_init");
NT_STATUS_HAVE_NO_MEMORY(ctx); NT_STATUS_HAVE_NO_MEMORY(ctx);
status = register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION, status = gpext_register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION,
GP_EXT_NAME, GP_EXT_GUID_SCRIPTS, GP_EXT_NAME, GP_EXT_GUID_SCRIPTS,
&scripts_methods); &scripts_methods);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {

View File

@ -204,7 +204,7 @@ static NTSTATUS security_get_reg_config(TALLOC_CTX *mem_ctx,
info = talloc_zero(mem_ctx, struct gp_extension_reg_info); info = talloc_zero(mem_ctx, struct gp_extension_reg_info);
NT_STATUS_HAVE_NO_MEMORY(info); NT_STATUS_HAVE_NO_MEMORY(info);
status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, status = gpext_info_add_entry(mem_ctx, GP_EXT_NAME,
GP_EXT_GUID_SECURITY, GP_EXT_GUID_SECURITY,
table, info); table, info);
NT_STATUS_NOT_OK_RETURN(status); NT_STATUS_NOT_OK_RETURN(status);
@ -230,7 +230,7 @@ static NTSTATUS security_shutdown(void)
{ {
NTSTATUS status; NTSTATUS status;
status = unregister_gp_extension(GP_EXT_NAME); status = gpext_unregister_gp_extension(GP_EXT_NAME);
if (NT_STATUS_IS_OK(status)) { if (NT_STATUS_IS_OK(status)) {
return status; return status;
} }
@ -260,7 +260,7 @@ NTSTATUS gpext_security_init(void)
ctx = talloc_init("gpext_security_init"); ctx = talloc_init("gpext_security_init");
NT_STATUS_HAVE_NO_MEMORY(ctx); NT_STATUS_HAVE_NO_MEMORY(ctx);
status = register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION, status = gpext_register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION,
GP_EXT_NAME, GP_EXT_GUID_SECURITY, GP_EXT_NAME, GP_EXT_GUID_SECURITY,
&security_methods); &security_methods);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {