diff options
author | gdt <gdt> | 2003-12-22 20:15:53 +0000 |
---|---|---|
committer | gdt <gdt> | 2003-12-22 20:15:53 +0000 |
commit | aa593d5e2638566ead1e69381e60639550991ff2 (patch) | |
tree | c865f642c1029fa47b8fc6cc86302468b9b2aef4 /lib/vty.c | |
parent | 47ce02a8f12134a6ba515fbf1d2b9276e39d4c06 (diff) |
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"); |