From b50f022fd853fa2fdc820b350882c774ea20acba Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 15 Oct 2007 13:04:35 +0000
Subject: [PATCH] Fix node daemon log file permissions

The creation of the log file for the node daemon lacks the mode
parameter, so after applying the current umask, the file got 0700
permissions. Restrict this to the correct 0600.

Reviewed-by: schreiberal
---
 daemons/ganeti-noded | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemons/ganeti-noded b/daemons/ganeti-noded
index 26e00ee19..454bc8c35 100755
--- a/daemons/ganeti-noded
+++ b/daemons/ganeti-noded
@@ -592,7 +592,7 @@ def createDaemon():
       os.close(fd)
     except OSError: # ERROR, fd wasn't open to begin with (ignored)
       pass
-  os.open(REDIRECT_TO, os.O_RDWR|os.O_CREAT|os.O_APPEND) # standard input (0)
+  os.open(REDIRECT_TO, os.O_RDWR|os.O_CREAT|os.O_APPEND, 0600)
   # Duplicate standard input to standard output and standard error.
   os.dup2(0, 1)     # standard output (1)
   os.dup2(0, 2)     # standard error (2)
-- 
GitLab