bind/named-bootconf.diff
Uwe Gansert a3097226b3 Accepting request 98618 from home:lmuelle:branches:network
- Ensure to create the required dir or sym link in /var/run; (bnc#738156).
- Cache lookup could return RRSIG data associated with nonexistent
  records, leading to an assertion failure. CVE-2011-4313; (bnc#730995).

OBS-URL: https://build.opensuse.org/request/show/98618
OBS-URL: https://build.opensuse.org/package/show/network/bind?expand=0&rev=80
2012-01-03 15:16:12 +00:00

24 lines
699 B
Diff

Index: contrib/named-bootconf/named-bootconf.sh
===================================================================
--- contrib/named-bootconf/named-bootconf.sh.orig
+++ contrib/named-bootconf/named-bootconf.sh
@@ -54,7 +54,8 @@
# POSSIBILITY OF SUCH DAMAGE.
if [ ${OPTIONFILE-X} = X ]; then
- WORKDIR=/tmp/`date +%s`.$$
+ TMPDIR=`mktemp -p /tmp/ -d named-bootconf.XXXXXXXXXX` || exit 1
+ WORKDIR=$TMPDIR/`date +%s`.$$
( umask 077 ; mkdir $WORKDIR ) || {
echo "unable to create work directory '$WORKDIR'" >&2
exit 1
@@ -308,7 +309,7 @@ if [ $DUMP -eq 1 ]; then
cat $ZONEFILE $COMMENTFILE
rm -f $OPTIONFILE $ZONEFILE $COMMENTFILE
- rmdir $WORKDIR
+ rm -rf $TMPDIR
fi
exit 0