The branch, master has been updated
       via  3d5972c... s3-libgpo: move group policy protos to where they belong.
      from  ed8a98f... s3-includes: remove some unused defines.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3d5972c43f536b94122100e1e30f92a4f8441768
Author: Günther Deschner <g...@samba.org>
Date:   Mon May 10 00:07:10 2010 +0200

    s3-libgpo: move group policy protos to where they belong.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 libgpo/gpext/gpext.c              |    4 ++
 libgpo/gpo_fetch.c                |    2 +
 libgpo/gpo_ldap.c                 |    2 +-
 libgpo/gpo_sec.c                  |    2 +-
 libgpo/gpo_util.c                 |    2 +-
 source3/include/ads_protos.h      |    1 +
 source3/include/includes.h        |    1 -
 source3/include/proto.h           |   78 -------------------------------------
 source3/libgpo/gpext/registry.c   |    2 +
 source3/libgpo/gpext/scripts.c    |    4 +-
 source3/libgpo/gpext/security.c   |    4 +-
 source3/libgpo/gpo_filesync.c     |    2 +
 source3/libgpo/gpo_proto.h        |   77 ++++++++++++++++++++++++++++++++++++
 source3/libgpo/gpo_reg.c          |    2 +
 source3/registry/reg_backend_db.c |    2 +-
 source3/utils/net_ads_gpo.c       |    2 +
 16 files changed, 102 insertions(+), 85 deletions(-)
 create mode 100644 source3/libgpo/gpo_proto.h


Changeset truncated at 500 lines:

diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index b6cc410..5465774 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -18,9 +18,13 @@
  */
 
 #include "includes.h"
+#include "../libgpo/gpo.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;
 
diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c
index 06c730c..2a7cb9d 100644
--- a/libgpo/gpo_fetch.c
+++ b/libgpo/gpo_fetch.c
@@ -32,6 +32,8 @@
 #include "libgpo/ads_convenience.h"
 #include "libgpo/gpo_s4.h"
 #include "lib/util/util.h"
+#else
+#include "libgpo/gpo_proto.h"
 #endif
 
 /****************************************************************
diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index a884198..2976826 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -18,8 +18,8 @@
  */
 
 #include "includes.h"
-#if _SAMBA_BUILD_ == 4
 #include "libgpo/gpo.h"
+#if _SAMBA_BUILD_ == 4
 #include "libgpo/gpo_s4.h"
 #include "source4/libgpo/ads_convenience.h"
 #endif
diff --git a/libgpo/gpo_sec.c b/libgpo/gpo_sec.c
index f207464..6b5e77f 100644
--- a/libgpo/gpo_sec.c
+++ b/libgpo/gpo_sec.c
@@ -19,12 +19,12 @@
 
 #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"
-#include "../libgpo/gpo.h"
 #endif
 
 /****************************************************************
diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c
index fdf4c6d..ef16329 100644
--- a/libgpo/gpo_util.c
+++ b/libgpo/gpo_util.c
@@ -19,10 +19,10 @@
 #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"
-#include "../libgpo/gpo.h"
 #include "../lib/talloc/talloc.h"
 #include "source4/libgpo/ads_convenience.h"
 #endif
diff --git a/source3/include/ads_protos.h b/source3/include/ads_protos.h
index 502eaa8..97b5728 100644
--- a/source3/include/ads_protos.h
+++ b/source3/include/ads_protos.h
@@ -96,6 +96,7 @@ void ads_process_results(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,
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 456b64b..6cbef2e 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -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 "../libgpo/gpo.h"
 #include "msdfs.h"
 #include "../lib/crypto/md5.h"
 #include "../lib/crypto/md4.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index b633d9e..27fa1b5 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
 
-/* 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"
 
diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c
index ae2adcc..d701855 100644
--- a/source3/libgpo/gpext/registry.c
+++ b/source3/libgpo/gpext/registry.c
@@ -19,6 +19,8 @@
 
 #include "includes.h"
 #include "../libgpo/gpo_ini.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 #define GP_EXT_NAME "registry"
 
diff --git a/source3/libgpo/gpext/scripts.c b/source3/libgpo/gpext/scripts.c
index 43f9b3a..3ec5805 100644
--- a/source3/libgpo/gpext/scripts.c
+++ b/source3/libgpo/gpext/scripts.c
@@ -18,7 +18,9 @@
  */
 
 #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"
 
diff --git a/source3/libgpo/gpext/security.c b/source3/libgpo/gpext/security.c
index f0a52fd..208db70 100644
--- a/source3/libgpo/gpext/security.c
+++ b/source3/libgpo/gpext/security.c
@@ -18,7 +18,9 @@
  */
 
 #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"
 
diff --git a/source3/libgpo/gpo_filesync.c b/source3/libgpo/gpo_filesync.c
index 85323c1..a3002fe 100644
--- a/source3/libgpo/gpo_filesync.c
+++ b/source3/libgpo/gpo_filesync.c
@@ -18,6 +18,8 @@
  */
 
 #include "includes.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 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
index 0000000..e093d1e
--- /dev/null
+++ b/source3/libgpo/gpo_proto.h
@@ -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);
diff --git a/source3/libgpo/gpo_reg.c b/source3/libgpo/gpo_reg.c
index 0c26dbe..f191eb8 100644
--- a/source3/libgpo/gpo_reg.c
+++ b/source3/libgpo/gpo_reg.c
@@ -18,6 +18,8 @@
  */
 
 #include "includes.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 
 /****************************************************************
diff --git a/source3/registry/reg_backend_db.c 
b/source3/registry/reg_backend_db.c
index c824175..90a6f64 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -65,7 +65,7 @@ static const char *builtin_registry_paths[] = {
        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",
diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c
index 14bc378..45587bf 100644
--- a/source3/utils/net_ads_gpo.c
+++ b/source3/utils/net_ads_gpo.c
@@ -19,6 +19,8 @@
 
 #include "includes.h"
 #include "utils/net.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
 
 #ifdef HAVE_ADS
 


-- 
Samba Shared Repository

Reply via email to