From a29216b1e1a56867b6da2b5526b0bd44ea6c2c05 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 12 Aug 2009 13:46:13 +0200 Subject: [PATCH] vty/command: Use CONFIGFILE_MASK as mask in chmod and not as mode. --- openbsc/src/vty/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsc/src/vty/command.c b/openbsc/src/vty/command.c index c32e703f4..6372fb13b 100644 --- a/openbsc/src/vty/command.c +++ b/openbsc/src/vty/command.c @@ -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;