2 * Unix SMB/CIFS implementation.
4 * Copyright (C) Guenther Deschner 2007-2008
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #include "librpc/gen_ndr/winreg.h"
25 #define KEY_WINLOGON_GPEXT_PATH "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\GPExtensions"
27 #define SAMBA_SUBSYSTEM_GPEXT "gpext"
29 #define SMB_GPEXT_INTERFACE_VERSION 1
34 struct gp_extension_methods
*methods
;
35 struct gp_extension
*prev
, *next
;
38 struct gp_extension_reg_table
{
40 enum winreg_Type type
;
44 struct gp_extension_reg_entry
{
46 struct registry_value
*data
;
49 struct gp_extension_reg_info_entry
{
52 struct gp_extension_reg_entry
*entries
;
55 struct gp_extension_reg_info
{
57 struct gp_extension_reg_info_entry
*entries
;
60 struct gp_extension_methods
{
62 NTSTATUS (*initialize
)(TALLOC_CTX
*mem_ctx
);
64 NTSTATUS (*process_group_policy
)(ADS_STRUCT
*ads
,
67 struct registry_key
*root_key
,
68 const struct security_token
*token
,
69 struct GROUP_POLICY_OBJECT
*gpo
,
70 const char *extension_guid
,
71 const char *snapin_guid
);
73 NTSTATUS (*process_group_policy2
)(ADS_STRUCT
*ads
,
76 const struct security_token
*token
,
77 struct GROUP_POLICY_OBJECT
*gpo_list
,
78 const char *extension_guid
);
80 NTSTATUS (*get_reg_config
)(TALLOC_CTX
*mem_ctx
,
81 struct gp_extension_reg_info
**info
);
83 NTSTATUS (*shutdown
)(void);
86 /* The following definitions come from libgpo/gpext/gpext.c */
88 struct gp_extension
*get_gp_extension_list(void);
89 NTSTATUS
unregister_gp_extension(const char *name
);
90 NTSTATUS
register_gp_extension(TALLOC_CTX
*gpext_ctx
,
94 struct gp_extension_methods
*methods
);
95 NTSTATUS
gp_ext_info_add_entry(TALLOC_CTX
*mem_ctx
,
98 struct gp_extension_reg_table
*table
,
99 struct gp_extension_reg_info
*info
);
100 NTSTATUS
shutdown_gp_extensions(void);
101 NTSTATUS
init_gp_extensions(TALLOC_CTX
*mem_ctx
);
102 NTSTATUS
free_gp_extensions(void);
103 void debug_gpext_header(int lvl
,
106 struct GROUP_POLICY_OBJECT
*gpo
,
107 const char *extension_guid
,
108 const char *snapin_guid
);
109 NTSTATUS
process_gpo_list_with_extension(ADS_STRUCT
*ads
,
112 const struct security_token
*token
,
113 struct GROUP_POLICY_OBJECT
*gpo_list
,
114 const char *extension_guid
,
115 const char *snapin_guid
);
116 NTSTATUS
gpext_process_extension(ADS_STRUCT
*ads
,
119 const struct security_token
*token
,
120 struct registry_key
*root_key
,
121 struct GROUP_POLICY_OBJECT
*gpo
,
122 const char *extension_guid
,
123 const char *snapin_guid
);
126 #endif /* __GPEXT_H__ */