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/lib/vty.c b/lib/vty.c
index edfd99d..8ba9970 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2185,6 +2185,14 @@
   close (sav);
   close (tmp);
   
+  if (chmod(fullpath_tmp, CONFIGFILE_MASK) != 0)
+    {
+      free (fullpath_sav);
+      free (fullpath_tmp);
+      unlink (fullpath_tmp);
+      return NULL;
+    }
+  
   if (link (fullpath_tmp, fullpath) == 0)
     ret = fopen (fullpath, "r");