summaryrefslogtreecommitdiff
path: root/modules/pam_debug
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_debug')
-rw-r--r--modules/pam_debug/.cvsignore6
-rw-r--r--modules/pam_debug/Makefile.am31
-rw-r--r--modules/pam_debug/README64
-rw-r--r--modules/pam_debug/README.xml41
-rw-r--r--modules/pam_debug/pam_debug.8110
-rw-r--r--modules/pam_debug/pam_debug.8.xml231
-rw-r--r--modules/pam_debug/pam_debug.c167
-rwxr-xr-xmodules/pam_debug/tst-pam_debug2
8 files changed, 0 insertions, 652 deletions
diff --git a/modules/pam_debug/.cvsignore b/modules/pam_debug/.cvsignore
deleted file mode 100644
index 9fb98574..00000000
--- a/modules/pam_debug/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-*.la
-*.lo
-.deps
-.libs
-Makefile
-Makefile.in
diff --git a/modules/pam_debug/Makefile.am b/modules/pam_debug/Makefile.am
deleted file mode 100644
index 0b798516..00000000
--- a/modules/pam_debug/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@thkukuk.de>
-#
-
-CLEANFILES = *~
-
-EXTRA_DIST = README $(MANS) $(XMLS) tst-pam_debug
-
-man_MANS = pam_debug.8
-XMLS = README.xml pam_debug.8.xml
-
-securelibdir = $(SECUREDIR)
-secureconfdir = $(SCONFIGDIR)
-
-AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include
-AM_LDFLAGS = -no-undefined -avoid-version -module
-if HAVE_VERSIONING
- AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
-endif
-
-securelib_LTLIBRARIES = pam_debug.la
-pam_debug_la_LIBADD = -L$(top_builddir)/libpam -lpam
-
-TESTS = tst-pam_debug
-
-if ENABLE_REGENERATE_MAN
-noinst_DATA = README
-README: pam_debug.8.xml
--include $(top_srcdir)/Make.xml.rules
-endif
-
diff --git a/modules/pam_debug/README b/modules/pam_debug/README
deleted file mode 100644
index 4afff114..00000000
--- a/modules/pam_debug/README
+++ /dev/null
@@ -1,64 +0,0 @@
-pam_debug — PAM module to debug the PAM stack
-
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
-DESCRIPTION
-
-The pam_debug PAM module is intended as a debugging aide for determining how
-the PAM stack is operating. This module returns what its module arguments tell
-it to return.
-
-OPTIONS
-
-auth=value
-
- The pam_sm_authenticate(3) function will return value.
-
-cred=value
-
- The pam_sm_setcred(3) function will return value.
-
-acct=value
-
- The pam_sm_acct_mgmt(3) function will return value.
-
-prechauthtok=value
-
- The pam_sm_chauthtok(3) function will return value if the PAM_PRELIM_CHECK
- flag is set.
-
-chauthtok=value
-
- The pam_sm_chauthtok(3) function will return value if the PAM_PRELIM_CHECK
- flag is not set.
-
-open_session=value
-
- The pam_sm_open_session(3) function will return value.
-
-close_session=value
-
- The pam_sm_close_session(3) function will return value.
-
-Where value can be one of: success, open_err, symbol_err, service_err,
-system_err, buf_err, perm_denied, auth_err, cred_insufficient,
-authinfo_unavail, user_unknown, maxtries, new_authtok_reqd, acct_expired,
-session_err, cred_unavail, cred_expired, cred_err, no_module_data, conv_err,
-authtok_err, authtok_recover_err, authtok_lock_busy, authtok_disable_aging,
-try_again, ignore, abort, authtok_expired, module_unknown, bad_item,
-conv_again, incomplete.
-
-EXAMPLES
-
-auth requisite pam_permit.so
-auth [success=2 default=ok] pam_debug.so auth=perm_denied cred=success
-auth [default=reset] pam_debug.so auth=success cred=perm_denied
-auth [success=done default=die] pam_debug.so
-auth optional pam_debug.so auth=perm_denied cred=perm_denied
-auth sufficient pam_debug.so auth=success cred=success
-
-
-AUTHOR
-
-pam_debug was written by Andrew G. Morgan <morgan@kernel.org>.
-
diff --git a/modules/pam_debug/README.xml b/modules/pam_debug/README.xml
deleted file mode 100644
index ef41911b..00000000
--- a/modules/pam_debug/README.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xml/4.3/docbookx.dtd"
-[
-<!--
-<!ENTITY pamaccess SYSTEM "pam_debug.8.xml">
--->
-]>
-
-<article>
-
- <articleinfo>
-
- <title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
- href="pam_debug.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_debug-name"]/*)'/>
- </title>
-
- </articleinfo>
-
- <section>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
- href="pam_debug.8.xml" xpointer='xpointer(//refsect1[@id = "pam_debug-description"]/*)'/>
- </section>
-
- <section>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
- href="pam_debug.8.xml" xpointer='xpointer(//refsect1[@id = "pam_debug-options"]/*)'/>
- </section>
-
- <section>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
- href="pam_debug.8.xml" xpointer='xpointer(//refsect1[@id = "pam_debug-examples"]/*)'/>
- </section>
-
- <section>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
- href="pam_debug.8.xml" xpointer='xpointer(//refsect1[@id = "pam_debug-author"]/*)'/>
- </section>
-
-</article>
diff --git a/modules/pam_debug/pam_debug.8 b/modules/pam_debug/pam_debug.8
deleted file mode 100644
index ae4a1407..00000000
--- a/modules/pam_debug/pam_debug.8
+++ /dev/null
@@ -1,110 +0,0 @@
-.\" Title: pam_debug
-.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
-.\" Date: 06/23/2006
-.\" Manual: Linux\-PAM Manual
-.\" Source: Linux\-PAM Manual
-.\"
-.TH "PAM_DEBUG" "8" "06/23/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.SH "NAME"
-pam_debug \- PAM module to debug the PAM stack
-.SH "SYNOPSIS"
-.HP 13
-\fBpam_debug.so\fR [auth=\fIvalue\fR] [cred=\fIvalue\fR] [acct=\fIvalue\fR] [prechauthtok=\fIvalue\fR] [chauthtok=\fIvalue\fR] [auth=\fIvalue\fR] [open_session=\fIvalue\fR] [close_session=\fIvalue\fR]
-.SH "DESCRIPTION"
-.PP
-The pam_debug PAM module is intended as a debugging aide for determining how the PAM stack is operating. This module returns what its module arguments tell it to return.
-.SH "OPTIONS"
-.TP 3n
-\fBauth=\fR\fB\fIvalue\fR\fR
-The
-\fBpam_sm_authenticate\fR(3)
-function will return
-\fIvalue\fR.
-.TP 3n
-\fBcred=\fR\fB\fIvalue\fR\fR
-The
-\fBpam_sm_setcred\fR(3)
-function will return
-\fIvalue\fR.
-.TP 3n
-\fBacct=\fR\fB\fIvalue\fR\fR
-The
-\fBpam_sm_acct_mgmt\fR(3)
-function will return
-\fIvalue\fR.
-.TP 3n
-\fBprechauthtok=\fR\fB\fIvalue\fR\fR
-The
-\fBpam_sm_chauthtok\fR(3)
-function will return
-\fIvalue\fR
-if the
-\fIPAM_PRELIM_CHECK\fR
-flag is set.
-.TP 3n
-\fBchauthtok=\fR\fB\fIvalue\fR\fR
-The
-\fBpam_sm_chauthtok\fR(3)
-function will return
-\fIvalue\fR
-if the
-\fIPAM_PRELIM_CHECK\fR
-flag is
-\fBnot\fR
-set.
-.TP 3n
-\fBopen_session=\fR\fB\fIvalue\fR\fR
-The
-\fBpam_sm_open_session\fR(3)
-function will return
-\fIvalue\fR.
-.TP 3n
-\fBclose_session=\fR\fB\fIvalue\fR\fR
-The
-\fBpam_sm_close_session\fR(3)
-function will return
-\fIvalue\fR.
-.PP
-Where
-\fIvalue\fR
-can be one of: success, open_err, symbol_err, service_err, system_err, buf_err, perm_denied, auth_err, cred_insufficient, authinfo_unavail, user_unknown, maxtries, new_authtok_reqd, acct_expired, session_err, cred_unavail, cred_expired, cred_err, no_module_data, conv_err, authtok_err, authtok_recover_err, authtok_lock_busy, authtok_disable_aging, try_again, ignore, abort, authtok_expired, module_unknown, bad_item, conv_again, incomplete.
-.SH "MODULE SERVICES PROVIDED"
-.PP
-The services
-\fBauth\fR,
-\fBaccount\fR,
-\fBpassword\fR
-and
-\fBsession\fR
-are supported.
-.SH "RETURN VALUES"
-.TP 3n
-PAM_SUCCESS
-Default return code if no other value was specified, else specified return value.
-.SH "EXAMPLES"
-.sp
-.RS 3n
-.nf
-auth requisite pam_permit.so
-auth [success=2 default=ok] pam_debug.so auth=perm_denied cred=success
-auth [default=reset] pam_debug.so auth=success cred=perm_denied
-auth [success=done default=die] pam_debug.so
-auth optional pam_debug.so auth=perm_denied cred=perm_denied
-auth sufficient pam_debug.so auth=success cred=success
-
-.fi
-.RE
-.SH "SEE ALSO"
-.PP
-
-\fBpam.conf\fR(5),
-\fBpam.d\fR(8),
-\fBpam\fR(8)
-.SH "AUTHOR"
-.PP
-pam_debug was written by Andrew G. Morgan <morgan@kernel.org>.
diff --git a/modules/pam_debug/pam_debug.8.xml b/modules/pam_debug/pam_debug.8.xml
deleted file mode 100644
index 65519852..00000000
--- a/modules/pam_debug/pam_debug.8.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
-
-<refentry id="pam_debug">
-
- <refmeta>
- <refentrytitle>pam_debug</refentrytitle>
- <manvolnum>8</manvolnum>
- <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
- </refmeta>
-
- <refnamediv id="pam_debug-name">
- <refname>pam_debug</refname>
- <refpurpose>PAM module to debug the PAM stack</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis id="pam_debug-cmdsynopsis">
- <command>pam_debug.so</command>
- <arg choice="opt">
- auth=<replaceable>value</replaceable>
- </arg>
- <arg choice="opt">
- cred=<replaceable>value</replaceable>
- </arg>
- <arg choice="opt">
- acct=<replaceable>value</replaceable>
- </arg>
- <arg choice="opt">
- prechauthtok=<replaceable>value</replaceable>
- </arg>
- <arg choice="opt">
- chauthtok=<replaceable>value</replaceable>
- </arg>
- <arg choice="opt">
- auth=<replaceable>value</replaceable>
- </arg>
- <arg choice="opt">
- open_session=<replaceable>value</replaceable>
- </arg>
- <arg choice="opt">
- close_session=<replaceable>value</replaceable>
- </arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="pam_debug-description">
- <title>DESCRIPTION</title>
- <para>
- The pam_debug PAM module is intended as a debugging aide for
- determining how the PAM stack is operating. This module returns
- what its module arguments tell it to return.
- </para>
- </refsect1>
-
- <refsect1 id="pam_debug-options">
- <title>OPTIONS</title>
- <variablelist>
- <varlistentry>
- <term>
- <option>auth=<replaceable>value</replaceable></option>
- </term>
- <listitem>
- <para>
- The
- <citerefentry>
- <refentrytitle>pam_sm_authenticate</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function will return
- <replaceable>value</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>cred=<replaceable>value</replaceable></option>
- </term>
- <listitem>
- <para>
- The
- <citerefentry>
- <refentrytitle>pam_sm_setcred</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function will return
- <replaceable>value</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>acct=<replaceable>value</replaceable></option>
- </term>
- <listitem>
- <para>
- The
- <citerefentry>
- <refentrytitle>pam_sm_acct_mgmt</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function will return
- <replaceable>value</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>prechauthtok=<replaceable>value</replaceable></option>
- </term>
- <listitem>
- <para>
- The
- <citerefentry>
- <refentrytitle>pam_sm_chauthtok</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function will return
- <replaceable>value</replaceable> if the
- <emphasis>PAM_PRELIM_CHECK</emphasis> flag is set.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>chauthtok=<replaceable>value</replaceable></option>
- </term>
- <listitem>
- <para>
- The
- <citerefentry>
- <refentrytitle>pam_sm_chauthtok</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function will return
- <replaceable>value</replaceable> if the
- <emphasis>PAM_PRELIM_CHECK</emphasis> flag is
- <emphasis remap='B'>not</emphasis> set.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>open_session=<replaceable>value</replaceable></option>
- </term>
- <listitem>
- <para>
- The
- <citerefentry>
- <refentrytitle>pam_sm_open_session</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function will return
- <replaceable>value</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>close_session=<replaceable>value</replaceable></option>
- </term>
- <listitem>
- <para>
- The
- <citerefentry>
- <refentrytitle>pam_sm_close_session</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function will return
- <replaceable>value</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Where <replaceable>value</replaceable> can be one of: success,
- open_err, symbol_err, service_err, system_err, buf_err, perm_denied,
- auth_err, cred_insufficient, authinfo_unavail, user_unknown,
- maxtries, new_authtok_reqd, acct_expired, session_err, cred_unavail,
- cred_expired, cred_err, no_module_data, conv_err, authtok_err,
- authtok_recover_err, authtok_lock_busy, authtok_disable_aging,
- try_again, ignore, abort, authtok_expired, module_unknown,
- bad_item, conv_again, incomplete.
- </para>
- </refsect1>
-
- <refsect1 id="pam_debug-services">
- <title>MODULE SERVICES PROVIDED</title>
- <para>
- The services <option>auth</option>, <option>account</option>,
- <option>password</option> and <option>session</option> are supported.
- </para>
- </refsect1>
-
- <refsect1 id='pam_debug-return_values'>
- <title>RETURN VALUES</title>
- <variablelist>
- <varlistentry>
- <term>PAM_SUCCESS</term>
- <listitem>
- <para>
- Default return code if no other value was specified,
- else specified return value.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id='pam_debug-examples'>
- <title>EXAMPLES</title>
- <programlisting>
-auth requisite pam_permit.so
-auth [success=2 default=ok] pam_debug.so auth=perm_denied cred=success
-auth [default=reset] pam_debug.so auth=success cred=perm_denied
-auth [success=done default=die] pam_debug.so
-auth optional pam_debug.so auth=perm_denied cred=perm_denied
-auth sufficient pam_debug.so auth=success cred=success
- </programlisting>
- </refsect1>
-
- <refsect1 id='pam_debug-see_also'>
- <title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>pam.d</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-
- <refsect1 id='pam_debug-author'>
- <title>AUTHOR</title>
- <para>
- pam_debug was written by Andrew G. Morgan &lt;morgan@kernel.org&gt;.
- </para>
- </refsect1>
-
-</refentry>
diff --git a/modules/pam_debug/pam_debug.c b/modules/pam_debug/pam_debug.c
deleted file mode 100644
index a65d1bf2..00000000
--- a/modules/pam_debug/pam_debug.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/* pam_permit module */
-
-/*
- * $Id$
- *
- * Written by Andrew Morgan <morgan@kernel.org> 2001/02/04
- *
- */
-
-#define DEFAULT_USER "nobody"
-
-#include "config.h"
-
-#include <stdio.h>
-
-/*
- * This module is intended as a debugging aide for determining how
- * the PAM stack is operating.
- *
- * here, we make definitions for the externally accessible functions
- * in this file (these definitions are required for static modules
- * but strongly encouraged generally) they are used to instruct the
- * modules include file to define their prototypes.
- */
-
-#define PAM_SM_AUTH
-#define PAM_SM_ACCOUNT
-#define PAM_SM_SESSION
-#define PAM_SM_PASSWORD
-
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
-#include <security/pam_ext.h>
-
-#define _PAM_ACTION_UNDEF (-10)
-#include "../../libpam/pam_tokens.h"
-
-/* --- authentication management functions --- */
-
-static int state(pam_handle_t *pamh, const char *text)
-{
- int retval;
-
- retval = pam_info (pamh, "%s", text);
-
- if (retval != PAM_SUCCESS) {
- D(("pam_info failed"));
- }
-
- return retval;
-}
-
-static int parse_args(int retval, const char *event,
- pam_handle_t *pamh, int argc, const char **argv)
-{
- int i;
-
- for (i=0; i<argc; ++i) {
- int length = strlen(event);
- if (!strncmp(event, argv[i], length) && (argv[i][length] == '=')) {
- int j;
- const char *return_string = argv[i] + (length+1);
-
- for (j=0; j<_PAM_RETURN_VALUES; ++j) {
- if (!strcmp(return_string, _pam_token_returns[j])) {
- retval = j;
- state(pamh, argv[i]);
- break;
- }
- }
- break;
- }
- }
-
- return retval;
-}
-
-PAM_EXTERN
-int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
- int argc, const char **argv)
-{
- int retval;
- const char *user=NULL;
-
- /*
- * authentication requires we know who the user wants to be
- */
- retval = pam_get_user(pamh, &user, NULL);
- if (retval != PAM_SUCCESS) {
- D(("get user returned error: %s", pam_strerror(pamh,retval)));
- return retval;
- }
- if (user == NULL || *user == '\0') {
- D(("username not known"));
- retval = pam_set_item(pamh, PAM_USER, (const void *) DEFAULT_USER);
- if (retval != PAM_SUCCESS)
- return retval;
- }
- user = NULL; /* clean up */
-
- retval = parse_args(PAM_SUCCESS, "auth", pamh, argc, argv);
-
- return retval;
-}
-
-PAM_EXTERN
-int pam_sm_setcred(pam_handle_t *pamh, int flags UNUSED,
- int argc, const char **argv)
-{
- return parse_args(PAM_SUCCESS, "cred", pamh, argc, argv);
-}
-
-/* --- account management functions --- */
-
-PAM_EXTERN
-int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
- int argc, const char **argv)
-{
- return parse_args(PAM_SUCCESS, "acct", pamh, argc, argv);
-}
-
-/* --- password management --- */
-
-PAM_EXTERN
-int pam_sm_chauthtok(pam_handle_t *pamh, int flags UNUSED,
- int argc, const char **argv)
-{
- if (flags & PAM_PRELIM_CHECK) {
- return parse_args(PAM_SUCCESS, "prechauthtok", pamh, argc, argv);
- } else {
- return parse_args(PAM_SUCCESS, "chauthtok", pamh, argc, argv);
- }
-}
-
-/* --- session management --- */
-
-PAM_EXTERN
-int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
- int argc, const char **argv)
-{
- return parse_args(PAM_SUCCESS, "open_session", pamh, argc, argv);
-}
-
-PAM_EXTERN
-int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
- int argc, const char **argv)
-{
- return parse_args(PAM_SUCCESS, "close_session", pamh, argc, argv);
-}
-
-/* end of module definition */
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_debug_modstruct = {
- "pam_debug",
- pam_sm_authenticate,
- pam_sm_setcred,
- pam_sm_acct_mgmt,
- pam_sm_open_session,
- pam_sm_close_session,
- pam_sm_chauthtok
-};
-
-#endif
diff --git a/modules/pam_debug/tst-pam_debug b/modules/pam_debug/tst-pam_debug
deleted file mode 100755
index f07ff640..00000000
--- a/modules/pam_debug/tst-pam_debug
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-../../tests/tst-dlopen .libs/pam_debug.so