mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
shepherd: Set #o640 permissions for log file of service in container.
* gnu/build/shepherd.scm (make-forkexec-constructor/container): Set #o640 permissions for log file.
This commit is contained in:
parent
162c7e1bc6
commit
3e866e24f0
1 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||
;;;
|
||||
|
@ -186,7 +187,7 @@ (define mounts
|
|||
(when log-file
|
||||
;; Create LOG-FILE so we can map it in the container.
|
||||
(unless (file-exists? log-file)
|
||||
(call-with-output-file log-file (const #t))
|
||||
(close (open log-file (logior O_CREAT O_APPEND O_CLOEXEC) #o640))
|
||||
(when user
|
||||
(let ((pw (getpwnam user)))
|
||||
(chown log-file (passwd:uid pw) (passwd:gid pw))))))
|
||||
|
|
Loading…
Reference in a new issue