GNU bug report logs -
#67867
[PATCH shepherd] service: fix ownership+permissions on Unix sockets
Previous Next
Reported by: Ulrich Baum <ulrich.baum <at> ubaum.de>
Date: Sun, 17 Dec 2023 15:53:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 1 year and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.