2
* Unix SMB/CIFS implementation.
3
* Group Policy Object Support
4
* Copyright (C) Guenther Deschner 2005
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 2 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, write to the Free Software
18
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31
#define GPO_FLAG_DISABLE 0x00000001
32
#define GPO_FLAG_FORCE 0x00000002
35
#define GPO_LIST_FLAG_MACHINE 0x00000001
36
#define GPO_LIST_FLAG_SITEONLY 0x00000002
38
#define GPO_VERSION_USER(x) (x >> 16)
39
#define GPO_VERSION_MACHINE(x) (x & 0xffff)
41
struct GROUP_POLICY_OBJECT {
42
uint32 options; /* GPFLAGS_* */
45
const char *file_sys_path;
46
const char *display_name;
49
uint32 link_type; /* GPO_LINK_TYPE */
50
const char *user_extensions;
51
const char *machine_extensions;
52
struct GROUP_POLICY_OBJECT *next, *prev;
55
/* the following is seen on the DS (see adssearch.pl for details) */
57
/* the type field in a 'gPLink', the same as GPO_FLAG ? */
58
#define GPO_LINK_OPT_NONE 0x00000000
59
#define GPO_LINK_OPT_DISABLED 0x00000001
60
#define GPO_LINK_OPT_ENFORCED 0x00000002
62
/* GPO_LINK_OPT_ENFORCED takes precedence over GPOPTIONS_BLOCK_INHERITANCE */
64
/* 'gPOptions', maybe a bitmask as well */
66
GPOPTIONS_INHERIT = 0,
67
GPOPTIONS_BLOCK_INHERITANCE = 1
70
/* 'flags' in a 'groupPolicyContainer' object */
71
#define GPFLAGS_ALL_ENABLED 0x00000000
72
#define GPFLAGS_USER_SETTINGS_DISABLED 0x00000001
73
#define GPFLAGS_MACHINE_SETTINGS_DISABLED 0x00000002
74
#define GPFLAGS_ALL_DISABLED (GPFLAGS_USER_SETTINGS_DISABLED | \
75
GPFLAGS_MACHINE_SETTINGS_DISABLED)
78
const char *gp_link; /* raw link name */
79
uint32 gp_opts; /* inheritance options GPO_INHERIT */
80
uint32 num_links; /* number of links */
81
char **link_names; /* array of parsed link names */
82
uint32 *link_opts; /* array of parsed link opts GPO_LINK_OPT_* */
86
const char *gp_extension; /* raw extension name */
89
char **extensions_guid;
94
#define GPO_CACHE_DIR "gpo_cache"
95
#define GPT_INI "GPT.INI"