Don't write pdnsd.conf if it doesn't exist or it's not writeable.
authorRoy Marples <roy@marples.name>
Mon, 25 Jul 2011 20:21:59 +0000 (20:21 +0000)
committerRoy Marples <roy@marples.name>
Mon, 25 Jul 2011 20:21:59 +0000 (20:21 +0000)
pdnsd.in

index f474196ef4c9237cea17ccbbdc550a7cd764a38a..8be0f9a0d006a4b7276dae187d97f77b7cc04099 100644 (file)
--- a/pdnsd.in
+++ b/pdnsd.in
@@ -98,7 +98,8 @@ if [ -n "$pdnsd_resolv" ]; then
        done
 fi
 
-if [ -n "$pdnsd_conf" ]; then
+# Only modify the configuration if it exists and we can write to it
+if [ -w "$pdnsd_conf" ]; then
        cf="$pdnsd_conf.new"
        newconf=