vty/command: Use CONFIGFILE_MASK as mask in chmod and not as mode.

This commit is contained in:
Stefan Schmidt 2009-08-12 13:46:13 +02:00 committed by Harald Welte
parent beccbc3fbe
commit a29216b1e1
1 changed files with 1 additions and 1 deletions

View File

@ -2541,7 +2541,7 @@ DEFUN(config_write_file,
talloc_free(config_file_sav);
talloc_free(config_file_tmp);
if (chmod(config_file, CONFIGFILE_MASK) != 0) {
if (chmod(config_file, 0666 & ~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;