Initial import from FreeBSD RELENG_4:
[games.git] / contrib / libpam / libpam / include / security / _pam_compat.h
1 #ifndef _PAM_COMPAT_H
2 #define _PAM_COMPAT_H
3
4 /*
5  * This file was contributed by Derrick J Brashear <shadow@dementia.org>
6  *
7  * A number of operating systems have started to implement PAM.
8  * unfortunately, they have a different set of numeric values for
9  * certain constants.  This file is included for compatibility's sake.
10  * $FreeBSD: src/contrib/libpam/libpam/include/security/_pam_compat.h,v 1.1.1.1.6.2 2001/06/11 15:28:14 markm Exp $
11  */
12
13 /* Solaris uses different constants. We redefine to those here */
14 #if defined(solaris) || (defined(__SVR4) && defined(sun))
15
16 /* generic for pam_* functions */
17 # undef PAM_SILENT
18 # define PAM_SILENT              0x80000000
19
20 /* flags for pam_chauthtok() */
21 # undef PAM_PRELIM_CHECK
22 # define PAM_PRELIM_CHECK        0x1
23
24 # undef PAM_UPDATE_AUTHTOK
25 # define PAM_UPDATE_AUTHTOK      0x2
26
27 /* flags for pam_setcred() */
28 # undef PAM_ESTABLISH_CRED
29 # define PAM_ESTABLISH_CRED      0x1
30
31 # undef PAM_DELETE_CRED
32 # define PAM_DELETE_CRED         0x2
33
34 # undef PAM_REINITIALIZE_CRED
35 # define PAM_REINITIALIZE_CRED   0x4
36
37 # define PAM_REFRESH_CRED        0x8
38 # undef PAM_REFRESH_CRED
39
40 /* another binary incompatibility comes from the return codes! */
41
42 # undef PAM_CONV_ERR
43 # define PAM_CONV_ERR            6
44
45 # undef PAM_PERM_DENIED
46 # define PAM_PERM_DENIED         7
47
48 # undef PAM_MAXTRIES
49 # define PAM_MAXTRIES            8
50
51 # undef PAM_AUTH_ERR
52 # define PAM_AUTH_ERR            9
53
54 # undef PAM_NEW_AUTHTOK_REQD
55 # define PAM_NEW_AUTHTOK_REQD    10
56
57 # undef PAM_CRED_INSUFFICIENT
58 # define PAM_CRED_INSUFFICIENT   11
59
60 # undef PAM_AUTHINFO_UNAVAIL
61 # define PAM_AUTHINFO_UNAVAIL    12
62
63 # undef PAM_USER_UNKNOWN
64 # define PAM_USER_UNKNOWN        13
65
66 # undef PAM_CRED_UNAVAIL
67 # define PAM_CRED_UNAVAIL        14
68
69 # undef PAM_CRED_EXPIRED
70 # define PAM_CRED_EXPIRED        15
71
72 # undef PAM_CRED_ERR
73 # define PAM_CRED_ERR            16
74
75 # undef PAM_ACCT_EXPIRED
76 # define PAM_ACCT_EXPIRED        17
77
78 # undef PAM_AUTHTOK_EXPIRED
79 # define PAM_AUTHTOK_EXPIRED     18
80
81 # undef PAM_SESSION_ERR
82 # define PAM_SESSION_ERR         19
83
84 # undef PAM_AUTHTOK_ERR
85 # define PAM_AUTHTOK_ERR           20
86
87 # undef PAM_AUTHTOK_RECOVERY_ERR
88 # define PAM_AUTHTOK_RECOVERY_ERR  21
89
90 # undef PAM_AUTHTOK_LOCK_BUSY
91 # define PAM_AUTHTOK_LOCK_BUSY     22
92
93 # undef PAM_AUTHTOK_DISABLE_AGING
94 # define PAM_AUTHTOK_DISABLE_AGING 23
95
96 # undef PAM_NO_MODULE_DATA
97 # define PAM_NO_MODULE_DATA      24
98
99 # undef PAM_IGNORE
100 # define PAM_IGNORE              25
101
102 # undef PAM_ABORT
103 # define PAM_ABORT               26
104
105 # undef PAM_TRY_AGAIN
106 # define PAM_TRY_AGAIN           27
107
108 #endif /* defined(solaris) || (defined(__SVR4) && defined(sun)) */
109
110 #endif /* _PAM_COMPAT_H */