s3-libgpo: move group policy protos to where they belong.
[sfrench/samba-autobuild/.git] / source3 / libgpo / gpo_proto.h
1
2 /* The following definitions come from libgpo/gpo_filesync.c  */
3
4 NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
5                        struct cli_state *cli,
6                        const char *nt_path,
7                        const char *unix_path);
8 NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
9                               struct cli_state *cli,
10                               const char *nt_path,
11                               const char *local_path);
12
13 /* The following definitions come from libgpo/gpo_ini.c  */
14
15 NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
16                        const char *filename,
17                        uint32_t *version,
18                        char **display_name);
19
20 /* The following definitions come from libgpo/gpo_reg.c  */
21
22 struct nt_user_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
23 WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
24                        const char *initial_path,
25                        uint32_t desired_access,
26                        const struct nt_user_token *token,
27                        struct gp_registry_context **reg_ctx);
28 void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
29 WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
30                            const char *subkeyname,
31                            struct registry_key *curr_key,
32                            struct registry_key **new_key);
33 WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
34                           struct gp_registry_context *reg_ctx,
35                           const char *subkeyname,
36                           struct registry_key **key);
37 WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
38                            struct registry_key *key,
39                            const char *val_name,
40                            const char *val);
41 WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
42                           struct registry_key *key,
43                           const char *val_name,
44                           const char **val);
45 WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
46                           uint32_t flags,
47                           const char *dn,
48                           const struct nt_user_token *token,
49                           struct GROUP_POLICY_OBJECT *gpo_list);
50 WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
51                          uint32_t flags,
52                          const DOM_SID *sid,
53                          struct GROUP_POLICY_OBJECT **gpo_list);
54 WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
55                      uint32_t flags,
56                      struct registry_key *key,
57                      const DOM_SID *sid);
58 void dump_reg_val(int lvl, const char *direction,
59                   const char *key, const char *subkey,
60                   struct registry_value *val);
61 void dump_reg_entry(uint32_t flags,
62                     const char *dir,
63                     struct gp_registry_entry *entry);
64 void dump_reg_entries(uint32_t flags,
65                       const char *dir,
66                       struct gp_registry_entry *entries,
67                       size_t num_entries);
68 bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
69                                     struct gp_registry_entry *entry,
70                                     struct gp_registry_entry **entries,
71                                     size_t *num);
72 WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
73                                 struct registry_key *root_key,
74                                 struct gp_registry_context *reg_ctx,
75                                 struct gp_registry_entry *entry,
76                                 const struct nt_user_token *token,
77                                 uint32_t flags);