Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / pam / libpam / pam_modules.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: pam_modules.h /main/5 1996/05/09 04:25:54 drk $ */
24 /*
25  * Copyright (c) 1992-1995, by Sun Microsystems, Inc.
26  * All rights reserved.
27  */
28
29
30 #ifndef _PAM_MODULES_H
31 #define _PAM_MODULES_H
32
33 #pragma ident   "@(#)pam_modules.h      1.20    96/02/02 SMI"   /* PAM 2.6 */
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 extern int
40 pam_sm_authenticate(
41         pam_handle_t    *pamh,
42         int     flags,
43         int     argc,
44         const char      **argv);
45
46 extern int
47 pam_sm_setcred(
48         pam_handle_t    *pamh,
49         int     flags,
50         int     argc,
51         const char      **argv);
52
53 extern int
54 pam_sm_acct_mgmt(
55         pam_handle_t    *pamh,
56         int     flags,
57         int     argc,
58         const char      **argv);
59
60 extern int
61 pam_sm_open_session(
62         pam_handle_t    *pamh,
63         int     flags,
64         int     argc,
65         const char      **argv);
66
67 extern int
68 pam_sm_close_session(
69         pam_handle_t    *pamh,
70         int     flags,
71         int     argc,
72         const char      **argv);
73
74 /*
75  * Be careful - there are flags defined for pam_chauthtok() in
76  * pam_appl.h also.
77  */
78 #define PAM_PRELIM_CHECK        1
79 #define PAM_UPDATE_AUTHTOK      2
80
81 #define PAM_REP_DEFAULT 0x0
82 #define PAM_REP_FILES   0x01
83 #define PAM_REP_NIS     0x02
84 #define PAM_REP_NISPLUS 0x04
85 #define PAM_OPWCMD      0x08    /* for nispasswd, yppasswd */
86 #define IS_FILES(x)     ((x & PAM_REP_FILES) == PAM_REP_FILES)
87 #define IS_NIS(x)       ((x & PAM_REP_NIS) == PAM_REP_NIS)
88 #define IS_NISPLUS(x)   ((x & PAM_REP_NISPLUS) == PAM_REP_NISPLUS)
89 #define IS_OPWCMD(x)    ((x & PAM_OPWCMD) == PAM_OPWCMD)
90
91 extern int
92 pam_sm_chauthtok(
93         pam_handle_t    *pamh,
94         int             flags,
95         int             argc,
96         const char      **argv);
97
98 #ifdef __cplusplus
99 }
100 #endif
101
102 #endif  /* _PAM_MODULES_H */