| 1 | /*
|
|---|
| 2 | * Unix SMB/CIFS implementation.
|
|---|
| 3 | * Group Policy Support
|
|---|
| 4 | * Copyright (C) Guenther Deschner 2007-2008
|
|---|
| 5 | *
|
|---|
| 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.
|
|---|
| 10 | *
|
|---|
| 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.
|
|---|
| 15 | *
|
|---|
| 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/>.
|
|---|
| 18 | */
|
|---|
| 19 |
|
|---|
| 20 | #define KEY_WINLOGON_GPEXT_PATH "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\GPExtensions"
|
|---|
| 21 |
|
|---|
| 22 | #define SAMBA_SUBSYSTEM_GPEXT "gpext"
|
|---|
| 23 |
|
|---|
| 24 | #define SMB_GPEXT_INTERFACE_VERSION 1
|
|---|
| 25 |
|
|---|
| 26 | struct gp_extension {
|
|---|
| 27 | struct GUID *guid;
|
|---|
| 28 | const char *name;
|
|---|
| 29 | struct gp_extension_methods *methods;
|
|---|
| 30 | struct gp_extension *prev, *next;
|
|---|
| 31 | };
|
|---|
| 32 |
|
|---|
| 33 | struct gp_extension_reg_table {
|
|---|
| 34 | const char *val;
|
|---|
| 35 | enum winreg_Type type;
|
|---|
| 36 | const char *data;
|
|---|
| 37 | };
|
|---|
| 38 |
|
|---|
| 39 | struct gp_extension_reg_entry {
|
|---|
| 40 | const char *value;
|
|---|
| 41 | struct registry_value *data;
|
|---|
| 42 | };
|
|---|
| 43 |
|
|---|
| 44 | struct gp_extension_reg_info_entry {
|
|---|
| 45 | struct GUID guid;
|
|---|
| 46 | size_t num_entries;
|
|---|
| 47 | struct gp_extension_reg_entry *entries;
|
|---|
| 48 | };
|
|---|
| 49 |
|
|---|
| 50 | struct gp_extension_reg_info {
|
|---|
| 51 | size_t num_entries;
|
|---|
| 52 | struct gp_extension_reg_info_entry *entries;
|
|---|
| 53 | };
|
|---|
| 54 |
|
|---|
| 55 | struct gp_extension_methods {
|
|---|
| 56 |
|
|---|
| 57 | NTSTATUS (*initialize)(TALLOC_CTX *mem_ctx);
|
|---|
| 58 |
|
|---|
| 59 | NTSTATUS (*process_group_policy)(ADS_STRUCT *ads,
|
|---|
| 60 | TALLOC_CTX *mem_ctx,
|
|---|
| 61 | uint32_t flags,
|
|---|
| 62 | struct registry_key *root_key,
|
|---|
| 63 | const struct nt_user_token *token,
|
|---|
| 64 | struct GROUP_POLICY_OBJECT *gpo,
|
|---|
| 65 | const char *extension_guid,
|
|---|
| 66 | const char *snapin_guid);
|
|---|
| 67 |
|
|---|
| 68 | NTSTATUS (*process_group_policy2)(ADS_STRUCT *ads,
|
|---|
| 69 | TALLOC_CTX *mem_ctx,
|
|---|
| 70 | uint32_t flags,
|
|---|
| 71 | const struct nt_user_token *token,
|
|---|
| 72 | struct GROUP_POLICY_OBJECT *gpo_list,
|
|---|
| 73 | const char *extension_guid);
|
|---|
| 74 |
|
|---|
| 75 | NTSTATUS (*get_reg_config)(TALLOC_CTX *mem_ctx,
|
|---|
| 76 | struct gp_extension_reg_info **info);
|
|---|
| 77 |
|
|---|
| 78 | NTSTATUS (*shutdown)(void);
|
|---|
| 79 | };
|
|---|