Commit 2c0499ae authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#9121 support nested groups

parent 9210ed16
......@@ -51,7 +51,7 @@ occurrences, and it must appear after the
.B overlay
directive.
.TP
.B dynlist\-attrset <group-oc> [<URI>] <URL-ad> [[<mapped-ad>:]<member-ad>[+<memberOf-ad] ...]
.B dynlist\-attrset <group-oc> [<URI>] <URL-ad> [[<mapped-ad>:]<member-ad>[+<memberOf-ad[@<static-oc>[*]] ...]
The value
.B group\-oc
is the name of the objectClass that triggers the dynamic expansion of the
......@@ -94,6 +94,15 @@ If the optional
.B memberOf-ad
attribute is also specified, then it will be populated with the DNs of the
dynamic groups that an entry is a member of.
If the optional
.B static-oc
objectClass is also specified, then the memberOf attribute will also be
populated with the DNs of the static groups that an entry is a member of.
If the optional
.B *
character is also specified, then the member and memberOf values will be
populated recursively, for nested groups. Note that currently nesting is
only supported for Search operations, not Compares.
Alternatively,
.B mapped-ad
......
This diff is collapsed.
......@@ -386,3 +386,375 @@ dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
# Testing nested dynamic group functionality...
dn: cn=Dynamic List,ou=Dynamic Lists,dc=example,dc=com
objectClass: groupOfURLs
cn: Dynamic List
memberURL: ldap:///ou=People,dc=example,dc=com?cn,mail?sub?(objectClass=person
)
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
dn: ou=Dynamic Lists,dc=example,dc=com
objectClass: organizationalUnit
ou: Dynamic Lists
dn: cn=Meta Group,ou=Dynamic Lists,dc=example,dc=com
objectClass: groupOfURLs
cn: Meta Group
memberURL: ldap:///ou=Dynamic Lists,dc=example,dc=com??sub?(description=Smith%
20family)
member: cn=The Smiths,ou=Dynamic Lists,dc=example,dc=com
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
dn: cn=The Smiths,ou=Dynamic Lists,dc=example,dc=com
objectClass: groupOfURLs
cn: The Smiths
memberURL: ldap:///ou=People,dc=example,dc=com??sub?(sn=Smith)
description: Smith family
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
dgMemberOf: cn=meta group,ou=dynamic lists,dc=example,dc=com
dn: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
objectClass: OpenLDAPperson
cn: Mark Elliot
cn: Mark A Elliot
sn: Elliot
uid: melliot
postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
homePostalAddress: 199 Outer Drive $ Ypsilanti, MI 48198
homePhone: +1 313 555 0388
drink: Gasoline
title: Director, UM Alumni Association
mail: melliot@mail.alumni.example.com
pager: +1 313 555 7671
facsimileTelephoneNumber: +1 313 555 7762
telephoneNumber: +1 313 555 4177
dgMemberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
# Testing nested static group 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
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=the jensens,ou=groups,dc=example,dc=com
dgMemberOf: cn=jjs,ou=groups,dc=example,dc=com
dgMemberOf: 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
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=the jensens,ou=groups,dc=example,dc=com
dgMemberOf: cn=jjs,ou=groups,dc=example,dc=com
dgMemberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
objectClass: OpenLDAPperson
cn: Ursula Hampster
sn: Hampster
uid: uham
title: Secretary, UM Alumni Association
postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
homePostalAddress: 123 Anystreet $ Anytown, MI 48104
mail: uham@mail.alumni.example.com
homePhone: +1 313 555 8421
pager: +1 313 555 2844
facsimileTelephoneNumber: +1 313 555 9700
telephoneNumber: +1 313 555 5331
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
dgMemberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
dgMemberOf: 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
dgMemberOf: cn=jjs,ou=groups,dc=example,dc=com
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
dn: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com
objectClass: OpenLDAPperson
cn: Jane Doe
cn: Jane Alverson
sn: Doe
uid: jdoe
title: Programmer Analyst, UM Alumni Association
postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
homePostalAddress: 123 Anystreet $ Anytown, MI 48104
drink: diet coke
description: Enthusiastic
mail: jdoe@woof.net
homePhone: +1 313 555 5445
pager: +1 313 555 1220
facsimileTelephoneNumber: +1 313 555 2311
telephoneNumber: +1 313 555 4774
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
dgMemberOf: 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
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
objectClass: OpenLDAPperson
cn: Jennifer Smith
cn: Jen Smith
sn: Smith
uid: jen
postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
drink: Sam Adams
homePostalAddress: 1000 Maple #44 $ Anytown, MI 48103
title: Telemarketer, UM Alumni Association
mail: jen@mail.alumni.example.com
homePhone: +1 313 555 2333
pager: +1 313 555 6442
facsimileTelephoneNumber: +1 313 555 2756
telephoneNumber: +1 313 555 8232
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=the smiths,ou=dynamic lists,dc=example,dc=com
dgMemberOf: cn=meta group,ou=dynamic lists,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
dgMemberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
# Testing filtered nested memberOf functionality...
dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
objectClass: OpenLDAPperson
cn: Jennifer Smith
cn: Jen Smith
sn: Smith
uid: jen
postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
drink: Sam Adams
homePostalAddress: 1000 Maple #44 $ Anytown, MI 48103
title: Telemarketer, UM Alumni Association
mail: jen@mail.alumni.example.com
homePhone: +1 313 555 2333
pager: +1 313 555 6442
facsimileTelephoneNumber: +1 313 555 2756
telephoneNumber: +1 313 555 8232
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=the smiths,ou=dynamic lists,dc=example,dc=com
dgMemberOf: cn=meta group,ou=dynamic lists,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
dgMemberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=dynamic list of members,ou=dynamic lists,dc=example,dc=com
dn: cn=Meta Group,ou=Dynamic Lists,dc=example,dc=com
objectClass: groupOfURLs
cn: Meta Group
memberURL: ldap:///ou=Dynamic Lists,dc=example,dc=com??sub?(description=Smith%
20family)
member: cn=The Smiths,ou=Dynamic Lists,dc=example,dc=com
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
dn: cn=The Smiths,ou=Dynamic Lists,dc=example,dc=com
objectClass: groupOfURLs
cn: The Smiths
memberURL: ldap:///ou=People,dc=example,dc=com??sub?(sn=Smith)
description: Smith family
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
dgMemberOf: cn=meta group,ou=dynamic lists,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
objectClass: OpenLDAPperson
cn: Ursula Hampster
sn: Hampster
uid: uham
title: Secretary, UM Alumni Association
postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
seeAlso: cn=All Staff,ou=Groups,dc=example,dc=com
homePostalAddress: 123 Anystreet $ Anytown, MI 48104
mail: uham@mail.alumni.example.com
homePhone: +1 313 555 8421
pager: +1 313 555 2844
facsimileTelephoneNumber: +1 313 555 9700
telephoneNumber: +1 313 555 5331
dgMemberOf: cn=all staff,ou=groups,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
dgMemberOf: cn=alumni assoc staff,ou=groups,dc=example,dc=com
dgMemberOf: 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
member: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=exam
ple,dc=com
member: cn=Jane Doe,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=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=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=exampl
e,dc=com
owner: cn=Manager,dc=example,dc=com
cn: All Staff
description: Everyone in the sample data
objectClass: groupofnames
dn: cn=Alumni Assoc Staff,ou=Groups,dc=example,dc=com
member: cn=Manager,dc=example,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=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=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
owner: cn=Manager,dc=example,dc=com
description: All Alumni Assoc Staff
cn: Alumni Assoc Staff
objectClass: groupofnames
dn: cn=Bonus Group,ou=Groups,dc=example,dc=com
objectClass: groupOfNames
cn: Bonus Group
member: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=Meta Group,ou=Dynamic Lists,dc=example,dc=com
member: cn=The Smiths,ou=Dynamic Lists,dc=example,dc=com
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
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
dn: cn=Meta Group,ou=Dynamic Lists,dc=example,dc=com
objectClass: groupOfURLs
cn: Meta Group
memberURL: ldap:///ou=Dynamic Lists,dc=example,dc=com??sub?(description=Smith%
20family)
member: cn=The Smiths,ou=Dynamic Lists,dc=example,dc=com
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
dn: cn=The Smiths,ou=Dynamic Lists,dc=example,dc=com
objectClass: groupOfURLs
cn: The Smiths
memberURL: ldap:///ou=People,dc=example,dc=com??sub?(sn=Smith)
description: Smith family
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
dgMemberOf: cn=meta group,ou=dynamic lists,dc=example,dc=com
dgMemberOf: cn=bonus group,ou=groups,dc=example,dc=com
......@@ -763,6 +763,179 @@ if test $RC != 0 ; then
exit $RC
fi
echo "Reconfiguring slapd..."
$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \
$TESTOUT 2>&1 << EOMODS
version: 1
dn: olcOverlay={0}dynlist,olcDatabase={$DBIX}$BACKEND,cn=config
changetype: modify
delete: olcDynListAttrSet
olcDynListAttrSet: {0}
-
add: olcDynListAttrSet
olcDynListAttrSet: groupOfURLs memberURL member+dgMemberOf*
-
EOMODS
echo "==========================================================" >> $LOG1
echo "Adding a couple dynamic groups..."
$LDAPADD -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
> $TESTOUT 2>&1 << EOMODS
dn: cn=The Smiths,$LISTDN
objectClass: groupOfURLs
cn: The Smiths
memberURL: ldap:///ou=People,${BASEDN}??sub?(sn=Smith)
description: Smith family
dn: cn=Meta Group,$LISTDN
objectClass: groupOfURLs
cn: Meta Group
memberURL: ldap:///${LISTDN}??sub?(description=Smith%20family)
EOMODS
echo "Testing nested dynamic group functionality..."
echo "# Testing nested dynamic group functionality..." >> $SEARCHOUT
$LDAPSEARCH -S "" -b "$LISTDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
'(objectclass=*)' '*' \
>> $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
$LDAPSEARCH -S "" -b "ou=People,$BASEDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
'(cn=Mark Elliot)' '*' \
>> $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
echo "Reconfiguring slapd..."
$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \
$TESTOUT 2>&1 << EOMODS
version: 1
dn: olcOverlay={0}dynlist,olcDatabase={$DBIX}$BACKEND,cn=config
changetype: modify
delete: olcDynListAttrSet
olcDynListAttrSet: {0}
-
add: olcDynListAttrSet
olcDynListAttrSet: groupOfURLs memberURL member+dgMemberOf@groupOfNames*
olcDynListAttrSet: labeledURIObject labeledURI uniqueMember+seeAlso@groupOfUniqueNames
-
EOMODS
echo "==========================================================" >> $LOG1
echo "Adding a couple static groups..."
$LDAPADD -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
> $TESTOUT 2>&1 << EOMODS
dn: cn=The Jensens,ou=Groups,$BASEDN
objectClass: groupOfnames
cn: The Jensens
member: cn=Bjorn Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN
member: cn=Barbara Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN
dn: cn=JJs,ou=Groups,$BASEDN
objectClass: groupOfnames
cn: JJs
member: cn=James A Jones 1,ou=Alumni Association,ou=People,$BASEDN
member: cn=James A Jones 2,ou=Information Technology Division,ou=People,$BASEDN
member: cn=The Jensens,ou=Groups,$BASEDN
EOMODS
echo "Testing nested static group functionality..."
echo "# Testing nested static group functionality..." >> $SEARCHOUT
$LDAPSEARCH -S "" -b "ou=People,$BASEDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
'(sn=Jensen)' '*' \
>> $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
echo "Adding another nested group..."
$LDAPADD -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
> $TESTOUT 2>&1 << EOMODS
dn: cn=Bonus Group,ou=Groups,$BASEDN
objectClass: groupOfnames
cn: Bonus Group
member: cn=Ursula Hampster,ou=Alumni Association,ou=People,$BASEDN
member: cn=Meta Group,$LISTDN
EOMODS
$LDAPSEARCH -S "" -b "ou=People,$BASEDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
'(sn=Hampster)' '*' \
>> $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
$LDAPSEARCH -S "" -b "ou=People,$BASEDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
'(sn=Doe)' '*' \
>> $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
$LDAPSEARCH -S "" -b "ou=People,$BASEDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
'(sn=Smith)' '*' \
>> $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 memberOf functionality..."
echo "# Testing filtered nested memberOf functionality..." >> $SEARCHOUT
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
"(dgMemberOf=cn=bonus group,ou=groups,$BASEDN)" '*' \
>> $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
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
-D "$BABSDN" -w bjensen \
"(member=cn=Jennifer Smith,ou=Alumni Association,ou=People,$BASEDN)" '*' \
>> $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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment