guix-commits
[Top][All Lists]
Advanced

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

01/03: services: mpd: Make /var/run/mpd/USER user-owned.


From: guix-commits
Subject: 01/03: services: mpd: Make /var/run/mpd/USER user-owned.
Date: Sun, 6 Dec 2020 17:27:48 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit ce3b5e5a8d8566162201cb778c4586f94a626dfa
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Dec 5 15:00:48 2020 +0100

    services: mpd: Make /var/run/mpd/USER user-owned.
    
    Fixes <https://bugs.gnu.org/44820>.
    Reported by Simon <lists@netpanic.org>.
    
    This is a followup to bb124f6e9c0af0a23736f233c2ea2c9c9b4a40a6.
    
    * gnu/services/audio.scm (mpd-service-activation): Chown the parent of
    DIRECTORY as well.
---
 gnu/services/audio.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index 627b941..c60053f 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -163,7 +163,11 @@ audio_output {
 
         (let ((directory #$(mpd-file-name config ".mpd")))
           (mkdir-p directory)
-          (chown directory (passwd:uid %user) (passwd:gid %user))))))
+          (chown directory (passwd:uid %user) (passwd:gid %user))
+
+          ;; Make /var/run/mpd/USER user-owned as well.
+          (chown (dirname directory)
+                 (passwd:uid %user) (passwd:gid %user))))))
 
 
 (define %mpd-accounts



reply via email to

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