Package: pdnsd
Version: 1.2.5par-2
Severity: important

Hi,

resolvconf script incorrectly expects the output
of /lib/resolvconf/list-records to be non-empty. When an empty list is
returned, the script hangs because cat expects data from stdin.

On my configuration, this bug disallows the machine to shutdown
correctly, and it also needs some Ctrl-C hitting to boot.

Patch attached.

-- 
Jindrich Makovicka
--- pdnsd.orig	2007-07-22 12:08:05.000000000 +0200
+++ pdnsd	2007-07-22 12:04:52.000000000 +0200
@@ -37,9 +37,15 @@
 	done
 }
 
-uniquify "`cat $(/lib/resolvconf/list-records)                      \
-            | sed -n -e 's/^[[:space:]]*nameserver[[:space:]]\+//p' \
-            | grep -v '^127.0.0.1$'`"
+FILES=$(/lib/resolvconf/list-records)
+
+if test -n "$FILES" ; then
+    uniquify "`cat $FILES \
+                | sed -n -e 's/^[[:space:]]*nameserver[[:space:]]\+//p' \
+                | grep -v '^127.0.0.1$'`"
+else
+    RSLT=""
+fi
 
 if [ -n "$RSLT" ] ; then
 	OUTPUT="$(/usr/sbin/pdnsd-ctl server resolvconf up "$RSLT" || :)"

Reply via email to