From 853e067e5532965de8807a0469b8a6c0c55653f7 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 23 Jan 2007 02:22:45 +0000 Subject: [PATCH] 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 --- src/switch_xml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_xml.c b/src/switch_xml.c index 44126125be..d179550e5c 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -856,11 +856,11 @@ static int preprocess(const char *file, int new_fd, int rlevel) } 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; } - 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; } close_fd = new_fd;