mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
ITS#9779 add test for negated filtered memberof
This commit is contained in:
parent
e73cdc55e0
commit
efb0597536
@ -386,8 +386,10 @@ memberOf: cn=all staff,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
|
||||
|
||||
# Testing static group member compare...
|
||||
TRUE
|
||||
|
||||
# Testing static group non-member compare (should return FALSE)...
|
||||
FALSE
|
||||
|
||||
# Testing nested dynamic group functionality...
|
||||
@ -677,6 +679,100 @@ memberOf: cn=bonus group,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
|
||||
|
||||
# Testing negated filtered memberOf functionality...
|
||||
dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,
|
||||
dc=com
|
||||
objectClass: OpenLDAPperson
|
||||
cn: Barbara Jensen
|
||||
cn: Babs Jensen
|
||||
sn:: IEplbnNlbiA=
|
||||
uid: bjensen
|
||||
title: Mythical Manager, Research Systems
|
||||
postalAddress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Anyt
|
||||
own, MI 48103-4943
|
||||
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
|
||||
userPassword:: YmplbnNlbg==
|
||||
mail: bjensen@mailgw.example.com
|
||||
homePostalAddress: 123 Wesley $ Anytown, MI 48103
|
||||
description: Mythical manager of the rsdd unix project
|
||||
drink: water
|
||||
homePhone: +1 313 555 2333
|
||||
pager: +1 313 555 3233
|
||||
facsimileTelephoneNumber: +1 313 555 2274
|
||||
telephoneNumber: +1 313 555 9022
|
||||
memberOf: cn=all staff,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=the jensens,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=jjs,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
|
||||
|
||||
dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc
|
||||
=com
|
||||
objectClass: OpenLDAPperson
|
||||
cn: Bjorn Jensen
|
||||
cn: Biiff Jensen
|
||||
sn: Jensen
|
||||
uid: bjorn
|
||||
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
|
||||
seeAlso: cn=itd staff,ou=groups,dc=example,dc=com
|
||||
userPassword:: Ympvcm4=
|
||||
homePostalAddress: 19923 Seven Mile Rd. $ South Lyon, MI 49999
|
||||
drink: Iced Tea
|
||||
description: Hiker, biker
|
||||
title: Director, Embedded Systems
|
||||
postalAddress: Info Tech Division $ 535 W. William St. $ Anytown, MI 48103
|
||||
mail: bjorn@mailgw.example.com
|
||||
homePhone: +1 313 555 5444
|
||||
pager: +1 313 555 4474
|
||||
facsimileTelephoneNumber: +1 313 555 2177
|
||||
telephoneNumber: +1 313 555 0355
|
||||
memberOf: cn=all staff,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=the jensens,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=jjs,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
|
||||
|
||||
dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=example
|
||||
,dc=com
|
||||
objectClass: OpenLDAPperson
|
||||
cn: James A Jones 2
|
||||
cn: James Jones
|
||||
cn: Jim Jones
|
||||
sn: Doe
|
||||
uid: jjones
|
||||
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
|
||||
seeAlso: cn=itd staff,ou=groups,dc=example,dc=com
|
||||
homePostalAddress: 933 Brooks $ Anytown, MI 48104
|
||||
homePhone: +1 313 555 8838
|
||||
title: Senior Manager, Information Technology Division
|
||||
description: Not around very much
|
||||
mail: jjones@mailgw.example.com
|
||||
postalAddress: Info Tech Division $ 535 W William $ Anytown, MI 48103
|
||||
pager: +1 313 555 2833
|
||||
facsimileTelephoneNumber: +1 313 555 8688
|
||||
telephoneNumber: +1 313 555 7334
|
||||
memberOf: cn=jjs,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=all staff,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
|
||||
|
||||
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
|
||||
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
|
||||
seeAlso: cn=itd staff,ou=groups,dc=example,dc=com
|
||||
homePostalAddress: 912 East Bllvd $ Anytown, MI 48104
|
||||
title: System Administrator, Information Technology Division
|
||||
description: overworked!
|
||||
mail: johnd@mailgw.example.com
|
||||
homePhone: +1 313 555 3774
|
||||
pager: +1 313 555 6573
|
||||
facsimileTelephoneNumber: +1 313 555 4544
|
||||
telephoneNumber: +1 313 555 9394
|
||||
memberOf: cn=all staff,ou=groups,dc=example,dc=com
|
||||
memberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
|
||||
|
||||
# Testing filtered nested member functionality...
|
||||
dn: cn=All Staff,ou=Groups,dc=example,dc=com
|
||||
member: cn=Manager,dc=example,dc=com
|
||||
|
@ -1049,6 +1049,20 @@ if test $RC != 0 ; then
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Testing negated filtered memberOf functionality..."
|
||||
echo "# Testing negated filtered memberOf functionality..." >> $SEARCHOUT
|
||||
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -H $URI1 \
|
||||
-D "$BABSDN" -w bjensen \
|
||||
"(&(objectClass=OpenLDAPperson)(!(memberOf=cn=Alumni Assoc Staff,ou=groups,$BASEDN)))" '*' 'memberOf' \
|
||||
>> $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Testing filtered nested member functionality..."
|
||||
echo "# Testing filtered nested member functionality..." >> $SEARCHOUT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user