diff options
author | Simo Sorce <idra@samba.org> | 2005-05-17 21:43:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:52 -0500 |
commit | ca4e0c8539e5b0e01ca9d68eba8692c544d7a4d6 (patch) | |
tree | 018e9cc324cb33f16408d960368f2e79c08d638e /source4/lib/ldb/tests | |
parent | f9ad3029ae97f5d5beed3f85ad912830fa8d7930 (diff) | |
download | samba-ca4e0c8539e5b0e01ca9d68eba8692c544d7a4d6.tar.gz samba-ca4e0c8539e5b0e01ca9d68eba8692c544d7a4d6.tar.bz2 samba-ca4e0c8539e5b0e01ca9d68eba8692c544d7a4d6.zip |
r6867: this code will change the way the @ATTRIBUTES object is handled
this object properties are now used as multivalue attributes
now all values inserted are checked against a "valid values table"
eg:
this form is now accepted:
dn: @ATTRIBUTES
uid: CASE_INSENSITIVE
uid: WILDCARD
this form is now rejected:
dn: @ATTRIBUTES
uid: CASE_INSENSITIVE WILDCARD
please update your .ldb files if you make use of @ATTRIBUTES
(sam.ldb heavily uses it)
the code passes all make test tests for both tdb and ldap, it also
passes the new test to check for wrong @ATTRIBUTES attribute values
Simo.
(This used to be commit 1295b891a26c2cb2c34540f90ded83390cf87da2)
Diffstat (limited to 'source4/lib/ldb/tests')
-rw-r--r-- | source4/lib/ldb/tests/schema-tests/schema.ldif | 9 | ||||
-rw-r--r-- | source4/lib/ldb/tests/test-attribs.ldif | 3 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/test-generic.sh | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tests/test-index.ldif | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tests/test-wrong_attributes.ldif | 3 |
5 files changed, 16 insertions, 5 deletions
diff --git a/source4/lib/ldb/tests/schema-tests/schema.ldif b/source4/lib/ldb/tests/schema-tests/schema.ldif index 651fdac41f..59757d22a9 100644 --- a/source4/lib/ldb/tests/schema-tests/schema.ldif +++ b/source4/lib/ldb/tests/schema-tests/schema.ldif @@ -12,9 +12,12 @@ dn: @ATTRIBUTES realm: CASE_INSENSITIVE userPrincipalName: CASE_INSENSITIVE servicePrincipalName: CASE_INSENSITIVE -name: CASE_INSENSITIVE WILDCARD -dn: CASE_INSENSITIVE WILDCARD -sAMAccountName: CASE_INSENSITIVE WILDCARD +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 4bfb1ebd65..e6fe1dcf5a 100644 --- a/source4/lib/ldb/tests/test-attribs.ldif +++ b/source4/lib/ldb/tests/test-attribs.ldif @@ -1,5 +1,6 @@ dn: @ATTRIBUTES -uid: CASE_INSENSITIVE WILDCARD +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 2b2ab2e78a..78fed1c12b 100755 --- a/source4/lib/ldb/tests/test-generic.sh +++ b/source4/lib/ldb/tests/test-generic.sh @@ -25,6 +25,9 @@ time $VALGRIND bin/ldbtest -r 1000 -s 10 || exit 1 echo "Adding index" $VALGRIND bin/ldbadd tests/test-index.ldif || exit 1 +echo "Adding attributes" +$VALGRIND bin/ldbadd tests/test-wrong_attributes.ldif || exit 1 + echo "testing indexed search" $VALGRIND bin/ldbsearch '(uid=uham)' || exit 1 $VALGRIND bin/ldbsearch '(&(objectclass=person)(objectclass=person)(objectclass=top))' || exit 1 diff --git a/source4/lib/ldb/tests/test-index.ldif b/source4/lib/ldb/tests/test-index.ldif index 24ac408764..7ba0106394 100644 --- a/source4/lib/ldb/tests/test-index.ldif +++ b/source4/lib/ldb/tests/test-index.ldif @@ -3,7 +3,8 @@ dn: @INDEXLIST @IDXATTR: objectclass dn: @ATTRIBUTES -uid: CASE_INSENSITIVE WILDCARD +uid: CASE_INSENSITIVE +uid: WILDCARD dn: @SUBCLASSES top: person diff --git a/source4/lib/ldb/tests/test-wrong_attributes.ldif b/source4/lib/ldb/tests/test-wrong_attributes.ldif new file mode 100644 index 0000000000..27f45f0e56 --- /dev/null +++ b/source4/lib/ldb/tests/test-wrong_attributes.ldif @@ -0,0 +1,3 @@ +dn: @ATTRIBUTES +uid: CASE_INTENSIVE + |