2003-12-22 Christian Hammers <ch@lathspell.de>

        * configure.ac (and everywhere a regular file is opened for
          writing): use file permissions from configure rather than
          compiled-in umask.
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c
index 7dc64c6..9690fb5 100644
--- a/bgpd/bgp_dump.c
+++ b/bgpd/bgp_dump.c
@@ -95,6 +95,7 @@
   struct tm *tm;
   char fullpath[MAXPATHLEN];
   char realpath[MAXPATHLEN];
+  mode_t oldumask;
 
   time (&clock);
   tm = localtime (&clock);
@@ -117,10 +118,15 @@
     fclose (bgp_dump->fp);
 
 
+  oldumask = umask(0777 & ~LOGFILE_MASK);
   bgp_dump->fp = fopen (realpath, "w");
 
   if (bgp_dump->fp == NULL)
-    return NULL;
+    {
+      umask(oldumask);
+      return NULL;
+    }
+  umask(oldumask);  
 
   return bgp_dump->fp;
 }