diff options
author | Simo Sorce <idra@samba.org> | 2005-07-12 12:04:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:20:13 -0500 |
commit | c9b0e86a436b5b169a4c33bd25eac379cb622b17 (patch) | |
tree | 7b3662e7b11aa57a7624e46b369858262dc1bfae /source4/lib/ldb/tests | |
parent | adb7fd18e5e58bc466bdd31d68423e5f958a1d5d (diff) | |
download | samba-c9b0e86a436b5b169a4c33bd25eac379cb622b17.tar.gz samba-c9b0e86a436b5b169a4c33bd25eac379cb622b17.tar.bz2 samba-c9b0e86a436b5b169a4c33bd25eac379cb622b17.zip |
r8373: New wildcard matching code.
This code applies correct ldap standard wildcard matching code
removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently
adds some more tests for wildcard matching
fixes dn comparison code in ldb_match
(This used to be commit 4eb5863042011988d85092d7dde3d809aa15bd59)
Diffstat (limited to 'source4/lib/ldb/tests')
-rw-r--r-- | source4/lib/ldb/tests/schema-tests/schema.ldif | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tests/test-attribs.ldif | 1 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/test-generic.sh | 9 | ||||
-rw-r--r-- | source4/lib/ldb/tests/test-index.ldif | 1 | ||||
-rw-r--r-- | source4/lib/ldb/tests/test-tdb-features.sh | 19 |
5 files changed, 13 insertions, 20 deletions
diff --git a/source4/lib/ldb/tests/schema-tests/schema.ldif b/source4/lib/ldb/tests/schema-tests/schema.ldif index 59757d22a9..d1ad50f2cc 100644 --- a/source4/lib/ldb/tests/schema-tests/schema.ldif +++ b/source4/lib/ldb/tests/schema-tests/schema.ldif @@ -13,11 +13,8 @@ realm: CASE_INSENSITIVE userPrincipalName: CASE_INSENSITIVE servicePrincipalName: CASE_INSENSITIVE name: CASE_INSENSITIVE -name: WILDCARD dn: CASE_INSENSITIVE -dn: WILDCARD sAMAccountName: CASE_INSENSITIVE -sAMAccountName: WILDCARD objectClass: CASE_INSENSITIVE unicodePwd: HIDDEN ntPwdHash: HIDDEN diff --git a/source4/lib/ldb/tests/test-attribs.ldif b/source4/lib/ldb/tests/test-attribs.ldif index e6fe1dcf5a..0bb3ebead6 100644 --- a/source4/lib/ldb/tests/test-attribs.ldif +++ b/source4/lib/ldb/tests/test-attribs.ldif @@ -1,6 +1,5 @@ dn: @ATTRIBUTES uid: CASE_INSENSITIVE -uid: WILDCARD cn: CASE_INSENSITIVE ou: CASE_INSENSITIVE dn: CASE_INSENSITIVE diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh index db6377d078..3ad17fe9d3 100755 --- a/source4/lib/ldb/tests/test-generic.sh +++ b/source4/lib/ldb/tests/test-generic.sh @@ -45,6 +45,15 @@ $VALGRIND ldbsearch '((' uid || exit 1 $VALGRIND ldbsearch '(objectclass=)' uid || exit 1 $VALGRIND ldbsearch -b 'cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST' -s base "" sn || exit 1 +echo "Test wildcard match" +$VALGRIND ldbadd $LDBDIR/tests/test-wildcard.ldif || exit 1 +$VALGRIND ldbsearch '(cn=test*multi)' || exit 1 +$VALGRIND ldbsearch '(cn=*test*multi*)' || exit 1 +$VALGRIND ldbsearch '(cn=*test_multi)' || exit 1 +$VALGRIND ldbsearch '(cn=test_multi*)' || exit 1 +$VALGRIND ldbsearch '(cn=test*multi*test*multi)' || exit 1 +$VALGRIND ldbsearch '(cn=test*multi*test*multi*multi_*)' || exit 1 + echo "Starting ldbtest indexed" time $VALGRIND ldbtest --num-records 100 --num-searches 500 || exit 1 diff --git a/source4/lib/ldb/tests/test-index.ldif b/source4/lib/ldb/tests/test-index.ldif index 7ba0106394..a793537187 100644 --- a/source4/lib/ldb/tests/test-index.ldif +++ b/source4/lib/ldb/tests/test-index.ldif @@ -4,7 +4,6 @@ dn: @INDEXLIST dn: @ATTRIBUTES uid: CASE_INSENSITIVE -uid: WILDCARD dn: @SUBCLASSES top: person diff --git a/source4/lib/ldb/tests/test-tdb-features.sh b/source4/lib/ldb/tests/test-tdb-features.sh index 613afef8ad..fb68733802 100644 --- a/source4/lib/ldb/tests/test-tdb-features.sh +++ b/source4/lib/ldb/tests/test-tdb-features.sh @@ -16,7 +16,7 @@ checkcount() { echo "OK: $count $expression" } -echo "Testing case sensitve search" +echo "Testing case sensitive search" cat <<EOF | $VALGRIND bin/ldbadd || exit 1 dn: cn=t1,cn=TEST objectClass: testclass @@ -24,7 +24,7 @@ test: foo EOF checkcount 1 '(test=foo)' checkcount 0 '(test=FOO)' -checkcount 0 '(test=fo*)' +checkcount 0 '(test=FO*)' echo "Making case insensitive" cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 @@ -37,17 +37,6 @@ EOF echo $ldif | $VALGRIND bin/ldbmodify || exit 1 checkcount 1 '(test=foo)' checkcount 1 '(test=FOO)' -checkcount 0 '(test=fo*)' - -echo "adding wildcard" -cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 -dn: @ATTRIBUTES -changetype: modify -add: test -test: WILDCARD -EOF -checkcount 1 '(test=foo)' -checkcount 1 '(test=FOO)' checkcount 1 '(test=fo*)' echo "adding i" @@ -115,7 +104,7 @@ checkcount 1 '(i=256)' checkcount 0 '(i=-256)' checkcount 1 '(test=foo)' checkcount 1 '(test=FOO)' -checkcount 1 '(test=fo*)' +checkcount 1 '(test=*f*o)' echo "making test case sensitive" cat <<EOF | $VALGRIND bin/ldbmodify || exit 1 @@ -126,5 +115,5 @@ test: NONE EOF checkcount 1 '(test=foo)' checkcount 0 '(test=FOO)' -checkcount 0 '(test=fo*)' +checkcount 1 '(test=f*o*)' |