FreeBSD Bugzilla – Attachment 227394 Details for
Bug 249151
security/stunnel: cannot create pid file when setuid set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for security/stunnel
patch-stunnel-bug249151.diff (text/plain), 2.79 KB, created by
Tatsuki Makino
on 2021-08-24 00:03:50 UTC
(
hide
)
Description:
patch for security/stunnel
Filename:
MIME Type:
Creator:
Tatsuki Makino
Created:
2021-08-24 00:03:50 UTC
Size:
2.79 KB
patch
obsolete
>diff --git security/stunnel/Makefile security/stunnel/Makefile >index 764412548..839c1afb1 100644 >--- security/stunnel/Makefile >+++ security/stunnel/Makefile >@@ -35,6 +35,10 @@ GNU_CONFIGURE= yes > CONFIGURE_ARGS= --localstatedir=/var/tmp --enable-static --disable-systemd \ > --with-ssl="${OPENSSLBASE}" > SHEBANG_FILES= src/stunnel3.in >+SUB_FILES= pid.conf >+SUB_LIST= STUNNEL_PIDFILE=${STUNNEL_PIDFILE} \ >+ STUNNEL_USER=${STUNNEL_USER} \ >+ STUNNEL_GROUP=${STUNNEL_GROUP} > > OPTIONS_DEFINE= DOCS EXAMPLES FIPS IPV6 LIBWRAP > OPTIONS_SINGLE= THREAD >@@ -50,6 +54,7 @@ FORK_DESC= Use the fork(3) threading model > PTHREAD_DESC= Use the pthread(3) threading model > UCONTEXT_DESC= Use the ucontext(3) threading model > >+STUNNEL_PIDFILE= /var/run/stunnel/stunnel.pid > STUNNEL_USER?= stunnel > STUNNEL_GROUP?= stunnel > >@@ -109,7 +114,7 @@ post-build: > > post-install: > ${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d/ >- ${INSTALL_DATA} ${FILESDIR}/pid.conf ${STAGEDIR}${ETCDIR}/conf.d/00-pid.conf >+ ${INSTALL_DATA} ${WRKDIR}/pid.conf ${STAGEDIR}${ETCDIR}/conf.d/00-pid.conf > > cert: > @${ECHO} "" >diff --git security/stunnel/files/pid.conf security/stunnel/files/pid.conf >deleted file mode 100644 >index f2b23cc18..000000000 >--- security/stunnel/files/pid.conf >+++ /dev/null >@@ -1 +0,0 @@ >-pid = /var/run/stunnel.pid >diff --git security/stunnel/files/pid.conf.in security/stunnel/files/pid.conf.in >new file mode 100644 >index 000000000..92969126e >--- /dev/null >+++ security/stunnel/files/pid.conf.in >@@ -0,0 +1 @@ >+pid = %%STUNNEL_PIDFILE%% >diff --git security/stunnel/files/stunnel.in security/stunnel/files/stunnel.in >index a36dd7eb0..0d90942e1 100644 >--- security/stunnel/files/stunnel.in >+++ security/stunnel/files/stunnel.in >@@ -13,9 +13,11 @@ > # Set it to the full path to the config file > # that stunnel will use during the automated > # start-up. >-# stunnel_pidfile (str): Default "%%PREFIX%%/var/stunnel/stunnel.pid" >+# stunnel_pidfile (str): Default "%%STUNNEL_PIDFILE%%" > # Set it to the value of 'pid' in > # the stunnel.conf file. >+# stunnel_uid (str): Default "%%STUNNEL_USER%%" >+# stunnel_gid (str): Default "%%STUNNEL_GROUP%%" > # > > . /etc/rc.subr >@@ -27,7 +29,9 @@ load_rc_config $name > > : ${stunnel_enable="NO"} > : ${stunnel_config="%%ETCDIR%%/${name}.conf"} >-: ${stunnel_pidfile="/var/run/${name}.pid"} >+: ${stunnel_pidfile="%%STUNNEL_PIDFILE%%"} >+: ${stunnel_uid="%%STUNNEL_USER%%"} >+: ${stunnel_gid="%%STUNNEL_GROUP%%"} > > command="%%PREFIX%%/bin/stunnel" > command_args=${stunnel_config} >@@ -35,4 +39,14 @@ pidfile=${stunnel_pidfile} > > required_files="${stunnel_config}" > >+start_precmd=stunnel_start_precmd >+ >+stunnel_start_precmd () { >+ local piddir >+ piddir=`/usr/bin/dirname "${pidfile}"` >+ if [ ! -d "${piddir}" ] ; then >+ /usr/bin/install -d -o "${stunnel_uid}" -g "${stunnel_gid}" "${piddir}" >+ 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:
tatsuki_makino
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 249151
:
222319
| 227394