summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2020-09-27 16:55:02 +0800
committerYixun Lan <dlan@gentoo.org>2020-09-27 17:12:18 +0800
commitee7dfe493ec4984750352a7184967121d02d50c8 (patch)
tree89575f15a2781543e4bc386a0f6faa7bd51dffa7 /net-proxy
parentdev-haskell/attoparsec-enumerator: switch to EAPI=7 (diff)
downloadgentoo-ee7dfe493ec4984750352a7184967121d02d50c8.tar.gz
gentoo-ee7dfe493ec4984750352a7184967121d02d50c8.tar.bz2
gentoo-ee7dfe493ec4984750352a7184967121d02d50c8.zip
net-proxy/trojan: run as non-privilege user due to security concern
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/trojan/files/trojan.initd5
-rw-r--r--net-proxy/trojan/trojan-1.16.0-r1.ebuild (renamed from net-proxy/trojan/trojan-1.16.0.ebuild)0
2 files changed, 4 insertions, 1 deletions
diff --git a/net-proxy/trojan/files/trojan.initd b/net-proxy/trojan/files/trojan.initd
index 2990245430db..c87f6576d6bf 100644
--- a/net-proxy/trojan/files/trojan.initd
+++ b/net-proxy/trojan/files/trojan.initd
@@ -20,6 +20,7 @@ depend() {
start() {
ebegin "Starting Trojan, Log File: ${TJ_LOG}"
start-stop-daemon --start -b \
+ --user nobody --group nobody \
-1 "${TJ_LOG}" -2 "${TJ_LOG}" \
-m -p "${TJ_PIDFILE}" \
--exec /usr/bin/trojan -- "${TJ_CONFIG}"
@@ -28,6 +29,8 @@ start() {
stop() {
ebegin "Stopping Trojan"
- start-stop-daemon --stop -p "${TJ_PIDFILE}"
+ start-stop-daemon --stop \
+ --user nobody --group nobody \
+ -p "${TJ_PIDFILE}"
eend $?
}
diff --git a/net-proxy/trojan/trojan-1.16.0.ebuild b/net-proxy/trojan/trojan-1.16.0-r1.ebuild
index 21f494f1364d..21f494f1364d 100644
--- a/net-proxy/trojan/trojan-1.16.0.ebuild
+++ b/net-proxy/trojan/trojan-1.16.0-r1.ebuild