View Javadoc

1   package ch.odi.pam;
2   
3   /**
4    * PAM Constants.
5    * Adapted from /usr/include/security/_pam_types.h by Theodore Ts'o and Andrew G. Morgan.
6    * Original C Header file is licensed under the GPL.
7    *
8    * @author Ortwin Gl?ck
9    */
10  public class PamConstants {
11      public static final int PAM_SUCCESS = 0;
12      public static final int PAM_OPEN_ERR = 1;
13      public static final int PAM_SYMBOL_ERR = 2;
14      public static final int PAM_SERVICE_ERR = 3;
15      public static final int PAM_SYSTEM_ERR = 4;
16      public static final int PAM_BUF_ERR = 5;
17      public static final int PAM_PERM_DENIED = 6;
18      public static final int PAM_AUTH_ERR = 7;
19      public static final int PAM_CRED_INSUFFICIENT = 8;
20      public static final int PAM_AUTHINFO_UNAVAIL = 9;
21      public static final int PAM_USER_UNKNOWN = 10;
22      public static final int PAM_MAXTRIES = 11;
23      public static final int PAM_NEW_AUTHTOK_REQD = 12;
24      public static final int PAM_ACCT_EXPIRED = 13;
25      public static final int PAM_SESSION_ERR = 14;
26      public static final int PAM_CRED_UNAVAIL = 15;
27      public static final int PAM_CRED_EXPIRED = 16;
28      public static final int PAM_CRED_ERR = 17;
29      public static final int PAM_NO_MODULE_DATA = 18;
30      public static final int PAM_CONV_ERR = 19;
31      public static final int PAM_AUTHTOK_ERR = 20;
32      public static final int PAM_AUTHTOK_RECOVER_ERR = 21;
33      public static final int PAM_AUTHTOK_LOCK_BUSY = 22;
34      public static final int PAM_AUTHTOK_DISABLE_AGING = 23;
35      public static final int PAM_TRY_AGAIN = 24;
36      public static final int PAM_IGNORE = 25;
37      public static final int PAM_ABORT = 26;
38      public static final int PAM_AUTHTOK_EXPIRED = 27;
39      public static final int PAM_MODULE_UNKNOWN = 28;
40      public static final int PAM_BAD_ITEM = 29;
41      public static final int PAM_CONV_AGAIN = 30;
42      public static final int PAM_INCOMPLETE = 31;
43      
44      public static final int PAM_SILENT = 0x8000;
45      public static final int PAM_DISALLOW_NULL_AUTHTOK = 0x0001;
46      public static final int PAM_ESTABLISH_CRED = 0x0002;
47      public static final int PAM_DELETE_CRED = 0x0004;
48      public static final int PAM_REINITIALIZE_CRED = 0x0008;
49      public static final int PAM_REFRESH_CRED = 0x0010;
50      public static final int PAM_CHANGE_EXPIRED_AUTHTOK = 0x0020;
51      
52      public static final int PAM_SERVICE = 1;
53      public static final int PAM_USER = 2;
54      public static final int PAM_TTY = 3;
55      public static final int PAM_RHOST = 4;
56      public static final int PAM_CONV = 5;
57      public static final int PAM_RUSER = 8;
58      public static final int PAM_USER_PROMPT = 9;
59      public static final int PAM_FAIL_DELAY = 10;
60      
61      public static final long PAM_DATA_SILENT = 0x4000000L;
62      
63      public static final int PAM_PROMPT_ECHO_OFF = 1;
64      public static final int PAM_PROMPT_ECHO_ON = 2;
65      public static final int PAM_ERROR_MSG = 3;
66      public static final int PAM_TEXT_INFO = 4;
67      public static final int PAM_RADIO_TYPE = 5;
68      public static final int PAM_BINARY_PROMPT = 7;
69      public static final int PAM_MAX_NUM_MSG = 32;
70      public static final int PAM_MAX_MSG_SIZE = 512;
71      public static final int PAM_MAX_RESP_SIZE = 512;
72      
73      // taken from libpam/pam_private.h
74      public static final String PAM_DEFAULT_PROMPT = "login: ";
75  }