all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ulrich Baum <ulrich.baum@ubaum.de>
To: 67867@debbugs.gnu.org
Subject: [bug#67867] [PATCH shepherd] service: fix ownership+permissions on Unix sockets
Date: Sun, 17 Dec 2023 14:38:12 +0100 (CET)	[thread overview]
Message-ID: <656849315.83800.1702820292582@office.mailbox.org> (raw)

Previously, ownership and permissions of AF_UNIX sockets created by
make-inetd-constructor and make-systemd-constructor were not set,
leaving the socket with root:root and 755 permissions.

modules/shepherd/service.scm (endpoint->listening-socket): fix chown and
chmod calls
---
 modules/shepherd/service.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 41c6248..f22aaaf 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1867,8 +1867,8 @@ retrying to bind it in one second.")
        (listen sock backlog)

        (when (= AF_UNIX (sockaddr:fam address))
-         (chown sock owner group)
-         (chmod sock #o666))
+         (chown (sockaddr:path address) owner group)
+         (chmod (sockaddr:path address) #o666))

        sock))))

--
2.43.0




             reply	other threads:[~2023-12-17 16:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-17 13:38 Ulrich Baum [this message]
2023-12-19 22:38 ` bug#67867: [PATCH shepherd] service: fix ownership+permissions on Unix sockets Ludovic Courtès

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=656849315.83800.1702820292582@office.mailbox.org \
    --to=ulrich.baum@ubaum.de \
    --cc=67867@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.