sudo_plugin-sys 1.2.1

Bindings to the sudo plugin API
Documentation
Build #233923 2020-03-27 03:27:17
# rustc version
rustc 1.44.0-nightly (2fbb07525 2020-03-26)# docs.rs version
docsrs 0.6.0 (794c8db 2020-03-21)# build log
[INFO] running `"docker" "create" "-v" "/home/cratesfyi/workspace/builds/sudo_plugin-sys-1.2.1/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/sudo_plugin-sys-1.2.1/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=1001" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "RUSTFLAGS=" "-e" "RUSTDOCFLAGS=-Z unstable-options --resource-suffix -20200326-1.44.0-nightly-2fbb07525 --static-root-path / --extern-html-root-url bindgen=https://docs.rs/bindgen/0.53.2 --extern-html-root-url libc=https://docs.rs/libc/0.2.68" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "3221225472" "--network" "none" "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "doc" "--lib" "--no-deps"`
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] [stdout] c08b7942ec8e71a747f1c0af2117961948c856070d193e0abfd921ef8131cc2a
[INFO] running `"docker" "start" "-a" "c08b7942ec8e71a747f1c0af2117961948c856070d193e0abfd921ef8131cc2a"`
[INFO] [stderr]    Compiling libc v0.2.68
[INFO] [stderr]    Compiling memchr v2.3.3
[INFO] [stderr]    Compiling cc v1.0.50
[INFO] [stderr]    Compiling glob v0.3.0
[INFO] [stderr]    Compiling version_check v0.9.1
[INFO] [stderr]    Compiling lazy_static v1.4.0
[INFO] [stderr]    Compiling log v0.4.8
[INFO] [stderr]    Compiling bitflags v1.2.1
[INFO] [stderr]    Compiling proc-macro2 v1.0.9
[INFO] [stderr]    Compiling cfg-if v0.1.10
[INFO] [stderr]    Compiling unicode-width v0.1.7
[INFO] [stderr]    Compiling quick-error v1.2.3
[INFO] [stderr]    Compiling unicode-xid v0.2.0
[INFO] [stderr]    Compiling regex-syntax v0.6.17
[INFO] [stderr]    Compiling vec_map v0.8.1
[INFO] [stderr]    Compiling bindgen v0.53.2
[INFO] [stderr]    Compiling strsim v0.8.0
[INFO] [stderr]    Compiling ansi_term v0.11.0
[INFO] [stderr]    Compiling termcolor v1.1.0
[INFO] [stderr]    Compiling shlex v0.1.1
[INFO] [stderr]    Compiling lazycell v1.2.1
[INFO] [stderr]    Compiling rustc-hash v1.1.0
[INFO] [stderr]    Compiling peeking_take_while v0.1.2
[INFO] [stderr]    Compiling thread_local v1.0.1
[INFO] [stderr]    Compiling nom v5.1.1
[INFO] [stderr]    Compiling clang-sys v0.29.2
[INFO] [stderr]    Compiling textwrap v0.11.0
[INFO] [stderr]    Compiling humantime v1.3.0
[INFO] [stderr]    Compiling libloading v0.5.2
[INFO] [stderr]    Compiling aho-corasick v0.7.10
[INFO] [stderr]    Compiling atty v0.2.14
[INFO] [stderr]    Compiling which v3.1.1
[INFO] [stderr]    Compiling quote v1.0.3
[INFO] [stderr]    Compiling clap v2.33.0
[INFO] [stderr]    Compiling regex v1.3.6
[INFO] [stderr]    Compiling cexpr v0.4.0
[INFO] [stderr]    Compiling env_logger v0.7.1
[INFO] [stderr]    Compiling sudo_plugin-sys v1.2.1 (/opt/rustwide/workdir)
[INFO] [stderr]  Documenting sudo_plugin-sys v1.2.1 (/opt/rustwide/workdir)
[INFO] [stderr] warning: missing code example in this documentation
[INFO] [stderr]   --> src/lib.rs:15:1
[INFO] [stderr]    |
[INFO] [stderr] 15 | / //! This crate is a (lighly enhanced) set of bindgen-generated Rust FFI
[INFO] [stderr] 16 | | //! bindings for the [`sudo_plugin(8)`][sudo_plugin] facility. In
[INFO] [stderr] 17 | | //! general, it is expected that end-users will prefer to use the
[INFO] [stderr] 18 | | //! handcrafted Rust wrappers from the `sudo_plugin` crate which
[INFO] [stderr] 19 | | //! accompanies this project.
[INFO] [stderr] 20 | | //!
[INFO] [stderr] 21 | | //! [sudo_plugin]: https://www.sudo.ws/man/1.8.22/sudo_plugin.man.html
[INFO] [stderr]    | |______________________________________________________________________^
[INFO] [stderr]    |
[INFO] [stderr] note: the lint level is defined here
[INFO] [stderr]   --> src/lib.rs:28:9
[INFO] [stderr]    |
[INFO] [stderr] 28 | #![warn(rustdoc)]
[INFO] [stderr]    |         ^^^^^^^
[INFO] [stderr]    = note: `#[warn(missing_doc_code_examples)]` implied by `#[warn(rustdoc)]`
[INFO] [stderr] 
[INFO] [stderr] warning: missing code example in this documentation
[INFO] [stderr]  --> /opt/rustwide/target/debug/build/sudo_plugin-sys-900c51f17e08d1f5/out/bindings.rs:3:1117
[INFO] [stderr]   |
[INFO] [stderr] 3 | pub const SUDO_API_VERSION_MAJOR : u32 = 1 ; pub const SUDO_API_VERSION_MINOR : u32 = 12 ; pub const SUDO_CONV_PROMPT_ECHO_OFF : u32 = 1 ; pub const SUDO_CONV_PROMPT_ECHO_ON : u32 = 2 ; pub const SUDO_CONV_ERROR_MSG : u32 = 3 ; pub const SUDO_CONV_INFO_MSG : u32 = 4 ; pub const SUDO_CONV_PROMPT_MASK : u32 = 5 ; pub const SUDO_CONV_PROMPT_ECHO_OK : u32 = 4096 ; pub const SUDO_CONV_REPL_MAX : u32 = 255 ; pub const SUDO_CONV_CALLBACK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_CONV_CALLBACK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_HOOK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_RET_ERROR : i32 = -1 ; pub const SUDO_HOOK_RET_NEXT : u32 = 0 ; pub const SUDO_HOOK_RET_STOP : u32 = 1 ; pub const SUDO_HOOK_SETENV : u32 = 1 ; pub const SUDO_HOOK_UNSETENV : u32 = 2 ; pub const SUDO_HOOK_PUTENV : u32 = 3 ; pub const SUDO_HOOK_GETENV : u32 = 4 ; pub const SUDO_POLICY_PLUGIN : u32 = 1 ; pub const SUDO_IO_PLUGIN : u32 = 2 ; pub const GROUP_API_VERSION_MAJOR : u32 = 1 ; pub const GROUP_API_VERSION_MINOR : u32 = 0 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_message { pub msg_type : :: std :: os :: raw :: c_int , pub timeout : :: std :: os :: raw :: c_int , pub msg : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_message ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_message > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_message > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . timeout as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_reply { pub reply : * mut :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_reply ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_reply > ( ) ) ) . reply as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_reply ) , "::" , stringify ! ( reply ) ) ) ; } pub type sudo_conv_callback_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( signo : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_callback { pub version : :: std :: os :: raw :: c_uint , pub closure : * mut :: std :: os :: raw :: c_void , pub on_suspend : sudo_conv_callback_fn_t , pub on_resume : sudo_conv_callback_fn_t , } # [ test ] fn bindgen_test_layout_sudo_conv_callback ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_callback > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_callback > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . closure as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( closure ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_suspend as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_suspend ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_resume as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_resume ) ) ) ; } pub type sudo_conv_t = :: std :: option :: Option < unsafe extern "C" fn ( num_msgs : :: std :: os :: raw :: c_int , msgs : * const sudo_conv_message , replies : * mut sudo_conv_reply , callback : * mut sudo_conv_callback ) -> :: std :: os :: raw :: c_int > ; pub type sudo_printf_t = :: std :: option :: Option < unsafe extern "C" fn ( msg_type : :: std :: os :: raw :: c_int , fmt : * const :: std :: os :: raw :: c_char , ... ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_setenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , overwrite : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_putenv_t = :: std :: option :: Option < unsafe extern "C" fn ( string : * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_getenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * mut * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_unsetenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_hook { pub hook_version : :: std :: os :: raw :: c_uint , pub hook_type : :: std :: os :: raw :: c_uint , pub hook_fn : sudo_hook_fn_t , pub closure : * mut :: std :: os :: raw :: c_void , } # [ test ] fn bindgen_test_layout_sudo_hook ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_hook > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_hook > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_type as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_fn as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_fn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . closure as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( closure ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct passwd { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct policy_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub check_policy : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , env_add : * mut * mut :: std :: os :: raw :: c_char , command_info : * mut * mut * mut :: std :: os :: raw :: c_char , argv_out : * mut * mut * mut :: std :: os :: raw :: c_char , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub list : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , verbose : :: std :: os :: raw :: c_int , list_user : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub validate : :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > , pub invalidate : :: std :: option :: Option < unsafe extern "C" fn ( remove : :: std :: os :: raw :: c_int ) > , pub init_session : :: std :: option :: Option < unsafe extern "C" fn ( pwd : * mut passwd , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , } # [ test ] fn bindgen_test_layout_policy_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < policy_plugin > ( ) , 88usize , concat ! ( "Size of: " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < policy_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . check_policy as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( check_policy ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . list as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . validate as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( validate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . invalidate as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( invalidate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . init_session as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( init_session ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct io_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , command_info : * const * mut :: std :: os :: raw :: c_char , argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub log_ttyin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_ttyout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stderr : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub change_winsize : :: std :: option :: Option < unsafe extern "C" fn ( rows : :: std :: os :: raw :: c_uint , cols : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_io_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < io_plugin > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < io_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyin as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyout as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdin as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdout as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stderr as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stderr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . change_winsize as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( change_winsize ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudoers_group_plugin { pub version : :: std :: os :: raw :: c_uint , pub init : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , sudo_printf : sudo_printf_t , argv : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub cleanup : :: std :: option :: Option < unsafe extern "C" fn ( ) > , pub query : :: std :: option :: Option < unsafe extern "C" fn ( user : * const :: std :: os :: raw :: c_char , group : * const :: std :: os :: raw :: c_char , pwd : * const passwd ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_sudoers_group_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudoers_group_plugin > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudoers_group_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . init as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( init ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . cleanup as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( cleanup ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . query as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( query ) ) ) ; }
[INFO] [stderr]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: missing code example in this documentation
[INFO] [stderr]  --> /opt/rustwide/target/debug/build/sudo_plugin-sys-900c51f17e08d1f5/out/bindings.rs:3:1148
[INFO] [stderr]   |
[INFO] [stderr] 3 | pub const SUDO_API_VERSION_MAJOR : u32 = 1 ; pub const SUDO_API_VERSION_MINOR : u32 = 12 ; pub const SUDO_CONV_PROMPT_ECHO_OFF : u32 = 1 ; pub const SUDO_CONV_PROMPT_ECHO_ON : u32 = 2 ; pub const SUDO_CONV_ERROR_MSG : u32 = 3 ; pub const SUDO_CONV_INFO_MSG : u32 = 4 ; pub const SUDO_CONV_PROMPT_MASK : u32 = 5 ; pub const SUDO_CONV_PROMPT_ECHO_OK : u32 = 4096 ; pub const SUDO_CONV_REPL_MAX : u32 = 255 ; pub const SUDO_CONV_CALLBACK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_CONV_CALLBACK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_HOOK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_RET_ERROR : i32 = -1 ; pub const SUDO_HOOK_RET_NEXT : u32 = 0 ; pub const SUDO_HOOK_RET_STOP : u32 = 1 ; pub const SUDO_HOOK_SETENV : u32 = 1 ; pub const SUDO_HOOK_UNSETENV : u32 = 2 ; pub const SUDO_HOOK_PUTENV : u32 = 3 ; pub const SUDO_HOOK_GETENV : u32 = 4 ; pub const SUDO_POLICY_PLUGIN : u32 = 1 ; pub const SUDO_IO_PLUGIN : u32 = 2 ; pub const GROUP_API_VERSION_MAJOR : u32 = 1 ; pub const GROUP_API_VERSION_MINOR : u32 = 0 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_message { pub msg_type : :: std :: os :: raw :: c_int , pub timeout : :: std :: os :: raw :: c_int , pub msg : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_message ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_message > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_message > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . timeout as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_reply { pub reply : * mut :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_reply ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_reply > ( ) ) ) . reply as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_reply ) , "::" , stringify ! ( reply ) ) ) ; } pub type sudo_conv_callback_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( signo : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_callback { pub version : :: std :: os :: raw :: c_uint , pub closure : * mut :: std :: os :: raw :: c_void , pub on_suspend : sudo_conv_callback_fn_t , pub on_resume : sudo_conv_callback_fn_t , } # [ test ] fn bindgen_test_layout_sudo_conv_callback ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_callback > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_callback > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . closure as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( closure ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_suspend as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_suspend ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_resume as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_resume ) ) ) ; } pub type sudo_conv_t = :: std :: option :: Option < unsafe extern "C" fn ( num_msgs : :: std :: os :: raw :: c_int , msgs : * const sudo_conv_message , replies : * mut sudo_conv_reply , callback : * mut sudo_conv_callback ) -> :: std :: os :: raw :: c_int > ; pub type sudo_printf_t = :: std :: option :: Option < unsafe extern "C" fn ( msg_type : :: std :: os :: raw :: c_int , fmt : * const :: std :: os :: raw :: c_char , ... ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_setenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , overwrite : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_putenv_t = :: std :: option :: Option < unsafe extern "C" fn ( string : * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_getenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * mut * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_unsetenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_hook { pub hook_version : :: std :: os :: raw :: c_uint , pub hook_type : :: std :: os :: raw :: c_uint , pub hook_fn : sudo_hook_fn_t , pub closure : * mut :: std :: os :: raw :: c_void , } # [ test ] fn bindgen_test_layout_sudo_hook ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_hook > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_hook > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_type as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_fn as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_fn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . closure as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( closure ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct passwd { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct policy_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub check_policy : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , env_add : * mut * mut :: std :: os :: raw :: c_char , command_info : * mut * mut * mut :: std :: os :: raw :: c_char , argv_out : * mut * mut * mut :: std :: os :: raw :: c_char , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub list : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , verbose : :: std :: os :: raw :: c_int , list_user : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub validate : :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > , pub invalidate : :: std :: option :: Option < unsafe extern "C" fn ( remove : :: std :: os :: raw :: c_int ) > , pub init_session : :: std :: option :: Option < unsafe extern "C" fn ( pwd : * mut passwd , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , } # [ test ] fn bindgen_test_layout_policy_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < policy_plugin > ( ) , 88usize , concat ! ( "Size of: " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < policy_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . check_policy as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( check_policy ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . list as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . validate as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( validate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . invalidate as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( invalidate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . init_session as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( init_session ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct io_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , command_info : * const * mut :: std :: os :: raw :: c_char , argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub log_ttyin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_ttyout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stderr : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub change_winsize : :: std :: option :: Option < unsafe extern "C" fn ( rows : :: std :: os :: raw :: c_uint , cols : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_io_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < io_plugin > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < io_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyin as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyout as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdin as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdout as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stderr as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stderr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . change_winsize as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( change_winsize ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudoers_group_plugin { pub version : :: std :: os :: raw :: c_uint , pub init : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , sudo_printf : sudo_printf_t , argv : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub cleanup : :: std :: option :: Option < unsafe extern "C" fn ( ) > , pub query : :: std :: option :: Option < unsafe extern "C" fn ( user : * const :: std :: os :: raw :: c_char , group : * const :: std :: os :: raw :: c_char , pwd : * const passwd ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_sudoers_group_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudoers_group_plugin > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudoers_group_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . init as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( init ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . cleanup as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( cleanup ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . query as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( query ) ) ) ; }
[INFO] [stderr]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: missing code example in this documentation
[INFO] [stderr]  --> /opt/rustwide/target/debug/build/sudo_plugin-sys-900c51f17e08d1f5/out/bindings.rs:3:1194
[INFO] [stderr]   |
[INFO] [stderr] 3 | pub const SUDO_API_VERSION_MAJOR : u32 = 1 ; pub const SUDO_API_VERSION_MINOR : u32 = 12 ; pub const SUDO_CONV_PROMPT_ECHO_OFF : u32 = 1 ; pub const SUDO_CONV_PROMPT_ECHO_ON : u32 = 2 ; pub const SUDO_CONV_ERROR_MSG : u32 = 3 ; pub const SUDO_CONV_INFO_MSG : u32 = 4 ; pub const SUDO_CONV_PROMPT_MASK : u32 = 5 ; pub const SUDO_CONV_PROMPT_ECHO_OK : u32 = 4096 ; pub const SUDO_CONV_REPL_MAX : u32 = 255 ; pub const SUDO_CONV_CALLBACK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_CONV_CALLBACK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_HOOK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_RET_ERROR : i32 = -1 ; pub const SUDO_HOOK_RET_NEXT : u32 = 0 ; pub const SUDO_HOOK_RET_STOP : u32 = 1 ; pub const SUDO_HOOK_SETENV : u32 = 1 ; pub const SUDO_HOOK_UNSETENV : u32 = 2 ; pub const SUDO_HOOK_PUTENV : u32 = 3 ; pub const SUDO_HOOK_GETENV : u32 = 4 ; pub const SUDO_POLICY_PLUGIN : u32 = 1 ; pub const SUDO_IO_PLUGIN : u32 = 2 ; pub const GROUP_API_VERSION_MAJOR : u32 = 1 ; pub const GROUP_API_VERSION_MINOR : u32 = 0 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_message { pub msg_type : :: std :: os :: raw :: c_int , pub timeout : :: std :: os :: raw :: c_int , pub msg : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_message ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_message > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_message > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . timeout as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_reply { pub reply : * mut :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_reply ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_reply > ( ) ) ) . reply as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_reply ) , "::" , stringify ! ( reply ) ) ) ; } pub type sudo_conv_callback_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( signo : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_callback { pub version : :: std :: os :: raw :: c_uint , pub closure : * mut :: std :: os :: raw :: c_void , pub on_suspend : sudo_conv_callback_fn_t , pub on_resume : sudo_conv_callback_fn_t , } # [ test ] fn bindgen_test_layout_sudo_conv_callback ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_callback > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_callback > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . closure as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( closure ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_suspend as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_suspend ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_resume as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_resume ) ) ) ; } pub type sudo_conv_t = :: std :: option :: Option < unsafe extern "C" fn ( num_msgs : :: std :: os :: raw :: c_int , msgs : * const sudo_conv_message , replies : * mut sudo_conv_reply , callback : * mut sudo_conv_callback ) -> :: std :: os :: raw :: c_int > ; pub type sudo_printf_t = :: std :: option :: Option < unsafe extern "C" fn ( msg_type : :: std :: os :: raw :: c_int , fmt : * const :: std :: os :: raw :: c_char , ... ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_setenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , overwrite : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_putenv_t = :: std :: option :: Option < unsafe extern "C" fn ( string : * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_getenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * mut * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_unsetenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_hook { pub hook_version : :: std :: os :: raw :: c_uint , pub hook_type : :: std :: os :: raw :: c_uint , pub hook_fn : sudo_hook_fn_t , pub closure : * mut :: std :: os :: raw :: c_void , } # [ test ] fn bindgen_test_layout_sudo_hook ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_hook > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_hook > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_type as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_fn as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_fn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . closure as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( closure ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct passwd { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct policy_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub check_policy : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , env_add : * mut * mut :: std :: os :: raw :: c_char , command_info : * mut * mut * mut :: std :: os :: raw :: c_char , argv_out : * mut * mut * mut :: std :: os :: raw :: c_char , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub list : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , verbose : :: std :: os :: raw :: c_int , list_user : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub validate : :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > , pub invalidate : :: std :: option :: Option < unsafe extern "C" fn ( remove : :: std :: os :: raw :: c_int ) > , pub init_session : :: std :: option :: Option < unsafe extern "C" fn ( pwd : * mut passwd , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , } # [ test ] fn bindgen_test_layout_policy_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < policy_plugin > ( ) , 88usize , concat ! ( "Size of: " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < policy_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . check_policy as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( check_policy ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . list as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . validate as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( validate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . invalidate as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( invalidate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . init_session as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( init_session ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct io_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , command_info : * const * mut :: std :: os :: raw :: c_char , argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub log_ttyin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_ttyout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stderr : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub change_winsize : :: std :: option :: Option < unsafe extern "C" fn ( rows : :: std :: os :: raw :: c_uint , cols : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_io_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < io_plugin > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < io_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyin as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyout as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdin as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdout as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stderr as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stderr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . change_winsize as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( change_winsize ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudoers_group_plugin { pub version : :: std :: os :: raw :: c_uint , pub init : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , sudo_printf : sudo_printf_t , argv : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub cleanup : :: std :: option :: Option < unsafe extern "C" fn ( ) > , pub query : :: std :: option :: Option < unsafe extern "C" fn ( user : * const :: std :: os :: raw :: c_char , group : * const :: std :: os :: raw :: c_char , pwd : * const passwd ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_sudoers_group_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudoers_group_plugin > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudoers_group_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . init as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( init ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . cleanup as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( cleanup ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . query as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( query ) ) ) ; }
[INFO] [stderr]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: missing code example in this documentation
[INFO] [stderr]  --> /opt/rustwide/target/debug/build/sudo_plugin-sys-900c51f17e08d1f5/out/bindings.rs:3:1239
[INFO] [stderr]   |
[INFO] [stderr] 3 | pub const SUDO_API_VERSION_MAJOR : u32 = 1 ; pub const SUDO_API_VERSION_MINOR : u32 = 12 ; pub const SUDO_CONV_PROMPT_ECHO_OFF : u32 = 1 ; pub const SUDO_CONV_PROMPT_ECHO_ON : u32 = 2 ; pub const SUDO_CONV_ERROR_MSG : u32 = 3 ; pub const SUDO_CONV_INFO_MSG : u32 = 4 ; pub const SUDO_CONV_PROMPT_MASK : u32 = 5 ; pub const SUDO_CONV_PROMPT_ECHO_OK : u32 = 4096 ; pub const SUDO_CONV_REPL_MAX : u32 = 255 ; pub const SUDO_CONV_CALLBACK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_CONV_CALLBACK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_VERSION_MAJOR : u32 = 1 ; pub const SUDO_HOOK_VERSION_MINOR : u32 = 0 ; pub const SUDO_HOOK_RET_ERROR : i32 = -1 ; pub const SUDO_HOOK_RET_NEXT : u32 = 0 ; pub const SUDO_HOOK_RET_STOP : u32 = 1 ; pub const SUDO_HOOK_SETENV : u32 = 1 ; pub const SUDO_HOOK_UNSETENV : u32 = 2 ; pub const SUDO_HOOK_PUTENV : u32 = 3 ; pub const SUDO_HOOK_GETENV : u32 = 4 ; pub const SUDO_POLICY_PLUGIN : u32 = 1 ; pub const SUDO_IO_PLUGIN : u32 = 2 ; pub const GROUP_API_VERSION_MAJOR : u32 = 1 ; pub const GROUP_API_VERSION_MINOR : u32 = 0 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_message { pub msg_type : :: std :: os :: raw :: c_int , pub timeout : :: std :: os :: raw :: c_int , pub msg : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_message ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_message > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_message > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_message ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . timeout as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_message > ( ) ) ) . msg as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_message ) , "::" , stringify ! ( msg ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_reply { pub reply : * mut :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_sudo_conv_reply ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_reply > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_reply ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_reply > ( ) ) ) . reply as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_reply ) , "::" , stringify ! ( reply ) ) ) ; } pub type sudo_conv_callback_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( signo : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_conv_callback { pub version : :: std :: os :: raw :: c_uint , pub closure : * mut :: std :: os :: raw :: c_void , pub on_suspend : sudo_conv_callback_fn_t , pub on_resume : sudo_conv_callback_fn_t , } # [ test ] fn bindgen_test_layout_sudo_conv_callback ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_conv_callback > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_conv_callback > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_conv_callback ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . closure as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( closure ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_suspend as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_suspend ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_conv_callback > ( ) ) ) . on_resume as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudo_conv_callback ) , "::" , stringify ! ( on_resume ) ) ) ; } pub type sudo_conv_t = :: std :: option :: Option < unsafe extern "C" fn ( num_msgs : :: std :: os :: raw :: c_int , msgs : * const sudo_conv_message , replies : * mut sudo_conv_reply , callback : * mut sudo_conv_callback ) -> :: std :: os :: raw :: c_int > ; pub type sudo_printf_t = :: std :: option :: Option < unsafe extern "C" fn ( msg_type : :: std :: os :: raw :: c_int , fmt : * const :: std :: os :: raw :: c_char , ... ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_setenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , overwrite : :: std :: os :: raw :: c_int , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_putenv_t = :: std :: option :: Option < unsafe extern "C" fn ( string : * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_getenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , value : * mut * mut :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type sudo_hook_fn_unsetenv_t = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , closure : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudo_hook { pub hook_version : :: std :: os :: raw :: c_uint , pub hook_type : :: std :: os :: raw :: c_uint , pub hook_fn : sudo_hook_fn_t , pub closure : * mut :: std :: os :: raw :: c_void , } # [ test ] fn bindgen_test_layout_sudo_hook ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudo_hook > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudo_hook > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudo_hook ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_type as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . hook_fn as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( hook_fn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudo_hook > ( ) ) ) . closure as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudo_hook ) , "::" , stringify ! ( closure ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct passwd { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct policy_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub check_policy : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , env_add : * mut * mut :: std :: os :: raw :: c_char , command_info : * mut * mut * mut :: std :: os :: raw :: c_char , argv_out : * mut * mut * mut :: std :: os :: raw :: c_char , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub list : :: std :: option :: Option < unsafe extern "C" fn ( argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , verbose : :: std :: os :: raw :: c_int , list_user : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub validate : :: std :: option :: Option < unsafe extern "C" fn ( ) -> :: std :: os :: raw :: c_int > , pub invalidate : :: std :: option :: Option < unsafe extern "C" fn ( remove : :: std :: os :: raw :: c_int ) > , pub init_session : :: std :: option :: Option < unsafe extern "C" fn ( pwd : * mut passwd , user_env_out : * mut * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , } # [ test ] fn bindgen_test_layout_policy_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < policy_plugin > ( ) , 88usize , concat ! ( "Size of: " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < policy_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( policy_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . check_policy as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( check_policy ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . list as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . validate as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( validate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . invalidate as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( invalidate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . init_session as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( init_session ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < policy_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( policy_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct io_plugin { pub type_ : :: std :: os :: raw :: c_uint , pub version : :: std :: os :: raw :: c_uint , pub open : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_uint , conversation : sudo_conv_t , sudo_printf : sudo_printf_t , settings : * const * mut :: std :: os :: raw :: c_char , user_info : * const * mut :: std :: os :: raw :: c_char , command_info : * const * mut :: std :: os :: raw :: c_char , argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , user_env : * const * mut :: std :: os :: raw :: c_char , plugin_plugins : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn ( exit_status : :: std :: os :: raw :: c_int , error : :: std :: os :: raw :: c_int ) > , pub show_version : :: std :: option :: Option < unsafe extern "C" fn ( verbose : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , pub log_ttyin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_ttyout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdin : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stdout : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub log_stderr : :: std :: option :: Option < unsafe extern "C" fn ( buf : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , pub register_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , register_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub deregister_hooks : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , deregister_hook : :: std :: option :: Option < unsafe extern "C" fn ( hook : * mut sudo_hook ) -> :: std :: os :: raw :: c_int > ) > , pub change_winsize : :: std :: option :: Option < unsafe extern "C" fn ( rows : :: std :: os :: raw :: c_uint , cols : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_io_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < io_plugin > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < io_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( io_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . version as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . close as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( close ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . show_version as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( show_version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyin as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_ttyout as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_ttyout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdin as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stdout as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stdout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . log_stderr as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( log_stderr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . register_hooks as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( register_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . deregister_hooks as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( deregister_hooks ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_plugin > ( ) ) ) . change_winsize as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( io_plugin ) , "::" , stringify ! ( change_winsize ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sudoers_group_plugin { pub version : :: std :: os :: raw :: c_uint , pub init : :: std :: option :: Option < unsafe extern "C" fn ( version : :: std :: os :: raw :: c_int , sudo_printf : sudo_printf_t , argv : * const * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub cleanup : :: std :: option :: Option < unsafe extern "C" fn ( ) > , pub query : :: std :: option :: Option < unsafe extern "C" fn ( user : * const :: std :: os :: raw :: c_char , group : * const :: std :: os :: raw :: c_char , pwd : * const passwd ) -> :: std :: os :: raw :: c_int > , } # [ test ] fn bindgen_test_layout_sudoers_group_plugin ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sudoers_group_plugin > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sudoers_group_plugin > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sudoers_group_plugin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . init as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( init ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . cleanup as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( cleanup ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sudoers_group_plugin > ( ) ) ) . query as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( sudoers_group_plugin ) , "::" , stringify ! ( query ) ) ) ; }
[INFO] [stderr]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: missing code example in this documentation
[INFO] [stderr]  --> /opt/rustwide/target/debug/build/sudo_plugin-sys-900c51f17e08d1f5/out/bindings.rs:3:2405
[INFO] [stderr]   |
[WARN] too much data in the log, truncating it