server: misc changes for traces

This commit is contained in:
2025-12-01 13:26:44 +09:00
parent 025df3490c
commit ff858de178
3 changed files with 24 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ use nix::unistd::{Group as LibcGroup, User as LibcUser};
#[cfg(not(target_os = "macos"))]
use std::ffi::CString;
use std::fmt;
pub const DEFAULT_CONFIG_PATH: &str = "/etc/muscl/config.toml";
pub const DEFAULT_SOCKET_PATH: &str = "/run/muscl/muscl.sock";
@@ -24,6 +25,12 @@ pub struct UnixUser {
pub groups: Vec<String>,
}
impl fmt::Display for UnixUser {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.username)
}
}
// TODO: these functions are somewhat critical, and should have integration tests
#[cfg(target_os = "macos")]