s3:libgpo/gpo_proto.h: add GPL/Copyright header (cherry picked from commit 59950faddc...
[Samba.git] / source3 / libgpo / gpo_proto.h
blob504704ec1f02cba4624daffb3f4e3fd611f1cb1e
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 /* The following definitions come from libgpo/gpo_filesync.c */
23 NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
24 struct cli_state *cli,
25 const char *nt_path,
26 const char *unix_path);
27 NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
28 struct cli_state *cli,
29 const char *nt_path,
30 const char *local_path);
32 /* The following definitions come from libgpo/gpo_ini.c */
34 NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
35 const char *filename,
36 uint32_t *version,
37 char **display_name);
39 /* The following definitions come from libgpo/gpo_reg.c */
41 struct security_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
42 WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
43 const char *initial_path,
44 uint32_t desired_access,
45 const struct security_token *token,
46 struct gp_registry_context **reg_ctx);
47 void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
48 WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
49 const char *subkeyname,
50 struct registry_key *curr_key,
51 struct registry_key **new_key);
52 WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
53 struct gp_registry_context *reg_ctx,
54 const char *subkeyname,
55 struct registry_key **key);
56 WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
57 struct registry_key *key,
58 const char *val_name,
59 const char *val);
60 WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
61 struct registry_key *key,
62 const char *val_name,
63 const char **val);
64 WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
65 uint32_t flags,
66 const char *dn,
67 const struct security_token *token,
68 struct GROUP_POLICY_OBJECT *gpo_list);
69 WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
70 uint32_t flags,
71 const struct dom_sid *sid,
72 struct GROUP_POLICY_OBJECT **gpo_list);
73 WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
74 uint32_t flags,
75 struct registry_key *key,
76 const struct dom_sid *sid);
77 void dump_reg_val(int lvl, const char *direction,
78 const char *key, const char *subkey,
79 struct registry_value *val);
80 void dump_reg_entry(uint32_t flags,
81 const char *dir,
82 struct gp_registry_entry *entry);
83 void dump_reg_entries(uint32_t flags,
84 const char *dir,
85 struct gp_registry_entry *entries,
86 size_t num_entries);
87 bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
88 struct gp_registry_entry *entry,
89 struct gp_registry_entry **entries,
90 size_t *num);
91 WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
92 struct registry_key *root_key,
93 struct gp_registry_context *reg_ctx,
94 struct gp_registry_entry *entry,
95 const struct security_token *token,
96 uint32_t flags);