From 0b620a09605afb815c6d8d8953bbb7a10a8c0575 Mon Sep 17 00:00:00 2001 From: Shinyzenith Date: Fri, 25 Mar 2022 20:50:01 +0530 Subject: [PATCH] [patch] CVE-2022-27816 --- src/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 22fd30f..1cc2764 100644 --- a/src/server.rs +++ b/src/server.rs @@ -12,7 +12,7 @@ fn main() -> std::io::Result<()> { env::set_var("RUST_LOG", "swhks=trace"); env_logger::init(); - let pid_file_path = String::from("/tmp/swhks.pid"); + let pid_file_path = String::from(format!("/run/user/{}/swhks.pid", unistd::Uid::current())); let sock_file_path = String::from(format!("/run/user/{}/swhkd.sock", unistd::Uid::current())); if Path::new(&pid_file_path).exists() {