[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Sat Nov 6 15:05:01 MDT 2010
The branch, master has been updated
via 3d443b3 ldb:ldb_parse.c - "ldb_parse_hex2char" - always initialise "c"
via 39ed810 s4:ldap.py - enhance the "distinguishedName" tests
from acb8a8d s4:update_keytab LDB module - we don't need to search for the "distinguishedName" attribute
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3d443b3797dd81133990a48b6021dcf529cc5497
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Nov 6 21:22:53 2010 +0100
ldb:ldb_parse.c - "ldb_parse_hex2char" - always initialise "c"
Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
Autobuild-Date: Sat Nov 6 21:04:58 UTC 2010 on sn-devel-104
commit 39ed810feb8b042faedaf7bc836f34162ce5fb67
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Nov 6 20:47:51 2010 +0100
s4:ldap.py - enhance the "distinguishedName" tests
The "dn" shortcut isn't supported by AD.
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/tests/python/ldap.py | 24 ++++++++++++++++++++++++
source4/lib/ldb/common/ldb_parse.c | 2 +-
2 files changed, 25 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index c3a4087..b4fe8cd 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -965,6 +965,18 @@ class BasicTests(unittest.TestCase):
"""Tests the 'distinguishedName' attribute"""
print "Tests the 'distinguishedName' attribute"""
+ # The "dn" shortcut isn't supported
+ m = Message()
+ m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
+ m["objectClass"] = MessageElement("group", 0, "objectClass")
+ m["dn"] = MessageElement("cn=ldaptestgroup,cn=users," + self.base_dn, 0,
+ "dn")
+ try:
+ ldb.add(m)
+ self.fail()
+ except LdbError, (num, _):
+ self.assertEquals(num, ERR_NO_SUCH_ATTRIBUTE)
+
# a wrong "distinguishedName" attribute is obviously tolerated
self.ldb.add({
"dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
@@ -979,6 +991,18 @@ class BasicTests(unittest.TestCase):
self.assertTrue(Dn(ldb, res[0]["distinguishedName"][0])
== Dn(ldb, "cn=ldaptestgroup, cn=users," + self.base_dn))
+ # The "dn" shortcut isn't supported
+ m = Message()
+ m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
+ m["dn"] = MessageElement(
+ "cn=ldaptestgroup,cn=users," + self.base_dn, FLAG_MOD_REPLACE,
+ "dn")
+ try:
+ ldb.modify(m)
+ self.fail()
+ except LdbError, (num, _):
+ self.assertEquals(num, ERR_NO_SUCH_ATTRIBUTE)
+
m = Message()
m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
m["distinguishedName"] = MessageElement(
diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c
index 0203f32..16b3e21 100644
--- a/source4/lib/ldb/common/ldb_parse.c
+++ b/source4/lib/ldb/common/ldb_parse.c
@@ -47,7 +47,7 @@ static int ldb_parse_hex2char(const char *x)
{
if (isxdigit(x[0]) && isxdigit(x[1])) {
const char h1 = x[0], h2 = x[1];
- int c;
+ int c = 0;
if (h1 >= 'a') c = h1 - (int)'a' + 10;
else if (h1 >= 'A') c = h1 - (int)'A' + 10;
--
Samba Shared Repository
More information about the samba-cvs
mailing list