diff options
author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-10-24 14:27:24 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-10-24 14:27:24 -0400 |
commit | f0933150a9764eee648c0fa4d591531e7c0cf9b9 (patch) | |
tree | 6c347949451ca3a8b09147ef96473f7e003d49a6 /tests | |
parent | 33dfde10b9a28ab9b42dff759cc8b90c5495b1c4 (diff) | |
download | slapi-nis-f0933150a9764eee648c0fa4d591531e7c0cf9b9.tar.gz slapi-nis-f0933150a9764eee648c0fa4d591531e7c0cf9b9.tar.xz slapi-nis-f0933150a9764eee648c0fa4d591531e7c0cf9b9.zip |
- add a straight-up test for nested group resolution
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test27-nis-nested-groups/after.sh | 8 | ||||
-rw-r--r-- | tests/test27-nis-nested-groups/after.txt | 16 | ||||
-rwxr-xr-x | tests/test27-nis-nested-groups/before.sh | 8 | ||||
-rw-r--r-- | tests/test27-nis-nested-groups/before.txt | 16 | ||||
-rwxr-xr-x | tests/test27-nis-nested-groups/change.sh | 15 | ||||
-rw-r--r-- | tests/test27-nis-nested-groups/change.txt | 4 | ||||
-rw-r--r-- | tests/test27-nis-nested-groups/description.txt | 1 | ||||
-rw-r--r-- | tests/test27-nis-nested-groups/dse.ldif | 21 | ||||
-rw-r--r-- | tests/test27-nis-nested-groups/userRoot.ldif | 25 |
9 files changed, 114 insertions, 0 deletions
diff --git a/tests/test27-nis-nested-groups/after.sh b/tests/test27-nis-nested-groups/after.sh new file mode 100755 index 0000000..27afbdf --- /dev/null +++ b/tests/test27-nis-nested-groups/after.sh @@ -0,0 +1,8 @@ +#!/bin/sh +echo map list: +$YP maplist example.com +$YP -c maplist example.com +for map in `$YP maplist example.com` ; do + echo contents of example.com:"$map": + $YP cat example.com $map +done diff --git a/tests/test27-nis-nested-groups/after.txt b/tests/test27-nis-nested-groups/after.txt new file mode 100644 index 0000000..d6a143c --- /dev/null +++ b/tests/test27-nis-nested-groups/after.txt @@ -0,0 +1,16 @@ +map list: +test +users +test +users +contents of example.com:test: +group1 user2a +group2 group1-fake-uid,user2b,user2a +contents of example.com:users: +user1 user1:user1 +user1a user1a:User 1 A +user1b user1b:User 1 B +user1c user1c:User 1 C +user2a user2a:User 2 A +user2b user2b:User 2 B +user2c user2c:User 2 C diff --git a/tests/test27-nis-nested-groups/before.sh b/tests/test27-nis-nested-groups/before.sh new file mode 100755 index 0000000..27afbdf --- /dev/null +++ b/tests/test27-nis-nested-groups/before.sh @@ -0,0 +1,8 @@ +#!/bin/sh +echo map list: +$YP maplist example.com +$YP -c maplist example.com +for map in `$YP maplist example.com` ; do + echo contents of example.com:"$map": + $YP cat example.com $map +done diff --git a/tests/test27-nis-nested-groups/before.txt b/tests/test27-nis-nested-groups/before.txt new file mode 100644 index 0000000..1c55f39 --- /dev/null +++ b/tests/test27-nis-nested-groups/before.txt @@ -0,0 +1,16 @@ +map list: +test +users +test +users +contents of example.com:test: +group1 +group2 group1-fake-uid +contents of example.com:users: +user1 user1:user1 +user1a user1a:User 1 A +user1b user1b:User 1 B +user1c user1c:User 1 C +user2a user2a:User 2 A +user2b user2b:User 2 B +user2c user2c:User 2 C diff --git a/tests/test27-nis-nested-groups/change.sh b/tests/test27-nis-nested-groups/change.sh new file mode 100755 index 0000000..d170da8 --- /dev/null +++ b/tests/test27-nis-nested-groups/change.sh @@ -0,0 +1,15 @@ +#!/bin/sh +modify << EOF +dn: cn=group1, cn=Groups1, cn=Accounts, dc=example, dc=com +changetype: modify +add: member +member: uid=user2a, cn=Users2, cn=Accounts, dc=example, dc=com +- + +dn: cn=group2, cn=Groups1, cn=Accounts, dc=example, dc=com +changetype: modify +add: member +member: uid=user2b, cn=Users2, cn=Accounts, dc=example, dc=com +- + +EOF diff --git a/tests/test27-nis-nested-groups/change.txt b/tests/test27-nis-nested-groups/change.txt new file mode 100644 index 0000000..aefc0f1 --- /dev/null +++ b/tests/test27-nis-nested-groups/change.txt @@ -0,0 +1,4 @@ +modifying entry "cn=group1, cn=Groups1, cn=Accounts, dc=example, dc=com" + +modifying entry "cn=group2, cn=Groups1, cn=Accounts, dc=example, dc=com" + diff --git a/tests/test27-nis-nested-groups/description.txt b/tests/test27-nis-nested-groups/description.txt new file mode 100644 index 0000000..4c49b92 --- /dev/null +++ b/tests/test27-nis-nested-groups/description.txt @@ -0,0 +1 @@ +nested group memberships (group->user) diff --git a/tests/test27-nis-nested-groups/dse.ldif b/tests/test27-nis-nested-groups/dse.ldif new file mode 100644 index 0000000..30f87a2 --- /dev/null +++ b/tests/test27-nis-nested-groups/dse.ldif @@ -0,0 +1,21 @@ +dn: nis-domain=example.com+nis-map=users,cn=NIS Server,cn=plugins,cn=config +objectClass: top +objectClass: extensibleObject +nis-domain: example.com +nis-map: users +nis-base: cn=Users1, cn=Accounts, dc=example, dc=com +nis-base: cn=Users2, cn=Accounts, dc=example, dc=com +nis-filter: objectclass=posixAccount +nis-keys-format: %{uid} +nis-value-format: %{uid}:%{cn} + +dn: nis-domain=example.com+nis-map=test,cn=NIS Server,cn=plugins,cn=config +objectClass: top +objectClass: extensibleObject +nis-domain: example.com +nis-map: test +nis-base: cn=Groups1, cn=Accounts, dc=example, dc=com +nis-filter: objectclass=posixgroup +nis-keys-format: %{cn} +nis-value-format: %merge(",","%deref_r(\"member\",\"uid\")","%referred_r(\"users\",\"memberOf\",\"uid\")") + diff --git a/tests/test27-nis-nested-groups/userRoot.ldif b/tests/test27-nis-nested-groups/userRoot.ldif new file mode 100644 index 0000000..751718f --- /dev/null +++ b/tests/test27-nis-nested-groups/userRoot.ldif @@ -0,0 +1,25 @@ +dn: uid=user1, cn=Users1, cn=Accounts, dc=example, dc=com +objectClass: posixAccount +objectClass: inetUser +cn: user1 +uid: user1 +uidNumber: 1001 +gidNumber: 1001 +gecos: User +loginShell: /bin/bash +homeDirectory: /home/user + +dn: cn=group1, cn=Groups1, cn=Accounts, dc=example, dc=com +objectClass: posixgroup +objectClass: extensibleObject +cn: group1 +uid: group1-fake-uid +gidNumber: 1002 + +dn: cn=group2, cn=Groups1, cn=Accounts, dc=example, dc=com +objectClass: posixgroup +objectClass: extensibleObject +uid: group2-fake-uid +gidNumber: 1003 +member: cn=group1, cn=Groups1, cn=Accounts, dc=example, dc=com + |