Make log path absolute
authorJamie Cameron <jcameron@webmin.com>
Sun, 17 Oct 2010 21:32:41 +0000 (14:32 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sun, 17 Oct 2010 21:32:41 +0000 (14:32 -0700)
bind8/lang/en
bind8/save_logging.cgi

index 02184fb..5dcb099 100644 (file)
@@ -544,6 +544,7 @@ logging_none=No logging channels defined.
 logging_err=Failed to save logging options
 logging_ename='$1' is not a valid channel name
 logging_efile=Missing log filename
+logging_efile2=Log filename must be an absolute path
 logging_ever='$1' is not a valid number of versions
 logging_esize='$1' is not a valid log size
 
index 972b86d..ff66586 100755 (executable)
@@ -32,6 +32,8 @@ else {
                local @mems;
                if ($in{"to_$i"} == 0) {
                        $in{"file_$i"} || &error($text{'logging_efile'});
+                       $in{"file_$i"} =~ /^\// ||
+                               &error($text{'logging_efile2'});
                        local @fvals = ( $in{"file_$i"} );
                        if ($in{"vmode_$i"} == 1) {
                                push(@fvals, 'versions', 'unlimited');