Debian Codegraph @

debian/rust-vendor/selinux-sys/src/lib.rs

raw
1 #![cfg(any(target_os = "linux", target_os = "android"))]
2 #![doc = include_str!("../README.md")]
3 #![doc(html_root_url = "https://docs.rs/selinux-sys/0.7.0")]
4
5 #[cfg(test)]
6 mod tests;
7
8 include!(concat!(env!("OUT_DIR"), "/selinux-sys.rs"));
9
10 /// Unspecified SID.
11 pub const SECSID_WILD: security_id_t = std::ptr::null_mut();
12
13 /// Initialize an `avc_entry_ref` structure.
14 ///
15 /// # Safety
16 /// `aeref` is assumed to be a valid pointer to a mutable `avc_entry_ref` structure.
17 pub unsafe fn avc_entry_ref_init(aeref: *mut avc_entry_ref) {
18 if !aeref.is_null() {
19 unsafe {
20 aeref.write(avc_entry_ref {
21 ae: std::ptr::null_mut(),
22 });
23 }
24 }
25 }