]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/systemd-logind.service.in
Merge pull request #33019 from yuwata/tpm2-unseal
[thirdparty/systemd.git] / units / systemd-logind.service.in
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
a7df2d1e 2#
91f9dcaf
LP
3# This file is part of systemd.
4#
5# systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation; either version 2.1 of the License, or
91f9dcaf
LP
8# (at your option) any later version.
9
91f9dcaf 10[Unit]
cd7e1e1a 11Description=User Login Management
515736d0 12Documentation=man:sd-login(3)
21006e0e
ZJS
13Documentation=man:systemd-logind.service(8)
14Documentation=man:logind.conf(5)
15Documentation=man:org.freedesktop.login1(5)
21006e0e 16
62507726
IL
17Wants=user.slice modprobe@drm.service
18After=nss-user-lookup.target user.slice modprobe@drm.service
91f9dcaf 19
a132bef0 20# Ask for the dbus socket.
8f9c6fe5
ZJS
21Wants=dbus.socket
22After=dbus.socket
23
91f9dcaf 24[Service]
91f9dcaf 25BusName=org.freedesktop.login1
11dce8e2 26CapabilityBoundingSet=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
10b1d42e 27DeviceAllow=block-* r
9af28206
TM
28DeviceAllow=char-/dev/console rw
29DeviceAllow=char-drm rw
30DeviceAllow=char-input rw
31DeviceAllow=char-tty rw
32DeviceAllow=char-vcs rw
b0d3095f 33ExecStart={{LIBEXECDIR}}/systemd-logind
9d5b6901 34FileDescriptorStoreMax=768
3ca9940c
LP
35IPAddressDeny=any
36LockPersonality=yes
40652ca4 37MemoryDenyWriteExecute=yes
3ca9940c 38NoNewPrivileges=yes
11dce8e2 39PrivateTmp=yes
ba679b8d 40# We don't use ProtectProc= since we need to look for usernames and tty for wall messages
cabc1c6d 41ProtectClock=yes
11dce8e2
ZJS
42ProtectControlGroups=yes
43ProtectHome=yes
99894b86 44ProtectHostname=yes
6168ae58 45ProtectKernelLogs=yes
24da96a1 46ProtectKernelModules=yes
11dce8e2
ZJS
47ProtectSystem=strict
48ReadWritePaths=/etc /run
3ca9940c
LP
49Restart=always
50RestartSec=0
dea63635 51RestrictAddressFamilies=AF_UNIX AF_NETLINK
3ca9940c
LP
52RestrictNamespaces=yes
53RestrictRealtime=yes
62aa2924 54RestrictSUIDSGID=yes
11dce8e2
ZJS
55RuntimeDirectory=systemd/sessions systemd/seats systemd/users systemd/inhibit systemd/shutdown
56RuntimeDirectoryPreserve=yes
19483c60 57StateDirectory=systemd/linger
7f396e5f 58SystemCallArchitectures=native
3ca9940c
LP
59SystemCallErrorNumber=EPERM
60SystemCallFilter=@system-service
5d71e463 61Type=notify-reload
059cc610 62{{SERVICE_WATCHDOG}}
f84aea43 63
c35ee02c
LP
64# Increase the default a bit in order to allow many simultaneous logins since
65# we keep one fd open per session.
059cc610 66LimitNOFILE={{HIGH_RLIMIT_NOFILE}}