]> git.sur5r.net Git - openldap/commitdiff
test attrval.{exact,regex} (related to ITS#4253)
authorPierangelo Masarati <ando@openldap.org>
Fri, 9 Dec 2005 12:18:29 +0000 (12:18 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 9 Dec 2005 12:18:29 +0000 (12:18 +0000)
tests/data/acl.out.master
tests/data/slapd-acl.conf
tests/scripts/defines.sh
tests/scripts/test006-acls

index db6c1fb0157aecec6462cc674c7afe3c8560d956..cb060640e105f2ada99cbf98086f2f8b40163540 100644 (file)
@@ -20,6 +20,19 @@ mail: jaj@mail.alumni.example.com
 facsimileTelephoneNumber: +1 313 555 4332
 telephoneNumber: +1 313 555 0895
 
+# Checking exact/regex attrval clause
+dn: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
+cn: Mark A Elliot
+
+dn: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
+cn: Mark Elliot
+
+dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com
+cn: John Doe
+
+dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com
+cn: Jonathon Doe
+
 # Using ldapsearch to retrieve all the entries...
 dn: ou=Add & Delete,dc=example,dc=com
 objectClass: organizationalUnit
@@ -316,8 +329,6 @@ telephoneNumber: +1 313 555 7334
 
 dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com
 objectClass: OpenLDAPperson
-cn: John Doe
-cn: Jonathon Doe
 sn: Doe
 uid: johnd
 postalAddress: ITD $ 535 W. William $ Anytown, MI 48109
index c769714932d23997eec753fe29d0e81b3a47381e..082fabf5d3dd793730733510546b42aa62f88e5b 100644 (file)
@@ -63,6 +63,34 @@ access               to filter="(objectclass=person)" attr=userpassword
                by anonymous auth
                by self =wx
 
+access         to dn.exact="cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com"
+                       attrs=cn val="Mark A Elliot"
+               by dn="cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
+               by * break
+
+access         to dn.exact="cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com"
+                       attrs=cn val="Mark Elliot"
+               by dn="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
+               by * break
+
+access         to dn.exact="cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com"
+                       attrs=cn
+               by * search
+
+access         to dn.exact="cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com"
+                       attrs=cn val.regex="^John D.*"
+               by dn="cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
+               by * break
+
+access         to dn.exact="cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com"
+                       attrs=cn val.regex="^Jonath.*"
+               by dn="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
+               by * break
+
+access         to dn.exact="cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com"
+                       attrs=cn
+               by * search
+
 access         to dn.children="ou=Alumni Association,ou=People,dc=example,dc=com"
                by dn.regex=".+,dc=example,dc=com" +c continue
                by dn.subtree="dc=example,dc=com" +rs continue
index faa061a0c044bb373cd6bfc38ba71a08265e34cd..4fbe350e3908cd94ec396725ea4088b992117811 100755 (executable)
@@ -205,6 +205,8 @@ PASSWD=secret
 BABSDN="cn=Barbara Jensen,ou=Information Technology DivisioN,OU=People,dc=example,dc=com"
 BJORNSDN="cn=Bjorn Jensen,ou=Information Technology DivisioN,OU=People,dc=example,dc=com"
 JAJDN="cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com"
+JOHNDDN="cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com"
+MELLIOTDN="cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com"
 REFINTDN="cn=Manager,o=refint"
 RETCODEDN="ou=RetCodes,$BASEDN"
 UNIQUEDN="cn=Manager,o=unique"
index 38da4d1bc0bae00fba1eea8ff07bbc5bb897ffe7..5be36420790cf2fda0e379670f41a5398d8c75d6 100755 (executable)
@@ -78,7 +78,23 @@ echo "# ... and should return all attributes if we're bound as anyone
 # under Example." \
 >> $SEARCHOUT
 $LDAPSEARCH -b "$JAJDN" -h $LOCALHOST -p $PORT1 \
-       -D "$BABSDN" -w bjensen "(objectclass=*)"  >> $SEARCHOUT 2>&1
+       -D "$BABSDN" -w bjensen "(objectclass=*)" >> $SEARCHOUT 2>&1
+
+# ITS#4253
+echo "# Checking exact/regex attrval clause" >> $SEARCHOUT
+$LDAPSEARCH -h $LOCALHOST -p $PORT1 \
+       -D "$BABSDN" -w bjensen \
+       -b "$MELLIOTDN" -s base "(objectclass=*)" cn >> $SEARCHOUT 2>&1
+$LDAPSEARCH -h $LOCALHOST -p $PORT1 \
+       -D "$BJORNSDN" -w bjorn \
+       -b "$MELLIOTDN" -s base "(objectclass=*)" cn >> $SEARCHOUT 2>&1
+
+$LDAPSEARCH -h $LOCALHOST -p $PORT1 \
+       -D "$BABSDN" -w bjensen \
+       -b "$JOHNDDN" -s base "(objectclass=*)" cn >> $SEARCHOUT 2>&1
+$LDAPSEARCH -h $LOCALHOST -p $PORT1 \
+       -D "$BJORNSDN" -w bjorn \
+       -b "$JOHNDDN" -s base "(objectclass=*)" cn >> $SEARCHOUT 2>&1
 
 #
 # Check group access. Try to modify Babs' entry. Two attempts: