X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=blobdiff_plain;f=libgpo%2Fgpo.h;h=6e71e3cff7df8b8573d208a314151d52e7eaabc3;hp=c34dc4c750b442162dd7580cf0ee5ee790704d5d;hb=6870313db5600c2dd68c51e757f233dad56aa250;hpb=d2bd5895cf9b8a3572b17bca850e9c56a4cca901 diff --git a/libgpo/gpo.h b/libgpo/gpo.h index c34dc4c750b..6e71e3cff7d 100644 --- a/libgpo/gpo.h +++ b/libgpo/gpo.h @@ -20,6 +20,12 @@ #ifndef __GPO_H__ #define __GPO_H__ +#if _SAMBA_BUILD_ == 4 +#include "source4/libgpo/ads_convenience.h" +#else +struct loadparm_context; +#endif + enum GPO_LINK_TYPE { GP_LINK_UNKOWN = 0, GP_LINK_MACHINE = 1, @@ -149,7 +155,7 @@ struct gp_registry_entries { }; struct gp_registry_context { - const struct nt_user_token *token; + const NT_USER_TOKEN *token; const char *path; struct registry_key *curr_key; }; @@ -160,6 +166,124 @@ struct gp_registry_context { #define ADS_EXTENDED_RIGHT_APPLY_GROUP_POLICY "edacfd8f-ffb3-11d1-b41d-00a0c968f939" +struct cli_state; + +/* The following definitions come from libgpo/gpo_fetch.c */ + +NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx, + 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, + ADS_STRUCT *ads, + struct loadparm_context *lp_ctx, + const char *cache_dir, + struct GROUP_POLICY_OBJECT *gpo); +NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx, + const char *unix_path, + uint32_t *sysvol_version, + char **display_name); + +/* The following definitions come from libgpo/gpo_ldap.c */ + +bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx, + const char *extension_raw, + struct GP_EXT **gp_ext); +ADS_STATUS ads_get_gpo_link(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + const char *link_dn, + struct GP_LINK *gp_link_struct); +ADS_STATUS ads_add_gpo_link(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + const char *link_dn, + const char *gpo_dn, + uint32_t gpo_opt); +ADS_STATUS ads_delete_gpo_link(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + const char *link_dn, + const char *gpo_dn); +ADS_STATUS ads_get_gpo(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + const char *gpo_dn, + const char *display_name, + const char *guid_name, + struct GROUP_POLICY_OBJECT *gpo); +ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + const char *dn, + NT_USER_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, + 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); + +/* The following definitions come from libgpo/gpo_util.c */ + +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, + int debuglevel); +void dump_gpo_list(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + 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); +NTSTATUS check_refresh_gpo(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + const char *cache_dir, + struct loadparm_context *lp_ctx, + uint32_t flags, + struct GROUP_POLICY_OBJECT *gpo); +NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + const char *cache_dir, + struct loadparm_context *lp_ctx, + uint32_t flags, + struct GROUP_POLICY_OBJECT *gpo_list); +NTSTATUS gpo_get_unix_path(TALLOC_CTX *mem_ctx, + const char *cache_dir, + struct GROUP_POLICY_OBJECT *gpo, + char **unix_path); +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, + const char *suffix, + const char **filename_out); +ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, + TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, + const char *dn, + NT_USER_TOKEN **token); + + #include "../libgpo/gpext/gpext.h" #endif