summaryrefslogtreecommitdiffstats
path: root/lib/vty.c
diff options
context:
space:
mode:
authorgdt <gdt>2003-12-22 20:15:53 +0000
committergdt <gdt>2003-12-22 20:15:53 +0000
commit29d3f53fdb17548a020683f1cc18cb4b78a8116c (patch)
treebf1db2b34a5b03486d182ee6afc8c8295c60d715 /lib/vty.c
parenta2be3c0db267692f66def274bac2afdf1596e7fb (diff)
downloadquagga-29d3f53fdb17548a020683f1cc18cb4b78a8116c.tar.bz2
quagga-29d3f53fdb17548a020683f1cc18cb4b78a8116c.tar.xz
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.
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/vty.c b/lib/vty.c
index edfd99dd..8ba99708 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2185,6 +2185,14 @@ vty_use_backup_config (char *fullpath)
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");