From 593630833c4a5e8eda36e2b4d0506f5d9d159ed2 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Fri, 8 Oct 2021 01:16:06 +0800 Subject: [PATCH] Revert "remove chroot when daemonizing (#640)" This reverts commit 862a8a78b74759636cb902d2196e5c988d6c8a79. --- bin/common/daemonize/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/common/daemonize/unix.rs b/bin/common/daemonize/unix.rs index 9a2cf93f..9f36bd96 100644 --- a/bin/common/daemonize/unix.rs +++ b/bin/common/daemonize/unix.rs @@ -8,7 +8,7 @@ use log::error; /// This function will redirect `stdout`, `stderr` to `/dev/null`, /// and follow the exact behavior in shadowsocks-libev pub fn daemonize>(pid_path: Option) { - let mut d = Daemonize::new().umask(0); + let mut d = Daemonize::new().umask(0).chroot("/"); if let Some(p) = pid_path { d = d.pid_file(p); }