From 2b3b41df2aa34789101f2609cbae858107e4d2ab Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Thu, 20 Sep 2012 18:42:49 +0200
Subject: [PATCH] utils.filelock: Remove executable bit from lock files

There's no need for lock files to be executable.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
---
 lib/utils/filelock.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/utils/filelock.py b/lib/utils/filelock.py
index 58b32bcff..879dfd9f1 100644
--- a/lib/utils/filelock.py
+++ b/lib/utils/filelock.py
@@ -73,7 +73,7 @@ class FileLock(object):
     # Using "os.open" is necessary to allow both opening existing file
     # read/write and creating if not existing. Vanilla "open" will truncate an
     # existing file -or- allow creating if not existing.
-    return cls(os.fdopen(os.open(filename, os.O_RDWR | os.O_CREAT), "w+"),
+    return cls(os.fdopen(os.open(filename, os.O_RDWR | os.O_CREAT, 0664), "w+"),
                filename)
 
   def __del__(self):
-- 
GitLab