View | Details | Raw Unified | Return to bug 218587
Collapse All | Expand All

(-)security/tor/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	tor
4
PORTNAME=	tor
5
PORTVERSION=	0.3.0.8
5
PORTVERSION=	0.3.0.8
6
PORTREVISION=	1
6
CATEGORIES=	security net ipv6
7
CATEGORIES=	security net ipv6
7
MASTER_SITES=	TOR
8
MASTER_SITES=	TOR
8
9
(-)security/tor/files/tor.in (+14 lines)
Lines 21-26 Link Here
21
# tor_disable_default_instance (str):	Doesn't run the default instance.
21
# tor_disable_default_instance (str):	Doesn't run the default instance.
22
#			Only valid when tor_instances is used.
22
#			Only valid when tor_instances is used.
23
#			Default: NO
23
#			Default: NO
24
# tor_setuid (str):	Runtime setuid.  Default: NO
24
#
25
#
25
# The instance definition that tor_instances expects:
26
# The instance definition that tor_instances expects:
26
# inst_name{:inst_conf:inst_user:inst_group:inst_pidfile:inst_data_dir}
27
# inst_name{:inst_conf:inst_user:inst_group:inst_pidfile:inst_data_dir}
Lines 42-47 Link Here
42
: ${tor_pidfile="/var/run/tor/tor.pid"}
43
: ${tor_pidfile="/var/run/tor/tor.pid"}
43
: ${tor_datadir="/var/db/tor"}
44
: ${tor_datadir="/var/db/tor"}
44
: ${tor_disable_default_instance="NO"}
45
: ${tor_disable_default_instance="NO"}
46
: ${tor_setuid="NO"}
45
47
46
instance=${slave_instance}
48
instance=${slave_instance}
47
if [ -n "${instance}" ]; then
49
if [ -n "${instance}" ]; then
Lines 112-117 Link Here
112
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}"
114
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}"
113
extra_commands="reload"
115
extra_commands="reload"
114
116
117
if [ $tor_setuid = "YES" ]; then
118
  if ! grep -q "^User ${tor_user}$" ${tor_conf}; then
119
    echo "User ${tor_user}" >> ${tor_conf}
120
  fi
121
  tor_user="root"
122
  tor_group="wheel"
123
else
124
  if grep -q "^User ${tor_user}$" ${tor_conf}; then
125
    sed -i '' -e "s/^User ${tor_user}$//" ${tor_conf}
126
  fi
127
fi
128
115
if ! run_rc_command "$1"; then
129
if ! run_rc_command "$1"; then
116
  exit_code=1
130
  exit_code=1
117
fi
131
fi

Return to bug 218587