summaryrefslogtreecommitdiff
path: root/Linux-PAM/modules/pam_deny
diff options
context:
space:
mode:
Diffstat (limited to 'Linux-PAM/modules/pam_deny')
-rw-r--r--Linux-PAM/modules/pam_deny/Makefile15
-rw-r--r--Linux-PAM/modules/pam_deny/README4
-rw-r--r--Linux-PAM/modules/pam_deny/pam_deny.c81
3 files changed, 100 insertions, 0 deletions
diff --git a/Linux-PAM/modules/pam_deny/Makefile b/Linux-PAM/modules/pam_deny/Makefile
new file mode 100644
index 00000000..f2a49e1d
--- /dev/null
+++ b/Linux-PAM/modules/pam_deny/Makefile
@@ -0,0 +1,15 @@
+#
+# $Id: Makefile,v 1.1.1.1 2001/04/29 04:17:18 hartmans Exp $
+#
+# This Makefile controls a build process of $(TITLE) module for
+# Linux-PAM. You should not modify this Makefile (unless you know
+# what you are doing!).
+#
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
+#
+
+include ../../Make.Rules
+
+TITLE=pam_deny
+
+include ../Simple.Rules
diff --git a/Linux-PAM/modules/pam_deny/README b/Linux-PAM/modules/pam_deny/README
new file mode 100644
index 00000000..c6b86c79
--- /dev/null
+++ b/Linux-PAM/modules/pam_deny/README
@@ -0,0 +1,4 @@
+# $Id: README,v 1.1.1.1 2001/04/29 04:17:18 hartmans Exp $
+#
+
+this module always fails, it ignores all options.
diff --git a/Linux-PAM/modules/pam_deny/pam_deny.c b/Linux-PAM/modules/pam_deny/pam_deny.c
new file mode 100644
index 00000000..d1fa42a3
--- /dev/null
+++ b/Linux-PAM/modules/pam_deny/pam_deny.c
@@ -0,0 +1,81 @@
+/* pam_permit module */
+
+/*
+ * $Id: pam_deny.c,v 1.1.1.1 2001/04/29 04:17:18 hartmans Exp $
+ *
+ * Written by Andrew Morgan <morgan@parc.power.net> 1996/3/11
+ *
+ */
+
+/*
+ * 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>
+
+/* --- authentication management functions --- */
+
+PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc
+ ,const char **argv)
+{
+ return PAM_AUTH_ERR;
+}
+
+PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc
+ ,const char **argv)
+{
+ return PAM_CRED_UNAVAIL;
+}
+
+/* --- account management functions --- */
+
+PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc
+ ,const char **argv)
+{
+ return PAM_ACCT_EXPIRED;
+}
+
+/* --- password management --- */
+
+PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh,int flags,int argc
+ ,const char **argv)
+{
+ return PAM_AUTHTOK_ERR;
+}
+
+/* --- session management --- */
+
+PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh,int flags,int argc
+ ,const char **argv)
+{
+ return PAM_SYSTEM_ERR;
+}
+
+PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh,int flags,int argc
+ ,const char **argv)
+{
+ return PAM_SYSTEM_ERR;
+}
+
+/* end of module definition */
+
+/* static module data */
+#ifdef PAM_STATIC
+struct pam_module _pam_deny_modstruct = {
+ "pam_deny",
+ pam_sm_authenticate,
+ pam_sm_setcred,
+ pam_sm_acct_mgmt,
+ pam_sm_open_session,
+ pam_sm_close_session,
+ pam_sm_chauthtok
+};
+#endif