summaryrefslogtreecommitdiff
path: root/gnu/build/shepherd.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-09-27 19:11:27 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-09-27 19:11:27 +0200
commite7f62a41b245ca30404c54f3f77930336627c2f7 (patch)
tree4b2a24dcc84f137b92ca581dba96cf7abac70439 /gnu/build/shepherd.scm
parent1fdab9d3b3e78b0c90b52567be5535a861a7273d (diff)
parentb48eb1e934f1d457ff6a0fec1c572bb12ed15fab (diff)
downloadguix-patches-e7f62a41b245ca30404c54f3f77930336627c2f7.tar
guix-patches-e7f62a41b245ca30404c54f3f77930336627c2f7.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/build/shepherd.scm')
-rw-r--r--gnu/build/shepherd.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index b32765ed5e..14bdf4edb8 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -150,14 +150,16 @@ namespace, in addition to essential bind-mounts such /proc."
(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))))
+ (call-with-output-file log-file (const #t))
+ (when user
+ (let ((pw (getpwnam user)))
+ (chown log-file (passwd:uid pw) (passwd:gid pw))))))
(let ((pid (run-container container-directory
mounts namespaces 1
(lambda ()
(mkdir-p "/var/run")
(clean-up pid-file)
- (clean-up log-file)
(exec-command command
#:user user