Ok, folks, this is a patch that permits FIFOs as log files.

diff -Naur bind-9.10.2-original/bin/named/logconf.c bind-9.10.2-patched/bin/named/logconf.c
--- bind-9.10.2-original/bin/named/logconf.c    2015-02-18 02:55:55.000000000 +0100
+++ bind-9.10.2-patched/bin/named/logconf.c     2015-03-01 21:05:16.000000000 +0100
@@ -232,7 +232,7 @@
                 * Test to make sure that file is a plain file.
                 * Fix defect #22771
                */
-               result = isc_file_isplainfile(dest.file.name);
+               result = isc_file_isplainfile_or_fifo(dest.file.name);
                if (result == ISC_R_SUCCESS || result == ISC_R_FILENOTFOUND) {
                        /*
                         * Test that the file can be opened, since
diff -Naur bind-9.10.2-original/lib/isc/unix/file.c bind-9.10.2-patched/lib/isc/unix/file.c
--- bind-9.10.2-original/lib/isc/unix/file.c    2015-02-18 02:55:55.000000000 +0100
+++ bind-9.10.2-patched/lib/isc/unix/file.c     2015-03-01 21:13:53.000000000 +0100
@@ -439,6 +439,24 @@
        return(ISC_R_SUCCESS);
 }
 
+
+isc_result_t
+isc_file_isplainfile_or_fifo (const char *filename) {
+       /*
+        * This function returns success if filename is a plain file.
+        */
+       struct stat filestat;
+       memset(&filestat,0,sizeof(struct stat));
+
+       if ((stat(filename, &filestat)) == -1)
+               return(isc__errno2result(errno));
+
+       if(! ( S_ISREG(filestat.st_mode) || S_ISFIFO(filestat.st_mode) ) )
+               return(ISC_R_INVALIDFILE);
+
+       return(ISC_R_SUCCESS);
+}
+
 isc_result_t
 isc_file_isplainfilefd(int fd) {
        /*
 

Reply via email to