[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Tue Jan 7 10:53:04 MST 2014


The branch, master has been updated
       via  8e5f4ea libgpo: apply some const.
       via  f168542 libgpo: when running in verbose mode, printout the parsed PReg file.
       via  88a0c40 libgpo: only use libgpo/gpext/gpext.h where really needed.
       via  c3f9d99 libgpo: allow to pass down a list of deleted GPOs in gpo_process_gpo_list().
       via  a78b4d4 libgpo: remove some unused code and remove that important FIXME note.
       via  f6bc219 libgpo: directly call gpext_process_extension() from gpo_process_gpo_list.
       via  685da81 libgpo: implement CSE filtering in gpext_process_extension().
       via  bb351de libgpo: remove gpext_process_gpo_list_with_extension in favor of gpext_process_extension.
       via  1010a01 libgpo: remove extension_guid and snapin_guid (the tool guid) from the process callback.
       via  a9cb303 libgpo: allow to pass down deleted and changed gpo list to CSE plugins.
       via  19268c5 libgpo/gpext: add new gpext_check_gpo_for_gpext_presence() helper function.
       via  288e883 libgpo: add gpo_copy().
       via  57498dc libgpo: make gpo_get_gp_ext_from_gpo public.
       via  3ef7919 libgpo: make gpo_process_a_gpo() static to the util code.
       via  0a15360 libgpo: remove unused gp_registry_entry2 struct.
       via  9a4e007 libgpo: remove ads reference from dump calls and make them take const structs.
       via  c39425f libgpo: prefix some more calls with gpext_.
       via  69997e2 libgpo: rename debug_gpext_header to gpext_debug_header.
       via  0e3c964 libgpo/CSE/scripts: fix a build warning.
       via  53bff63 s3-registry: fix typo in DEBUG statement.
      from  7d2abf5 s4:netlogon: implement "allow nt4 crypto" and "reject md5 clients" features.

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


- Log -----------------------------------------------------------------
commit 8e5f4eab764918353cfb17fddb6abe6a2b737f6c
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 22:23:44 2013 +0100

    libgpo: apply some const.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Tue Jan  7 18:52:42 CET 2014 on sn-devel-104

commit f1685427ed26da39e3d4ad5be7406c61d7cd1179
Author: Günther Deschner <gd at samba.org>
Date:   Fri Dec 20 17:23:22 2013 +0100

    libgpo: when running in verbose mode, printout the parsed PReg file.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 88a0c401fce6fb3cde13b532a5a9972f40876421
Author: Günther Deschner <gd at samba.org>
Date:   Fri Dec 20 17:22:23 2013 +0100

    libgpo: only use libgpo/gpext/gpext.h where really needed.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit c3f9d9929c494e9f750e0fd02443cc645ca1bba8
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 17:29:10 2013 +0100

    libgpo: allow to pass down a list of deleted GPOs in gpo_process_gpo_list().
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit a78b4d4f65e05ad73ed59713f1ce323d176e7b8c
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 17:28:35 2013 +0100

    libgpo: remove some unused code and remove that important FIXME note.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit f6bc2198503463880ce108c554c38884a5b88a74
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 17:26:59 2013 +0100

    libgpo: directly call gpext_process_extension() from gpo_process_gpo_list.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 685da81365587aacba46bd73d12dadc247614cb2
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 17:25:37 2013 +0100

    libgpo: implement CSE filtering in gpext_process_extension().
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit bb351dec9b693e387b10bc26d94ada7f0995fa37
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 16:12:13 2013 +0100

    libgpo: remove gpext_process_gpo_list_with_extension in favor of gpext_process_extension.
    
    gpext_preocess_extension properly deals with GPO lists now.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 1010a011190b04dd2eed86e03b146f157233f084
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 14:34:53 2013 +0100

    libgpo: remove extension_guid and snapin_guid (the tool guid) from the process callback.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit a9cb3031bcba1e4f39c71e4e09508e4eec0e833e
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 19:33:28 2013 +0100

    libgpo: allow to pass down deleted and changed gpo list to CSE plugins.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 19268c5c2654956e2a45c7f8ce27a699e96c930b
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 19:59:09 2013 +0100

    libgpo/gpext: add new gpext_check_gpo_for_gpext_presence() helper function.
    
    It will be used to inspect single members of a gpo list for the presence of a CSE guid.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 288e883fb0612ffbbcf17c5bf8341872153a3092
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 13:27:45 2013 +0100

    libgpo: add gpo_copy().
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 57498dc569eb07403134f88f2872102f15a297c2
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 20:02:58 2013 +0100

    libgpo: make gpo_get_gp_ext_from_gpo public.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 3ef7919e3a0c42cb1fef23d8ec3df945a97d1263
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 17:59:38 2013 +0100

    libgpo: make gpo_process_a_gpo() static to the util code.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 0a15360f359e1b5780e109646502f044336b212f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 16:29:36 2013 +0100

    libgpo: remove unused gp_registry_entry2 struct.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 9a4e007d9000f4f02474394659110dcb9b136d0e
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 15:45:58 2013 +0100

    libgpo: remove ads reference from dump calls and make them take const structs.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit c39425f14bd58537aed1079335a62bbac8af7fb6
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 15:43:23 2013 +0100

    libgpo: prefix some more calls with gpext_.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 69997e2911e1c720fc5b87dae24b9a9c82b87eb7
Author: Günther Deschner <gd at samba.org>
Date:   Wed Dec 18 15:24:17 2013 +0100

    libgpo: rename debug_gpext_header to gpext_debug_header.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 0e3c964fab820ca9431fe1792763c0deafcfbd54
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 22:22:39 2013 +0100

    libgpo/CSE/scripts: fix a build warning.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 53bff63383cbe51c52f035199cef95823e77c228
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 19 21:29:32 2013 +0100

    s3-registry: fix typo in DEBUG statement.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

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

Summary of changes:
 libgpo/gpext/gpext.c            |  202 +++++++++++++++++++++----------
 libgpo/gpext/gpext.h            |   52 ++++-----
 libgpo/gpo.h                    |   43 +++----
 libgpo/gpo_fetch.c              |    2 +-
 libgpo/gpo_ldap.c               |    6 +-
 libgpo/gpo_util.c               |  257 +++++++++++++--------------------------
 librpc/idl/preg.idl             |    2 +-
 source3/libgpo/gpext/registry.c |   80 ++++++++-----
 source3/libgpo/gpext/scripts.c  |   95 +++++++++------
 source3/libgpo/gpext/security.c |   67 +++++++----
 source3/registry/reg_api.c      |    2 +-
 source3/utils/net_ads_gpo.c     |   14 +-
 12 files changed, 421 insertions(+), 401 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index a48d3f5..2afcfec 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -32,7 +32,7 @@ static struct gp_extension *extensions = NULL;
 /****************************************************************
 ****************************************************************/
 
-struct gp_extension *get_gp_extension_list(void)
+struct gp_extension *gpext_get_gp_extension_list(void)
 {
 	return extensions;
 }
@@ -101,7 +101,7 @@ static struct gp_extension_methods *get_methods_by_name(struct gp_extension *be,
 /****************************************************************
 ****************************************************************/
 
-NTSTATUS unregister_gp_extension(const char *name)
+NTSTATUS gpext_unregister_gp_extension(const char *name)
 {
 	struct gp_extension *ext;
 
@@ -121,11 +121,11 @@ NTSTATUS unregister_gp_extension(const char *name)
 /****************************************************************
 ****************************************************************/
 
-NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx,
-			       int version,
-			       const char *name,
-			       const char *guid,
-			       struct gp_extension_methods *methods)
+NTSTATUS gpext_register_gp_extension(TALLOC_CTX *gpext_ctx,
+				     int version,
+				     const char *name,
+				     const char *guid,
+				     struct gp_extension_methods *methods)
 {
 	struct gp_extension_methods *test;
 	struct gp_extension *entry;
@@ -340,11 +340,11 @@ static NTSTATUS gp_ext_info_add_reg_table(TALLOC_CTX *mem_ctx,
 /****************************************************************
 ****************************************************************/
 
-NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx,
-			       const char *module,
-			       const char *ext_guid,
-			       struct gp_extension_reg_table *table,
-			       struct gp_extension_reg_info *info)
+NTSTATUS gpext_info_add_entry(TALLOC_CTX *mem_ctx,
+			      const char *module,
+			      const char *ext_guid,
+			      struct gp_extension_reg_table *table,
+			      struct gp_extension_reg_info *info)
 {
 	NTSTATUS status;
 	struct gp_extension_reg_info_entry *entry = NULL;
@@ -538,7 +538,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
 /****************************************************************
 ****************************************************************/
 
-NTSTATUS shutdown_gp_extensions(void)
+NTSTATUS gpext_shutdown_gp_extensions(void)
 {
 	struct gp_extension *ext = NULL;
 
@@ -554,7 +554,7 @@ NTSTATUS shutdown_gp_extensions(void)
 /****************************************************************
 ****************************************************************/
 
-NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx)
+NTSTATUS gpext_init_gp_extensions(TALLOC_CTX *mem_ctx)
 {
 	NTSTATUS status;
 	WERROR werr;
@@ -564,7 +564,7 @@ NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx)
 	struct gp_extension *gpext = NULL;
 	struct gp_registry_context *reg_ctx = NULL;
 
-	if (get_gp_extension_list()) {
+	if (gpext_get_gp_extension_list()) {
 		return NT_STATUS_OK;
 	}
 
@@ -637,7 +637,7 @@ NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx)
 /****************************************************************
 ****************************************************************/
 
-NTSTATUS free_gp_extensions(void)
+NTSTATUS gpext_free_gp_extensions(void)
 {
 	struct gp_extension *ext, *ext_next = NULL;
 
@@ -655,10 +655,10 @@ NTSTATUS free_gp_extensions(void)
 /****************************************************************
 ****************************************************************/
 
-void debug_gpext_header(int lvl,
+void gpext_debug_header(int lvl,
 			const char *name,
 			uint32_t flags,
-			struct GROUP_POLICY_OBJECT *gpo,
+			const struct GROUP_POLICY_OBJECT *gpo,
 			const char *extension_guid,
 			const char *snapin_guid)
 {
@@ -678,14 +678,49 @@ void debug_gpext_header(int lvl,
 	TALLOC_FREE(flags_str);
 }
 
-NTSTATUS process_gpo_list_with_extension(
-			   TALLOC_CTX *mem_ctx,
-			   uint32_t flags,
-			   const struct security_token *token,
-			   struct GROUP_POLICY_OBJECT *gpo_list,
-			   const char *extension_guid,
-			   const char *snapin_guid)
+/****************************************************************
+****************************************************************/
+
+static NTSTATUS gpext_check_gpo_for_gpext_presence(TALLOC_CTX *mem_ctx,
+						   uint32_t flags,
+						   const struct GROUP_POLICY_OBJECT *gpo,
+						   const struct GUID *guid,
+						   bool *gpext_guid_present)
 {
+	struct GP_EXT *gp_ext = NULL;
+	int i;
+	bool ok;
+
+	*gpext_guid_present = false;
+
+
+	if (gpo->link_type == GP_LINK_LOCAL) {
+		return NT_STATUS_OK;
+	}
+
+	ok = gpo_get_gp_ext_from_gpo(mem_ctx, flags, gpo, &gp_ext);
+	if (!ok) {
+		return NT_STATUS_INVALID_PARAMETER;
+	}
+
+	if (gp_ext == NULL) {
+		return NT_STATUS_OK;
+	}
+
+	for (i = 0; i < gp_ext->num_exts; i++) {
+		struct GUID guid2;
+		NTSTATUS status;
+
+		status = GUID_from_string(gp_ext->extensions_guid[i], &guid2);
+		if (!NT_STATUS_IS_OK(status)) {
+			return status;
+		}
+		if (GUID_equal(guid, &guid2)) {
+			*gpext_guid_present = true;
+			return NT_STATUS_OK;
+		}
+	}
+
 	return NT_STATUS_OK;
 }
 
@@ -696,63 +731,104 @@ NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
 				 uint32_t flags,
 				 const struct security_token *token,
 				 struct registry_key *root_key,
-				 struct GROUP_POLICY_OBJECT *gpo,
-				 const char *extension_guid,
-				 const char *snapin_guid)
+				 const struct GROUP_POLICY_OBJECT *deleted_gpo_list,
+				 const struct GROUP_POLICY_OBJECT *changed_gpo_list,
+				 const char *extension_guid_filter)
 {
 	NTSTATUS status;
 	struct gp_extension *ext = NULL;
-	struct GUID guid;
-	bool cse_found = false;
+	const struct GROUP_POLICY_OBJECT *gpo;
+	struct GUID extension_guid_filter_guid;
 
-	status = init_gp_extensions(mem_ctx);
+	status = gpext_init_gp_extensions(mem_ctx);
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(1,("init_gp_extensions failed: %s\n",
+		DEBUG(1,("gpext_init_gp_extensions failed: %s\n",
 			nt_errstr(status)));
 		return status;
 	}
 
-	status = GUID_from_string(extension_guid, &guid);
-	if (!NT_STATUS_IS_OK(status)) {
-		return status;
+	if (extension_guid_filter) {
+		status = GUID_from_string(extension_guid_filter,
+					  &extension_guid_filter_guid);
+		if (!NT_STATUS_IS_OK(status)) {
+			return status;
+		}
 	}
 
 	for (ext = extensions; ext; ext = ext->next) {
 
-		if (GUID_equal(ext->guid, &guid)) {
-			cse_found = true;
-			break;
+		struct GROUP_POLICY_OBJECT *deleted_gpo_list_filtered = NULL;
+		struct GROUP_POLICY_OBJECT *changed_gpo_list_filtered = NULL;
+
+		if (extension_guid_filter) {
+			if (!GUID_equal(&extension_guid_filter_guid, ext->guid)) {
+				continue;
+			}
 		}
-	}
 
-	if (!cse_found) {
-		goto no_ext;
-	}
+		for (gpo = deleted_gpo_list; gpo; gpo = gpo->next) {
 
-	status = ext->methods->initialize(mem_ctx);
-	NT_STATUS_NOT_OK_RETURN(status);
+			bool is_present = false;
 
-	status = ext->methods->process_group_policy(mem_ctx,
-						    flags,
-						    root_key,
-						    token,
-						    gpo,
-						    extension_guid,
-						    snapin_guid);
-	if (!NT_STATUS_IS_OK(status)) {
-		ext->methods->shutdown();
-	}
+			status = gpext_check_gpo_for_gpext_presence(mem_ctx,
+								    flags,
+								    gpo,
+								    ext->guid,
+								    &is_present);
+			if (!NT_STATUS_IS_OK(status)) {
+				return status;
+			}
 
-	return status;
+			if (is_present) {
+				struct GROUP_POLICY_OBJECT *new_gpo;
 
- no_ext:
-	if (flags & GPO_INFO_FLAG_VERBOSE) {
-		DEBUG(0,("process_extension: no extension available for:\n"));
-		DEBUGADD(0,("%s (%s) (snapin: %s)\n",
-			extension_guid,
-			cse_gpo_guid_string_to_name(extension_guid),
-			snapin_guid));
+				status = gpo_copy(mem_ctx, gpo, &new_gpo);
+				if (!NT_STATUS_IS_OK(status)) {
+					return status;
+				}
+
+				DLIST_ADD(deleted_gpo_list_filtered, new_gpo);
+			}
+		}
+
+		for (gpo = changed_gpo_list; gpo; gpo = gpo->next) {
+
+			bool is_present = false;
+
+			status = gpext_check_gpo_for_gpext_presence(mem_ctx,
+								    flags,
+								    gpo,
+								    ext->guid,
+								    &is_present);
+			if (!NT_STATUS_IS_OK(status)) {
+				return status;
+			}
+
+			if (is_present) {
+				struct GROUP_POLICY_OBJECT *new_gpo;
+
+				status = gpo_copy(mem_ctx, gpo, &new_gpo);
+				if (!NT_STATUS_IS_OK(status)) {
+					return status;
+				}
+
+				DLIST_ADD(changed_gpo_list_filtered, new_gpo);
+			}
+		}
+
+		status = ext->methods->initialize(mem_ctx);
+		NT_STATUS_NOT_OK_RETURN(status);
+
+		status = ext->methods->process_group_policy(mem_ctx,
+							    flags,
+							    root_key,
+							    token,
+							    deleted_gpo_list_filtered,
+							    changed_gpo_list_filtered);
+		if (!NT_STATUS_IS_OK(status)) {
+			ext->methods->shutdown();
+		}
 	}
 
-	return NT_STATUS_OK;
+	return status;
 }
diff --git a/libgpo/gpext/gpext.h b/libgpo/gpext/gpext.h
index ef0b1a2..0f5139d 100644
--- a/libgpo/gpext/gpext.h
+++ b/libgpo/gpext/gpext.h
@@ -65,9 +65,8 @@ struct gp_extension_methods {
 					 uint32_t flags,
 					 struct registry_key *root_key,
 					 const struct security_token *token,
-					 struct GROUP_POLICY_OBJECT *gpo,
-					 const char *extension_guid,
-					 const char *snapin_guid);
+					 const struct GROUP_POLICY_OBJECT *deleted_gpo_list,
+					 const struct GROUP_POLICY_OBJECT *changed_gpo_list);
 
 	NTSTATUS (*get_reg_config)(TALLOC_CTX *mem_ctx,
 				   struct gp_extension_reg_info **info);
@@ -77,41 +76,34 @@ struct gp_extension_methods {
 
 /* The following definitions come from libgpo/gpext/gpext.c  */
 
-struct gp_extension *get_gp_extension_list(void);
-NTSTATUS unregister_gp_extension(const char *name);
-NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx,
-			       int version,
-			       const char *name,
-			       const char *guid,
-			       struct gp_extension_methods *methods);
-NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx,
-			       const char *module,
-			       const char *ext_guid,
-			       struct gp_extension_reg_table *table,
-			       struct gp_extension_reg_info *info);
-NTSTATUS shutdown_gp_extensions(void);
-NTSTATUS init_gp_extensions(TALLOC_CTX *mem_ctx);
-NTSTATUS free_gp_extensions(void);
-void debug_gpext_header(int lvl,
+struct gp_extension *gpext_get_gp_extension_list(void);
+NTSTATUS gpext_unregister_gp_extension(const char *name);
+NTSTATUS gpext_register_gp_extension(TALLOC_CTX *gpext_ctx,
+				     int version,
+				     const char *name,
+				     const char *guid,
+				     struct gp_extension_methods *methods);
+NTSTATUS gpext_info_add_entry(TALLOC_CTX *mem_ctx,
+			      const char *module,
+			      const char *ext_guid,
+			      struct gp_extension_reg_table *table,
+			      struct gp_extension_reg_info *info);
+NTSTATUS gpext_shutdown_gp_extensions(void);
+NTSTATUS gpext_init_gp_extensions(TALLOC_CTX *mem_ctx);
+NTSTATUS gpext_free_gp_extensions(void);
+void gpext_debug_header(int lvl,
 			const char *name,
 			uint32_t flags,
-			struct GROUP_POLICY_OBJECT *gpo,
+			const struct GROUP_POLICY_OBJECT *gpo,
 			const char *extension_guid,
 			const char *snapin_guid);
-NTSTATUS process_gpo_list_with_extension(
-			   TALLOC_CTX *mem_ctx,
-			   uint32_t flags,
-			   const struct security_token *token,
-			   struct GROUP_POLICY_OBJECT *gpo_list,
-			   const char *extension_guid,
-			   const char *snapin_guid);
 NTSTATUS gpext_process_extension(TALLOC_CTX *mem_ctx,
 				 uint32_t flags,
 				 const struct security_token *token,
 				 struct registry_key *root_key,
-				 struct GROUP_POLICY_OBJECT *gpo,
-				 const char *extension_guid,
-				 const char *snapin_guid);
+				 const struct GROUP_POLICY_OBJECT *deleted_gpo_list,
+				 const struct GROUP_POLICY_OBJECT *changed_gpo_list,
+				 const char *extension_guid);
 
 
 #endif /* __GPEXT_H__ */
diff --git a/libgpo/gpo.h b/libgpo/gpo.h
index 40ecd34..0bae44a 100644
--- a/libgpo/gpo.h
+++ b/libgpo/gpo.h
@@ -138,13 +138,6 @@ 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;
@@ -176,7 +169,7 @@ NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
 NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
                          ADS_STRUCT *ads,
                          const char *cache_dir,
-			 struct GROUP_POLICY_OBJECT *gpo);
+			 const struct GROUP_POLICY_OBJECT *gpo);
 NTSTATUS gpo_get_sysvol_gpt_version(TALLOC_CTX *mem_ctx,
 				    const char *unix_path,
 				    uint32_t *sysvol_version,
@@ -228,39 +221,30 @@ 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);
-NTSTATUS gpo_process_a_gpo(TALLOC_CTX *mem_ctx,
-			   const struct security_token *token,
-			   struct registry_key *root_key,
-			   struct GROUP_POLICY_OBJECT *gpo,
-			   const char *extension_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,
-			      struct GROUP_POLICY_OBJECT *gpo_list,
+			      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_dir,
 			   uint32_t flags,
-			   struct GROUP_POLICY_OBJECT *gpo);
+			   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,
                            const char *cache_dir,
-			   struct GROUP_POLICY_OBJECT *gpo,
+			   const 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,
@@ -273,7 +257,12 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
 				const char *dn,
 				struct security_token **token);
 
-
-#include "../libgpo/gpext/gpext.h"
+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
diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c
index 9fdff7c..07141d4 100644
--- a/libgpo/gpo_fetch.c
+++ b/libgpo/gpo_fetch.c
@@ -151,7 +151,7 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads,
 NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
                          ADS_STRUCT *ads,
                          const char *cache_dir,
-			 struct GROUP_POLICY_OBJECT *gpo)
+			 const struct GROUP_POLICY_OBJECT *gpo)
 {
 	NTSTATUS result;
 	char *server, *service, *nt_path, *unix_path;
diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index d46c48f..f797c2f 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -756,7 +756,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
 		if (ADS_ERR_OK(status)) {
 
 			if (DEBUGLEVEL >= 100) {
-				dump_gplink(ads, mem_ctx, &gp_link);
+				dump_gplink(&gp_link);
 			}
 
 			status = add_gplink_to_gpo_list(ads, mem_ctx, gpo_list,
@@ -794,7 +794,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list