mirror of
https://github.com/telemt/telemt.git
synced 2026-10-07 01:45:58 +03:00
Runtime Paths Checks as opt-in #935
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,8 @@ pub struct DaemonOptions {
|
||||
pub daemonize: bool,
|
||||
/// Path to PID file.
|
||||
pub pid_file: Option<PathBuf>,
|
||||
/// Require trusted, symlink-free PID and log parents. Disabled by default for compatibility.
|
||||
pub strict_runtime_paths: bool,
|
||||
/// User to run as after binding sockets.
|
||||
pub user: Option<String>,
|
||||
/// Group to run as after binding sockets.
|
||||
@@ -332,6 +334,7 @@ mod tests {
|
||||
fn test_daemon_options_default() {
|
||||
let opts = DaemonOptions::default();
|
||||
assert!(!opts.daemonize);
|
||||
assert!(!opts.strict_runtime_paths);
|
||||
assert!(!opts.should_daemonize());
|
||||
assert_eq!(opts.pid_file_path(), Path::new(DEFAULT_PID_FILE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user