Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 473630 Details for
Bug 601510
net-dns/bind-9.10.4_p4 (OpenRC): pidfile issues (can make an selinux enabled system unusable)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to /etc/init.d/named
named.diff (text/plain), 2.37 KB, created by
Alexander Wetzel
on 2017-05-21 10:38:00 UTC
(
hide
)
Description:
patch to /etc/init.d/named
Filename:
MIME Type:
Creator:
Alexander Wetzel
Created:
2017-05-21 10:38:00 UTC
Size:
2.37 KB
patch
obsolete
>--- named.dist 2017-05-19 21:41:57.090136000 +0200 >+++ named 2017-05-20 20:51:41.092977063 +0200 >@@ -27,8 +27,8 @@ > return 1 > fi > >- from=$1 >- to=$2 >+ from=$(echo $1 | sed 's#//*#/#g') >+ to=$(echo $2 | sed 's#//*#/#g') > shift 2 > > opts="${*}" >@@ -47,7 +47,7 @@ > } > > _umount() { >- local dir=$1 >+ local dir=$(echo $1 | sed 's#//*#/#g') > local ret=0 > > if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then >@@ -64,9 +64,9 @@ > > _get_pidfile() { > # as suggested in bug #107724, bug 335398#c17 >- [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\ >+ [ -n "${PIDFILE}" ] || PIDFILE=$(\ > /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} | grep 'pid-file' | cut -d\" -f2) >- [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/run/named/named.pid >+ [ -z "${PIDFILE}" ] && PIDFILE=/run/named/named.pid > } > > check_chroot() { >@@ -119,6 +119,15 @@ > > ebegin "Starting ${CHROOT:+chrooted }named" > >+ # create piddir (usually /run/named) if necessary, bug 334535 >+ _get_pidfile >+ piddir=${PIDFILE%/*} >+ checkpath -q -d -o root:named -m 0770 "${piddir}" || { >+ eerror "Failed to create PID directory at $piddir" >+ eend 1 >+ return 1 >+ } >+ > if [ -n "${CHROOT}" ]; then > if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then > check_chroot || { >@@ -147,27 +156,15 @@ > _mount /etc/bind ${CHROOT}/etc/bind -o bind > _mount /var/bind ${CHROOT}/var/bind -o bind > _mount /var/log/named ${CHROOT}/var/log/named -o bind >+ _mount ${piddir} ${CHROOT}/${piddir} -o bind > if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then > _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind > fi > fi >- >- # On initial startup, if piddir inside the chroot /var/run/named >- # Then the .../var/run part might not exist yet >- checkpath -q -d -o root:root -m 0755 "${piddir}/.." > fi > > checkconfig || { eend 1; return 1; } > >- # create piddir (usually /run/named) if necessary, bug 334535 >- _get_pidfile >- piddir="${PIDFILE%/*}" >- checkpath -q -d -o root:named -m 0770 "${piddir}" || { >- eerror "Failed to create PID directory at $piddir" >- eend 1 >- return 1 >- } >- > # In case someone have $CPU set in /etc/conf.d/named > if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then > CPU="-n ${CPU}" >@@ -221,6 +218,7 @@ > done > > [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP >+ _umount ${CHROOT}/${PIDFILE%/*} > _umount ${CHROOT}/etc/bind > _umount ${CHROOT}/var/log/named > _umount ${CHROOT}/var/bind
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
Actions:
View
|
Diff
Attachments on
bug 601510
:
454966
|
473630
|
473634