Debian Codegraph @

src/pam/sys_openpam.rs

raw symbols SCIP
1 /* automatically generated by rust-bindgen 0.72.1, minified by cargo-minify */
2
3 pub type pam_handle_t = u8;
4 pub type _bindgen_ty_1 = std::ffi::c_uint;
5 pub type _bindgen_ty_2 = std::ffi::c_uint;
6 pub type _bindgen_ty_3 = std::ffi::c_int;
7 pub type _bindgen_ty_4 = std::ffi::c_uint;
8 #[repr(C)]
9 #[derive(Debug, Copy, Clone)]
10 pub struct pam_message {
11 pub msg_style: std::ffi::c_int,
12 pub msg: *mut std::ffi::c_char,
13 }
14 #[repr(C)]
15 #[derive(Debug, Copy, Clone)]
16 pub struct pam_response {
17 pub resp: *mut std::ffi::c_char,
18 pub resp_retcode: std::ffi::c_int,
19 }
20 #[repr(C)]
21 #[derive(Debug, Copy, Clone)]
22 pub struct pam_conv {
23 pub conv: ::std::option::Option<
24 unsafe extern "C" fn(
25 arg1: std::ffi::c_int,
26 arg2: *mut *const pam_message,
27 arg3: *mut *mut pam_response,
28 arg4: *mut std::ffi::c_void,
29 ) -> std::ffi::c_int,
30 >,
31 pub appdata_ptr: *mut std::ffi::c_void,
32 }
33 pub const PAM_SUCCESS: _bindgen_ty_1 = 0;
34 pub const PAM_OPEN_ERR: _bindgen_ty_1 = 1;
35 pub const PAM_SYMBOL_ERR: _bindgen_ty_1 = 2;
36 pub const PAM_SERVICE_ERR: _bindgen_ty_1 = 3;
37 pub const PAM_SYSTEM_ERR: _bindgen_ty_1 = 4;
38 pub const PAM_BUF_ERR: _bindgen_ty_1 = 5;
39 pub const PAM_CONV_ERR: _bindgen_ty_1 = 6;
40 pub const PAM_PERM_DENIED: _bindgen_ty_1 = 7;
41 pub const PAM_MAXTRIES: _bindgen_ty_1 = 8;
42 pub const PAM_AUTH_ERR: _bindgen_ty_1 = 9;
43 pub const PAM_NEW_AUTHTOK_REQD: _bindgen_ty_1 = 10;
44 pub const PAM_CRED_INSUFFICIENT: _bindgen_ty_1 = 11;
45 pub const PAM_AUTHINFO_UNAVAIL: _bindgen_ty_1 = 12;
46 pub const PAM_USER_UNKNOWN: _bindgen_ty_1 = 13;
47 pub const PAM_CRED_UNAVAIL: _bindgen_ty_1 = 14;
48 pub const PAM_CRED_EXPIRED: _bindgen_ty_1 = 15;
49 pub const PAM_CRED_ERR: _bindgen_ty_1 = 16;
50 pub const PAM_ACCT_EXPIRED: _bindgen_ty_1 = 17;
51 pub const PAM_AUTHTOK_EXPIRED: _bindgen_ty_1 = 18;
52 pub const PAM_SESSION_ERR: _bindgen_ty_1 = 19;
53 pub const PAM_AUTHTOK_ERR: _bindgen_ty_1 = 20;
54 pub const PAM_AUTHTOK_RECOVERY_ERR: _bindgen_ty_1 = 21;
55 pub const PAM_AUTHTOK_LOCK_BUSY: _bindgen_ty_1 = 22;
56 pub const PAM_AUTHTOK_DISABLE_AGING: _bindgen_ty_1 = 23;
57 pub const PAM_NO_MODULE_DATA: _bindgen_ty_1 = 24;
58 pub const PAM_IGNORE: _bindgen_ty_1 = 25;
59 pub const PAM_ABORT: _bindgen_ty_1 = 26;
60 pub const PAM_TRY_AGAIN: _bindgen_ty_1 = 27;
61 pub const PAM_MODULE_UNKNOWN: _bindgen_ty_1 = 28;
62 pub const PAM_BAD_ITEM: _bindgen_ty_1 = 31;
63 pub const PAM_PROMPT_ECHO_OFF: _bindgen_ty_2 = 1;
64 pub const PAM_PROMPT_ECHO_ON: _bindgen_ty_2 = 2;
65 pub const PAM_ERROR_MSG: _bindgen_ty_2 = 3;
66 pub const PAM_TEXT_INFO: _bindgen_ty_2 = 4;
67 pub const PAM_MAX_RESP_SIZE: _bindgen_ty_2 = 512;
68 pub const PAM_SILENT: _bindgen_ty_3 = -2147483648;
69 pub const PAM_DISALLOW_NULL_AUTHTOK: _bindgen_ty_3 = 1;
70 pub const PAM_REINITIALIZE_CRED: _bindgen_ty_3 = 4;
71 pub const PAM_CHANGE_EXPIRED_AUTHTOK: _bindgen_ty_3 = 4;
72 pub const PAM_USER: _bindgen_ty_4 = 2;
73 pub const PAM_TTY: _bindgen_ty_4 = 3;
74 pub const PAM_RUSER: _bindgen_ty_4 = 8;
75 unsafe extern "C" {
76 pub fn pam_acct_mgmt(_pamh: *mut pam_handle_t, _flags: std::ffi::c_int) -> std::ffi::c_int;
77 }
78 unsafe extern "C" {
79 pub fn pam_authenticate(_pamh: *mut pam_handle_t, _flags: std::ffi::c_int) -> std::ffi::c_int;
80 }
81 unsafe extern "C" {
82 pub fn pam_chauthtok(_pamh: *mut pam_handle_t, _flags: std::ffi::c_int) -> std::ffi::c_int;
83 }
84 unsafe extern "C" {
85 pub fn pam_close_session(_pamh: *mut pam_handle_t, _flags: std::ffi::c_int) -> std::ffi::c_int;
86 }
87 unsafe extern "C" {
88 pub fn pam_end(_pamh: *mut pam_handle_t, _status: std::ffi::c_int) -> std::ffi::c_int;
89 }
90 unsafe extern "C" {
91 pub fn pam_get_item(
92 _pamh: *const pam_handle_t,
93 _item_type: std::ffi::c_int,
94 _item: *mut *const std::ffi::c_void,
95 ) -> std::ffi::c_int;
96 }
97 unsafe extern "C" {
98 pub fn pam_getenvlist(_pamh: *mut pam_handle_t) -> *mut *mut std::ffi::c_char;
99 }
100 unsafe extern "C" {
101 pub fn pam_open_session(_pamh: *mut pam_handle_t, _flags: std::ffi::c_int) -> std::ffi::c_int;
102 }
103 unsafe extern "C" {
104 pub fn pam_set_item(
105 _pamh: *mut pam_handle_t,
106 _item_type: std::ffi::c_int,
107 _item: *const std::ffi::c_void,
108 ) -> std::ffi::c_int;
109 }
110 unsafe extern "C" {
111 pub fn pam_setcred(_pamh: *mut pam_handle_t, _flags: std::ffi::c_int) -> std::ffi::c_int;
112 }
113 unsafe extern "C" {
114 pub fn pam_start(
115 _service: *const std::ffi::c_char,
116 _user: *const std::ffi::c_char,
117 _pam_conv: *const pam_conv,
118 _pamh: *mut *mut pam_handle_t,
119 ) -> std::ffi::c_int;
120 }
121 unsafe extern "C" {
122 pub fn pam_strerror(
123 _pamh: *const pam_handle_t,
124 _error_number: std::ffi::c_int,
125 ) -> *const std::ffi::c_char;
126 }