Even more sane permissions. This should be handled via a umask, like in many other...
authorJason Parker <jparker@digium.com>
Tue, 12 Feb 2008 20:27:01 +0000 (20:27 +0000)
committerJason Parker <jparker@digium.com>
Tue, 12 Feb 2008 20:27:01 +0000 (20:27 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103474 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 22495c5..ee370c3 100644 (file)
@@ -1425,7 +1425,7 @@ static int action_createconfig(struct mansession *s, const struct message *m)
        ast_str_set(&filepath, 0, "%s/", ast_config_AST_CONFIG_DIR);
        ast_str_append(&filepath, 0, "%s", fn);
 
-       if ((fd = open(filepath->str, O_CREAT | O_EXCL, 0644)) != -1) {
+       if ((fd = open(filepath->str, O_CREAT | O_EXCL, AST_FILE_MODE)) != -1) {
                close(fd);
                astman_send_ack(s, m, "New configuration file created successfully");
        } else