summaryrefslogtreecommitdiffstats
path: root/lib/command.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/command.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/command.c')
-rw-r--r--lib/command.c8
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;