Patchwork [1,of,3,STABLE] server: drop executable bit from daemon log file

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 25, 2017, 1:51 p.m.
Message ID <8fe892cbca35e4bc0922.1508939460@mimosa>
Download mbox | patch
Permalink /patch/25283/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 25, 2017, 1:51 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1508934001 -32400
#      Wed Oct 25 21:20:01 2017 +0900
# Branch stable
# Node ID 8fe892cbca35e4bc0922e9383b186f870e3489e3
# Parent  a6a322193a0227629dec874801b0a013274e0ca3
server: drop executable bit from daemon log file

The logfile option was unused, so it was okay until now.

Patch

diff --git a/mercurial/server.py b/mercurial/server.py
--- a/mercurial/server.py
+++ b/mercurial/server.py
@@ -93,7 +93,8 @@  def runservice(opts, parentfn=None, init
         nullfd = os.open(os.devnull, os.O_RDWR)
         logfilefd = nullfd
         if logfile:
-            logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND)
+            logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND,
+                                0o666)
         os.dup2(nullfd, 0)
         os.dup2(logfilefd, 1)
         os.dup2(logfilefd, 2)