[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Fri Aug 19 13:04:02 MDT 2011


The branch, master has been updated
       via  c21c254 s3:passdb/py_passdb.c - restore Python >= 2.4 compatibility
       via  aefde81 ldb:ldb_controls.c - cosmetic indentation fix
       via  87b482a ldb - two cosmetic fixes
      from  0825a52 Revert "s3-messaging: IDMAP_ messages belongs to the Winbind range"

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


- Log -----------------------------------------------------------------
commit c21c25450819c9bf2d88c52e6ba44df2c28a01a4
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Fri Aug 19 19:27:32 2011 +0200

    s3:passdb/py_passdb.c - restore Python >= 2.4 compatibility
    
    Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
    Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104

commit aefde815ac44319c734f9459da2d36025c18fc56
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Wed Jun 22 14:46:09 2011 +0200

    ldb:ldb_controls.c - cosmetic indentation fix

commit 87b482a89e045b8ae253911cb55b4957ee71175e
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Tue Jun 21 11:32:02 2011 +0200

    ldb - two cosmetic fixes
    
    @ldb.h: Removes an invalid comment line
    @pyldb.c: Fixes indentation

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

Summary of changes:
 lib/ldb/common/ldb_controls.c |    9 ++++-----
 lib/ldb/include/ldb.h         |    2 --
 lib/ldb/pyldb.c               |    4 ++--
 source3/passdb/py_passdb.c    |    7 +++++++
 4 files changed, 13 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb_controls.c b/lib/ldb/common/ldb_controls.c
index b3ef243..81f3c7a 100644
--- a/lib/ldb/common/ldb_controls.c
+++ b/lib/ldb/common/ldb_controls.c
@@ -373,17 +373,16 @@ char *ldb_control_to_string(TALLOC_CTX *mem_ctx, const struct ldb_control *contr
 	 */
 	if (control->data == NULL) {
 		/*
-		 * We don't know the control but there is no real data attached to it
-		 * so we can represent it with local_oid:oid:criticity
+		 * We don't know the control but there is no real data attached
+		 * to it so we can represent it with local_oid:oid:criticity.
 		 */
 		res = talloc_asprintf(mem_ctx, "local_oid:%s:%d",
 					control->oid,
 					control->critical);
-		return res;
-	}
-
+	} else {
 		res = talloc_asprintf(mem_ctx, "unknown oid:%s",
 					control->oid);
+	}
 	return res;
 }
 
diff --git a/lib/ldb/include/ldb.h b/lib/ldb/include/ldb.h
index 4220ed0..ae34019 100644
--- a/lib/ldb/include/ldb.h
+++ b/lib/ldb/include/ldb.h
@@ -1425,8 +1425,6 @@ int ldb_build_extended_req(struct ldb_request **ret_req,
 /**
   call an extended operation
 
-  This function deletes a record from the database.
-
   \param ldb the context associated with the database (from ldb_init())
   \param oid the OID of the extended operation.
   \param data a void pointer a the extended operation specific parameters,
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index 218505d..72680c1 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -1143,11 +1143,11 @@ static PyObject *py_ldb_add(PyLdbObject *self, PyObject *args, PyObject *kwargs)
 
 	ret = ldb_request(ldb_ctx, req);
 	if (ret == LDB_SUCCESS) {
-			ret = ldb_wait(req->handle, LDB_WAIT_ALL);
+		ret = ldb_wait(req->handle, LDB_WAIT_ALL);
 	} 
 
 	if (ret == LDB_SUCCESS) {
-			ret = ldb_transaction_commit(ldb_ctx);
+		ret = ldb_transaction_commit(ldb_ctx);
 	} else {
 		ldb_transaction_cancel(ldb_ctx);
 		if (ldb_ctx->err_string == NULL) {
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index 9192ab3..e23f475 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -25,6 +25,13 @@
 #include "passdb.h"
 #include "secrets.h"
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+#endif
+
 #ifndef Py_RETURN_NONE
 #define Py_RETURN_NONE	return Py_INCREF(Py_None), Py_None
 #endif


-- 
Samba Shared Repository


More information about the samba-cvs mailing list