Skip to content

Commit 2480dd4

Browse files
sgebaueransasaki
authored andcommitted
Allow agent to start as non-root
Signed-off-by: Sven Gebauer <[email protected]>
1 parent be3d841 commit 2480dd4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

keylime-agent/src/main.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,10 @@ async fn main() -> Result<()> {
250250
Some(&config.agent.run_as)
251251
}
252252
} else {
253-
error!("Cannot drop privileges: not enough permission");
254-
return Err(Error::Configuration(
255-
config::KeylimeConfigError::Generic(
256-
"Cannot drop privileges: not enough permission".to_string(),
257-
),
258-
));
253+
if !(config.agent.run_as).is_empty() {
254+
warn!("Ignoring 'run_as' option because Keylime agent has not been started as root.");
255+
}
256+
None
259257
};
260258

261259
// Drop privileges

0 commit comments

Comments
 (0)