[SCM] Samba Shared Repository - branch master updated - 59f8c1d98a53b01a32883da0662ce33cadd45419

Andrew Bartlett abartlet at samba.org
Wed Jan 7 06:09:45 GMT 2009


The branch, master has been updated
       via  59f8c1d98a53b01a32883da0662ce33cadd45419 (commit)
       via  59d5a963d137ec10686b98e575b16c45848ea3ab (commit)
      from  c81863e86861bbb00df23b92470631e60314d9d1 (commit)

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


- Log -----------------------------------------------------------------
commit 59f8c1d98a53b01a32883da0662ce33cadd45419
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jan 7 16:30:05 2009 +1100

    Use new error constant (missing from 6efb7ff9)

commit 59d5a963d137ec10686b98e575b16c45848ea3ab
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jan 7 16:29:23 2009 +1100

    Raise a python exception when the ldb search fails
    
    This fixes a regression found by ldap.py in the new hand-written
    python bindings.
    
    Andrew Bartlett

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

Summary of changes:
 source4/lib/ldb/pyldb.c              |    6 ++++++
 source4/lib/ldb/tests/python/ldap.py |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 0bc6447..521fa49 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -848,6 +848,12 @@ static PyObject *py_ldb_search(PyLdbObject *self, PyObject *args, PyObject *kwar
 
 	talloc_free(req);
 
+	if (ret != LDB_SUCCESS) {
+		talloc_free(res);
+		PyErr_LDB_ERROR_IS_ERR_RAISE(ret, ldb_ctx);
+		return NULL;
+	}
+
 	return PyLdbResult_FromResult(res);
 }
 
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index f9006db..f0b5000 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -616,7 +616,7 @@ member: cn=ldaptestuser4,cn=ldaptestcontainer,""" + self.base_dn + """
             ldb.delete("cn=ldaptestcontainer2," + self.base_dn)
             self.fail()
         except LdbError, (num, _):
-            self.assertEquals(num, NOT_ALLOWED_ON_NON_LEAF)
+            self.assertEquals(num, ERR_NOT_ALLOWED_ON_NON_LEAF)
 
         print "Testing base ldb.search for CN=ldaptestuser4,CN=ldaptestcontainer2," + self.base_dn
         res = ldb.search(expression="(objectclass=*)", base=("CN=ldaptestuser4,CN=ldaptestcontainer2," + self.base_dn), scope=SCOPE_BASE)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list