mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +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:
parent
69997e2911
commit
c39425f14b
@ -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,11 +121,11 @@ 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,
|
||||||
struct gp_extension_methods *methods)
|
struct gp_extension_methods *methods)
|
||||||
{
|
{
|
||||||
struct gp_extension_methods *test;
|
struct gp_extension_methods *test;
|
||||||
struct gp_extension *entry;
|
struct gp_extension *entry;
|
||||||
@ -340,11 +340,11 @@ 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,
|
||||||
struct gp_extension_reg_info *info)
|
struct gp_extension_reg_info *info)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct gp_extension_reg_info_entry *entry = NULL;
|
struct gp_extension_reg_info_entry *entry = NULL;
|
||||||
@ -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,13 +678,15 @@ void gpext_debug_header(int lvl,
|
|||||||
TALLOC_FREE(flags_str);
|
TALLOC_FREE(flags_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS process_gpo_list_with_extension(
|
/****************************************************************
|
||||||
TALLOC_CTX *mem_ctx,
|
****************************************************************/
|
||||||
uint32_t flags,
|
|
||||||
const struct security_token *token,
|
NTSTATUS gpext_process_gpo_list_with_extension(TALLOC_CTX *mem_ctx,
|
||||||
struct GROUP_POLICY_OBJECT *gpo_list,
|
uint32_t flags,
|
||||||
const char *extension_guid,
|
const struct security_token *token,
|
||||||
const char *snapin_guid)
|
struct GROUP_POLICY_OBJECT *gpo_list,
|
||||||
|
const char *extension_guid,
|
||||||
|
const char *snapin_guid)
|
||||||
{
|
{
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -77,34 +77,33 @@ 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,
|
const char *extension_guid,
|
||||||
const char *extension_guid,
|
const char *snapin_guid);
|
||||||
const char *snapin_guid);
|
|
||||||
NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
|
NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
const struct security_token *token,
|
const struct security_token *token,
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -329,9 +329,9 @@ 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);
|
||||||
|
|
||||||
*reg_info = info;
|
*reg_info = info;
|
||||||
@ -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,9 +384,9 @@ 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,
|
||||||
®istry_methods);
|
®istry_methods);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
TALLOC_FREE(ctx);
|
TALLOC_FREE(ctx);
|
||||||
}
|
}
|
||||||
|
@ -65,9 +65,9 @@ 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);
|
||||||
|
|
||||||
*reg_info = info;
|
*reg_info = info;
|
||||||
@ -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,9 +442,9 @@ 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)) {
|
||||||
TALLOC_FREE(ctx);
|
TALLOC_FREE(ctx);
|
||||||
}
|
}
|
||||||
|
@ -204,9 +204,9 @@ 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);
|
||||||
|
|
||||||
*reg_info = info;
|
*reg_info = info;
|
||||||
@ -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,9 +260,9 @@ 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)) {
|
||||||
TALLOC_FREE(ctx);
|
TALLOC_FREE(ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user