Skip to content

Commit

Permalink
apply bounding for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
LeChatP committed Mar 14, 2024
1 parent 2c2d610 commit 49bfe4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub fn capset_to_string(set: &CapSet) -> String {

pub fn parse_capset(s: &str) -> Result<CapSet, ParseCapError> {
if s.is_empty() || s.eq_ignore_ascii_case("all") {
return Ok(!CapSet::empty());
return Ok(!CapSet::empty() & capctl::bounding::probe());
}

let mut res = CapSet::empty();
Expand Down
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use capctl::{Cap, CapSet, ParseCapError};
use tracing::warn;

pub fn capset_to_string(set: &CapSet) -> String {
set.iter()
Expand Down Expand Up @@ -29,13 +30,12 @@ where
}
}
}

Ok(res)
}

pub fn parse_capset(s: &str) -> Result<CapSet, ParseCapError> {
if s.is_empty() || s.eq_ignore_ascii_case("all") {
return Ok(!CapSet::empty());
return Ok(!CapSet::empty() & capctl::bounding::probe());
}

parse_capset_iter(s.split(' '))
Expand Down

0 comments on commit 49bfe4f

Please sign in to comment.