Commit cd0b5244 authored by Jakub Jirutka's avatar Jakub Jirutka

community/tor: run as unprivileged user

parent bd84b033
......@@ -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"
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment