udev: String substitutions can be done in ENV, too
[systemd_ALT.git] / units / systemd-journald.service.in
blob79ec60c937b3ba735459ff649f4f9053fd9b70d6
1 #  SPDX-License-Identifier: LGPL-2.1-or-later
3 #  This file is part of systemd.
5 #  systemd is free software; you can redistribute it and/or modify it
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
8 #  (at your option) any later version.
10 [Unit]
11 Description=Journal Service
12 Documentation=man:systemd-journald.service(8) man:journald.conf(5)
13 DefaultDependencies=no
14 Requires=systemd-journald.socket
15 After=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket syslog.socket
16 Before=sysinit.target
18 # Mount and swap units need the journal socket units. If they were removed by
19 # an isolate request the mount and swap units would be removed too, hence let's
20 # exclude systemd-journald and its sockets from isolate requests.
21 IgnoreOnIsolate=yes
23 [Service]
24 DeviceAllow=char-* rw
25 ExecStart={{ROOTLIBEXECDIR}}/systemd-journald
26 FileDescriptorStoreMax=4224
27 IPAddressDeny=any
28 LockPersonality=yes
29 MemoryDenyWriteExecute=yes
30 NoNewPrivileges=yes
31 OOMScoreAdjust=-250
32 ProtectClock=yes
33 Restart=always
34 RestartSec=0
35 RestrictAddressFamilies=AF_UNIX AF_NETLINK
36 RestrictNamespaces=yes
37 RestrictRealtime=yes
38 RestrictSUIDSGID=yes
39 RuntimeDirectory=systemd/journal
40 RuntimeDirectoryPreserve=yes
41 # Audit socket is not listed here because this unit can be turned off. However
42 # the link between the socket and the service units is still created thanks to
43 # the 'Service=' setting specified in the socket unit.
44 Sockets=systemd-journald.socket systemd-journald-dev-log.socket
45 StandardOutput=null
46 SystemCallArchitectures=native
47 SystemCallErrorNumber=EPERM
48 SystemCallFilter=@system-service
49 Type=notify
50 PassEnvironment=TERM
51 {{SERVICE_WATCHDOG}}
53 # In case you're wondering why CAP_SYS_PTRACE is needed, access to
54 # /proc/<pid>/exe requires this capability. Thus if this capability is missing
55 # the _EXE=/OBJECT_EXE= fields will be missing from the journal entries.
56 CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE
58 # If there are many split up journal files we need a lot of fds to access them
59 # all in parallel.
60 LimitNOFILE={{HIGH_RLIMIT_NOFILE}}