s4:auth/ntlm: allow auth_operations to specify check_password_send/recv()
[sfrench/samba-autobuild/.git] / libgpo / gpo.h
index ea3d652bcb00bae018e1fcbcb89d4ebcc3b4d31a..0bae44aeca9a94399f11faab5d335eb54c952b8c 100644 (file)
@@ -20,9 +20,7 @@
 #ifndef __GPO_H__
 #define __GPO_H__
 
-#if _SAMBA_BUILD_ == 4
-#include "source4/libgpo/ads_convenience.h"
-#endif
+#include "ads.h"
 
 enum GPO_LINK_TYPE {
        GP_LINK_UNKOWN  = 0,
@@ -140,20 +138,13 @@ struct gp_registry_value {
        struct registry_value *data;
 };
 
-struct gp_registry_entry2 {
-       enum gp_reg_action action;
-       const char *key;
-       size_t num_values;
-       struct gp_registry_value **values;
-};
-
 struct gp_registry_entries {
        size_t num_entries;
        struct gp_registry_entry **entries;
 };
 
 struct gp_registry_context {
-       const NT_USER_TOKEN *token;
+       const struct security_token *token;
        const char *path;
        struct registry_key *curr_key;
 };
@@ -169,16 +160,16 @@ struct cli_state;
 /* The following definitions come from libgpo/gpo_fetch.c  */
 
 NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
-                                 const char *cache_path,
+                                 const char *cache_dir,
                                 const char *file_sys_path,
                                 char **server,
                                 char **service,
                                 char **nt_path,
                                 char **unix_path);
 NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
-                         const char *cache_path,
-                        struct cli_state *cli,
-                        struct GROUP_POLICY_OBJECT *gpo);
+                         ADS_STRUCT *ads,
+                         const char *cache_dir,
+                        const struct GROUP_POLICY_OBJECT *gpo);
 NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx,
                                    const char *unix_path,
                                    uint32_t *sysvol_version,
@@ -211,18 +202,18 @@ ADS_STATUS ads_get_gpo(ADS_STRUCT *ads,
 ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
                             TALLOC_CTX *mem_ctx,
                             const char *dn,
-                            NT_USER_TOKEN **token);
+                            struct security_token **token);
 ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
                            TALLOC_CTX *mem_ctx,
                            const char *dn,
                            uint32_t flags,
-                           const NT_USER_TOKEN *token,
+                           const struct security_token *token,
                            struct GROUP_POLICY_OBJECT **gpo_list);
 
 /* The following definitions come from libgpo/gpo_sec.c  */
 
 NTSTATUS gpo_apply_security_filtering(const struct GROUP_POLICY_OBJECT *gpo,
-                                     const NT_USER_TOKEN *token);
+                                     const struct security_token *token);
 
 /* The following definitions come from libgpo/gpo_util.c  */
 
@@ -230,42 +221,32 @@ const char *cse_gpo_guid_string_to_name(const char *guid);
 const char *cse_gpo_name_to_guid_string(const char *name);
 const char *cse_snapin_gpo_guid_string_to_name(const char *guid);
 void dump_gp_ext(struct GP_EXT *gp_ext, int debuglevel);
-void dump_gpo(ADS_STRUCT *ads,
-             TALLOC_CTX *mem_ctx,
-             struct GROUP_POLICY_OBJECT *gpo,
+void dump_gpo(const struct GROUP_POLICY_OBJECT *gpo,
              int debuglevel);
-void dump_gpo_list(ADS_STRUCT *ads,
-                  TALLOC_CTX *mem_ctx,
-                  struct GROUP_POLICY_OBJECT *gpo_list,
+void dump_gpo_list(const struct GROUP_POLICY_OBJECT *gpo_list,
                   int debuglevel);
-void dump_gplink(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct GP_LINK *gp_link);
-ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads,
-                            TALLOC_CTX *mem_ctx,
-                            const NT_USER_TOKEN *token,
-                            struct registry_key *root_key,
-                            struct GROUP_POLICY_OBJECT *gpo,
-                            const char *extension_guid_filter,
-                            uint32_t flags);
-ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
-                               TALLOC_CTX *mem_ctx,
-                               const NT_USER_TOKEN *token,
-                               struct GROUP_POLICY_OBJECT *gpo_list,
-                               const char *extensions_guid_filter,
-                               uint32_t flags);
+void dump_gplink(const struct GP_LINK *gp_link);
+NTSTATUS gpo_process_gpo_list(TALLOC_CTX *mem_ctx,
+                             const struct security_token *token,
+                             const struct GROUP_POLICY_OBJECT *deleted_gpo_list,
+                             const struct GROUP_POLICY_OBJECT *changed_gpo_list,
+                             const char *extensions_guid_filter,
+                             uint32_t flags);
 NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
                           TALLOC_CTX *mem_ctx,
-                           const char *cache_path,
+                           const char *cache_dir,
                           uint32_t flags,
-                          struct GROUP_POLICY_OBJECT *gpo,
-                          struct cli_state **cli_out);
+                          const struct GROUP_POLICY_OBJECT *gpo);
 NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
                                TALLOC_CTX *mem_ctx,
+                                const char *cache_dir,
                                uint32_t flags,
-                               struct GROUP_POLICY_OBJECT *gpo_list);
+                               const struct GROUP_POLICY_OBJECT *gpo_list);
 NTSTATUS gpo_get_unix_path(TALLOC_CTX *mem_ctx,
-                          struct GROUP_POLICY_OBJECT *gpo,
+                           const char *cache_dir,
+                          const struct GROUP_POLICY_OBJECT *gpo,
                           char **unix_path);
-char *gpo_flag_str(uint32_t flags);
+char *gpo_flag_str(TALLOC_CTX *mem_ctx, uint32_t flags);
 NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
                      uint32_t flags,
                      const char *filename,
@@ -274,9 +255,14 @@ NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
 ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
                                TALLOC_CTX *mem_ctx,
                                const char *dn,
-                               NT_USER_TOKEN **token);
-
-
-#include "../libgpo/gpext/gpext.h"
+                               struct security_token **token);
+
+bool gpo_get_gp_ext_from_gpo(TALLOC_CTX *mem_ctx,
+                            uint32_t flags,
+                            const struct GROUP_POLICY_OBJECT *gpo,
+                            struct GP_EXT **gp_ext);
+NTSTATUS gpo_copy(TALLOC_CTX *mem_ctx,
+                 const struct GROUP_POLICY_OBJECT *gpo_src,
+                 struct GROUP_POLICY_OBJECT **gpo_dst);
 
 #endif