]> granicus.if.org Git - linux-pam/blob - modules/pam_deny/pam_deny.c
Relevant BUGIDs:
[linux-pam] / modules / pam_deny / pam_deny.c
1 /* pam_permit module */
2
3 /*
4  * $Id$
5  *
6  * Written by Andrew Morgan <morgan@parc.power.net> 1996/3/11
7  *
8  */
9
10 /*
11  * here, we make definitions for the externally accessible functions
12  * in this file (these definitions are required for static modules
13  * but strongly encouraged generally) they are used to instruct the
14  * modules include file to define their prototypes.
15  */
16
17 #define PAM_SM_AUTH
18 #define PAM_SM_ACCOUNT
19 #define PAM_SM_SESSION
20 #define PAM_SM_PASSWORD
21
22 #include <security/pam_modules.h>
23
24 /* --- authentication management functions --- */
25
26 PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc
27                         ,const char **argv)
28 {
29      return PAM_AUTH_ERR;
30 }
31
32 PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc
33                    ,const char **argv)
34 {
35      return PAM_CRED_UNAVAIL;
36 }
37
38 /* --- account management functions --- */
39
40 PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc
41                      ,const char **argv)
42 {
43      return PAM_ACCT_EXPIRED;
44 }
45
46 /* --- password management --- */
47
48 PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh,int flags,int argc
49                      ,const char **argv)
50 {
51      return PAM_AUTHTOK_ERR;
52 }
53
54 /* --- session management --- */
55
56 PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh,int flags,int argc
57                         ,const char **argv)
58 {
59     return PAM_SYSTEM_ERR;
60 }
61
62 PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh,int flags,int argc
63                          ,const char **argv)
64 {
65      return PAM_SYSTEM_ERR;
66 }
67
68 /* end of module definition */
69
70 /* static module data */
71 #ifdef PAM_STATIC
72 struct pam_module _pam_deny_modstruct = {
73     "pam_deny",
74     pam_sm_authenticate,
75     pam_sm_setcred,
76     pam_sm_acct_mgmt,
77     pam_sm_open_session,
78     pam_sm_close_session,
79     pam_sm_chauthtok
80 };
81 #endif