guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#57363] [PATCH] shepherd: Set #o640 permissions for log file of serv


From: Arun Isaac
Subject: [bug#57363] [PATCH] shepherd: Set #o640 permissions for log file of service in container.
Date: Tue, 23 Aug 2022 23:03:25 +0530

* gnu/build/shepherd.scm (make-forkexec-constructor/container): Set #o640
permissions for log file.
---
 gnu/build/shepherd.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index f4caefce3c..c7ba73967f 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017, 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Mathieu Othacehe <othacehe@gnu.org>
 ;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
+;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -187,6 +188,7 @@ (define mounts
       ;; Create LOG-FILE so we can map it in the container.
       (unless (file-exists? log-file)
         (call-with-output-file log-file (const #t))
+        (chmod log-file #o640)
         (when user
           (let ((pw (getpwnam user)))
             (chown log-file (passwd:uid pw) (passwd:gid pw))))))
-- 
2.37.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]