提交 853e067e authored 作者: Michael Jerris's avatar Michael Jerris

change new xml stuff to use path sep define, and to set file mode on open for write.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4028 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 88b2a865
...@@ -856,11 +856,11 @@ static int preprocess(const char *file, int new_fd, int rlevel) ...@@ -856,11 +856,11 @@ static int preprocess(const char *file, int new_fd, int rlevel)
} }
if (new_fd < 0) { if (new_fd < 0) {
if (!(new_file = switch_mprintf("%s/freeswitch.registry", SWITCH_GLOBAL_dirs.log_dir))) { if (!(new_file = switch_mprintf("%s%sfreeswitch.registry", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR))) {
goto done; goto done;
} }
if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 0)) < 0) { if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 700)) < 0) {
goto done; goto done;
} }
close_fd = new_fd; close_fd = new_fd;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论