s3: libsmb: Do some hardening in the receive processing of cli_shadow_copy_data_recv().
[Samba.git] / source3 / libgpo / gpo_proto.h
blob32a61eab21424d3a4bd5bc0a691273ad4fc44967
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_reg.c */
37 struct security_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
38 WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
39 const char *initial_path,
40 uint32_t desired_access,
41 const struct security_token *token,
42 struct gp_registry_context **reg_ctx);
43 void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
44 WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
45 const char *subkeyname,
46 struct registry_key *curr_key,
47 struct registry_key **new_key);
48 WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
49 struct gp_registry_context *reg_ctx,
50 const char *subkeyname,
51 struct registry_key **key);
52 WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
53 struct registry_key *key,
54 const char *val_name,
55 const char *val);
56 WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
57 struct registry_key *key,
58 const char *val_name,
59 const char **val);
60 WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
61 uint32_t flags,
62 const char *dn,
63 const struct security_token *token,
64 struct GROUP_POLICY_OBJECT *gpo_list);
65 WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
66 uint32_t flags,
67 const struct dom_sid *sid,
68 struct GROUP_POLICY_OBJECT **gpo_list);
69 WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
70 uint32_t flags,
71 struct registry_key *key,
72 const struct dom_sid *sid);
73 void dump_reg_val(int lvl, const char *direction,
74 const char *key, const char *subkey,
75 struct registry_value *val);
76 void dump_reg_entry(uint32_t flags,
77 const char *dir,
78 struct gp_registry_entry *entry);
79 void dump_reg_entries(uint32_t flags,
80 const char *dir,
81 struct gp_registry_entry *entries,
82 size_t num_entries);
83 bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
84 struct gp_registry_entry *entry,
85 struct gp_registry_entry **entries,
86 size_t *num);
87 WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
88 struct registry_key *root_key,
89 struct gp_registry_context *reg_ctx,
90 struct gp_registry_entry *entry,
91 const struct security_token *token,
92 uint32_t flags);
94 #endif /* _LIBGPO_GPO_PROTO_H_ */