diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-25 17:05:15 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-25 21:56:02 +0200 |
commit | cd0b52445f8f8a6208e524335f6de9ca0854f94c (patch) | |
tree | 814e96d5bf12ed472f986f58129059f8e08ae0a8 /community/tor | |
parent | bd84b03391292e67b44989744a3ff28691fcddeb (diff) | |
download | aports-cd0b52445f8f8a6208e524335f6de9ca0854f94c.tar.bz2 aports-cd0b52445f8f8a6208e524335f6de9ca0854f94c.tar.xz |
community/tor: run as unprivileged user
Diffstat (limited to 'community/tor')
-rw-r--r-- | community/tor/APKBUILD | 8 | ||||
-rw-r--r-- | community/tor/tor.initd | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/community/tor/APKBUILD b/community/tor/APKBUILD index d8b2240877..23a93136c5 100644 --- a/community/tor/APKBUILD +++ b/community/tor/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Sam Dodrill <shadow.h511@gmail.com> pkgname=tor pkgver=0.2.7.6 -pkgrel=4 +pkgrel=5 pkgdesc="Anonymous network connectivity" url="https://www.torproject.org" arch="all" @@ -52,11 +52,11 @@ package() { } md5sums="cc19107b57136a68e8c563bf2d35b072 tor-0.2.7.6.tar.gz -5fcebf3f26f4ec4ddfed262a020263d4 tor.initd +fb939d073a7a51e9814c10d1aabec0ce tor.initd e05a796ffc4981c22c167de11fa36ef9 tor.confd" sha256sums="493a8679f904503048114aca6467faef56861206bab8283d858f37141d95105d tor-0.2.7.6.tar.gz -f8cabd757daa05d6a72992911ff24204854275d190887e02a35e7d098cae40cf tor.initd +04800394384a6ce4cad13bb1ffb8650a7ce799a574d897c0166180c19dd34f88 tor.initd 41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c tor.confd" sha512sums="9b0dbfabe6cd05189b179da24bfaa73b89ab237775e3b5b0ebc0a22ee98909e9b13e55841a466f04000e0ff876c15f76515ff46abca28d05eeddbdc52f183afc tor-0.2.7.6.tar.gz -7763735be48d4cee9d78c0f1c8cd37e504efa262267997c214349fc6de46e7ae9a00b1320977946f562ab2b35fa0bdf37932860b266714e936c75f08aa187fa2 tor.initd +8dd2f56697b730881fa7e67088b0860a753fb7c3dad9eb3d2af6eb7b9cfa10aaaf01628e65cb139d423bdb97075b4b5fa72e44ffc80ea3f810ceff6429ec3d2a tor.initd 9028ac41e3acdf4405095addb69537e87edecafaec840296ac27a5a8992fe132dc822e4e4abb8826f76460c438da2719dea17859690d03e17198a82086a3d660 tor.confd" diff --git a/community/tor/tor.initd b/community/tor/tor.initd index 16faa64bc6..99ec8ae853 100644 --- a/community/tor/tor.initd +++ b/community/tor/tor.initd @@ -2,12 +2,14 @@ conffile="/etc/tor/torrc" pidfile="/run/tor/tor.pid" -graceful_timeout=${GRACEFUL_TIMEOUT:-60} +user="${user:-tor}" +graceful_timeout="${GRACEFUL_TIMEOUT:-60}" command="/usr/bin/tor" command_args="-f $conffile" command_background="yes" start_stop_daemon_args=" + --user $user --chdir /var/lib/tor --env HOME=/var/lib/tor" @@ -43,7 +45,7 @@ checkconfig() { start_pre() { checkconfig || return 1 - checkpath -d -m 0755 -o tor "$(dirname "$pidfile")" + checkpath -d -m 0755 -o "$user" "$(dirname "$pidfile")" } gracefulstop() { |