2017-11-18 17:35:03 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
#
|
2011-06-17 00:15:02 +02:00
|
|
|
# This file is part of systemd.
|
|
|
|
#
|
|
|
|
# systemd is free software; you can redistribute it and/or modify it
|
2012-04-12 00:20:58 +02: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-17 00:15:02 +02:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Login Service
|
2012-07-19 12:46:55 +02:00
|
|
|
Documentation=man:systemd-logind.service(8) man:logind.conf(5)
|
2017-06-29 04:54:12 +02:00
|
|
|
Documentation=https://www.freedesktop.org/wiki/Software/systemd/logind
|
|
|
|
Documentation=https://www.freedesktop.org/wiki/Software/systemd/multiseat
|
2013-07-02 03:47:23 +02:00
|
|
|
Wants=user.slice
|
|
|
|
After=nss-user-lookup.target user.slice
|
2011-06-17 00:15:02 +02:00
|
|
|
|
2017-07-23 17:45:57 +02:00
|
|
|
# Ask for the dbus socket.
|
2014-02-14 23:01:43 +01:00
|
|
|
Wants=dbus.socket
|
|
|
|
After=dbus.socket
|
|
|
|
|
2011-06-17 00:15:02 +02:00
|
|
|
[Service]
|
|
|
|
BusName=org.freedesktop.login1
|
2018-12-18 15:05:48 +01: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 22:05:43 +02:00
|
|
|
DeviceAllow=block-* r
|
2019-05-01 14:28:36 +02:00
|
|
|
DeviceAllow=char-/dev/console rw
|
|
|
|
DeviceAllow=char-drm rw
|
|
|
|
DeviceAllow=char-input rw
|
|
|
|
DeviceAllow=char-tty rw
|
|
|
|
DeviceAllow=char-vcs rw
|
2019-07-23 13:14:53 +02:00
|
|
|
# Make sure the DeviceAllow= lines above can work correctly when referenceing char-drm
|
|
|
|
ExecStartPre=-/sbin/modprobe -abq drm
|
2018-11-12 17:19:48 +01:00
|
|
|
ExecStart=@rootlibexecdir@/systemd-logind
|
|
|
|
FileDescriptorStoreMax=512
|
|
|
|
IPAddressDeny=any
|
|
|
|
LockPersonality=yes
|
2016-06-08 14:23:37 +02:00
|
|
|
MemoryDenyWriteExecute=yes
|
2018-11-12 17:19:48 +01:00
|
|
|
NoNewPrivileges=yes
|
2018-12-18 15:05:48 +01:00
|
|
|
PrivateTmp=yes
|
|
|
|
ProtectControlGroups=yes
|
|
|
|
ProtectHome=yes
|
2019-02-18 23:30:12 +01:00
|
|
|
ProtectHostname=yes
|
2018-12-18 15:05:48 +01:00
|
|
|
ProtectKernelModules=yes
|
|
|
|
ProtectSystem=strict
|
|
|
|
ReadWritePaths=/etc /run
|
2018-11-12 17:19:48 +01:00
|
|
|
Restart=always
|
|
|
|
RestartSec=0
|
2018-04-27 11:11:29 +02:00
|
|
|
RestrictAddressFamilies=AF_UNIX AF_NETLINK
|
2018-11-12 17:19:48 +01:00
|
|
|
RestrictNamespaces=yes
|
|
|
|
RestrictRealtime=yes
|
2019-03-20 19:52:20 +01:00
|
|
|
RestrictSUIDSGID=yes
|
2018-12-18 15:05:48 +01:00
|
|
|
RuntimeDirectory=systemd/sessions systemd/seats systemd/users systemd/inhibit systemd/shutdown
|
|
|
|
RuntimeDirectoryPreserve=yes
|
2019-04-28 11:17:59 +02:00
|
|
|
StateDirectory=systemd/linger
|
2017-02-08 22:32:37 +01:00
|
|
|
SystemCallArchitectures=native
|
2018-11-12 17:19:48 +01:00
|
|
|
SystemCallErrorNumber=EPERM
|
|
|
|
SystemCallFilter=@system-service
|
|
|
|
WatchdogSec=3min
|
2011-10-11 04:43:29 +02:00
|
|
|
|
2018-10-01 18:08:27 +02:00
|
|
|
# Increase the default a bit in order to allow many simultaneous logins since
|
|
|
|
# we keep one fd open per session.
|
2018-10-17 10:21:48 +02:00
|
|
|
LimitNOFILE=@HIGH_RLIMIT_NOFILE@
|