[PATCH 03/26] Fixup to initial commit

abartlet at samba.org abartlet at samba.org
Thu Jun 5 04:07:08 MDT 2014


From: Garming Sam <garming at catalyst.net.nz>

Change-Id: Ie164a9044988679ca39fac4aa8af583c0aea0ea0
Signed-off-by: Garming Sam <garming at catalyst.net.nz>
---
 docs-xml/smbdotconf/domain/gpoupdatecommand.xml | 14 ++++++++++++++
 lib/param/param_table.c                         |  2 +-
 libgpo/pygpo.c                                  | 17 +++++++++++------
 3 files changed, 26 insertions(+), 7 deletions(-)
 create mode 100644 docs-xml/smbdotconf/domain/gpoupdatecommand.xml

diff --git a/docs-xml/smbdotconf/domain/gpoupdatecommand.xml b/docs-xml/smbdotconf/domain/gpoupdatecommand.xml
new file mode 100644
index 0000000..cbfd662
--- /dev/null
+++ b/docs-xml/smbdotconf/domain/gpoupdatecommand.xml
@@ -0,0 +1,14 @@
+<samba:parameter name="gpo update command"
+                 context="G"
+                 type="list"
+                 advanced="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>This option sets the command that is called when there are
+		GPO updates.
+	</para>
+</description>
+
+<value type="default">&pathconfig.SCRIPTSBINDIR;/samba_gpoupdate</value>
+<value type="example">/usr/local/sbin/gpoupdate</value>
+</samba:parameter>
diff --git a/lib/param/param_table.c b/lib/param/param_table.c
index d62d4e5..8f2d19c 100644
--- a/lib/param/param_table.c
+++ b/lib/param/param_table.c
@@ -4250,7 +4250,7 @@ struct parm_struct parm_table[] = {
 		.label		= "gpo update command",
 		.type		= P_CMDLIST,
 		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(szGPOUpdateCommand),
+		.offset		= GLOBAL_VAR(gpo_update_command),
 		.special	= NULL,
 		.enum_list	= NULL,
 		.flags		= FLAG_ADVANCED,
diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index 6b7b1b2..645c933 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -47,10 +47,11 @@ static PyObject *py_ads_parse_gp_ext(PyGpExtObject *self, PyObject *args)
 {
 	struct GP_EXT *gp_ext = pygp_ext_AsgpextContext((PyObject *)self);
 	bool verify;
+	const char *extension_raw;
 	TALLOC_CTX *tmp_ctx;
+
 	tmp_ctx = talloc_new(NULL);
-	const char *extension_raw;
-	if (!PyArg_ParseTuple(args, "s" , &extension_raw)) {
+	if (!PyArg_ParseTuple(args, "s", &extension_raw)) {
 		return NULL;
 		}
 	verify = ads_parse_gp_ext(tmp_ctx, extension_raw, &gp_ext);
@@ -163,7 +164,9 @@ static PyObject *py_parse_gpt_ini(PyObject *self, PyObject *args)
 	uint32_t *version = 0;
 	NTSTATUS status;
 	char **display_name = NULL;
-	if (!PyArg_ParseTuple(args, "s", &filename)){
+	PyObject *result = NULL;
+
+	if (!PyArg_ParseTuple(args, "s", &filename)) {
 		return NULL;
 		}
 	status = parse_gpt_ini(tmp_ctx, filename, version, display_name);
@@ -172,7 +175,7 @@ static PyObject *py_parse_gpt_ini(PyObject *self, PyObject *args)
 		}
 	//Do not need to check for display name because it might not have one
 	//Zero cases will be handled in python
-	PyObject *result = Py_BuildValue("[s,i]", display_name, version);
+	result = Py_BuildValue("[s,i]", display_name, version);
 	return result;
 
 }
@@ -584,9 +587,11 @@ static PyObject *py_ads_init(PyGpObject *self, PyObject *args)
 {
 	const char *realm = NULL;
 	const char *workgroup = NULL;
-	const char * ldap_server = NULL;
+	const char *ldap_server = NULL;
+	ADS_STRUCT *ads = NULL;
+
 	printf("Before the as content statement\n");
-	ADS_STRUCT *ads =pygpoads_AsgpoadsContext(self->ads);
+	ads = pygpoads_AsgpoadsContext(self->ads);
 
 	if (!PyArg_ParseTuple(args, "ss" , &realm, &workgroup)) {
                    return NULL;
-- 
1.9.3



More information about the samba-technical mailing list