packaging/RHEL-CTDB: try harder to set $RPMVER
[Samba.git] / source3 / libgpo / gpo_proto.h
blobfa2f87338d2d2eee327549f81a929d2ad0f58b47
1 /*
2 * Unix SMB/CIFS implementation.
3 * Group Policy Object Support
5 * Copyright (C) Guenther Deschner 2006-2008
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef _LIBGPO_GPO_PROTO_H_
22 #define _LIBGPO_GPO_PROTO_H_
24 /* The following definitions come from libgpo/gpo_filesync.c */
26 NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
27 struct cli_state *cli,
28 const char *nt_path,
29 const char *unix_path);
30 NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
31 struct cli_state *cli,
32 const char *nt_path,
33 const char *local_path);
35 /* The following definitions come from libgpo/gpo_ini.c */
37 NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
38 const char *filename,
39 uint32_t *version,
40 char **display_name);
42 /* The following definitions come from libgpo/gpo_reg.c */
44 struct security_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
45 WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
46 const char *initial_path,
47 uint32_t desired_access,
48 const struct security_token *token,
49 struct gp_registry_context **reg_ctx);
50 void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
51 WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
52 const char *subkeyname,
53 struct registry_key *curr_key,
54 struct registry_key **new_key);
55 WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
56 struct gp_registry_context *reg_ctx,
57 const char *subkeyname,
58 struct registry_key **key);
59 WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
60 struct registry_key *key,
61 const char *val_name,
62 const char *val);
63 WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
64 struct registry_key *key,
65 const char *val_name,
66 const char **val);
67 WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
68 uint32_t flags,
69 const char *dn,
70 const struct security_token *token,
71 struct GROUP_POLICY_OBJECT *gpo_list);
72 WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
73 uint32_t flags,
74 const struct dom_sid *sid,
75 struct GROUP_POLICY_OBJECT **gpo_list);
76 WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
77 uint32_t flags,
78 struct registry_key *key,
79 const struct dom_sid *sid);
80 void dump_reg_val(int lvl, const char *direction,
81 const char *key, const char *subkey,
82 struct registry_value *val);
83 void dump_reg_entry(uint32_t flags,
84 const char *dir,
85 struct gp_registry_entry *entry);
86 void dump_reg_entries(uint32_t flags,
87 const char *dir,
88 struct gp_registry_entry *entries,
89 size_t num_entries);
90 bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
91 struct gp_registry_entry *entry,
92 struct gp_registry_entry **entries,
93 size_t *num);
94 WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
95 struct registry_key *root_key,
96 struct gp_registry_context *reg_ctx,
97 struct gp_registry_entry *entry,
98 const struct security_token *token,
99 uint32_t flags);
101 #endif /* _LIBGPO_GPO_PROTO_H_ */