Revert "systemd: drop _ prefix from username"

Prefixing all system and group names with the underscore is
recommended by the systemd developers.

This reverts commit 8b6ef6aeeb.

(cherry picked from commit 91bd96b319)
This commit is contained in:
Steve Cotton 2024-01-21 01:34:18 +01:00 committed by Steve Cotton
parent 8e25550407
commit 165d2ba37f
5 changed files with 8 additions and 5 deletions

View file

@ -1,2 +1,2 @@
### Security Fixes
* Run wesnothd server as `wesnoth:wesnoth` instead of `nobody:users`, improving safety and fixing a warning message in systemd 246+
* Run wesnothd server as `_wesnoth:_wesnoth` instead of `nobody:users`, improving safety and fixing a warning message in systemd 246+

View file

@ -23,7 +23,8 @@ ExecStopPost=/bin/rm -f @FIFO_DIR@/socket
SyslogIdentifier=Wesnothd@BINARY_SUFFIX@
WorkingDirectory=@FIFO_DIR@
User=wesnoth
User=_wesnoth
Group=_wesnoth
# Additional security-related features
# (when using the -c option, do not use ProtectHome)

View file

@ -4,7 +4,8 @@ After=network.target
[Service]
ExecStart=%bindir/wesnothd
User=wesnoth
User=_wesnoth
Group=_wesnoth
[Install]
WantedBy=multi-user.target

View file

@ -1 +1,2 @@
u wesnoth - "Wesnoth multiplayer server"
u _wesnoth -
g _wesnoth -

View file

@ -1 +1 @@
d @FIFO_DIR@ 0700 wesnoth wesnoth -
d @FIFO_DIR@ 0700 _wesnoth _wesnoth -