2020-11-09 07:23:58 +03:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2017-11-18 19:35:03 +03:00
#
2011-12-30 20:50:37 +04:00
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
2012-04-12 02:20:58 +04: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-12-30 20:50:37 +04:00
# (at your option) any later version.
[Unit]
Description = Journal Service
2012-06-01 19:26:28 +04:00
Documentation = man:systemd-journald.service(8) man:journald.conf(5)
2011-12-30 20:50:37 +04:00
DefaultDependencies = no
Requires = systemd-journald.socket
2014-11-03 22:58:24 +03:00
After = systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket syslog.socket
2012-08-25 01:18:35 +04:00
Before = sysinit.target
2011-12-30 20:50:37 +04:00
2023-11-28 02:32:22 +03:00
# To avoid journald SIGKILLed during soft-reboot and corrupting journals.
# See https://github.com/systemd/systemd/issues/30195
Before = soft-reboot.target
Conflicts = soft-reboot.target
2022-06-29 14:14:37 +03:00
# Mount and swap units need the journal socket units. If they were removed by
# an isolate request the mount and swap units would be removed too, hence let's
# exclude systemd-journald and its sockets from isolate requests.
IgnoreOnIsolate = yes
2011-12-30 20:50:37 +04:00
[Service]
2019-05-01 15:28:36 +03:00
DeviceAllow = char-* rw
2023-06-12 04:15:19 +03:00
ExecStart = {{LIBEXECDIR}}/systemd-journald
2017-07-17 11:04:37 +03:00
FileDescriptorStoreMax = 4224
2018-11-12 19:19:48 +03:00
IPAddressDeny = any
LockPersonality = yes
2016-06-08 15:23:37 +03:00
MemoryDenyWriteExecute = yes
2018-11-12 19:19:48 +03:00
NoNewPrivileges = yes
2019-11-27 23:18:10 +03:00
OOMScoreAdjust = -250
2020-04-02 21:18:11 +03:00
ProtectClock = yes
2018-11-12 19:19:48 +03:00
Restart = always
RestartSec = 0
2016-08-26 14:23:27 +03:00
RestrictAddressFamilies = AF_UNIX AF_NETLINK
2018-11-12 19:19:48 +03:00
RestrictNamespaces = yes
RestrictRealtime = yes
2019-03-20 21:52:20 +03:00
RestrictSUIDSGID = yes
2019-11-27 23:18:28 +03:00
RuntimeDirectory = systemd/journal
RuntimeDirectoryPreserve = yes
2022-12-06 22:15:43 +03:00
# Audit socket is not listed here because this unit can be turned off. However
# the link between the socket and the service units is still created thanks to
# the 'Service=' setting specified in the socket unit.
Sockets = systemd-journald.socket systemd-journald-dev-log.socket
2018-11-12 19:19:48 +03:00
StandardOutput = null
2017-02-09 00:32:37 +03:00
SystemCallArchitectures = native
2018-11-12 19:19:48 +03:00
SystemCallErrorNumber = EPERM
SystemCallFilter = @system-service
Type = notify
2023-03-16 13:22:58 +03:00
PassEnvironment = TERM
2021-05-16 12:55:36 +03:00
{ { S E R V I C E _ W A T C H D O G } }
2011-12-30 20:50:37 +04:00
2020-11-25 11:47:46 +03:00
# In case you're wondering why CAP_SYS_PTRACE is needed, access to
2020-11-25 13:20:38 +03:00
# /proc/<pid>/exe requires this capability. Thus if this capability is missing
# the _EXE=/OBJECT_EXE= fields will be missing from the journal entries.
2020-11-25 11:47:46 +03:00
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
2018-10-01 19:08:27 +03:00
# If there are many split up journal files we need a lot of fds to access them
# all in parallel.
2021-05-16 12:55:36 +03:00
LimitNOFILE = {{HIGH_RLIMIT_NOFILE}}