Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164282828
D11223.id29670.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11223.id29670.diff
View Options
Index: security/tor/Makefile
===================================================================
--- security/tor/Makefile
+++ security/tor/Makefile
@@ -3,6 +3,7 @@
PORTNAME= tor
PORTVERSION= 0.3.0.8
+PORTREVISION= 1
CATEGORIES= security net ipv6
MASTER_SITES= TOR
Index: security/tor/files/tor.in
===================================================================
--- security/tor/files/tor.in
+++ security/tor/files/tor.in
@@ -21,6 +21,7 @@
# tor_disable_default_instance (str): Doesn't run the default instance.
# Only valid when tor_instances is used.
# Default: NO
+# tor_setuid (str): Runtime setuid. Default: NO
#
# The instance definition that tor_instances expects:
# inst_name{:inst_conf:inst_user:inst_group:inst_pidfile:inst_data_dir}
@@ -42,6 +43,7 @@
: ${tor_pidfile="/var/run/tor/tor.pid"}
: ${tor_datadir="/var/db/tor"}
: ${tor_disable_default_instance="NO"}
+: ${tor_setuid="NO"}
instance=${slave_instance}
if [ -n "${instance}" ]; then
@@ -112,6 +114,18 @@
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}"
extra_commands="reload"
+if [ $tor_setuid = "YES" ]; then
+ if ! grep -q "^User ${tor_user}$" ${tor_conf}; then
+ echo "User ${tor_user}" >> ${tor_conf}
+ fi
+ tor_user="root"
+ tor_group="wheel"
+else
+ if grep -q "^User ${tor_user}$" ${tor_conf}; then
+ sed -i '' -e "s/^User ${tor_user}$//" ${tor_conf}
+ fi
+fi
+
if ! run_rc_command "$1"; then
exit_code=1
fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 31, 9:07 AM (14 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35778548
Default Alt Text
D11223.id29670.diff (1 KB)
Attached To
Mode
D11223: security/tor: Implemented setuid feature
Attached
Detach File
Event Timeline
Log In to Comment