Add a DirectoryMode to the Emacs Server example

* doc/emacs/misc.texi (Emacs Server): Update example

* 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."

Copyright-paperwork-exempt: yes
This commit is contained in:
Ulrich Ölmann 2020-12-14 16:02:54 +01:00 committed by Lars Ingebrigtsen
parent e8a358c3be
commit f6454ad6cd

View file

@ -1709,6 +1709,7 @@ connections. A setup to use this functionality could be:
@example
[Socket]
ListenStream=/path/to/.emacs.socket
DirectoryMode=0700
[Install]
WantedBy=sockets.target