diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-03-26 15:31:02 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-03-26 15:31:02 +0100 |
commit | 1e200c1952adab450909ac35252be4636c3e1053 (patch) | |
tree | 575e1337aaec5cf8decb10567a4876c1650441c6 /source4/lib/ldb/tests | |
parent | ca202cf464aec82e63be4b2160f394f56b8c195e (diff) | |
parent | 853f9283fb8fbcd2078e3cf8e99d6c8e24d77346 (diff) | |
download | samba-1e200c1952adab450909ac35252be4636c3e1053.tar.gz samba-1e200c1952adab450909ac35252be4636c3e1053.tar.bz2 samba-1e200c1952adab450909ac35252be4636c3e1053.zip |
Merge branch 'master' of git://git.samba.org/samba
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-x | source4/lib/ldb/tests/python/api.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index c372b8fa71..07500e2372 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -258,6 +258,19 @@ class SimpleLdb(unittest.TestCase): l = ldb.Ldb(filename()) l.set_debug(my_report_fn) + def test_zero_byte_string(self): + """Testing we do not get trapped in the \0 byte in a property string.""" + l = ldb.Ldb(filename()) + l.add({ + "dn" : "dc=somedn", + "objectclass" : "user", + "cN" : "LDAPtestUSER", + "givenname" : "ldap", + "displayname" : "foo\0bar", + }) + res = l.search(expression="(dn=dc=somedn)") + self.assertEquals("foo\0bar", res[0]["displayname"][0]) + class DnTests(unittest.TestCase): def setUp(self): |