2008-02-29 18:03:23 +03:00
/*
* Unix SMB / CIFS implementation .
* Group Policy Support
* Copyright ( C ) Guenther Deschner 2007 - 2008
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , see < http : //www.gnu.org/licenses/>.
*/
2009-03-01 04:13:21 +03:00
# ifndef __GPEXT_H__
# define __GPEXT_H__
# include "librpc/gen_ndr/winreg.h"
2008-02-29 18:03:23 +03:00
# define KEY_WINLOGON_GPEXT_PATH "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\GPExtensions"
# define SAMBA_SUBSYSTEM_GPEXT "gpext"
# define SMB_GPEXT_INTERFACE_VERSION 1
struct gp_extension {
struct GUID * guid ;
const char * name ;
struct gp_extension_methods * methods ;
struct gp_extension * prev , * next ;
} ;
struct gp_extension_reg_table {
const char * val ;
enum winreg_Type type ;
const char * data ;
} ;
struct gp_extension_reg_entry {
const char * value ;
struct registry_value * data ;
} ;
struct gp_extension_reg_info_entry {
struct GUID guid ;
size_t num_entries ;
struct gp_extension_reg_entry * entries ;
} ;
struct gp_extension_reg_info {
size_t num_entries ;
struct gp_extension_reg_info_entry * entries ;
} ;
struct gp_extension_methods {
NTSTATUS ( * initialize ) ( TALLOC_CTX * mem_ctx ) ;
2013-12-13 18:52:31 +04:00
NTSTATUS ( * process_group_policy ) ( TALLOC_CTX * mem_ctx ,
2008-02-29 18:03:23 +03:00
uint32_t flags ,
struct registry_key * root_key ,
2010-08-26 16:08:22 +04:00
const struct security_token * token ,
2013-12-20 01:23:44 +04:00
const struct GROUP_POLICY_OBJECT * deleted_gpo_list ,
const struct GROUP_POLICY_OBJECT * changed_gpo_list ) ;
2008-02-29 18:03:23 +03:00
NTSTATUS ( * get_reg_config ) ( TALLOC_CTX * mem_ctx ,
struct gp_extension_reg_info * * info ) ;
NTSTATUS ( * shutdown ) ( void ) ;
} ;
2009-03-01 04:13:21 +03:00
2009-03-01 18:25:57 +03:00
/* The following definitions come from libgpo/gpext/gpext.c */
2013-12-18 18:43:23 +04:00
struct gp_extension * gpext_get_gp_extension_list ( void ) ;
NTSTATUS gpext_unregister_gp_extension ( const char * name ) ;
NTSTATUS gpext_register_gp_extension ( TALLOC_CTX * gpext_ctx ,
int version ,
const char * name ,
const char * guid ,
struct gp_extension_methods * methods ) ;
NTSTATUS gpext_info_add_entry ( TALLOC_CTX * mem_ctx ,
const char * module ,
const char * ext_guid ,
struct gp_extension_reg_table * table ,
struct gp_extension_reg_info * info ) ;
NTSTATUS gpext_shutdown_gp_extensions ( void ) ;
NTSTATUS gpext_init_gp_extensions ( TALLOC_CTX * mem_ctx ) ;
NTSTATUS gpext_free_gp_extensions ( void ) ;
2013-12-18 18:24:17 +04:00
void gpext_debug_header ( int lvl ,
2009-03-01 18:25:57 +03:00
const char * name ,
uint32_t flags ,
2013-12-20 01:23:44 +04:00
const struct GROUP_POLICY_OBJECT * gpo ,
2009-03-01 18:25:57 +03:00
const char * extension_guid ,
const char * snapin_guid ) ;
2013-12-13 18:54:10 +04:00
NTSTATUS gpext_process_extension ( TALLOC_CTX * mem_ctx ,
2009-03-01 18:25:57 +03:00
uint32_t flags ,
2010-08-26 16:08:22 +04:00
const struct security_token * token ,
2009-03-01 18:25:57 +03:00
struct registry_key * root_key ,
2013-12-18 22:33:28 +04:00
const struct GROUP_POLICY_OBJECT * deleted_gpo_list ,
const struct GROUP_POLICY_OBJECT * changed_gpo_list ,
2013-12-19 20:25:37 +04:00
const char * extension_guid ) ;
2009-03-01 18:25:57 +03:00
2009-03-01 04:13:21 +03:00
# endif /* __GPEXT_H__ */