[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-837-g096eafd

Stefan Metzmacher metze at samba.org
Fri Feb 15 07:51:13 GMT 2008


The branch, v4-0-test has been updated
       via  096eafd34778dde222bce4b0a5c0fc38b7de0359 (commit)
       via  558c717c6c279b739633e26855910b61b792e7b6 (commit)
      from  7f2421f17cae313d7dbf5c35c73b5410cb1d5db0 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 096eafd34778dde222bce4b0a5c0fc38b7de0359
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 14 14:56:58 2008 +0100

    NET-API-BECOME-DC: at least find the 'provision' function in python mode
    
    This is still broken, as we call provision() with wrong arguments.
    Also the python provision() function, doesn't allow us
    to specify the locations of the partition ldb files,
    this is strictly needed otherwise the torture test destroys
    a production databases.
    
    I think we should have a provision_become_dc() again!
    
    metze

commit 558c717c6c279b739633e26855910b61b792e7b6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 14 14:54:52 2008 +0100

    cyrus_sasl: fix compiler warnings
    
    metze

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

Summary of changes:
 source/auth/gensec/cyrus_sasl.c         |    5 ++++-
 source/torture/libnet/libnet_BecomeDC.c |   20 ++++++++++++++++----
 2 files changed, 20 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/gensec/cyrus_sasl.c b/source/auth/gensec/cyrus_sasl.c
index 64a0b2f..cb7bcb7 100644
--- a/source/auth/gensec/cyrus_sasl.c
+++ b/source/auth/gensec/cyrus_sasl.c
@@ -362,8 +362,11 @@ int gensec_sasl_log(void *context,
 NTSTATUS gensec_sasl_init(void)
 {
 	NTSTATUS ret;
-	int sasl_ret, i;
+	int sasl_ret;
+#if 0
+	int i;
 	const char **sasl_mechs;
+#endif
 	
 	static const sasl_callback_t callbacks[] = {
 		{ 
diff --git a/source/torture/libnet/libnet_BecomeDC.c b/source/torture/libnet/libnet_BecomeDC.c
index 0dd06bd..997dbc9 100644
--- a/source/torture/libnet/libnet_BecomeDC.c
+++ b/source/torture/libnet/libnet_BecomeDC.c
@@ -284,6 +284,7 @@ static NTSTATUS test_become_dc_prepare_db_py(void *private_data,
 {
 	struct test_become_dc_state *s = talloc_get_type(private_data, struct test_become_dc_state);
 	bool ok;
+	PyObject *module, *module_dict;
 	PyObject *provision_fn, *result, *parameters;
 
 	DEBUG(0,("Provision for Become-DC test using PYTHON\n"));
@@ -293,13 +294,24 @@ static NTSTATUS test_become_dc_prepare_db_py(void *private_data,
 
 	py_update_path("bin"); /* FIXME: Can't assume this always runs in source/... */
 
-	provision_fn = PyImport_Import(PyString_FromString("samba.provision.provision"));
+	module = PyImport_Import(PyString_FromString("samba.provision"));
+	if (module == NULL) {
+		DEBUG(0, ("Unable to import 'samba.provision' Python module.\n"));
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
+	module_dict = PyModule_GetDict(module);
+	if (module_dict == NULL) {
+		DEBUG(0, ("Unable to GetDict of 'samba.provision'.\n"));
+		return NT_STATUS_UNSUCCESSFUL;
+	}
 
+	provision_fn = PyDict_GetItemString(module_dict, "provision");
 	if (provision_fn == NULL) {
-		DEBUG(0, ("Unable to import provision Python module.\n"));
-	      	return NT_STATUS_UNSUCCESSFUL;
+		DEBUG(0, ("Unable to get function 'provision' of 'samba.provision'.\n"));
+		return NT_STATUS_UNSUCCESSFUL;
 	}
-	
+
 	DEBUG(0,("New Server[%s] in Site[%s]\n",
 		p->dest_dsa->dns_name, p->dest_dsa->site_name));
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list