Skip to content

Commit a1fce3a

Browse files
committed
Replace each single doc(alias) directive specifying multiple aliases by multiple doc(alias) directives each specifying a single alias.
Closes koutheir#1.
1 parent 90b7cb6 commit a1fce3a

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [0.2.3] - 2021-08-22
6+
7+
### Changed
8+
9+
- Replace each single `doc(alias)` directive specifying multiple aliases by
10+
multiple `doc(alias)` directives each specifying a single alias.
11+
This reduces the minimum supported Rust version for this crate.
12+
513
## [0.2.2] - 2021-08-18
614

715
### Added

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "selinux"
33
description = "Flexible Mandatory Access Control for Linux"
4-
version = "0.2.2" # Remember to update `html_root_url`.
4+
version = "0.2.3" # Remember to update `html_root_url`.
55
authors = ["Koutheir Attouchi <[email protected]>"]
66
edition = "2018"
77
readme = "README.md"

src/lib.rs

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![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")]
33
#![allow(clippy::upper_case_acronyms)]
44

55
/*!
@@ -409,12 +409,10 @@ impl<'t> SecurityContext<'t> {
409409
///
410410
/// See: `get_default_context()`, `get_default_context_with_level()`,
411411
/// `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"))]
418416
pub fn default_for_se_user(
419417
se_user: &str,
420418
role: Option<&str>,
@@ -643,7 +641,8 @@ impl<'t> SecurityContext<'t> {
643641
/// Get the context associated with the given path in the file system.
644642
///
645643
/// See: `lgetfilecon()`, `getfilecon()`.
646-
#[doc(alias("lgetfilecon", "getfilecon"))]
644+
#[doc(alias("lgetfilecon"))]
645+
#[doc(alias("getfilecon"))]
647646
pub fn of_path(
648647
path: impl AsRef<Path>,
649648
follow_symbolic_links: bool,
@@ -688,7 +687,8 @@ impl<'t> SecurityContext<'t> {
688687
/// Set the SELinux security context of a file system object.
689688
///
690689
/// See: `lsetfilecon()`, `setfilecon()`.
691-
#[doc(alias("lsetfilecon", "setfilecon"))]
690+
#[doc(alias("lsetfilecon"))]
691+
#[doc(alias("setfilecon"))]
692692
pub fn set_for_path(
693693
&self,
694694
path: impl AsRef<Path>,
@@ -968,7 +968,8 @@ impl<'t> SecurityContext<'t> {
968968
/// Check the validity of an SELinux context.
969969
///
970970
/// 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"))]
972973
#[must_use]
973974
pub fn check(&self) -> Option<bool> {
974975
let proc: unsafe extern "C" fn(_) -> _ = if self.is_raw {
@@ -1317,7 +1318,8 @@ impl SecurityContextList {
13171318
/// that are reachable from the specified `reachable_from_context`.
13181319
///
13191320
/// 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"))]
13211323
pub fn of_se_user(
13221324
se_user: &str,
13231325
level: Option<&str>,
@@ -1843,7 +1845,8 @@ pub enum ProtectionCheckingMode {
18431845
/// Determine the support of SELinux in the running kernel.
18441846
///
18451847
/// 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"))]
18471850
#[must_use]
18481851
pub fn kernel_support() -> KernelSupport {
18491852
if unsafe { selinux_sys::is_selinux_mls_enabled() } != 0 {
@@ -1888,7 +1891,8 @@ pub fn current_mode() -> SELinuxMode {
18881891
/// Set the current SELinux enforcing mode.
18891892
///
18901893
/// See: `security_disable()`, `security_setenforce()`.
1891-
#[doc(alias("security_disable", "security_setenforce"))]
1894+
#[doc(alias("security_disable"))]
1895+
#[doc(alias("security_setenforce"))]
18921896
pub fn set_current_mode(new_mode: SELinuxMode) -> Result<()> {
18931897
let (r, proc_name) = match new_mode {
18941898
SELinuxMode::NotRunning => {
@@ -1914,7 +1918,8 @@ pub fn set_current_mode(new_mode: SELinuxMode) -> Result<()> {
19141918
/// and permissions.
19151919
///
19161920
/// 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"))]
19181923
pub fn undefined_handling() -> Result<UndefinedHandling> {
19191924
let mut reject_unknown = unsafe { (OptionalNativeFunctions::get().security_reject_unknown)() };
19201925
if reject_unknown == -1 {
@@ -2043,7 +2048,8 @@ pub fn flush_class_cache() -> Result<()> {
20432048
/// Get the SELinux user name and level for a given Linux user name.
20442049
///
20452050
/// See: `getseuser()`, `getseuserbyname()`.
2046-
#[doc(alias("getseuser", "getseuserbyname"))]
2051+
#[doc(alias("getseuser"))]
2052+
#[doc(alias("getseuserbyname"))]
20472053
pub fn se_user_and_level(
20482054
user_name: &str,
20492055
service: Option<&str>,

0 commit comments

Comments
 (0)