mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
test dgAuthz
This commit is contained in:
parent
aa081c4b71
commit
347776960c
@ -139,7 +139,7 @@ objectClass: groupOfURLs
|
||||
objectClass: dgIdentityAux
|
||||
cn: Dynamic List of Members
|
||||
memberURL: ldap:///ou=People,dc=example,dc=com??sub?(objectClass=person)
|
||||
dgIdentity: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=ex
|
||||
dgIdentity: cn=Bjorn Jensen,ou=Information Technology DivisioN,ou=People,dc=ex
|
||||
ample,dc=com
|
||||
member: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=exam
|
||||
ple,dc=com
|
||||
@ -156,3 +156,39 @@ member: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc
|
||||
member: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
member: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
|
||||
# Testing list search with dgIdentity and dgAuthz anonymously...
|
||||
dn: cn=Dynamic List of Members,ou=Dynamic Lists,dc=example,dc=com
|
||||
objectClass: groupOfURLs
|
||||
objectClass: dgIdentityAux
|
||||
cn: Dynamic List of Members
|
||||
memberURL: ldap:///ou=People,dc=example,dc=com??sub?(objectClass=person)
|
||||
dgIdentity: cn=Bjorn Jensen,ou=Information Technology DivisioN,ou=People,dc=ex
|
||||
ample,dc=com
|
||||
dgAuthz: {0}dn:cn=Barbara Jensen,ou=Information Technology DivisioN,ou=People,
|
||||
dc=example,dc=com
|
||||
|
||||
# Testing list search with dgIdentity and dgAuthz as the authorized identity...
|
||||
dn: cn=Dynamic List of Members,ou=Dynamic Lists,dc=example,dc=com
|
||||
objectClass: groupOfURLs
|
||||
objectClass: dgIdentityAux
|
||||
cn: Dynamic List of Members
|
||||
memberURL: ldap:///ou=People,dc=example,dc=com??sub?(objectClass=person)
|
||||
dgIdentity: cn=Bjorn Jensen,ou=Information Technology DivisioN,ou=People,dc=ex
|
||||
ample,dc=com
|
||||
dgAuthz: {0}dn:cn=Barbara Jensen,ou=Information Technology DivisioN,ou=People,
|
||||
dc=example,dc=com
|
||||
member: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=exam
|
||||
ple,dc=com
|
||||
member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=exampl
|
||||
e,dc=com
|
||||
member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
member: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
member: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=exa
|
||||
mple,dc=com
|
||||
member: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
member: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc
|
||||
=com
|
||||
member: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
member: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
|
||||
|
||||
|
@ -316,7 +316,7 @@ if test $RC != 0 ; then
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
CMPDN="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,$BASEDN"
|
||||
CMPDN="$BJORNSDN"
|
||||
echo "Testing list compare..."
|
||||
echo "# Testing list compare..." >> $SEARCHOUT
|
||||
$LDAPCOMPARE -h $LOCALHOST -p $PORT1 \
|
||||
@ -451,6 +451,42 @@ if test $RC != 0 ; then
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Testing dgAuthz..."
|
||||
|
||||
CMPDN="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,$BASEDN"
|
||||
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
|
||||
> $TESTOUT 2>&1 << EOMODS
|
||||
dn: cn=Dynamic List of Members,$LISTDN
|
||||
changetype: modify
|
||||
add: dgAuthz
|
||||
dgAuthz: dn:$BABSDN
|
||||
EOMODS
|
||||
|
||||
echo "Testing list search with dgIdentity and dgAuthz anonymously..."
|
||||
echo "# Testing list search with dgIdentity and dgAuthz anonymously..." >> $SEARCHOUT
|
||||
$LDAPSEARCH -S "" -b "$LISTDN" -h $LOCALHOST -p $PORT1 \
|
||||
'(cn=Dynamic List of Members)' '*' \
|
||||
>> $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Testing list search with dgIdentity and dgAuthz as the authorized identity..."
|
||||
echo "# Testing list search with dgIdentity and dgAuthz as the authorized identity..." >> $SEARCHOUT
|
||||
$LDAPSEARCH -S "" -b "$LISTDN" -h $LOCALHOST -p $PORT1 \
|
||||
-D "$BABSDN" -w bjensen \
|
||||
'(cn=Dynamic List of Members)' '*' \
|
||||
>> $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
|
||||
LDIF=$DYNLISTOUT
|
||||
|
Loading…
Reference in New Issue
Block a user