[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1179-g6fc40ce

Günther Deschner gd at samba.org
Mon Apr 20 21:40:06 GMT 2009


The branch, master has been updated
       via  6fc40ce0d3b1bdfe9a138db4953896f47094424e (commit)
      from  7010365e9ac5f9a285b5ad7b660a3c49ff0e8c17 (commit)

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


- Log -----------------------------------------------------------------
commit 6fc40ce0d3b1bdfe9a138db4953896f47094424e
Author: Günther Deschner <gd at samba.org>
Date:   Mon Apr 20 23:38:11 2009 +0200

    libgpo: fix the build of gpext plugins.
    
    Guenther

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

Summary of changes:
 libgpo/gpo_ini.h                |    3 +++
 source3/libgpo/gpext/registry.c |    3 ++-
 source3/libgpo/gpext/scripts.c  |    6 +++---
 source3/libgpo/gpext/security.c |   10 +++++-----
 source3/utils/net_ads_gpo.c     |    4 ++--
 5 files changed, 15 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_ini.h b/libgpo/gpo_ini.h
index 02ca0ff..1f3fa56 100644
--- a/libgpo/gpo_ini.h
+++ b/libgpo/gpo_ini.h
@@ -40,3 +40,6 @@ NTSTATUS parse_gpt_ini(TALLOC_CTX *ctx,
 		       const char *filename,
 		       uint32_t *version,
 		       char **display_name);
+NTSTATUS gp_inifile_getstring(struct gp_inifile_context *ctx, const char *key, char **ret);
+NTSTATUS gp_inifile_getint(struct gp_inifile_context *ctx, const char *key, int *ret);
+
diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c
index 0a0dd9b..ae2adcc 100644
--- a/source3/libgpo/gpext/registry.c
+++ b/source3/libgpo/gpext/registry.c
@@ -18,6 +18,7 @@
  */
 
 #include "includes.h"
+#include "../libgpo/gpo_ini.h"
 
 #define GP_EXT_NAME "registry"
 
@@ -534,7 +535,7 @@ static NTSTATUS registry_process_group_policy(ADS_STRUCT *ads,
 	debug_gpext_header(0, "registry_process_group_policy", flags, gpo,
 			   extension_guid, snapin_guid);
 
-	status = gpo_get_unix_path(mem_ctx, gpo, &unix_path);
+	status = gpo_get_unix_path(mem_ctx, cache_path(GPO_CACHE_DIR), gpo, &unix_path);
 	NT_STATUS_NOT_OK_RETURN(status);
 
 	status = reg_parse_registry(mem_ctx,
diff --git a/source3/libgpo/gpext/scripts.c b/source3/libgpo/gpext/scripts.c
index 4ced3ab..43f9b3a 100644
--- a/source3/libgpo/gpext/scripts.c
+++ b/source3/libgpo/gpext/scripts.c
@@ -130,9 +130,9 @@ static NTSTATUS scripts_parse_ini_section(struct gp_inifile_context *ini_ctx,
 	while (1) {
 
 		const char *key = NULL;
-		const char *script = NULL;
+		char *script = NULL;
 		const char *count = NULL;
-		const char *parameters = NULL;
+		char *parameters = NULL;
 
 		count = talloc_asprintf(ini_ctx->mem_ctx, "%d", i);
 		NT_STATUS_HAVE_NO_MEMORY(count);
@@ -354,7 +354,7 @@ static NTSTATUS scripts_process_group_policy(ADS_STRUCT *ads,
 	debug_gpext_header(0, "scripts_process_group_policy", flags, gpo,
 			   extension_guid, snapin_guid);
 
-	status = gpo_get_unix_path(mem_ctx, gpo, &unix_path);
+	status = gpo_get_unix_path(mem_ctx, cache_path(GPO_CACHE_DIR), gpo, &unix_path);
 	NT_STATUS_NOT_OK_RETURN(status);
 
 	status = gp_inifile_init_context(mem_ctx, flags, unix_path,
diff --git a/source3/libgpo/gpext/security.c b/source3/libgpo/gpext/security.c
index 8adeb59..f0a52fd 100644
--- a/source3/libgpo/gpext/security.c
+++ b/source3/libgpo/gpext/security.c
@@ -59,9 +59,9 @@ struct gpttmpl_table {
 static NTSTATUS gpttmpl_parse_header(struct gp_inifile_context *ini_ctx,
 				     uint32_t *version_out)
 {
-	const char *signature = NULL;
+	char *signature = NULL;
 	NTSTATUS result;
-	uint32_t version;
+	int version;
 	int is_unicode;
 
 	if (!ini_ctx) {
@@ -79,7 +79,7 @@ static NTSTATUS gpttmpl_parse_header(struct gp_inifile_context *ini_ctx,
 	}
 	result = gp_inifile_getint(ini_ctx, GPTTMPL_SECTION_VERSION
 			":"GPTTMPL_PARAMETER_REVISION, &version);
-	if (!NT_STATUS_IS_OK(result))
+	if (!NT_STATUS_IS_OK(result)) {
 		return NT_STATUS_INTERNAL_DB_CORRUPTION;
 	}
 
@@ -88,7 +88,7 @@ static NTSTATUS gpttmpl_parse_header(struct gp_inifile_context *ini_ctx,
 	}
 
 	result = gp_inifile_getint(ini_ctx, GPTTMPL_SECTION_UNICODE
-			":"GPTTMPL_PARAMETER_UNICODE, is_unicode);
+			":"GPTTMPL_PARAMETER_UNICODE, &is_unicode);
 	if (!NT_STATUS_IS_OK(result) || !is_unicode) {
 		return NT_STATUS_INTERNAL_DB_CORRUPTION;
 	}
@@ -157,7 +157,7 @@ static NTSTATUS security_process_group_policy(ADS_STRUCT *ads,
 	/* this handler processes the gpttmpl files and merge output to the
 	 * registry */
 
-	status = gpo_get_unix_path(mem_ctx, gpo, &unix_path);
+	status = gpo_get_unix_path(mem_ctx, cache_path(GPO_CACHE_DIR), gpo, &unix_path);
 	if (!NT_STATUS_IS_OK(status)) {
 		goto out;
 	}
diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c
index 9e41905..7484726 100644
--- a/source3/utils/net_ads_gpo.c
+++ b/source3/utils/net_ads_gpo.c
@@ -401,7 +401,7 @@ static int net_ads_gpo_apply(struct net_context *c, int argc, const char **argv)
 		flags |= GPO_LIST_FLAG_MACHINE;
 	}
 
-	if (opt_verbose) {
+	if (c->opt_verbose) {
 		flags |= GPO_INFO_FLAG_VERBOSE;
 	}
 
@@ -410,7 +410,7 @@ static int net_ads_gpo_apply(struct net_context *c, int argc, const char **argv)
 		argv[0], dn);
 
 	if (uac & UF_WORKSTATION_TRUST_ACCOUNT) {
-		status = gp_get_machine_token(ads, mem_ctx, dn, &token);
+		status = gp_get_machine_token(ads, mem_ctx, NULL, dn, &token);
 	} else {
 		status = ads_get_sid_token(ads, mem_ctx, dn, &token);
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list