aboutsummaryrefslogtreecommitdiff
path: root/xtests
diff options
context:
space:
mode:
Diffstat (limited to 'xtests')
-rw-r--r--xtests/.cvsignore9
-rw-r--r--xtests/Makefile.am22
-rwxr-xr-xxtests/run-xtests.sh38
-rw-r--r--xtests/tst-pam_cracklib1.c135
-rw-r--r--xtests/tst-pam_cracklib1.pamd2
-rw-r--r--xtests/tst-pam_dispatch1.c99
-rw-r--r--xtests/tst-pam_dispatch1.pamd3
-rw-r--r--xtests/tst-pam_dispatch2.c98
-rw-r--r--xtests/tst-pam_dispatch2.pamd3
-rw-r--r--xtests/tst-pam_dispatch3.c87
-rw-r--r--xtests/tst-pam_dispatch3.pamd6
-rw-r--r--xtests/tst-pam_dispatch4.c95
-rw-r--r--xtests/tst-pam_dispatch4.pamd8
13 files changed, 0 insertions, 605 deletions
diff --git a/xtests/.cvsignore b/xtests/.cvsignore
deleted file mode 100644
index c59c99ef..00000000
--- a/xtests/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-tst-pam_dispatch1
-tst-pam_dispatch2
-tst-pam_dispatch3
-tst-pam_dispatch4
-tst-pam_cracklib1
diff --git a/xtests/Makefile.am b/xtests/Makefile.am
deleted file mode 100644
index ac6e2954..00000000
--- a/xtests/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (c) 2006 Thorsten Kukuk <kukuk@suse.de>
-#
-
-AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_srcdir)/libpam/include \
- -I$(top_srcdir)/libpamc/include -I$(top_srcdir)/libpam_misc/include
-AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \
- -L$(top_builddir)/libpam_misc -lpam_misc
-
-CLEANFILES = *~
-
-EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
- tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
- tst-pam_cracklib1.pamd
-
-XTESTS = tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 \
- tst-pam_dispatch4 tst-pam_cracklib1
-
-noinst_PROGRAMS = $(XTESTS)
-
-xtests: $(XTESTS) run-xtests.sh
- $(srcdir)/run-xtests.sh
diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh
deleted file mode 100755
index 9c8c3571..00000000
--- a/xtests/run-xtests.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-if test `id -u` -ne 0 ; then
- echo "You need to be root to run the tests"
- exit 1
-fi
-
-XTESTS="tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 \
- tst-pam_dispatch4 tst-pam_cracklib1"
-
-failed=0
-pass=0
-all=0
-
-for testname in $XTESTS ; do
- install -m 644 $testname.pamd /etc/pam.d/$testname
- ./$testname > /dev/null
- if test $? -ne 0 ; then
- echo "FAIL: $testname"
- failed=`expr $failed + 1`
- else
- echo "PASS: $testname"
- pass=`expr $pass + 1`
- fi
- all=`expr $all + 1`
- rm -f /etc/pam.d/$testname
- done
- if test "$failed" -ne 0; then
- echo "==================="
- echo "$failed of $all tests failed"
- echo "==================="
- exit 1
- else
- echo "=================="
- echo "All $all tests passed"
- echo "=================="
- fi
-exit 0
diff --git a/xtests/tst-pam_cracklib1.c b/xtests/tst-pam_cracklib1.c
deleted file mode 100644
index 6c0ec321..00000000
--- a/xtests/tst-pam_cracklib1.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <security/pam_appl.h>
-
-/* A conversation function which uses an internally-stored value for
- the responses. */
-static int
-fake_conv (int num_msg, const struct pam_message **msgm UNUSED,
- struct pam_response **response, void *appdata_ptr UNUSED)
-{
- static int calls = 0;
- struct pam_response *reply;
- int count;
-
- /* Sanity test. */
- if (num_msg <= 0)
- return PAM_CONV_ERR;
-
- /* Allocate memory for the responses. */
- reply = calloc (num_msg, sizeof (struct pam_response));
- if (reply == NULL)
- return PAM_CONV_ERR;
-
- /* Each prompt elicits the same response. */
- for (count = 0; count < num_msg; ++count)
- {
- reply[count].resp_retcode = 0;
- /* first call get a password, second one NULL */
- if (calls)
- reply[count].resp = NULL;
- else
- {
- ++calls;
- reply[count].resp = strdup ("Kindergarten");
- }
- }
-
- /* Set the pointers in the response structure and return. */
- *response = reply;
- return PAM_SUCCESS;
-}
-
-static struct pam_conv conv = {
- fake_conv,
- NULL
-};
-
-
-/* Check that errors of optional modules are ignored and that
- required modules after a sufficient one are not executed. */
-
-int
-main(int argc, char *argv[])
-{
- pam_handle_t *pamh=NULL;
- const char *user="root";
- int retval;
- int debug = 0;
-
- if (argc > 1 && strcmp (argv[1], "-d") == 0)
- debug = 1;
-
- retval = pam_start("tst-pam_cracklib1", user, &conv, &pamh);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "cracklib1: pam_start returned %d\n", retval);
- return 1;
- }
-
- /* Try one, first input is correct, second is NULL */
- retval = pam_chauthtok (pamh, 0);
- if (retval != PAM_AUTHTOK_RECOVERY_ERR)
- {
- if (debug)
- fprintf (stderr, "cracklib1-1: pam_chauthtok returned %d\n", retval);
- return 1;
- }
-
- /* Try two, first input is NULL */
- retval = pam_chauthtok (pamh, 0);
- if (retval != PAM_AUTHTOK_RECOVERY_ERR)
- {
- if (debug)
- fprintf (stderr, "cracklib1-2: pam_chauthtok returned %d\n", retval);
- return 1;
- }
-
-
- retval = pam_end (pamh,retval);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "cracklib1: pam_end returned %d\n", retval);
- return 1;
- }
- return 0;
-}
diff --git a/xtests/tst-pam_cracklib1.pamd b/xtests/tst-pam_cracklib1.pamd
deleted file mode 100644
index 41a9188d..00000000
--- a/xtests/tst-pam_cracklib1.pamd
+++ /dev/null
@@ -1,2 +0,0 @@
-#%PAM-1.0
-password required pam_cracklib.so
diff --git a/xtests/tst-pam_dispatch1.c b/xtests/tst-pam_dispatch1.c
deleted file mode 100644
index 404c0119..00000000
--- a/xtests/tst-pam_dispatch1.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
-
-static struct pam_conv conv = {
- misc_conv,
- NULL
-};
-
-static int debug = 0;
-
-/*
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=196859
-
- This stack should not return PAM_IGNORE to the application:
- auth [default=bad] pam_debug.so auth=ignore
-*/
-static int
-test1 (void)
-{
- pam_handle_t *pamh=NULL;
- const char *user="nobody";
- int retval;
-
- retval = pam_start("tst-pam_dispatch1", user, &conv, &pamh);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test1: pam_start returned %d\n", retval);
- return 1;
- }
-
- retval = pam_authenticate(pamh, 0);
- if (retval != PAM_PERM_DENIED)
- {
- if (debug)
- fprintf (stderr, "test1: pam_authenticate returned %d\n", retval);
- return 1;
- }
-
- retval = pam_end(pamh,retval);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test1: pam_end returned %d\n", retval);
- return 1;
- }
- return 0;
-}
-
-
-int main(int argc, char *argv[])
-{
- if (argc > 1 && strcmp (argv[1], "-d") == 0)
- debug = 1;
-
- if (test1 ())
- return 1;
-
- return 0;
-}
diff --git a/xtests/tst-pam_dispatch1.pamd b/xtests/tst-pam_dispatch1.pamd
deleted file mode 100644
index 9bfc87c5..00000000
--- a/xtests/tst-pam_dispatch1.pamd
+++ /dev/null
@@ -1,3 +0,0 @@
-# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=196859
-# This stack should not return PAM_IGNORE to the application:
-auth [default=bad] pam_debug.so auth=ignore
diff --git a/xtests/tst-pam_dispatch2.c b/xtests/tst-pam_dispatch2.c
deleted file mode 100644
index 5c63f5b3..00000000
--- a/xtests/tst-pam_dispatch2.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <strings.h>
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
-
-static struct pam_conv conv = {
- misc_conv,
- NULL
-};
-
-static int debug = 0;
-
-/*
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=196859
-
- This stack should not return PAM_IGNORE to the application:
- auth [default=die] pam_debug.so auth=ignore
-*/
-static int
-test2 (void)
-{
- pam_handle_t *pamh=NULL;
- const char *user="nobody";
- int retval;
-
- retval = pam_start("tst-pam_dispatch2", user, &conv, &pamh);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test2: pam_start returned %d\n", retval);
- return 1;
- }
-
- retval = pam_authenticate(pamh, 0);
- if (retval != PAM_PERM_DENIED)
- {
- if (debug)
- fprintf (stderr, "test2: pam_authenticate returned %d\n", retval);
- return 1;
- }
-
- retval = pam_end(pamh,retval);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test2: pam_end returned %d\n", retval);
- return 1;
- }
- return 0;
-}
-
-int main(int argc, char *argv[])
-{
- if (argc > 1 && strcmp (argv[1], "-d") == 0)
- debug = 1;
-
- if (test2 ())
- return 1;
-
- return 0;
-}
diff --git a/xtests/tst-pam_dispatch2.pamd b/xtests/tst-pam_dispatch2.pamd
deleted file mode 100644
index 79f52609..00000000
--- a/xtests/tst-pam_dispatch2.pamd
+++ /dev/null
@@ -1,3 +0,0 @@
-# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=196859
-# This stack should not return PAM_IGNORE to the application:
-auth [default=die] pam_debug.so auth=ignore
diff --git a/xtests/tst-pam_dispatch3.c b/xtests/tst-pam_dispatch3.c
deleted file mode 100644
index d44e4880..00000000
--- a/xtests/tst-pam_dispatch3.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
-
-static struct pam_conv conv = {
- misc_conv,
- NULL
-};
-
-
-/* Check that errors of optional modules are ignored and that
- required modules after a sufficient one are not executed. */
-
-int
-main(int argc, char *argv[])
-{
- pam_handle_t *pamh=NULL;
- const char *user="nobody";
- int retval;
- int debug = 0;
-
- if (argc > 1 && strcmp (argv[1], "-d") == 0)
- debug = 1;
-
- retval = pam_start("tst-pam_dispatch3", user, &conv, &pamh);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test3: pam_start returned %d\n", retval);
- return 1;
- }
-
- retval = pam_authenticate(pamh, 0);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test3: pam_authenticate returned %d\n", retval);
- return 1;
- }
-
- retval = pam_end(pamh,retval);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test3: pam_end returned %d\n", retval);
- return 1;
- }
- return 0;
-}
diff --git a/xtests/tst-pam_dispatch3.pamd b/xtests/tst-pam_dispatch3.pamd
deleted file mode 100644
index 8172c5f2..00000000
--- a/xtests/tst-pam_dispatch3.pamd
+++ /dev/null
@@ -1,6 +0,0 @@
-#%PAM-1.0
-auth optional pam_debug.so auth=auth_err
-auth sufficient pam_debug.so auth=success
-auth required pam_debug.so auth=perm_denied
-account required pam_debug.so acct=acct_expired
-
diff --git a/xtests/tst-pam_dispatch4.c b/xtests/tst-pam_dispatch4.c
deleted file mode 100644
index 12bc362a..00000000
--- a/xtests/tst-pam_dispatch4.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
-
-static struct pam_conv conv = {
- misc_conv,
- NULL
-};
-
-
-/* Check that errors of optional modules are ignored and that
- required modules after a sufficient one are not executed. */
-
-int
-main(int argc, char *argv[])
-{
- pam_handle_t *pamh=NULL;
- const char *user="nobody";
- int retval;
- int debug = 0;
-
- if (argc > 1 && strcmp (argv[1], "-d") == 0)
- debug = 1;
-
- retval = pam_start("tst-pam_dispatch4", user, &conv, &pamh);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test4: pam_start returned %d\n", retval);
- return 1;
- }
-
- retval = pam_authenticate (pamh, 0);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test4: pam_authenticate returned %d\n", retval);
- return 1;
- }
-
- retval = pam_acct_mgmt (pamh, 0);
- if (retval == PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test4: pam_authenticate returned %d\n", retval);
- return 1;
- }
-
- retval = pam_end (pamh,retval);
- if (retval != PAM_SUCCESS)
- {
- if (debug)
- fprintf (stderr, "test4: pam_end returned %d\n", retval);
- return 1;
- }
- return 0;
-}
diff --git a/xtests/tst-pam_dispatch4.pamd b/xtests/tst-pam_dispatch4.pamd
deleted file mode 100644
index 7c08372b..00000000
--- a/xtests/tst-pam_dispatch4.pamd
+++ /dev/null
@@ -1,8 +0,0 @@
-#%PAM-1.0
-# We jump to pam_permit.so, should pass
-auth [success=1 default=ignore] pam_debug.so auth=success
-auth required pam_deny.so
-auth required pam_permit.so
-# We jump to a non-existing slot, fail, but don't seg.fault
-account [success=1 default=ignore] pam_debug.so account=success
-account required pam_deny.so