Mercurial > crates > nonstick
comparison pam/src/constants.rs @ 34:ec70822cbdef
Overhaul
author | Andy Caldwell <andrew.caldwell@metaswitch.com> |
---|---|
date | Sun, 24 Apr 2022 03:42:11 +0100 |
parents | 27730595f1ea |
children |
comparison
equal
deleted
inserted
replaced
32:ea5f195f035f | 34:ec70822cbdef |
---|---|
3 // TODO: Import constants from C header file at compile time. | 3 // TODO: Import constants from C header file at compile time. |
4 | 4 |
5 pub type PamFlag = c_uint; | 5 pub type PamFlag = c_uint; |
6 pub type PamItemType = c_int; | 6 pub type PamItemType = c_int; |
7 pub type PamMessageStyle = c_int; | 7 pub type PamMessageStyle = c_int; |
8 pub type AlwaysZero = c_int; | |
9 | 8 |
10 // The Linux-PAM flags | 9 // The Linux-PAM flags |
11 // see /usr/include/security/_pam_types.h | 10 // see /usr/include/security/_pam_types.h |
12 pub const PAM_SILENT: PamFlag = 0x8000; | 11 pub const PAM_SILENT: PamFlag = 0x8000; |
13 pub const PAM_DISALLOW_NULL_AUTHTOK: PamFlag = 0x0001; | 12 pub const PAM_DISALLOW_NULL_AUTHTOK: PamFlag = 0x0001; |
14 pub const PAM_ESTABLISH_CRED: PamFlag = 0x0002; | 13 pub const PAM_ESTABLISH_CRED: PamFlag = 0x0002; |
15 pub const PAM_DELETE_CRED: PamFlag = 0x0004; | 14 pub const PAM_DELETE_CRED: PamFlag = 0x0004; |
16 pub const PAM_REINITIALIZE_CRED: PamFlag = 0x0008; | 15 pub const PAM_REINITIALIZE_CRED: PamFlag = 0x0008; |
17 pub const PAM_REFRESH_CRED: PamFlag = 0x0010; | 16 pub const PAM_REFRESH_CRED: PamFlag = 0x0010; |
18 pub const PAM_CHANGE_EXPIRED_AUTHTOK: PamFlag = 0x0020; | 17 pub const PAM_CHANGE_EXPIRED_AUTHTOK: PamFlag = 0x0020; |
19 | |
20 // The Linux-PAM item types | |
21 // see /usr/include/security/_pam_types.h | |
22 /// The service name | |
23 pub const PAM_SERVICE: PamItemType = 1; | |
24 /// The user name | |
25 pub const PAM_USER: PamItemType = 2; | |
26 /// The tty name | |
27 pub const PAM_TTY: PamItemType = 3; | |
28 /// The remote host name | |
29 pub const PAM_RHOST: PamItemType = 4; | |
30 /// The pam_conv structure | |
31 pub const PAM_CONV: PamItemType = 5; | |
32 /// The authentication token (password) | |
33 pub const PAM_AUTHTOK: PamItemType = 6; | |
34 /// The old authentication token | |
35 pub const PAM_OLDAUTHTOK: PamItemType = 7; | |
36 /// The remote user name | |
37 pub const PAM_RUSER: PamItemType = 8; | |
38 /// the prompt for getting a username | |
39 pub const PAM_USER_PROMPT: PamItemType = 9; | |
40 /* Linux-PAM :extensionsPamItemType = */ | |
41 /// app supplied function to override failure delays | |
42 pub const PAM_FAIL_DELAY: PamItemType = 10; | |
43 /// X :display name | |
44 pub const PAM_XDISPLAY: PamItemType = 11; | |
45 /// X :server authentication data | |
46 pub const PAM_XAUTHDATA: PamItemType = 12; | |
47 /// The type for pam_get_authtok | |
48 pub const PAM_AUTHTOK_TYPE: PamItemType = 13; | |
49 | 18 |
50 // Message styles | 19 // Message styles |
51 pub const PAM_PROMPT_ECHO_OFF: PamMessageStyle = 1; | 20 pub const PAM_PROMPT_ECHO_OFF: PamMessageStyle = 1; |
52 pub const PAM_PROMPT_ECHO_ON: PamMessageStyle = 2; | 21 pub const PAM_PROMPT_ECHO_ON: PamMessageStyle = 2; |
53 pub const PAM_ERROR_MSG: PamMessageStyle = 3; | 22 pub const PAM_ERROR_MSG: PamMessageStyle = 3; |