mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-22 14:23:04 +01:00
remove all trace from the various contrib/ scripts that tor used
to have a 'group' option. svn:r17236
This commit is contained in:
parent
fea2bd4ac1
commit
00e3d7b4a9
4 changed files with 5 additions and 13 deletions
|
@ -9,8 +9,8 @@
|
||||||
# This script provides prioritization of Tor traffic below other
|
# This script provides prioritization of Tor traffic below other
|
||||||
# traffic on a Linux server. It has two modes of operation: UID based
|
# traffic on a Linux server. It has two modes of operation: UID based
|
||||||
# and IP based. The UID based method requires that Tor be launched from
|
# and IP based. The UID based method requires that Tor be launched from
|
||||||
# a specific user ID. The "User" and "Group" Tor config settings are
|
# a specific user ID. The "User" Tor config setting is
|
||||||
# insufficient, as they set the UID after the socket is created.
|
# insufficient, as it sets the UID after the socket is created.
|
||||||
# Here is a three line C wrapper you can use to execute Tor and drop
|
# Here is a three line C wrapper you can use to execute Tor and drop
|
||||||
# privs to UID 501 before it creates any sockets. Change the UID
|
# privs to UID 501 before it creates any sockets. Change the UID
|
||||||
# to the UID for your tor server user, and compile with
|
# to the UID for your tor server user, and compile with
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
DEV=eth0
|
DEV=eth0
|
||||||
|
|
||||||
# NOTE! You must START Tor under this UID. Using the Tor User/Group
|
# NOTE! You must START Tor under this UID. Using the Tor User
|
||||||
# config setting is NOT sufficient.
|
# config setting is NOT sufficient.
|
||||||
TOR_UID=$(id -u tor)
|
TOR_UID=$(id -u tor)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
# tor_conf (str): Points to your tor conf file
|
# tor_conf (str): Points to your tor conf file
|
||||||
# Default: /usr/local/etc/tor/torrc
|
# Default: /usr/local/etc/tor/torrc
|
||||||
# tor_user (str): Tor Daemon user. Default _tor
|
# tor_user (str): Tor Daemon user. Default _tor
|
||||||
# tor_groupr (str): Tor Daemon group. Default _tor
|
|
||||||
#
|
#
|
||||||
|
|
||||||
. /etc/rc.subr
|
. /etc/rc.subr
|
||||||
|
@ -27,7 +26,6 @@ load_rc_config ${name}
|
||||||
: ${tor_enable="NO"}
|
: ${tor_enable="NO"}
|
||||||
: ${tor_conf="/usr/local/etc/tor/torrc"}
|
: ${tor_conf="/usr/local/etc/tor/torrc"}
|
||||||
: ${tor_user="_tor"}
|
: ${tor_user="_tor"}
|
||||||
: ${tor_group="_tor"}
|
|
||||||
: ${tor_pidfile="/var/run/tor/tor.pid"}
|
: ${tor_pidfile="/var/run/tor/tor.pid"}
|
||||||
: ${tor_logfile="/var/log/tor"}
|
: ${tor_logfile="/var/log/tor"}
|
||||||
: ${tor_datadir="/var/run/tor"}
|
: ${tor_datadir="/var/run/tor"}
|
||||||
|
@ -35,7 +33,7 @@ load_rc_config ${name}
|
||||||
required_files=${tor_conf}
|
required_files=${tor_conf}
|
||||||
required_dirs=${tor_datadir}
|
required_dirs=${tor_datadir}
|
||||||
command="/usr/local/bin/${name}"
|
command="/usr/local/bin/${name}"
|
||||||
command_args="-f ${tor_conf} --pidfile ${tor_pidfile} --runasdaemon 1 --datadirectory ${tor_datadir} --user ${tor_user} --group ${tor_group}"
|
command_args="-f ${tor_conf} --pidfile ${tor_pidfile} --runasdaemon 1 --datadirectory ${tor_datadir} --user ${tor_user}"
|
||||||
extra_commands="log"
|
extra_commands="log"
|
||||||
log_cmd="${name}_log"
|
log_cmd="${name}_log"
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,6 @@ TORCTL=@BINDIR@/torctl
|
||||||
# torctl will use these environment variables
|
# torctl will use these environment variables
|
||||||
TORUSER=@TORUSER@
|
TORUSER=@TORUSER@
|
||||||
export TORUSER
|
export TORUSER
|
||||||
TORGROUP=@TORGROUP@
|
|
||||||
export TORGROUP
|
|
||||||
|
|
||||||
if [ -x /bin/su ] ; then
|
if [ -x /bin/su ] ; then
|
||||||
SUPROG=/bin/su
|
SUPROG=/bin/su
|
||||||
|
|
|
@ -41,22 +41,18 @@ TORDATA="@LOCALSTATEDIR@/lib/tor"
|
||||||
TORARGS="--pidfile $PIDFILE --log \"notice file $LOGFILE\" --runasdaemon 1"
|
TORARGS="--pidfile $PIDFILE --log \"notice file $LOGFILE\" --runasdaemon 1"
|
||||||
TORARGS="$TORARGS --datadirectory $TORDATA"
|
TORARGS="$TORARGS --datadirectory $TORDATA"
|
||||||
|
|
||||||
# If user and group names are set in the environment, then use them;
|
# If user name is set in the environment, then use it;
|
||||||
# otherwise run as the invoking user (or whatever user the config
|
# otherwise run as the invoking user (or whatever user the config
|
||||||
# file says)... unless the invoking user is root. The idea here is to
|
# file says)... unless the invoking user is root. The idea here is to
|
||||||
# let an unprivileged user run tor for her own use using this script,
|
# let an unprivileged user run tor for her own use using this script,
|
||||||
# while still providing for it to be used as a system daemon.
|
# while still providing for it to be used as a system daemon.
|
||||||
if [ "x`id -u`" = "x0" ]; then
|
if [ "x`id -u`" = "x0" ]; then
|
||||||
TORUSER=@TORUSER@
|
TORUSER=@TORUSER@
|
||||||
TORGROUP=@TORGROUP@
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$TORUSER" != "x" ]; then
|
if [ "x$TORUSER" != "x" ]; then
|
||||||
TORARGS="$TORARGS --user $TORUSER"
|
TORARGS="$TORARGS --user $TORUSER"
|
||||||
fi
|
fi
|
||||||
if [ "x$TORGROUP" != "x" ]; then
|
|
||||||
TORARGS="$TORARGS --group $TORGROUP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We no longer wrap the Tor daemon startup in an su when running as
|
# We no longer wrap the Tor daemon startup in an su when running as
|
||||||
# root, because it's too painful to make the use of su portable.
|
# root, because it's too painful to make the use of su portable.
|
||||||
|
|
Loading…
Add table
Reference in a new issue