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/command.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/command.c')
-rw-r--r-- | lib/command.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c index 8c60fc4f..43a0bb3f 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2552,6 +2552,14 @@ DEFUN (config_write_file, free (config_file_sav); free (config_file_tmp); + + if (chmod (config_file, CONFIGFILE_MASK) != 0) + { + vty_out (vty, "Can't chmod configuration file %s: %s (%d).%s", + config_file, strerror(errno), errno, VTY_NEWLINE); + return CMD_WARNING; + } + vty_out (vty, "Configuration saved to %s%s", config_file, VTY_NEWLINE); return CMD_SUCCESS; |