diff options
author | gdt <gdt> | 2003-12-22 20:15:53 +0000 |
---|---|---|
committer | gdt <gdt> | 2003-12-22 20:15:53 +0000 |
commit | 29d3f53fdb17548a020683f1cc18cb4b78a8116c (patch) | |
tree | bf1db2b34a5b03486d182ee6afc8c8295c60d715 /lib/vty.c | |
parent | a2be3c0db267692f66def274bac2afdf1596e7fb (diff) | |
download | quagga-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.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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"); |