FreeBSD Bugzilla – Attachment 174584 Details for
Bug 212529
security/tor: Added auto-creation of db and run, added warning about the tor2web option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
tor.patch (text/plain), 2.14 KB, created by
Yuri Victorovich
on 2016-09-09 16:55:25 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Yuri Victorovich
Created:
2016-09-09 16:55:25 UTC
Size:
2.14 KB
patch
obsolete
>Index: security/tor/Makefile >=================================================================== >--- security/tor/Makefile (revision 421622) >+++ security/tor/Makefile (working copy) >@@ -27,7 +27,7 @@ > > STATIC_TOR_DESC= Build a static tor > TCMALLOC_DESC= Use the tcmalloc memory allocation library >-TOR2WEB_DESC= Faster but non-anonymous hidden services >+TOR2WEB_DESC= (EXPERT OPTION) Faster but non-anonymous hidden services > TRANSPARENT_DESC= Transparent proxy support > > OPTIONS_DEFAULT= TRANSPARENT >@@ -34,6 +34,7 @@ > > USE_RC_SUBR= tor > SUB_FILES= pkg-message >+SUB_LIST= USER="${USERS}" GROUP="${GROUPS}" > > GROUPS= _tor > USERS= _tor >@@ -86,6 +87,16 @@ > CONFIGURE_ARGS+= --disable-transparent > .endif > >+pre-everything:: >+.if ${PORT_OPTIONS:MTOR2WEB} >+ @${ECHO_MSG} >+ @${ECHO_MSG} "Warning: The expert option 'tor2web' is chosen." >+ @${ECHO_MSG} " With this option tor cannot be used for regular traffic," >+ @${ECHO_MSG} " only for non-anonymous hidden service traffic." >+ @${ECHO_MSG} " Please make sure you understand this option." >+ @${ECHO_MSG} >+.endif >+ > post-patch: > @${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \ > ${WRKSRC}/configure >Index: security/tor/files/tor.in >=================================================================== >--- security/tor/files/tor.in (revision 421622) >+++ security/tor/files/tor.in (working copy) >@@ -26,7 +26,8 @@ > > : ${tor_enable="NO"} > : ${tor_conf="%%PREFIX%%/etc/tor/torrc"} >-: ${tor_user="_tor"} >+: ${tor_user="%%USER%%"} >+: ${tor_group="%%GROUP%%"} > : ${tor_pidfile="/var/run/tor/tor.pid"} > : ${tor_datadir="/var/db/tor"} > >@@ -37,5 +38,23 @@ > command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}" > extra_commands="reload" > >+mkDir() { >+ local dir=$1 >+ local what=$2 >+ echo "${name}: creating the ${what} directory: ${dir}" >+ mkdir ${dir} >+ chown ${tor_user}:${tor_group} ${dir} >+ chmod 0700 ${dir} >+} >+ >+# create datadir if it doesn't exist >+if ! [ -d ${tor_datadir} ]; then >+ mkDir ${tor_datadir} "data" >+fi >+# create rundir if it doesn't exist >+if ! [ -d ${tor_pidfile%/*} ]; then >+ mkDir ${tor_pidfile%/*} "run" >+fi >+ > run_rc_command "$1" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
yuri
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 212529
:
174582
|
174583
| 174584