Remove "users" crate, call libc directly
This is all I actually needed anyways
This commit is contained in:
parent
35dcf93971
commit
df0ca4ce31
3 changed files with 4 additions and 13 deletions
|
|
@ -55,7 +55,8 @@ fn socket_directory() -> Result<std::path::PathBuf> {
|
|||
Ok(path) => Ok(path),
|
||||
Err(_) => {
|
||||
let mut path = std::env::temp_dir();
|
||||
path.push(format!("fwd{}", users::get_current_uid()));
|
||||
let uid = unsafe { libc::getuid() };
|
||||
path.push(format!("fwd{}", uid));
|
||||
Ok(path)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue