s3-libgpo: move group policy protos to where they belong.
authorGünther Deschner <gd@samba.org>
Sun, 9 May 2010 22:07:10 +0000 (00:07 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 17 May 2010 19:07:17 +0000 (21:07 +0200)
Guenther

16 files changed:
libgpo/gpext/gpext.c
libgpo/gpo_fetch.c
libgpo/gpo_ldap.c
libgpo/gpo_sec.c
libgpo/gpo_util.c
source3/include/ads_protos.h
source3/include/includes.h
source3/include/proto.h
source3/libgpo/gpext/registry.c
source3/libgpo/gpext/scripts.c
source3/libgpo/gpext/security.c
source3/libgpo/gpo_filesync.c
source3/libgpo/gpo_proto.h [new file with mode: 0644]
source3/libgpo/gpo_reg.c
source3/registry/reg_backend_db.c
source3/utils/net_ads_gpo.c

index b6cc410eec922d44370272952a22417c5e62e143..5465774eb1a93d155f771ceefc88157ce7953bf8 100644 (file)
  */
 
 #include "includes.h"
  */
 
 #include "includes.h"
+#include "../libgpo/gpo.h"
 #include "../libgpo/gpext/gpext.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "lib/util/dlinklist.h"
 #include "../libgpo/gpext/gpext.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "lib/util/dlinklist.h"
+#if _SAMBA_BUILD_ == 3
+#include "libgpo/gpo_proto.h"
+#endif
 
 static struct gp_extension *extensions = NULL;
 
 
 static struct gp_extension *extensions = NULL;
 
index 06c730cfa38404bc697bcbe247e85db0d0f5f7d0..2a7cb9d858909c8446407fa5c4baca98570e2fe0 100644 (file)
@@ -32,6 +32,8 @@
 #include "libgpo/ads_convenience.h"
 #include "libgpo/gpo_s4.h"
 #include "lib/util/util.h"
 #include "libgpo/ads_convenience.h"
 #include "libgpo/gpo_s4.h"
 #include "lib/util/util.h"
+#else
+#include "libgpo/gpo_proto.h"
 #endif
 
 /****************************************************************
 #endif
 
 /****************************************************************
index a884198ed5b7b9f6b974d21d1709474ab310aa09..2976826f1ac37967807c7124515275b8a0e25138 100644 (file)
@@ -18,8 +18,8 @@
  */
 
 #include "includes.h"
  */
 
 #include "includes.h"
-#if _SAMBA_BUILD_ == 4
 #include "libgpo/gpo.h"
 #include "libgpo/gpo.h"
+#if _SAMBA_BUILD_ == 4
 #include "libgpo/gpo_s4.h"
 #include "source4/libgpo/ads_convenience.h"
 #endif
 #include "libgpo/gpo_s4.h"
 #include "source4/libgpo/ads_convenience.h"
 #endif
index f20746422ce07bc4c1762d82440b66fd40a405a2..6b5e77f20a63dac63cc9cb461fe680856f703c57 100644 (file)
 
 #include "includes.h"
 #include "libcli/security/dom_sid.h"
 
 #include "includes.h"
 #include "libcli/security/dom_sid.h"
+#include "../libgpo/gpo.h"
 #if _SAMBA_BUILD_ == 4
 #include "libgpo/ads_convenience.h"
 #include "librpc/gen_ndr/security.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "../libcli/security/secace.h"
 #if _SAMBA_BUILD_ == 4
 #include "libgpo/ads_convenience.h"
 #include "librpc/gen_ndr/security.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "../libcli/security/secace.h"
-#include "../libgpo/gpo.h"
 #endif
 
 /****************************************************************
 #endif
 
 /****************************************************************
index fdf4c6d1af11003c2b701c588db471785bdb4ea1..ef16329504ec85c28fa4221a39283494a25eefd0 100644 (file)
 #define TALLOC_DEPRECATED 1
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #define TALLOC_DEPRECATED 1
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_misc.h"
+#include "../libgpo/gpo.h"
 #if _SAMBA_BUILD_ == 4
 #include "system/filesys.h"
 #include "auth/auth.h"
 #if _SAMBA_BUILD_ == 4
 #include "system/filesys.h"
 #include "auth/auth.h"
-#include "../libgpo/gpo.h"
 #include "../lib/talloc/talloc.h"
 #include "source4/libgpo/ads_convenience.h"
 #endif
 #include "../lib/talloc/talloc.h"
 #include "source4/libgpo/ads_convenience.h"
 #endif
index 502eaa82d9756d5d2f95eea509ebcff0f57c127e..97b5728b054bb9f10da52d3bbc5af14d555e0468 100644 (file)
@@ -96,6 +96,7 @@ void ads_process_results(ADS_STRUCT *ads, LDAPMessage *res,
                         void *data_area);
 void ads_dump(ADS_STRUCT *ads, LDAPMessage *res);
 
                         void *data_area);
 void ads_dump(ADS_STRUCT *ads, LDAPMessage *res);
 
+struct GROUP_POLICY_OBJECT;
 ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
                         TALLOC_CTX *mem_ctx,
                         LDAPMessage *res,
 ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
                         TALLOC_CTX *mem_ctx,
                         LDAPMessage *res,
index 456b64b9cce5d2c74ef217708784d831c8f7068c..6cbef2ec4455f89ade8c313e3d9d17e23e38ec7b 100644 (file)
@@ -651,7 +651,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "mapping.h"
 #include "passdb.h"
 #include "rpc_secdes.h"
 #include "mapping.h"
 #include "passdb.h"
 #include "rpc_secdes.h"
-#include "../libgpo/gpo.h"
 #include "msdfs.h"
 #include "../lib/crypto/md5.h"
 #include "../lib/crypto/md4.h"
 #include "msdfs.h"
 #include "../lib/crypto/md5.h"
 #include "../lib/crypto/md4.h"
index b633d9ef8a57cb2deb4521e5893c185b7336857f..27fa1b55144cec10b80e0d14f9cac73582b19d8a 100644 (file)
@@ -2017,84 +2017,6 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip
 ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
                                       char **returned_principal);
 
 ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
                                       char **returned_principal);
 
-/* The following definitions come from libgpo/gpo_filesync.c  */
-
-NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
-                      struct cli_state *cli,
-                      const char *nt_path,
-                      const char *unix_path);
-NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
-                             struct cli_state *cli,
-                             const char *nt_path,
-                             const char *local_path);
-
-/* The following definitions come from libgpo/gpo_ini.c  */
-
-NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
-                      const char *filename,
-                      uint32_t *version,
-                      char **display_name);
-
-/* The following definitions come from libgpo/gpo_reg.c  */
-
-struct nt_user_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
-WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
-                      const char *initial_path,
-                      uint32_t desired_access,
-                      const struct nt_user_token *token,
-                      struct gp_registry_context **reg_ctx);
-void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
-WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
-                          const char *subkeyname,
-                          struct registry_key *curr_key,
-                          struct registry_key **new_key);
-WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
-                         struct gp_registry_context *reg_ctx,
-                         const char *subkeyname,
-                         struct registry_key **key);
-WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
-                          struct registry_key *key,
-                          const char *val_name,
-                          const char *val);
-WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
-                         struct registry_key *key,
-                         const char *val_name,
-                         const char **val);
-WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
-                         uint32_t flags,
-                         const char *dn,
-                         const struct nt_user_token *token,
-                         struct GROUP_POLICY_OBJECT *gpo_list);
-WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
-                        uint32_t flags,
-                        const DOM_SID *sid,
-                        struct GROUP_POLICY_OBJECT **gpo_list);
-WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
-                    uint32_t flags,
-                    struct registry_key *key,
-                    const DOM_SID *sid);
-void dump_reg_val(int lvl, const char *direction,
-                 const char *key, const char *subkey,
-                 struct registry_value *val);
-void dump_reg_entry(uint32_t flags,
-                   const char *dir,
-                   struct gp_registry_entry *entry);
-void dump_reg_entries(uint32_t flags,
-                     const char *dir,
-                     struct gp_registry_entry *entries,
-                     size_t num_entries);
-bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
-                                   struct gp_registry_entry *entry,
-                                   struct gp_registry_entry **entries,
-                                   size_t *num);
-WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
-                               struct registry_key *root_key,
-                               struct gp_registry_context *reg_ctx,
-                               struct gp_registry_entry *entry,
-                               const struct nt_user_token *token,
-                               uint32_t flags);
-
-
 #include "librpc/gen_ndr/ndr_krb5pac.h"
 #include "librpc/gen_ndr/ndr_spoolss.h"
 
 #include "librpc/gen_ndr/ndr_krb5pac.h"
 #include "librpc/gen_ndr/ndr_spoolss.h"
 
index ae2adcc90de6fd54df578ba90f6461dc9a1174ee..d7018556d85f1cd2ed7f983d08ca9392e4e27d57 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "includes.h"
 #include "../libgpo/gpo_ini.h"
 
 #include "includes.h"
 #include "../libgpo/gpo_ini.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 #define GP_EXT_NAME "registry"
 
 
 #define GP_EXT_NAME "registry"
 
index 43f9b3afb59200d4b226032a07ba361840017169..3ec580530991cb8cd28b396bcb0cb0d2276c368e 100644 (file)
@@ -18,7 +18,9 @@
  */
 
 #include "includes.h"
  */
 
 #include "includes.h"
-#include "libgpo/gpo_ini.h"
+#include "../libgpo/gpo_ini.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 #define GP_EXT_NAME "scripts"
 
 
 #define GP_EXT_NAME "scripts"
 
index f0a52fda5d9ed465a2cb4dd3922aab3467fd42b1..208db700ff5129f690eeefc89453cbb0729819c2 100644 (file)
@@ -18,7 +18,9 @@
  */
 
 #include "includes.h"
  */
 
 #include "includes.h"
-#include "libgpo/gpo_ini.h"
+#include "../libgpo/gpo_ini.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 #define GP_EXT_NAME "security"
 
 
 #define GP_EXT_NAME "security"
 
index 85323c12c90acf00cd5f76e9d76121748950b209..a3002fe860667b3c8c7468a5700d1c438006b47d 100644 (file)
@@ -18,6 +18,8 @@
  */
 
 #include "includes.h"
  */
 
 #include "includes.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 struct sync_context {
        TALLOC_CTX *mem_ctx;
 
 struct sync_context {
        TALLOC_CTX *mem_ctx;
diff --git a/source3/libgpo/gpo_proto.h b/source3/libgpo/gpo_proto.h
new file mode 100644 (file)
index 0000000..e093d1e
--- /dev/null
@@ -0,0 +1,77 @@
+
+/* The following definitions come from libgpo/gpo_filesync.c  */
+
+NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
+                      struct cli_state *cli,
+                      const char *nt_path,
+                      const char *unix_path);
+NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
+                             struct cli_state *cli,
+                             const char *nt_path,
+                             const char *local_path);
+
+/* The following definitions come from libgpo/gpo_ini.c  */
+
+NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,
+                      const char *filename,
+                      uint32_t *version,
+                      char **display_name);
+
+/* The following definitions come from libgpo/gpo_reg.c  */
+
+struct nt_user_token *registry_create_system_token(TALLOC_CTX *mem_ctx);
+WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
+                      const char *initial_path,
+                      uint32_t desired_access,
+                      const struct nt_user_token *token,
+                      struct gp_registry_context **reg_ctx);
+void gp_free_reg_ctx(struct gp_registry_context *reg_ctx);
+WERROR gp_store_reg_subkey(TALLOC_CTX *mem_ctx,
+                          const char *subkeyname,
+                          struct registry_key *curr_key,
+                          struct registry_key **new_key);
+WERROR gp_read_reg_subkey(TALLOC_CTX *mem_ctx,
+                         struct gp_registry_context *reg_ctx,
+                         const char *subkeyname,
+                         struct registry_key **key);
+WERROR gp_store_reg_val_sz(TALLOC_CTX *mem_ctx,
+                          struct registry_key *key,
+                          const char *val_name,
+                          const char *val);
+WERROR gp_read_reg_val_sz(TALLOC_CTX *mem_ctx,
+                         struct registry_key *key,
+                         const char *val_name,
+                         const char **val);
+WERROR gp_reg_state_store(TALLOC_CTX *mem_ctx,
+                         uint32_t flags,
+                         const char *dn,
+                         const struct nt_user_token *token,
+                         struct GROUP_POLICY_OBJECT *gpo_list);
+WERROR gp_reg_state_read(TALLOC_CTX *mem_ctx,
+                        uint32_t flags,
+                        const DOM_SID *sid,
+                        struct GROUP_POLICY_OBJECT **gpo_list);
+WERROR gp_secure_key(TALLOC_CTX *mem_ctx,
+                    uint32_t flags,
+                    struct registry_key *key,
+                    const DOM_SID *sid);
+void dump_reg_val(int lvl, const char *direction,
+                 const char *key, const char *subkey,
+                 struct registry_value *val);
+void dump_reg_entry(uint32_t flags,
+                   const char *dir,
+                   struct gp_registry_entry *entry);
+void dump_reg_entries(uint32_t flags,
+                     const char *dir,
+                     struct gp_registry_entry *entries,
+                     size_t num_entries);
+bool add_gp_registry_entry_to_array(TALLOC_CTX *mem_ctx,
+                                   struct gp_registry_entry *entry,
+                                   struct gp_registry_entry **entries,
+                                   size_t *num);
+WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
+                               struct registry_key *root_key,
+                               struct gp_registry_context *reg_ctx,
+                               struct gp_registry_entry *entry,
+                               const struct nt_user_token *token,
+                               uint32_t flags);
index 0c26dbedc6208d1f4c54248630d3a2940fc002ef..f191eb8711b8ec79df78e6d564bb34db11642915 100644 (file)
@@ -18,6 +18,8 @@
  */
 
 #include "includes.h"
  */
 
 #include "includes.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 
 /****************************************************************
 
 
 /****************************************************************
index c8241755275c494d7c228a464db001d5891a5ae3..90a6f6411590e52daa2120b9320567f9f33f53d9 100644 (file)
@@ -65,7 +65,7 @@ static const char *builtin_registry_paths[] = {
        KEY_HKCU,
        KEY_GP_USER_POLICY,
        KEY_GP_USER_WIN_POLICY,
        KEY_HKCU,
        KEY_GP_USER_POLICY,
        KEY_GP_USER_WIN_POLICY,
-       KEY_WINLOGON_GPEXT_PATH,
+       "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\GPExtensions",
        "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors",
        KEY_PROD_OPTIONS,
        "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration",
        "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors",
        KEY_PROD_OPTIONS,
        "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration",
index 14bc3786335c3e6146fa326880f9bdd070bd366a..45587bfef51ed5ba0ef654e495b7a87143b5fc82 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "includes.h"
 #include "utils/net.h"
 
 #include "includes.h"
 #include "utils/net.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 #ifdef HAVE_ADS
 
 
 #ifdef HAVE_ADS