Skip to content

Commit aadb643

Browse files
server: Only warn if the process has no caps set
1 parent a08cb5d commit aadb643

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

server/src/capability.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub enum Error {
99
SetGid(nix::Error),
1010
SetUid(nix::Error),
1111
InsufficientCapabilities,
12-
NoCapabilities,
1312
}
1413

1514
impl std::fmt::Display for Error {
@@ -24,9 +23,6 @@ impl std::fmt::Display for Error {
2423
f,
2524
"Insufficient process capabilities, insecure memory might get used"
2625
),
27-
Self::NoCapabilities => {
28-
write!(f, "No process capabilities, insecure memory might get used")
29-
}
3026
}
3127
}
3228
}
@@ -58,7 +54,8 @@ pub fn drop_unnecessary_capabilities() -> Result<(), Error> {
5854
return Err(Error::InsufficientCapabilities);
5955
}
6056
} else if permitted_caps.is_empty() {
61-
return Err(Error::NoCapabilities);
57+
tracing::warn!("No process capabilities, insecure memory might get used");
58+
return Ok(());
6259
} else {
6360
return Err(Error::InsufficientCapabilities);
6461
}

0 commit comments

Comments
 (0)