unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Fix systemd socket-unit example
@ 2020-12-03 11:54 Ulrich Ölmann
  2020-12-14 13:59 ` Ulrich Ölmann
  2020-12-14 15:03 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Ulrich Ölmann @ 2020-12-03 11:54 UTC (permalink / raw)
  To: Emacs development discussions; +Cc: Ulrich Ölmann

* doc/emacs/misc.texi (Emacs Server): The socket containing directory
is per default created with permissions 0755 by the socket-unit.
However this is considered unsafe since commit [1], so enhance unit
example with systemd configuration directive `DirectoryMode=' to
create it with safe permissions, see
https://www.freedesktop.org/software/systemd/man/systemd.socket.html#DirectoryMode=

[1] 2003-04-12 "(server-socket-name): Use new safe location for socket."
---
It took me some hours to track the problem down as `emacs --daemon'
did not complain about what it misliked and only refused to cooperate
with `emacsclient'. Unfortunately I am only a emacs user and no
developer so I do not know how to enhance that situation.

 doc/emacs/misc.texi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 4865ee175180..327ae3e31e30 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1709,6 +1709,7 @@ Emacs Server
 @example
 [Socket]
 ListenStream=/path/to/.emacs.socket
+DirectoryMode=0700
 
 [Install]
 WantedBy=sockets.target
-- 
2.29.2




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix systemd socket-unit example
  2020-12-03 11:54 [PATCH] Fix systemd socket-unit example Ulrich Ölmann
@ 2020-12-14 13:59 ` Ulrich Ölmann
  2020-12-14 14:12   ` Stefan Kangas
  2020-12-14 15:03 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Ulrich Ölmann @ 2020-12-14 13:59 UTC (permalink / raw)
  To: emacs-devel; +Cc: Ulrich Ölmann, Matthew Leach

Gentle ping!
(And putting the socket unit's original author Matthew on CC).

Ulrich


On Thu, Dec 03 2020 at 12:54 +0100, Ulrich Ölmann <u.oelmann@pengutronix.de> wrote:
> * doc/emacs/misc.texi (Emacs Server): The socket containing directory
> is per default created with permissions 0755 by the socket-unit.
> However this is considered unsafe since commit [1], so enhance unit
> example with systemd configuration directive `DirectoryMode=' to
> create it with safe permissions, see
> https://www.freedesktop.org/software/systemd/man/systemd.socket.html#DirectoryMode=
>
> [1] 2003-04-12 "(server-socket-name): Use new safe location for socket."
> ---
> It took me some hours to track the problem down as `emacs --daemon'
> did not complain about what it misliked and only refused to cooperate
> with `emacsclient'. Unfortunately I am only a emacs user and no
> developer so I do not know how to enhance that situation.
>
>  doc/emacs/misc.texi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
> index 4865ee175180..327ae3e31e30 100644
> --- a/doc/emacs/misc.texi
> +++ b/doc/emacs/misc.texi
> @@ -1709,6 +1709,7 @@ Emacs Server
>  @example
>  [Socket]
>  ListenStream=/path/to/.emacs.socket
> +DirectoryMode=0700
>  
>  [Install]
>  WantedBy=sockets.target
-- 
Pengutronix e.K.                           | Ulrich Ölmann               |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix systemd socket-unit example
  2020-12-14 13:59 ` Ulrich Ölmann
@ 2020-12-14 14:12   ` Stefan Kangas
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2020-12-14 14:12 UTC (permalink / raw)
  To: Ulrich Ölmann, emacs-devel; +Cc: Matthew Leach

Ulrich Ölmann <u.oelmann@pengutronix.de> writes:

> Gentle ping!

Thanks for the patch!

Someone will hopefully get to reviewing it soon, but meanwhile I would
recommend sending this to the bug-gnu-emacs mailing list so we don't
risk losing track of it.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix systemd socket-unit example
  2020-12-03 11:54 [PATCH] Fix systemd socket-unit example Ulrich Ölmann
  2020-12-14 13:59 ` Ulrich Ölmann
@ 2020-12-14 15:03 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-14 15:03 UTC (permalink / raw)
  To: Ulrich Ölmann; +Cc: Emacs development discussions

Ulrich Ölmann <u.oelmann@pengutronix.de> writes:

> * doc/emacs/misc.texi (Emacs Server): The socket containing directory
> is per default created with permissions 0755 by the socket-unit.
> However this is considered unsafe since commit [1], so enhance unit
> example with systemd configuration directive `DirectoryMode=' to
> create it with safe permissions, see
> https://www.freedesktop.org/software/systemd/man/systemd.socket.html#DirectoryMode=

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-14 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 11:54 [PATCH] Fix systemd socket-unit example Ulrich Ölmann
2020-12-14 13:59 ` Ulrich Ölmann
2020-12-14 14:12   ` Stefan Kangas
2020-12-14 15:03 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).