Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1198,3 +1198,5 @@ jobs:
run: |
lima ls
lima bash -c "cd work && cargo test --features 'feat_selinux'"
- name: Lint with SELinux
run: lima bash -c "cd work && cargo clippy --all-targets --features 'feat_selinux' -- -D warnings"
1 change: 0 additions & 1 deletion src/uucore/src/lib/features/selinux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ pub fn set_selinux_security_context(path: &Path, context: Option<&String>) -> Re
/// Err(Error::ContextConversionFailure) => println!("Failed to convert the security context to a string"),
/// }
/// ```

pub fn get_selinux_security_context(path: &Path) -> Result<String, Error> {
if !is_selinux_enabled() {
return Err(Error::SELinuxNotEnabled);
Expand Down
6 changes: 3 additions & 3 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4193,10 +4193,10 @@ fn test_ls_context_long() {
for c_flag in ["-Zl", "-Zal"] {
let result = scene.ucmd().args(&[c_flag, "foo"]).succeeds();

let line: Vec<_> = result.stdout_str().split(" ").collect();
assert!(line[0].ends_with("."));
let line: Vec<_> = result.stdout_str().split(' ').collect();
assert!(line[0].ends_with('.'));
assert!(line[4].starts_with("unconfined_u"));
let s: Vec<_> = line[4].split(":").collect();
let s: Vec<_> = line[4].split(':').collect();
assert!(s.len() == 4);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_stat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,6 @@ fn test_stat_selinux() {
.stdout_contains("system_u");
// Count that we have 4 fields
let result = ts.ucmd().arg("--printf='%C'").arg("/bin/").succeeds();
let s: Vec<_> = result.stdout_str().split(":").collect();
let s: Vec<_> = result.stdout_str().split(':').collect();
assert!(s.len() == 4);
}
Loading