From: Arun Isaac <arunisaac@systemreboot.net>
To: 57363@debbugs.gnu.org
Cc: "Arun Isaac" <arunisaac@systemreboot.net>,
"Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#57363] [PATCH] shepherd: Set #o640 permissions for log file of service in container.
Date: Tue, 23 Aug 2022 23:03:25 +0530 [thread overview]
Message-ID: <20220823173325.30877-1-arunisaac@systemreboot.net> (raw)
In-Reply-To: <20220823173102.30242-1-arunisaac@systemreboot.net>
* 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
next prev parent reply other threads:[~2022-08-23 17:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 17:31 [bug#57363] [PATCH 0/1] Set #o640 permissions for log file of shepherd service in container Arun Isaac
2022-08-23 17:33 ` Arun Isaac [this message]
2022-08-26 14:48 ` Maxime Devos
2022-08-29 19:15 ` Arun Isaac
2022-08-29 19:15 ` [bug#57363] [PATCH v2] shepherd: Set #o640 permissions for log file of " Arun Isaac
2022-09-02 9:21 ` Ludovic Courtès
2022-09-02 11:20 ` bug#57363: " Arun Isaac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220823173325.30877-1-arunisaac@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=57363@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).