1
1
#![ cfg( all( target_os = "linux" , not( target_env = "kernel" ) ) ) ]
2
- #![ doc( html_root_url = "https://docs.rs/selinux/0.2.2 " ) ]
2
+ #![ doc( html_root_url = "https://docs.rs/selinux/0.2.3 " ) ]
3
3
#![ allow( clippy:: upper_case_acronyms) ]
4
4
5
5
/*!
@@ -409,12 +409,10 @@ impl<'t> SecurityContext<'t> {
409
409
///
410
410
/// See: `get_default_context()`, `get_default_context_with_level()`,
411
411
/// `get_default_context_with_role()`, `get_default_context_with_rolelevel()`.
412
- #[ doc( alias(
413
- "get_default_context" ,
414
- "get_default_context_with_level" ,
415
- "get_default_context_with_role" ,
416
- "get_default_context_with_rolelevel"
417
- ) ) ]
412
+ #[ doc( alias( "get_default_context" ) ) ]
413
+ #[ doc( alias( "get_default_context_with_level" ) ) ]
414
+ #[ doc( alias( "get_default_context_with_role" ) ) ]
415
+ #[ doc( alias( "get_default_context_with_rolelevel" ) ) ]
418
416
pub fn default_for_se_user (
419
417
se_user : & str ,
420
418
role : Option < & str > ,
@@ -643,7 +641,8 @@ impl<'t> SecurityContext<'t> {
643
641
/// Get the context associated with the given path in the file system.
644
642
///
645
643
/// See: `lgetfilecon()`, `getfilecon()`.
646
- #[ doc( alias( "lgetfilecon" , "getfilecon" ) ) ]
644
+ #[ doc( alias( "lgetfilecon" ) ) ]
645
+ #[ doc( alias( "getfilecon" ) ) ]
647
646
pub fn of_path (
648
647
path : impl AsRef < Path > ,
649
648
follow_symbolic_links : bool ,
@@ -688,7 +687,8 @@ impl<'t> SecurityContext<'t> {
688
687
/// Set the SELinux security context of a file system object.
689
688
///
690
689
/// See: `lsetfilecon()`, `setfilecon()`.
691
- #[ doc( alias( "lsetfilecon" , "setfilecon" ) ) ]
690
+ #[ doc( alias( "lsetfilecon" ) ) ]
691
+ #[ doc( alias( "setfilecon" ) ) ]
692
692
pub fn set_for_path (
693
693
& self ,
694
694
path : impl AsRef < Path > ,
@@ -968,7 +968,8 @@ impl<'t> SecurityContext<'t> {
968
968
/// Check the validity of an SELinux context.
969
969
///
970
970
/// See: `security_check_context()`, `is_selinux_enabled()`.
971
- #[ doc( alias( "security_check_context" , "is_selinux_enabled" ) ) ]
971
+ #[ doc( alias( "security_check_context" ) ) ]
972
+ #[ doc( alias( "is_selinux_enabled" ) ) ]
972
973
#[ must_use]
973
974
pub fn check ( & self ) -> Option < bool > {
974
975
let proc: unsafe extern "C" fn ( _) -> _ = if self . is_raw {
@@ -1317,7 +1318,8 @@ impl SecurityContextList {
1317
1318
/// that are reachable from the specified `reachable_from_context`.
1318
1319
///
1319
1320
/// See: `get_ordered_context_list()`, `get_ordered_context_list_with_level()`.
1320
- #[ doc( alias( "get_ordered_context_list" , "get_ordered_context_list_with_level" ) ) ]
1321
+ #[ doc( alias( "get_ordered_context_list" ) ) ]
1322
+ #[ doc( alias( "get_ordered_context_list_with_level" ) ) ]
1321
1323
pub fn of_se_user (
1322
1324
se_user : & str ,
1323
1325
level : Option < & str > ,
@@ -1843,7 +1845,8 @@ pub enum ProtectionCheckingMode {
1843
1845
/// Determine the support of SELinux in the running kernel.
1844
1846
///
1845
1847
/// See: `is_selinux_enabled()`, `is_selinux_mls_enabled()`.
1846
- #[ doc( alias( "is_selinux_enabled" , "is_selinux_mls_enabled" ) ) ]
1848
+ #[ doc( alias( "is_selinux_enabled" ) ) ]
1849
+ #[ doc( alias( "is_selinux_mls_enabled" ) ) ]
1847
1850
#[ must_use]
1848
1851
pub fn kernel_support ( ) -> KernelSupport {
1849
1852
if unsafe { selinux_sys:: is_selinux_mls_enabled ( ) } != 0 {
@@ -1888,7 +1891,8 @@ pub fn current_mode() -> SELinuxMode {
1888
1891
/// Set the current SELinux enforcing mode.
1889
1892
///
1890
1893
/// See: `security_disable()`, `security_setenforce()`.
1891
- #[ doc( alias( "security_disable" , "security_setenforce" ) ) ]
1894
+ #[ doc( alias( "security_disable" ) ) ]
1895
+ #[ doc( alias( "security_setenforce" ) ) ]
1892
1896
pub fn set_current_mode ( new_mode : SELinuxMode ) -> Result < ( ) > {
1893
1897
let ( r, proc_name) = match new_mode {
1894
1898
SELinuxMode :: NotRunning => {
@@ -1914,7 +1918,8 @@ pub fn set_current_mode(new_mode: SELinuxMode) -> Result<()> {
1914
1918
/// and permissions.
1915
1919
///
1916
1920
/// See: `security_reject_unknown()`, `security_deny_unknown()`.
1917
- #[ doc( alias( "security_reject_unknown" , "security_deny_unknown" ) ) ]
1921
+ #[ doc( alias( "security_reject_unknown" ) ) ]
1922
+ #[ doc( alias( "security_deny_unknown" ) ) ]
1918
1923
pub fn undefined_handling ( ) -> Result < UndefinedHandling > {
1919
1924
let mut reject_unknown = unsafe { ( OptionalNativeFunctions :: get ( ) . security_reject_unknown ) ( ) } ;
1920
1925
if reject_unknown == -1 {
@@ -2043,7 +2048,8 @@ pub fn flush_class_cache() -> Result<()> {
2043
2048
/// Get the SELinux user name and level for a given Linux user name.
2044
2049
///
2045
2050
/// See: `getseuser()`, `getseuserbyname()`.
2046
- #[ doc( alias( "getseuser" , "getseuserbyname" ) ) ]
2051
+ #[ doc( alias( "getseuser" ) ) ]
2052
+ #[ doc( alias( "getseuserbyname" ) ) ]
2047
2053
pub fn se_user_and_level (
2048
2054
user_name : & str ,
2049
2055
service : Option < & str > ,
0 commit comments