]>
Commit | Line | Data |
---|---|---|
a7df2d1e ZJS |
1 | # SPDX-License-Identifier: LGPL-2.1+ |
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 | 11 | Description=User Login Management |
3f612b91 | 12 | Documentation=man:systemd-logind.service(8) man:logind.conf(5) |
16a5d412 DR |
13 | Documentation=https://www.freedesktop.org/wiki/Software/systemd/logind |
14 | Documentation=https://www.freedesktop.org/wiki/Software/systemd/multiseat | |
62507726 IL |
15 | Wants=user.slice modprobe@drm.service |
16 | After=nss-user-lookup.target user.slice modprobe@drm.service | |
91f9dcaf | 17 | |
a132bef0 | 18 | # Ask for the dbus socket. |
8f9c6fe5 ZJS |
19 | Wants=dbus.socket |
20 | After=dbus.socket | |
21 | ||
91f9dcaf | 22 | [Service] |
91f9dcaf | 23 | BusName=org.freedesktop.login1 |
11dce8e2 | 24 | 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 |
10b1d42e | 25 | DeviceAllow=block-* r |
9af28206 TM |
26 | DeviceAllow=char-/dev/console rw |
27 | DeviceAllow=char-drm rw | |
28 | DeviceAllow=char-input rw | |
29 | DeviceAllow=char-tty rw | |
30 | DeviceAllow=char-vcs rw | |
11aa16bb | 31 | # Make sure the DeviceAllow= lines above can work correctly when referenceing char-drm |
3ca9940c LP |
32 | ExecStart=@rootlibexecdir@/systemd-logind |
33 | FileDescriptorStoreMax=512 | |
34 | IPAddressDeny=any | |
35 | LockPersonality=yes | |
40652ca4 | 36 | MemoryDenyWriteExecute=yes |
3ca9940c | 37 | NoNewPrivileges=yes |
11dce8e2 | 38 | PrivateTmp=yes |
cabc1c6d | 39 | ProtectClock=yes |
11dce8e2 ZJS |
40 | ProtectControlGroups=yes |
41 | ProtectHome=yes | |
99894b86 | 42 | ProtectHostname=yes |
11dce8e2 | 43 | ProtectKernelModules=yes |
6168ae58 | 44 | ProtectKernelLogs=yes |
11dce8e2 ZJS |
45 | ProtectSystem=strict |
46 | ReadWritePaths=/etc /run | |
3ca9940c LP |
47 | Restart=always |
48 | RestartSec=0 | |
dea63635 | 49 | RestrictAddressFamilies=AF_UNIX AF_NETLINK |
3ca9940c LP |
50 | RestrictNamespaces=yes |
51 | RestrictRealtime=yes | |
62aa2924 | 52 | RestrictSUIDSGID=yes |
11dce8e2 ZJS |
53 | RuntimeDirectory=systemd/sessions systemd/seats systemd/users systemd/inhibit systemd/shutdown |
54 | RuntimeDirectoryPreserve=yes | |
19483c60 | 55 | StateDirectory=systemd/linger |
7f396e5f | 56 | SystemCallArchitectures=native |
3ca9940c LP |
57 | SystemCallErrorNumber=EPERM |
58 | SystemCallFilter=@system-service | |
21d0dd5a | 59 | @SERVICE_WATCHDOG@ |
f84aea43 | 60 | |
c35ee02c LP |
61 | # Increase the default a bit in order to allow many simultaneous logins since |
62 | # we keep one fd open per session. | |
c02b6ee4 | 63 | LimitNOFILE=@HIGH_RLIMIT_NOFILE@ |