2020-11-09 04:23:58 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-18 16:35:03 +00:00
|
|
|
#
|
2011-06-16 22:15:02 +00:00
|
|
|
# This file is part of systemd.
|
|
|
|
#
|
|
|
|
# systemd is free software; you can redistribute it and/or modify it
|
2012-04-11 22:20:58 +00:00
|
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
2011-06-16 22:15:02 +00:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
[Unit]
|
2020-04-23 07:59:03 +00:00
|
|
|
Description=User Login Management
|
2020-10-15 18:49:18 +00:00
|
|
|
Documentation=man:sd-login(3)
|
2020-09-29 06:03:10 +00:00
|
|
|
Documentation=man:systemd-logind.service(8)
|
|
|
|
Documentation=man:logind.conf(5)
|
|
|
|
Documentation=man:org.freedesktop.login1(5)
|
|
|
|
|
2020-01-07 14:33:29 +00:00
|
|
|
Wants=user.slice modprobe@drm.service
|
|
|
|
After=nss-user-lookup.target user.slice modprobe@drm.service
|
2011-06-16 22:15:02 +00:00
|
|
|
|
2017-07-23 15:45:57 +00:00
|
|
|
# Ask for the dbus socket.
|
2014-02-14 22:01:43 +00:00
|
|
|
Wants=dbus.socket
|
|
|
|
After=dbus.socket
|
|
|
|
|
2011-06-16 22:15:02 +00:00
|
|
|
[Service]
|
|
|
|
BusName=org.freedesktop.login1
|
2018-12-18 14:05:48 +00:00
|
|
|
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_MAC_ADMIN CAP_AUDIT_CONTROL CAP_CHOWN CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG CAP_LINUX_IMMUTABLE
|
2019-08-02 20:05:43 +00:00
|
|
|
DeviceAllow=block-* r
|
2019-05-01 12:28:36 +00:00
|
|
|
DeviceAllow=char-/dev/console rw
|
|
|
|
DeviceAllow=char-drm rw
|
|
|
|
DeviceAllow=char-input rw
|
|
|
|
DeviceAllow=char-tty rw
|
|
|
|
DeviceAllow=char-vcs rw
|
2023-06-12 01:15:19 +00:00
|
|
|
ExecStart={{LIBEXECDIR}}/systemd-logind
|
2023-11-21 09:25:23 +00:00
|
|
|
FileDescriptorStoreMax=768
|
2018-11-12 16:19:48 +00:00
|
|
|
IPAddressDeny=any
|
|
|
|
LockPersonality=yes
|
2016-06-08 12:23:37 +00:00
|
|
|
MemoryDenyWriteExecute=yes
|
2018-11-12 16:19:48 +00:00
|
|
|
NoNewPrivileges=yes
|
2018-12-18 14:05:48 +00:00
|
|
|
PrivateTmp=yes
|
2021-12-17 12:19:25 +00:00
|
|
|
# We don't use ProtectProc= since we need to look for usernames and tty for wall messages
|
2020-04-02 18:18:11 +00:00
|
|
|
ProtectClock=yes
|
2018-12-18 14:05:48 +00:00
|
|
|
ProtectControlGroups=yes
|
|
|
|
ProtectHome=yes
|
2019-02-18 22:30:12 +00:00
|
|
|
ProtectHostname=yes
|
2019-11-14 00:56:23 +00:00
|
|
|
ProtectKernelLogs=yes
|
2020-08-06 12:50:38 +00:00
|
|
|
ProtectKernelModules=yes
|
2018-12-18 14:05:48 +00:00
|
|
|
ProtectSystem=strict
|
|
|
|
ReadWritePaths=/etc /run
|
2018-11-12 16:19:48 +00:00
|
|
|
Restart=always
|
|
|
|
RestartSec=0
|
2018-04-27 09:11:29 +00:00
|
|
|
RestrictAddressFamilies=AF_UNIX AF_NETLINK
|
2018-11-12 16:19:48 +00:00
|
|
|
RestrictNamespaces=yes
|
|
|
|
RestrictRealtime=yes
|
2019-03-20 18:52:20 +00:00
|
|
|
RestrictSUIDSGID=yes
|
2018-12-18 14:05:48 +00:00
|
|
|
RuntimeDirectory=systemd/sessions systemd/seats systemd/users systemd/inhibit systemd/shutdown
|
|
|
|
RuntimeDirectoryPreserve=yes
|
2019-04-28 09:17:59 +00:00
|
|
|
StateDirectory=systemd/linger
|
2017-02-08 21:32:37 +00:00
|
|
|
SystemCallArchitectures=native
|
2018-11-12 16:19:48 +00:00
|
|
|
SystemCallErrorNumber=EPERM
|
|
|
|
SystemCallFilter=@system-service
|
2023-01-02 16:35:23 +00:00
|
|
|
Type=notify-reload
|
2021-05-16 09:55:36 +00:00
|
|
|
{{SERVICE_WATCHDOG}}
|
2011-10-11 02:43:29 +00:00
|
|
|
|
2018-10-01 16:08:27 +00:00
|
|
|
# Increase the default a bit in order to allow many simultaneous logins since
|
|
|
|
# we keep one fd open per session.
|
2021-05-16 09:55:36 +00:00
|
|
|
LimitNOFILE={{HIGH_RLIMIT_NOFILE}}
|