summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
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;