summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-08 18:51:23 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-08 18:51:23 -0400
commit817519e20c76ea5835369d961a04c163ca145b1f (patch)
treef6ea74346125f6be1bc1ba633094570f5857c475
parentfaa365abedd8a072f2711e96f54b4821e60eae6c (diff)
downloadslapi-nis-817519e20c76ea5835369d961a04c163ca145b1f.tar.gz
slapi-nis-817519e20c76ea5835369d961a04c163ca145b1f.tar.xz
slapi-nis-817519e20c76ea5835369d961a04c163ca145b1f.zip
- detect when a search base is removed from a map configuration
-rwxr-xr-xtests/test04-nis-modify-map/after.sh8
-rw-r--r--tests/test04-nis-modify-map/after.txt13
-rwxr-xr-xtests/test04-nis-modify-map/before.sh8
-rw-r--r--tests/test04-nis-modify-map/before.txt19
-rwxr-xr-xtests/test04-nis-modify-map/change.sh15
-rw-r--r--tests/test04-nis-modify-map/change.txt4
-rw-r--r--tests/test04-nis-modify-map/description.txt1
-rw-r--r--tests/test04-nis-modify-map/dse.ldif16
8 files changed, 84 insertions, 0 deletions
diff --git a/tests/test04-nis-modify-map/after.sh b/tests/test04-nis-modify-map/after.sh
new file mode 100755
index 0000000..27afbdf
--- /dev/null
+++ b/tests/test04-nis-modify-map/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/test04-nis-modify-map/after.txt b/tests/test04-nis-modify-map/after.txt
new file mode 100644
index 0000000..fe5a37b
--- /dev/null
+++ b/tests/test04-nis-modify-map/after.txt
@@ -0,0 +1,13 @@
+map list:
+passwd.byname
+passwd.byuid
+passwd.byname
+passwd.byuid
+contents of example.com:passwd.byname:
+user2a user2a:*:2001:2001:User 2 A:/home/user2a:/bin/sh
+user2b user2b:*:2002:2002:User 2 B:/home/user2b:/bin/sh
+user2c user2c:*:2003:2003:User 2 C:/home/user2c:/bin/sh
+contents of example.com:passwd.byuid:
+2001 user2a:*:2001:2001:User 2 A:/home/user2a:/bin/sh
+2002 user2b:*:2002:2002:User 2 B:/home/user2b:/bin/sh
+2003 user2c:*:2003:2003:User 2 C:/home/user2c:/bin/sh
diff --git a/tests/test04-nis-modify-map/before.sh b/tests/test04-nis-modify-map/before.sh
new file mode 100755
index 0000000..27afbdf
--- /dev/null
+++ b/tests/test04-nis-modify-map/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/test04-nis-modify-map/before.txt b/tests/test04-nis-modify-map/before.txt
new file mode 100644
index 0000000..4205396
--- /dev/null
+++ b/tests/test04-nis-modify-map/before.txt
@@ -0,0 +1,19 @@
+map list:
+passwd.byname
+passwd.byuid
+passwd.byname
+passwd.byuid
+contents of example.com:passwd.byname:
+user1a user1a:*:1001:1001:User 1 A:/home/user1a:/bin/sh
+user1b user1b:*:1002:1002:User 1 B:/home/user1b:/bin/sh
+user1c user1c:*:1003:1003:User 1 C:/home/user1c:/bin/sh
+user2a user2a:*:2001:2001:User 2 A:/home/user2a:/bin/sh
+user2b user2b:*:2002:2002:User 2 B:/home/user2b:/bin/sh
+user2c user2c:*:2003:2003:User 2 C:/home/user2c:/bin/sh
+contents of example.com:passwd.byuid:
+1001 user1a:*:1001:1001:User 1 A:/home/user1a:/bin/sh
+1002 user1b:*:1002:1002:User 1 B:/home/user1b:/bin/sh
+1003 user1c:*:1003:1003:User 1 C:/home/user1c:/bin/sh
+2001 user2a:*:2001:2001:User 2 A:/home/user2a:/bin/sh
+2002 user2b:*:2002:2002:User 2 B:/home/user2b:/bin/sh
+2003 user2c:*:2003:2003:User 2 C:/home/user2c:/bin/sh
diff --git a/tests/test04-nis-modify-map/change.sh b/tests/test04-nis-modify-map/change.sh
new file mode 100755
index 0000000..ea6c54e
--- /dev/null
+++ b/tests/test04-nis-modify-map/change.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+modify << EOF
+dn: nis-domain=example.com+nis-map=passwd.byname,cn=NIS Server,cn=plugins,cn=config
+changetype: modify
+delete: nis-base
+nis-base: cn=Users1, cn=Accounts, dc=example, dc=com
+-
+
+dn: nis-domain=example.com+nis-map=passwd.byuid,cn=NIS Server,cn=plugins,cn=config
+changetype: modify
+delete: nis-base
+nis-base: cn=Users1, cn=Accounts, dc=example, dc=com
+-
+
+EOF
diff --git a/tests/test04-nis-modify-map/change.txt b/tests/test04-nis-modify-map/change.txt
new file mode 100644
index 0000000..d1b0969
--- /dev/null
+++ b/tests/test04-nis-modify-map/change.txt
@@ -0,0 +1,4 @@
+modifying entry "nis-domain=example.com+nis-map=passwd.byname,cn=NIS Server,cn=plugins,cn=config"
+
+modifying entry "nis-domain=example.com+nis-map=passwd.byuid,cn=NIS Server,cn=plugins,cn=config"
+
diff --git a/tests/test04-nis-modify-map/description.txt b/tests/test04-nis-modify-map/description.txt
new file mode 100644
index 0000000..f8ad3da
--- /dev/null
+++ b/tests/test04-nis-modify-map/description.txt
@@ -0,0 +1 @@
+detect removal of a search base from map
diff --git a/tests/test04-nis-modify-map/dse.ldif b/tests/test04-nis-modify-map/dse.ldif
new file mode 100644
index 0000000..4af74ff
--- /dev/null
+++ b/tests/test04-nis-modify-map/dse.ldif
@@ -0,0 +1,16 @@
+dn: nis-domain=example.com+nis-map=passwd.byname,cn=NIS Server,cn=plugins,cn=config
+objectClass: top
+objectClass: extensibleObject
+nis-domain: example.com
+nis-map: passwd.byname
+nis-base: cn=Users1, cn=Accounts, dc=example, dc=com
+nis-base: cn=Users2, cn=Accounts, dc=example, dc=com
+
+dn: nis-domain=example.com+nis-map=passwd.byuid,cn=NIS Server,cn=plugins,cn=config
+objectClass: top
+objectClass: extensibleObject
+nis-domain: example.com
+nis-map: passwd.byuid
+nis-base: cn=Users1, cn=Accounts, dc=example, dc=com
+nis-base: cn=Users2, cn=Accounts, dc=example, dc=com
+