From eb583f656d3f611816198ffb48775d1228561689 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sun, 1 Jun 2008 00:55:52 -0300 Subject: [PATCH] Set a decent mode when creating the log file If we don't set the mode at creation time, it can end up with totally broken permissions. Signed-off-by: Alberto Bertogli --- nmdb/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nmdb/log.c b/nmdb/log.c index 89d107e..10e223d 100644 --- a/nmdb/log.c +++ b/nmdb/log.c @@ -26,7 +26,8 @@ int log_init(void) if (strcmp(settings.logfname, "-") == 0) { logfd = 1; } else { - logfd = open(settings.logfname, O_WRONLY | O_APPEND | O_CREAT); + logfd = open(settings.logfname, O_WRONLY | O_APPEND | O_CREAT, + 0660); if (logfd < 0) return 0; } -- 2.11.4.GIT