diff options
Diffstat (limited to 'Linux-PAM/modules/pam_deny')
-rw-r--r-- | Linux-PAM/modules/pam_deny/Makefile | 15 | ||||
-rw-r--r-- | Linux-PAM/modules/pam_deny/README | 4 | ||||
-rw-r--r-- | Linux-PAM/modules/pam_deny/pam_deny.c | 81 |
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..2fdd6e11 --- /dev/null +++ b/Linux-PAM/modules/pam_deny/Makefile @@ -0,0 +1,15 @@ +# +# $Id: Makefile,v 1.2 2000/11/19 23:54:03 agmorgan 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..2eb96d4e --- /dev/null +++ b/Linux-PAM/modules/pam_deny/README @@ -0,0 +1,4 @@ +# $Id: README,v 1.1.1.1 2000/06/20 22:11:33 agmorgan 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..8be1a8a8 --- /dev/null +++ b/Linux-PAM/modules/pam_deny/pam_deny.c @@ -0,0 +1,81 @@ +/* pam_permit module */ + +/* + * $Id: pam_deny.c,v 1.2 2000/12/04 19:02:34 baggins 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 |