summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2014-02-17 18:48:02 -0500
committerNalin Dahyabhai <nalin@dahyabhai.net>2014-02-17 18:48:02 -0500
commit772ea7675ddad6cd7dce045154562a0ab22629bb (patch)
tree79b90ee9ee5f6f3a813751dd7fc9723f3610652e
parenta9a6a23f8e734f482dcbfaeac25607c576b17a0f (diff)
downloadslapi-nis-772ea7675ddad6cd7dce045154562a0ab22629bb.tar.gz
slapi-nis-772ea7675ddad6cd7dce045154562a0ab22629bb.tar.xz
slapi-nis-772ea7675ddad6cd7dce045154562a0ab22629bb.zip
Fixup nsswitch tests to allow the server to resolve its user
-rw-r--r--configure.ac9
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/test36-schema-nsswitch/wrap_group0
-rw-r--r--tests/test36-schema-nsswitch/wrap_pam3
-rw-r--r--tests/test36-schema-nsswitch/wrap_passwd.in1
5 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3771d2d..39c7df0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -543,6 +543,12 @@ AM_CONDITIONAL(CAN_TEST,[test "$server" = dirsrv && test "$SLAPD" != no-slapd])
AC_SUBST(CAN_TEST)
test_user=`id -un`
AC_SUBST(test_user)
+test_uid=`id -u`
+AC_SUBST(test_uid)
+test_group=`id -gn`
+AC_SUBST(test_group)
+test_gid=`id -g`
+AC_SUBST(test_gid)
test_basedn=dc=example,dc=com
AC_SUBST(test_basedn)
while true ; do
@@ -659,4 +665,5 @@ AC_OUTPUT(Makefile yp/Makefile src/Makefile
tests/config/dse.ldif.memberof
tests/config/dse.ldif.mep
tests/config/dse.ldif.usn
- src/nisserver-plugin-defs.1)
+ src/nisserver-plugin-defs.1
+ tests/test36-schema-nsswitch/wrap_passwd)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9264902..d848bf7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -7,7 +7,9 @@ wrappers_so_LDADD = -ldl
wrappers_so_LDFLAGS = -shared
wrappers_so_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(wrappers_so_LDFLAGS) $(LDFLAGS) -o $@
-EXTRA_DIST = run-tests.sh test*/*.ldif test*/*.sh test*/*.txt config/slapd-collations.conf config/userRoot.ldif config/schema *.supp
+EXTRA_DIST = run-tests.sh test*/*.ldif test*/*.sh test*/*.txt *.supp \
+ config/slapd-collations.conf config/userRoot.ldif config/schema \
+ test36-schema-nsswitch/wrap_passwd.in
if CAN_TEST
check:
@true
diff --git a/tests/test36-schema-nsswitch/wrap_group b/tests/test36-schema-nsswitch/wrap_group
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/test36-schema-nsswitch/wrap_group
diff --git a/tests/test36-schema-nsswitch/wrap_pam b/tests/test36-schema-nsswitch/wrap_pam
new file mode 100644
index 0000000..e369400
--- /dev/null
+++ b/tests/test36-schema-nsswitch/wrap_pam
@@ -0,0 +1,3 @@
+testuser1:authtok:MAXTRIES
+testuser2:authtok:PERM_DENIED
+testuser3, for real:authtok:0:ACCT_EXPIRED
diff --git a/tests/test36-schema-nsswitch/wrap_passwd.in b/tests/test36-schema-nsswitch/wrap_passwd.in
new file mode 100644
index 0000000..f4bd94f
--- /dev/null
+++ b/tests/test36-schema-nsswitch/wrap_passwd.in
@@ -0,0 +1 @@
+@test_user@:*:@test_uid@:@test_gid@:Test Owner:/home/@test_user@:/bin/sh