systemd.git
6 years agoMerge version 241-7+rpi1 and 242-4 to produce 242-4+rpi1 archive/raspbian/242-4+rpi1 raspbian/242-4+rpi1
Raspbian automatic forward porter [Sat, 24 Aug 2019 08:52:37 +0000 (09:52 +0100)]
Merge version 241-7+rpi1 and 242-4 to produce 242-4+rpi1

6 years agoMerge systemd (242-4) import into refs/heads/workingbranch
Michael Biebl [Wed, 21 Aug 2019 20:09:13 +0000 (21:09 +0100)]
Merge systemd (242-4) import into refs/heads/workingbranch

6 years agoDrop seccomp system call filter for udev
Michael Biebl [Wed, 18 Jul 2018 21:49:16 +0000 (23:49 +0200)]
Drop seccomp system call filter for udev

The seccomp based system call whitelist requires at least systemd 239 to
be the active init and during a dist-upgrade we can't guarantee that
systemd has been fully configured before udev is restarted.

This partially reverts upstream commit
ee8f26180d01e3ddd4e5f20b03b81e5e737657ae.

Once buster is released, this patch can be dropped.

Closes: #903224
Gbp-Pq: Topic debian
Gbp-Pq: Name Drop-seccomp-system-call-filter-for-udev.patch

6 years agoAdd env variable for machine ID path
Martin Pitt [Wed, 18 Jan 2017 10:21:35 +0000 (11:21 +0100)]
Add env variable for machine ID path

During package build, in minimal chroots, or other systems which do not already
have an /etc/machine-id we get six test failures. Introduce a
$SYSTEMD_MACHINE_ID_PATH environment variable which can specify a location
other than /etc/machine-id, so that the unit tests are independent from the
environment.

Also adjust test-fs-util to not assume that /etc/machine-id exists. Use
/etc/passwd instead which is created by base-files.

Closes: #851445
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62344

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-env-variable-for-machine-ID-path.patch

6 years agoLet graphical-session-pre.target be manually started
Iain Lane [Mon, 22 Aug 2016 05:03:27 +0000 (07:03 +0200)]
Let graphical-session-pre.target be manually started

This is needed until https://github.com/systemd/systemd/issues/3750 is fixed.

Forwarded: not-needed
Bug-Ubuntu: https://launchpad.net/bugs/1615341

Gbp-Pq: Topic debian
Gbp-Pq: Name Let-graphical-session-pre.target-be-manually-started.patch

6 years agoRevert "core: enable TasksMax= for all services by default, and set it to 512"
Martin Pitt [Mon, 9 May 2016 19:24:38 +0000 (21:24 +0200)]
Revert "core: enable TasksMax= for all services by default, and set it to 512"

This reverts commit 9ded9cd14cc03c67291b10a5c42ce5094ba0912f.

Introducing a default limit on number of threads broke a lot of software which
regularly needs more, such as MySQL and RabbitMQ, or services that spawn off an
indefinite number of subtasks that are not in a scope, like LXC or cron.

15% is way too much for most "simple" services, and it's too little for others
such as the ones mentioned above. There is also no particular rationale about
any particular global limit, so even if we'd bump it higher we'd just make the
limit even less useful while still breaking software.

It is both much safer and also much more effective in terms of guarding against
berserk programs/bugs/unintended fork bombs etc. to set limits in units
individually. Once someone looks at one, this is then a great time to also flip
on the other resource and privilege limitations that systemd offers.

Bug: https://github.com/systemd/systemd/issues/3211
Bug-Debian: https://bugs.debian.org/823530
Bug-Ubuntu: https://launchpad.net/bugs/1578080

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-enable-TasksMax-for-all-services-by-default-a.patch

6 years agoRevert "core: set RLIMIT_CORE to unlimited by default"
Martin Pitt [Sat, 27 Feb 2016 11:27:06 +0000 (12:27 +0100)]
Revert "core: set RLIMIT_CORE to unlimited by default"

Partially revert commit 15a900327ab as this completely breaks core dumps
without systemd-coredump. It's also contradicting core(8), and it's not
systemd's place to redefine the kernel definitions of core files.

Commit bdfd7b2c now honours the process' RLIMIT_CORE for systemd-coredump. This
isn't what RLIMIT_CORE is supposed to do (it limits the size of the core
*file*, but the kernel deliberately ignores it for piping), so set a static
2^63 core size limit for systemd-coredump to go back to the previous behaviour
(otherwise the change above would break systemd-coredump).

Bug-Debian: https://bugs.debian.org/815020

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch

6 years agoRevert "core: one step back again, for nspawn we actually can't wait for cgroups...
Martin Pitt [Mon, 27 Apr 2015 13:29:13 +0000 (15:29 +0200)]
Revert "core: one step back again, for nspawn we actually can't wait for cgroups running empty since systemd will get exactly zero notifications about it"

This reverts commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7.

Bug-Debian: https://bugs.debian.org/784720
Bug-Ubuntu: https://launchpad.net/bugs/1448259
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1141137

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-one-step-back-again-for-nspawn-we-actual.patch

6 years agoSkip filesystem check if already done by the initramfs
Nis Martensen [Tue, 19 Jan 2016 21:01:43 +0000 (22:01 +0100)]
Skip filesystem check if already done by the initramfs

Newer versions of initramfs-tools already fsck and mount / and /usr in
the initramfs. Skip the filesystem check in this case.

Based on a previous patch by Michael Biebl <biebl@debian.org>.

Closes: #782522
Closes: #810748
Gbp-Pq: Topic debian
Gbp-Pq: Name Skip-filesystem-check-if-already-done-by-the-initram.patch

6 years agofsckd daemon for inter-fsckd communication
Didier Roche [Fri, 22 May 2015 11:04:38 +0000 (13:04 +0200)]
fsckd daemon for inter-fsckd communication

Global logic:
Add systemd-fsckd multiplexer which accepts multiple (via systemd-fsck's
/run/systemd/fsck.progress socket) fsck instances to connect to it and sends
progress report. systemd-fsckd then computes and writes to /dev/console the
number of devices currently being checked and the minimum fsck progress.

Plymouth and user interaction:
Forward the progress to plymouth and support canellation of in progress fsck.
Try to connect and send to plymouth (if running) some checked report progress,
using direct plymouth protocole.

Update message is the following:
fsckd:<num_devices>:<progress>:<string>
* num_devices corresponds to the current number of devices being checked (int)
* progress corresponds to the current minimum percentage of all devices being
  checked (float, from 0 to 100)
* string is a translated message ready to be displayed by the plymouth theme
  displaying the information above. It can be overridden by plymouth themes
  supporting i18n.

Grab in fsckd plymouth watch key Control+C, and propagate this cancel request
to systemd-fsck which will terminate fsck.

Send a message to signal to user what key we are grabbing for fsck cancel.

Message is: fsckd-cancel-msg:<string>
Where string is a translated string ready to be displayed by the plymouth theme
indicating that Control+C can be used to cancel current checks. It can be
overridden (matching only fsckd-cancel-msg prefix) for themes supporting i18n.

Misc:
systemd-fsckd stops on idle when no fsck is connected.
Add man page explaining the plymouth theme protocol, usage of the daemon
as well as the socket activation part. Adapt existing fsck man page.

Note that fsckd had lived in the upstream tree for a while, but was removed.
More information at
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030175.html
-

Gbp-Pq: Topic debian
Gbp-Pq: Name fsckd-daemon-for-inter-fsckd-communication.patch

6 years agoOnly start logind if dbus is installed
Martin Pitt [Mon, 9 Feb 2015 09:53:43 +0000 (10:53 +0100)]
Only start logind if dbus is installed

logind fails to start in environments without dbus, such as LXC containers or
servers. Add a startup condition to avoid the very noisy startup failure.

Part of #772700

Gbp-Pq: Topic debian
Gbp-Pq: Name Only-start-logind-if-dbus-is-installed.patch

6 years agoDon't enable audit by default
Martin Pitt [Sun, 28 Dec 2014 11:49:35 +0000 (12:49 +0100)]
Don't enable audit by default

It causes flooding of dmesg and syslog, suppressing actually important
messages.

Don't enable it for now, until a better solution is found:
http://lists.freedesktop.org/archives/systemd-devel/2014-December/026591.html

Bug-Debian: https://bugs.debian.org/773528

Gbp-Pq: Topic debian
Gbp-Pq: Name Don-t-enable-audit-by-default.patch

6 years agoRe-enable journal forwarding to syslog
Martin Pitt [Fri, 28 Nov 2014 13:43:25 +0000 (14:43 +0100)]
Re-enable journal forwarding to syslog

Revert upstream commit 46b131574fdd7d77 for now, until Debian's sysloggers
can/do all read from the journal directly. See

  http://lists.freedesktop.org/archives/systemd-devel/2014-November/025550.html

for details. Once we grow a journal.conf.d/ directory, sysloggers can be moved
to pulling from the journal one by one and disable forwarding again in such a
conf.d snippet.

Gbp-Pq: Topic debian
Gbp-Pq: Name Re-enable-journal-forwarding-to-syslog.patch

6 years agoAdd support for TuxOnIce hibernation
Julien Muchembled [Tue, 29 Apr 2014 09:40:50 +0000 (11:40 +0200)]
Add support for TuxOnIce hibernation

systemd does not support non-mainline kernel features so upstream rejected this
patch.
It is however required for systemd integration by tuxonice-userui package.

Forwarded: http://lists.freedesktop.org/archives/systemd-devel/2014-April/018960.html

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-support-for-TuxOnIce-hibernation.patch

6 years agoMake /run/lock tmpfs an API fs
Michael Biebl [Thu, 4 Sep 2014 23:15:16 +0000 (01:15 +0200)]
Make /run/lock tmpfs an API fs

The /run/lock directory is world-writable in Debian due to historic
reasons. To avoid user processes filling up /run, we mount a separate
tmpfs for /run/lock. As this directory needs to be available during
early boot, we make it an API fs.

Drop it from tmpfiles.d/legacy.conf to not clobber the permissions.

Closes: #751392
Gbp-Pq: Topic debian
Gbp-Pq: Name Make-run-lock-tmpfs-an-API-fs.patch

6 years agoBring tmpfiles.d/tmp.conf in line with Debian defaults
Tollef Fog Heen [Tue, 5 Jun 2012 18:59:36 +0000 (20:59 +0200)]
Bring tmpfiles.d/tmp.conf in line with Debian defaults

Closes: #675422
Gbp-Pq: Topic debian
Gbp-Pq: Name Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch

6 years agoUse Debian specific config files
Michael Biebl [Thu, 18 Jul 2013 18:11:02 +0000 (20:11 +0200)]
Use Debian specific config files

Use /etc/default/locale instead of /etc/locale.conf for locale settings.

Use /etc/default/keyboard instead of /etc/X11/xorg.conf.d/00-keyboard.conf for
keyboard configuration.

Read/write /etc/timezone if /etc/localtime does not exist.

Gbp-Pq: Topic debian
Gbp-Pq: Name Use-Debian-specific-config-files.patch

6 years agomeson: make nologin path build time configurable
Michael Biebl [Wed, 17 Jul 2019 23:24:00 +0000 (01:24 +0200)]
meson: make nologin path build time configurable

Some distros install nologin as /usr/sbin/nologin, others as
/sbin/nologin.
Since we can't really on merged-usr everywhere (where the path wouldn't
matter), make the path build time configurable via -Dnologin-path=.

Closes #13028

(cherry picked from commit 6db904625d413739c480ddbe7667d3f40acc4ae0)

Gbp-Pq: Name meson-make-nologin-path-build-time-configurable.patch

6 years agonetwork: do not send ipv6 token to kernel
Yu Watanabe [Thu, 9 May 2019 05:39:46 +0000 (14:39 +0900)]
network: do not send ipv6 token to kernel

We disabled kernel RA support. Then, we should not send
IFLA_INET6_TOKEN.
Thus, we do not need to send IFLA_INET6_ADDR_GEN_MODE twice.

Follow-up for 0e2fdb83bb5e22047e0c7cc058b415d0e93f02cf and
4eb086a38712ea98faf41e075b84555b11b54362.

(cherry picked from commit 9f6e82e6eb3b6e73d66d00d1d6eee60691fb702f)

Gbp-Pq: Name network-do-not-send-ipv6-token-to-kernel.patch

6 years agonetworkd: fix link_up() (#12505)
Susant Sahani [Thu, 9 May 2019 02:05:35 +0000 (07:35 +0530)]
networkd: fix link_up() (#12505)

Fillup IFLA_INET6_ADDR_GEN_MODE while we do link_up.

Fixes the following error:
```
dummy-test: Could not bring up interface: Invalid argument
```

After reading the kernel code when we do a link up
```
net/core/rtnetlink.c
IFLA_AF_SPEC
 af_ops->set_link_af(dev, af);
  inet6_set_link_af
   if (tb[IFLA_INET6_ADDR_GEN_MODE])
             Here it looks for IFLA_INET6_ADDR_GEN_MODE
```
Since link up we didn't filling up that it's failing.

Closes #12504.

(cherry picked from commit 4eb086a38712ea98faf41e075b84555b11b54362)

Gbp-Pq: Name networkd-fix-link_up-12505.patch

6 years agonetwork: read link specific sysctl value
Yu Watanabe [Fri, 14 Jun 2019 00:42:51 +0000 (09:42 +0900)]
network: read link specific sysctl value

This introduce link_sysctl_ipv6_enabled() and replaces
manager_sysctl_ipv6_enabled() with it.

(cherry picked from commit bafa9641446852f7fa15ca12d08a223d345c78ea)

Gbp-Pq: Name network-read-link-specific-sysctl-value.patch

6 years agonetwork: ignore requested ipv6 routing policy rule when ipv6 is disabled by sysctl
Yu Watanabe [Tue, 11 Jun 2019 14:29:57 +0000 (23:29 +0900)]
network: ignore requested ipv6 routing policy rule when ipv6 is disabled by sysctl

(cherry picked from commit 7ef7e5509b637e660e89ba8a938930ec01de6e54)

Gbp-Pq: Name network-ignore-requested-ipv6-routing-policy-rule-when-ip.patch

6 years agonetwork: ignore requested ipv6 route when ipv6 is disabled by sysctl
Yu Watanabe [Tue, 11 Jun 2019 14:26:11 +0000 (23:26 +0900)]
network: ignore requested ipv6 route when ipv6 is disabled by sysctl

(cherry picked from commit c442331750a2a9711036080f7590e190b9b0eb54)

Gbp-Pq: Name network-ignore-requested-ipv6-route-when-ipv6-is-disabled.patch

6 years agonetwork: ignore requested ipv6 addresses when ipv6 is disabled by sysctl
Yu Watanabe [Tue, 11 Jun 2019 14:20:56 +0000 (23:20 +0900)]
network: ignore requested ipv6 addresses when ipv6 is disabled by sysctl

(cherry picked from commit 54a1a535bd60f13964bbddd8f381601e33e8e56f)

Gbp-Pq: Name network-ignore-requested-ipv6-addresses-when-ipv6-is-disa.patch

6 years agoman: add note that %h/%u/%U are mostly useless
Zbigniew Jędrzejewski-Szmek [Tue, 21 May 2019 17:31:49 +0000 (19:31 +0200)]
man: add note that %h/%u/%U are mostly useless

Fixes #12389.

(cherry picked from commit b4e2407716731d1ce099bad1c2778f7a4424ed2e)

Gbp-Pq: Name man-add-note-that-h-u-U-are-mostly-useless.patch

6 years agocore: unset HOME=/ that the kernel gives us
Zbigniew Jędrzejewski-Szmek [Tue, 21 May 2019 17:26:12 +0000 (19:26 +0200)]
core: unset HOME=/ that the kernel gives us

Partially fixes #12389.

%h would return "/" in a machine, but "/root" in a container. Let's fix
this by resetting $HOME to the expected value.

(cherry picked from commit 9d48671c62de133a2b9fe7c31e70c0ff8e68f2db)

Gbp-Pq: Name core-unset-HOME-that-the-kernel-gives-us.patch

6 years agoask-password: prevent buffer overflow when reading from keyring
Thadeu Lima de Souza Cascardo [Mon, 13 May 2019 19:58:01 +0000 (16:58 -0300)]
ask-password: prevent buffer overflow when reading from keyring

When we read from keyring, a temporary buffer is allocated in order to
determine the size needed for the entire data. However, when zeroing that area,
we use the data size returned by the read instead of the lesser size allocate
for the buffer.

That will cause memory corruption that causes systemd-cryptsetup to crash
either when a single large password is used or when multiple passwords have
already been pushed to the keyring.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
(cherry picked from commit 59c55e73eaee345e1ee67c23eace8895ed499693)

Gbp-Pq: Name ask-password-prevent-buffer-overflow-when-reading-from-ke.patch

6 years agorandom-util: eat up bad RDRAND values seen on AMD CPUs
Lennart Poettering [Fri, 10 May 2019 19:16:16 +0000 (15:16 -0400)]
random-util: eat up bad RDRAND values seen on AMD CPUs

An ugly, ugly work-around for #11810. And no, we shouldn't have to do
this. This is something for AMD, the firmware or the kernel to
fix/work-around, not us. But nonetheless, this should do it for now.

Fixes: #11810
(cherry picked from commit 1c53d4a070edbec8ad2d384ba0014d0eb6bae077)

Gbp-Pq: Name random-util-eat-up-bad-RDRAND-values-seen-on-AMD-CPUs.patch

6 years agoDrop support for /usr/sbin/halt.local
Michael Biebl [Tue, 14 May 2019 15:40:45 +0000 (17:40 +0200)]
Drop support for /usr/sbin/halt.local

/usr/sbin/halt.local is a Fedora/Red Hat anachronism from pre-systemd
times.

(cherry picked from commit 44508946534eee032927c263b79464832656dd6e)

Gbp-Pq: Name Drop-support-for-usr-sbin-halt.local.patch

6 years agomeson: stop creating .wants directories for {multi-user,getty}.target (#12569)
Michael Biebl [Fri, 17 May 2019 06:02:46 +0000 (08:02 +0200)]
meson: stop creating .wants directories for {multi-user,getty}.target (#12569)

Since preset is supposed to be used to enable the services, there is no
need to pre-create those directories either.

Follow-up for #12164

(cherry picked from commit dadc7f2e43b163dd740832abd73b83245f716c1e)

Gbp-Pq: Name meson-stop-creating-.wants-directories-for-multi-user-get.patch

6 years agotest: add test for flush_accept()
Lennart Poettering [Thu, 18 Apr 2019 13:16:18 +0000 (15:16 +0200)]
test: add test for flush_accept()

Fixes: #12335
(cherry picked from commit 5b116c37e14582ee6550c9157445d6bbd4ce1813)

Gbp-Pq: Name test-add-test-for-flush_accept.patch

6 years agosocket-util: make sure flush_accept() doesn't hang on unexpected EOPNOTSUPP
Lennart Poettering [Thu, 18 Apr 2019 13:13:54 +0000 (15:13 +0200)]
socket-util: make sure flush_accept() doesn't hang on unexpected EOPNOTSUPP

So apparently there are two reasons why accept() can return EOPNOTSUPP:
because the socket is not a listening stream socket (or similar), or
because the incoming TCP connection for some reason wasn't acceptable to
the host. THe latter should be a transient error, as suggested on
accept(2). The former however should be considered fatal for
flush_accept(). Let's fix this by explicitly checking whether the socket
is a listening socket beforehand.

(cherry picked from commit f3d75364fbebf2ddb6393e54db5e10b6f6234e14)

Gbp-Pq: Name socket-util-make-sure-flush_accept-doesn-t-hang-on-unexpe.patch

6 years agosystemd (242-4) unstable; urgency=medium
Michael Biebl [Wed, 21 Aug 2019 20:09:13 +0000 (21:09 +0100)]
systemd (242-4) unstable; urgency=medium

  * Upload to unstable

[dgit import unpatched systemd 242-4]

6 years agoImport systemd_242-4.debian.tar.xz
Michael Biebl [Wed, 21 Aug 2019 20:09:13 +0000 (21:09 +0100)]
Import systemd_242-4.debian.tar.xz

[dgit import tarball systemd 242-4 systemd_242-4.debian.tar.xz]

6 years agoMerge version 241-6+rpi1 and 241-7 to produce 241-7+rpi1 archive/raspbian/241-7+rpi1 raspbian/241-7+rpi1
Raspbian automatic forward porter [Sat, 27 Jul 2019 19:10:21 +0000 (20:10 +0100)]
Merge version 241-6+rpi1 and 241-7 to produce 241-7+rpi1

6 years agoMerge systemd (241-7) import into refs/heads/workingbranch
Michael Biebl [Thu, 18 Jul 2019 17:38:23 +0000 (18:38 +0100)]
Merge systemd (241-7) import into refs/heads/workingbranch

6 years agoDrop seccomp system call filter for udev
Michael Biebl [Wed, 18 Jul 2018 21:49:16 +0000 (23:49 +0200)]
Drop seccomp system call filter for udev

The seccomp based system call whitelist requires at least systemd 239 to
be the active init and during a dist-upgrade we can't guarantee that
systemd has been fully configured before udev is restarted.

This partially reverts upstream commit
ee8f26180d01e3ddd4e5f20b03b81e5e737657ae.

Once buster is released, this patch can be dropped.

Closes: #903224
Gbp-Pq: Topic debian
Gbp-Pq: Name Drop-seccomp-system-call-filter-for-udev.patch

6 years agoAdd env variable for machine ID path
Martin Pitt [Wed, 18 Jan 2017 10:21:35 +0000 (11:21 +0100)]
Add env variable for machine ID path

During package build, in minimal chroots, or other systems which do not already
have an /etc/machine-id we get six test failures. Introduce a
$SYSTEMD_MACHINE_ID_PATH environment variable which can specify a location
other than /etc/machine-id, so that the unit tests are independent from the
environment.

Also adjust test-fs-util to not assume that /etc/machine-id exists. Use
/etc/passwd instead which is created by base-files.

Closes: #851445
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62344

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-env-variable-for-machine-ID-path.patch

6 years agoLet graphical-session-pre.target be manually started
Iain Lane [Mon, 22 Aug 2016 05:03:27 +0000 (07:03 +0200)]
Let graphical-session-pre.target be manually started

This is needed until https://github.com/systemd/systemd/issues/3750 is fixed.

Forwarded: not-needed
Bug-Ubuntu: https://launchpad.net/bugs/1615341

Gbp-Pq: Topic debian
Gbp-Pq: Name Let-graphical-session-pre.target-be-manually-started.patch

6 years agoRevert "core: enable TasksMax= for all services by default, and set it to 512"
Martin Pitt [Mon, 9 May 2016 19:24:38 +0000 (21:24 +0200)]
Revert "core: enable TasksMax= for all services by default, and set it to 512"

This reverts commit 9ded9cd14cc03c67291b10a5c42ce5094ba0912f.

Introducing a default limit on number of threads broke a lot of software which
regularly needs more, such as MySQL and RabbitMQ, or services that spawn off an
indefinite number of subtasks that are not in a scope, like LXC or cron.

15% is way too much for most "simple" services, and it's too little for others
such as the ones mentioned above. There is also no particular rationale about
any particular global limit, so even if we'd bump it higher we'd just make the
limit even less useful while still breaking software.

It is both much safer and also much more effective in terms of guarding against
berserk programs/bugs/unintended fork bombs etc. to set limits in units
individually. Once someone looks at one, this is then a great time to also flip
on the other resource and privilege limitations that systemd offers.

Bug: https://github.com/systemd/systemd/issues/3211
Bug-Debian: https://bugs.debian.org/823530
Bug-Ubuntu: https://launchpad.net/bugs/1578080

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-enable-TasksMax-for-all-services-by-default-a.patch

6 years agoRevert "core: set RLIMIT_CORE to unlimited by default"
Martin Pitt [Sat, 27 Feb 2016 11:27:06 +0000 (12:27 +0100)]
Revert "core: set RLIMIT_CORE to unlimited by default"

Partially revert commit 15a900327ab as this completely breaks core dumps
without systemd-coredump. It's also contradicting core(8), and it's not
systemd's place to redefine the kernel definitions of core files.

Commit bdfd7b2c now honours the process' RLIMIT_CORE for systemd-coredump. This
isn't what RLIMIT_CORE is supposed to do (it limits the size of the core
*file*, but the kernel deliberately ignores it for piping), so set a static
2^63 core size limit for systemd-coredump to go back to the previous behaviour
(otherwise the change above would break systemd-coredump).

Bug-Debian: https://bugs.debian.org/815020

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch

6 years agoRevert "core: one step back again, for nspawn we actually can't wait for cgroups...
Martin Pitt [Mon, 27 Apr 2015 13:29:13 +0000 (15:29 +0200)]
Revert "core: one step back again, for nspawn we actually can't wait for cgroups running empty since systemd will get exactly zero notifications about it"

This reverts commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7.

Bug-Debian: https://bugs.debian.org/784720
Bug-Ubuntu: https://launchpad.net/bugs/1448259
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1141137

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-one-step-back-again-for-nspawn-we-actual.patch

6 years agoSkip filesystem check if already done by the initramfs
Nis Martensen [Tue, 19 Jan 2016 21:01:43 +0000 (22:01 +0100)]
Skip filesystem check if already done by the initramfs

Newer versions of initramfs-tools already fsck and mount / and /usr in
the initramfs. Skip the filesystem check in this case.

Based on a previous patch by Michael Biebl <biebl@debian.org>.

Closes: #782522
Closes: #810748
Gbp-Pq: Topic debian
Gbp-Pq: Name Skip-filesystem-check-if-already-done-by-the-initram.patch

6 years agofsckd daemon for inter-fsckd communication
Didier Roche [Fri, 22 May 2015 11:04:38 +0000 (13:04 +0200)]
fsckd daemon for inter-fsckd communication

Global logic:
Add systemd-fsckd multiplexer which accepts multiple (via systemd-fsck's
/run/systemd/fsck.progress socket) fsck instances to connect to it and sends
progress report. systemd-fsckd then computes and writes to /dev/console the
number of devices currently being checked and the minimum fsck progress.

Plymouth and user interaction:
Forward the progress to plymouth and support canellation of in progress fsck.
Try to connect and send to plymouth (if running) some checked report progress,
using direct plymouth protocole.

Update message is the following:
fsckd:<num_devices>:<progress>:<string>
* num_devices corresponds to the current number of devices being checked (int)
* progress corresponds to the current minimum percentage of all devices being
  checked (float, from 0 to 100)
* string is a translated message ready to be displayed by the plymouth theme
  displaying the information above. It can be overridden by plymouth themes
  supporting i18n.

Grab in fsckd plymouth watch key Control+C, and propagate this cancel request
to systemd-fsck which will terminate fsck.

Send a message to signal to user what key we are grabbing for fsck cancel.

Message is: fsckd-cancel-msg:<string>
Where string is a translated string ready to be displayed by the plymouth theme
indicating that Control+C can be used to cancel current checks. It can be
overridden (matching only fsckd-cancel-msg prefix) for themes supporting i18n.

Misc:
systemd-fsckd stops on idle when no fsck is connected.
Add man page explaining the plymouth theme protocol, usage of the daemon
as well as the socket activation part. Adapt existing fsck man page.

Note that fsckd had lived in the upstream tree for a while, but was removed.
More information at
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030175.html
-

Gbp-Pq: Topic debian
Gbp-Pq: Name fsckd-daemon-for-inter-fsckd-communication.patch

6 years agoOnly start logind if dbus is installed
Martin Pitt [Mon, 9 Feb 2015 09:53:43 +0000 (10:53 +0100)]
Only start logind if dbus is installed

logind fails to start in environments without dbus, such as LXC containers or
servers. Add a startup condition to avoid the very noisy startup failure.

Part of #772700

Gbp-Pq: Topic debian
Gbp-Pq: Name Only-start-logind-if-dbus-is-installed.patch

6 years agoDon't enable audit by default
Martin Pitt [Sun, 28 Dec 2014 11:49:35 +0000 (12:49 +0100)]
Don't enable audit by default

It causes flooding of dmesg and syslog, suppressing actually important
messages.

Don't enable it for now, until a better solution is found:
http://lists.freedesktop.org/archives/systemd-devel/2014-December/026591.html

Bug-Debian: https://bugs.debian.org/773528

Gbp-Pq: Topic debian
Gbp-Pq: Name Don-t-enable-audit-by-default.patch

6 years agoRe-enable journal forwarding to syslog
Martin Pitt [Fri, 28 Nov 2014 13:43:25 +0000 (14:43 +0100)]
Re-enable journal forwarding to syslog

Revert upstream commit 46b131574fdd7d77 for now, until Debian's sysloggers
can/do all read from the journal directly. See

  http://lists.freedesktop.org/archives/systemd-devel/2014-November/025550.html

for details. Once we grow a journal.conf.d/ directory, sysloggers can be moved
to pulling from the journal one by one and disable forwarding again in such a
conf.d snippet.

Gbp-Pq: Topic debian
Gbp-Pq: Name Re-enable-journal-forwarding-to-syslog.patch

6 years agoAdd support for TuxOnIce hibernation
Julien Muchembled [Tue, 29 Apr 2014 09:40:50 +0000 (11:40 +0200)]
Add support for TuxOnIce hibernation

systemd does not support non-mainline kernel features so upstream rejected this
patch.
It is however required for systemd integration by tuxonice-userui package.

Forwarded: http://lists.freedesktop.org/archives/systemd-devel/2014-April/018960.html

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-support-for-TuxOnIce-hibernation.patch

6 years agoRevert "udev: network device renaming - immediately give up if the target name isn...
Michael Biebl [Wed, 17 Jul 2013 23:04:07 +0000 (01:04 +0200)]
Revert "udev: network device renaming - immediately give up if the target name isn't available"

This reverts commit 97595710b77aa162ca5e20da57d0a1ed7355eaad.

We need to keep supporting systems with 75-persistent-net-generator.rules
generated names for a while after switching to net.ifnames. Re-apply this old
hack to make the renaming less likely to fail.

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-udev-network-device-renaming-immediately-give.patch

6 years agoMake /run/lock tmpfs an API fs
Michael Biebl [Thu, 4 Sep 2014 23:15:16 +0000 (01:15 +0200)]
Make /run/lock tmpfs an API fs

The /run/lock directory is world-writable in Debian due to historic
reasons. To avoid user processes filling up /run, we mount a separate
tmpfs for /run/lock. As this directory needs to be available during
early boot, we make it an API fs.

Drop it from tmpfiles.d/legacy.conf to not clobber the permissions.

Closes: #751392
Gbp-Pq: Topic debian
Gbp-Pq: Name Make-run-lock-tmpfs-an-API-fs.patch

6 years agoBring tmpfiles.d/tmp.conf in line with Debian defaults
Tollef Fog Heen [Tue, 5 Jun 2012 18:59:36 +0000 (20:59 +0200)]
Bring tmpfiles.d/tmp.conf in line with Debian defaults

Closes: #675422
Gbp-Pq: Topic debian
Gbp-Pq: Name Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch

6 years agoUse Debian specific config files
Michael Biebl [Thu, 18 Jul 2013 18:11:02 +0000 (20:11 +0200)]
Use Debian specific config files

Use /etc/default/locale instead of /etc/locale.conf for locale settings.

Use /etc/default/keyboard instead of /etc/X11/xorg.conf.d/00-keyboard.conf for
keyboard configuration.

Read/write /etc/timezone if /etc/localtime does not exist.

Gbp-Pq: Topic debian
Gbp-Pq: Name Use-Debian-specific-config-files.patch

6 years agomeson: make nologin path build time configurable
Michael Biebl [Wed, 17 Jul 2019 23:24:00 +0000 (01:24 +0200)]
meson: make nologin path build time configurable

Some distros install nologin as /usr/sbin/nologin, others as
/sbin/nologin.
Since we can't really on merged-usr everywhere (where the path wouldn't
matter), make the path build time configurable via -Dnologin-path=.

Closes #13028

(cherry picked from commit 6db904625d413739c480ddbe7667d3f40acc4ae0)

Gbp-Pq: Name meson-make-nologin-path-build-time-configurable.patch

6 years agonetwork: do not send ipv6 token to kernel
Yu Watanabe [Thu, 9 May 2019 05:39:46 +0000 (14:39 +0900)]
network: do not send ipv6 token to kernel

We disabled kernel RA support. Then, we should not send
IFLA_INET6_TOKEN.
Thus, we do not need to send IFLA_INET6_ADDR_GEN_MODE twice.

Follow-up for 0e2fdb83bb5e22047e0c7cc058b415d0e93f02cf and
4eb086a38712ea98faf41e075b84555b11b54362.

(cherry picked from commit 9f6e82e6eb3b6e73d66d00d1d6eee60691fb702f)

Gbp-Pq: Name network-do-not-send-ipv6-token-to-kernel.patch

6 years agonetworkd: fix link_up() (#12505)
Susant Sahani [Thu, 9 May 2019 02:05:35 +0000 (07:35 +0530)]
networkd: fix link_up() (#12505)

Fillup IFLA_INET6_ADDR_GEN_MODE while we do link_up.

Fixes the following error:
```
dummy-test: Could not bring up interface: Invalid argument
```

After reading the kernel code when we do a link up
```
net/core/rtnetlink.c
IFLA_AF_SPEC
 af_ops->set_link_af(dev, af);
  inet6_set_link_af
   if (tb[IFLA_INET6_ADDR_GEN_MODE])
             Here it looks for IFLA_INET6_ADDR_GEN_MODE
```
Since link up we didn't filling up that it's failing.

Closes #12504.

(cherry picked from commit 4eb086a38712ea98faf41e075b84555b11b54362)

Gbp-Pq: Name networkd-fix-link_up-12505.patch

6 years agonetwork: read link specific sysctl value
Yu Watanabe [Fri, 14 Jun 2019 00:42:51 +0000 (09:42 +0900)]
network: read link specific sysctl value

This introduce link_sysctl_ipv6_enabled() and replaces
manager_sysctl_ipv6_enabled() with it.

(cherry picked from commit bafa9641446852f7fa15ca12d08a223d345c78ea)

Gbp-Pq: Name network-read-link-specific-sysctl-value.patch

6 years agonetwork: ignore requested ipv6 routing policy rule when ipv6 is disabled by sysctl
Yu Watanabe [Tue, 11 Jun 2019 14:29:57 +0000 (23:29 +0900)]
network: ignore requested ipv6 routing policy rule when ipv6 is disabled by sysctl

(cherry picked from commit 7ef7e5509b637e660e89ba8a938930ec01de6e54)

Gbp-Pq: Name network-ignore-requested-ipv6-routing-policy-rule-when-ip.patch

6 years agonetwork: ignore requested ipv6 route when ipv6 is disabled by sysctl
Yu Watanabe [Tue, 11 Jun 2019 14:26:11 +0000 (23:26 +0900)]
network: ignore requested ipv6 route when ipv6 is disabled by sysctl

(cherry picked from commit c442331750a2a9711036080f7590e190b9b0eb54)

Gbp-Pq: Name network-ignore-requested-ipv6-route-when-ipv6-is-disabled.patch

6 years agonetwork: ignore requested ipv6 addresses when ipv6 is disabled by sysctl
Yu Watanabe [Tue, 11 Jun 2019 14:20:56 +0000 (23:20 +0900)]
network: ignore requested ipv6 addresses when ipv6 is disabled by sysctl

(cherry picked from commit 54a1a535bd60f13964bbddd8f381601e33e8e56f)

Gbp-Pq: Name network-ignore-requested-ipv6-addresses-when-ipv6-is-disa.patch

6 years agonetwork: check whether ipv6 is enabled in sysctl
Yu Watanabe [Mon, 18 Feb 2019 06:00:15 +0000 (15:00 +0900)]
network: check whether ipv6 is enabled in sysctl

Currently, the value is read only once.

Fixes #11711.

(cherry picked from commit 4b600505dda8af6c43496f9e93e420a192d9a38b)

Gbp-Pq: Name network-check-whether-ipv6-is-enabled-in-sysctl.patch

6 years agosysctl-util: add sysctl_read_ip_property()
Yu Watanabe [Mon, 18 Feb 2019 05:41:43 +0000 (14:41 +0900)]
sysctl-util: add sysctl_read_ip_property()

(cherry picked from commit a6b3b0aace152b77682d68d99b3e41580c955efb)

Gbp-Pq: Name sysctl-util-add-sysctl_read_ip_property.patch

6 years agoman: add note that %h/%u/%U are mostly useless
Zbigniew Jędrzejewski-Szmek [Tue, 21 May 2019 17:31:49 +0000 (19:31 +0200)]
man: add note that %h/%u/%U are mostly useless

Fixes #12389.

(cherry picked from commit b4e2407716731d1ce099bad1c2778f7a4424ed2e)

Gbp-Pq: Name man-add-note-that-h-u-U-are-mostly-useless.patch

6 years agocore: unset HOME=/ that the kernel gives us
Zbigniew Jędrzejewski-Szmek [Tue, 21 May 2019 17:26:12 +0000 (19:26 +0200)]
core: unset HOME=/ that the kernel gives us

Partially fixes #12389.

%h would return "/" in a machine, but "/root" in a container. Let's fix
this by resetting $HOME to the expected value.

(cherry picked from commit 9d48671c62de133a2b9fe7c31e70c0ff8e68f2db)

Gbp-Pq: Name core-unset-HOME-that-the-kernel-gives-us.patch

6 years agoask-password: prevent buffer overflow when reading from keyring
Michael Biebl [Thu, 27 Jun 2019 13:02:40 +0000 (15:02 +0200)]
ask-password: prevent buffer overflow when reading from keyring

When we read from keyring, a temporary buffer is allocated in order to
determine the size needed for the entire data. However, when zeroing that area,
we use the data size returned by the read instead of the lesser size allocate
for the buffer.

That will cause memory corruption that causes systemd-cryptsetup to crash
either when a single large password is used or when multiple passwords have
already been pushed to the keyring.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
(cherry picked from commit 59c55e73eaee345e1ee67c23eace8895ed499693)

Gbp-Pq: Name ask-password-prevent-buffer-overflow-when-reading-from-ke.patch

6 years agorandom-util: eat up bad RDRAND values seen on AMD CPUs
Michael Biebl [Tue, 14 May 2019 11:12:35 +0000 (13:12 +0200)]
random-util: eat up bad RDRAND values seen on AMD CPUs

An ugly, ugly work-around for #11810. And no, we shouldn't have to do
this. This is something for AMD, the firmware or the kernel to
fix/work-around, not us. But nonetheless, this should do it for now.

Fixes: #11810
(cherry picked from commit 1c53d4a070edbec8ad2d384ba0014d0eb6bae077)

Gbp-Pq: Name random-util-eat-up-bad-RDRAND-values-seen-on-AMD-CPUs.patch

6 years agosystemctl: restore "systemctl reboot ARG" functionality
Vesa Jääskeläinen [Sat, 9 Mar 2019 20:30:45 +0000 (22:30 +0200)]
systemctl: restore "systemctl reboot ARG" functionality

Commit d85515edcf9700dc068201ab9f7103f04f3b25b2 changed logic how reboot is
executed. That commit changed behavior to use emergency action reboot code path
to perform the reboot.

This inadvertently broke rebooting with argument:
$ systemctl reboot custom-reason

Restore original behavior so that if reboot service unit similar to
systemd-reboot.service is executed it is possible to override reboot reason
with "systemctl reboot ARG".

When "systemctl reboot ARG" is executed ARG is placed in file
/run/systemd/reboot-param and reboot is issued using logind's Reboot
dbus-service.

If RebootArgument is specified in systemd-reboot.service it takes precedence
over what systemctl sets.

Fixes: #11828
(cherry picked from commit 77defcf5382a557189350f928967d676510e362c)

Gbp-Pq: Name systemctl-restore-systemctl-reboot-ARG-functionality.patch

6 years agojournal-remote: do not request Content-Length if Transfer-Encoding is chunked
Yu Watanabe [Mon, 11 Mar 2019 03:27:18 +0000 (12:27 +0900)]
journal-remote: do not request Content-Length if Transfer-Encoding is chunked

This fixes a bug introduced by 7fdb237f5473cb8fc2129e57e8a0039526dcb4fd.

Closes #11571.

(cherry picked from commit a289dfd69b3ff4bccdde93e84b67c947bafa27e1)

Gbp-Pq: Name journal-remote-do-not-request-Content-Length-if-Transfer-.patch

6 years agopam-systemd: use secure_getenv() rather than getenv()
Lennart Poettering [Mon, 4 Feb 2019 09:23:43 +0000 (10:23 +0100)]
pam-systemd: use secure_getenv() rather than getenv()

And explain why in a comment.

(cherry picked from commit 83d4ab55336ff8a0643c6aa627b31e351a24040a)

Gbp-Pq: Name pam-systemd-use-secure_getenv-rather-than-getenv.patch

6 years agonetwork: do not remove rule when it is requested by existing links
Yu Watanabe [Fri, 22 Feb 2019 04:32:47 +0000 (13:32 +0900)]
network: do not remove rule when it is requested by existing links

Otherwise, the first link once removes all saved rules in the foreign
rule database, and the second or later links create again...

(cherry picked from commit 031fb59a984e5b51f3c72aa8125ecc50b08011fe)

Gbp-Pq: Name network-do-not-remove-rule-when-it-is-requested-by-existi.patch

6 years agonetwork: remove routing policy rule from foreign rule database when it is removed
Yu Watanabe [Fri, 22 Feb 2019 04:27:44 +0000 (13:27 +0900)]
network: remove routing policy rule from foreign rule database when it is removed

Previously, When the first link configures rules, it removes all saved
rules, which were configured by networkd previously, in the foreign rule
database, but the rules themselves are still in the database.
Thus, when the second or later link configures rules, it errnously
treats the rules already exist.
This is the root of issue #11280.

This removes rules from the foreign database when they are removed.

Fixes #11280.

(cherry picked from commit 92cd00b9749141907a1110044cc7d1f01caff545)

Gbp-Pq: Name network-remove-routing-policy-rule-from-foreign-rule-data.patch

6 years agonetworkd: clarify that IPv6 RA uses our own stack, no the kernel's
Lennart Poettering [Wed, 13 Mar 2019 16:00:56 +0000 (17:00 +0100)]
networkd: clarify that IPv6 RA uses our own stack, no the kernel's

Fixes: #8906
(cherry picked from commit c4a05aa1a8338013108d099de805f3262a871c0f)

Gbp-Pq: Name networkd-clarify-that-IPv6-RA-uses-our-own-stack-no-the-k.patch

6 years agobash-completion: use default completion for redirect operators
Frantisek Sumsal [Sat, 23 Mar 2019 20:49:17 +0000 (21:49 +0100)]
bash-completion: use default completion for redirect operators

(cherry picked from commit 1413763ea540a897852494259cb949fe01e1e7e7)

Gbp-Pq: Name bash-completion-use-default-completion-for-redirect-opera.patch

6 years agoudev: run programs in the specified order
Yu Watanabe [Mon, 4 Mar 2019 19:01:34 +0000 (04:01 +0900)]
udev: run programs in the specified order

This fixes bugs introduced by 29448498c724da7ade1b5efb20d7472c1b128d2c
and d838e14515c82b05a07f2bf393cce057b45b2b53.

Previously, RUN and SECLABEL keys are stored in udev_list with its unique
flag is false. If the flag is false, then udev_list is just a linked
list and new entries are always added in the last.
So, we should use OrderedHashmap instead of Hashmap.

Fixes #11368.

(cherry picked from commit 39a15c8a8dad26deda140867f03e44a535b7bd8d)

Gbp-Pq: Name udev-run-programs-in-the-specified-order.patch

6 years agoRe-add uaccess tag for /dev/dri/renderD*
Michael Biebl [Wed, 13 Mar 2019 22:22:26 +0000 (23:22 +0100)]
Re-add uaccess tag for /dev/dri/renderD*

Setting an access mode != 0666 is explicitly supported via -Dgroup-render-mode
In such a case, re-add the uaccess tag.

This is basically the same change that was done for /dev/kvm in
commit fa53e24130af3a389573acb9585eadbf7192955f and
ace5e3111c0b8d8bfd84b32f2c689b0a4d92c061
and partially reverts the changes from
4e15a7343cb389e97f3eb4f49699161862d8b8b2

(cherry picked from commit 055a083a47de968744c4988fe305592477118c86)

Gbp-Pq: Name Re-add-uaccess-tag-for-dev-dri-renderD.patch

6 years agoremove "." path components from required mount paths
Stephane Chazelas [Wed, 6 Mar 2019 22:16:55 +0000 (22:16 +0000)]
remove "." path components from required mount paths

unit_require_mounts_for may be passed path arguments that contain "."
components like for user's home directories where "." is sometimes used
to specify some form of anchor point.

This change stops considering such path as an error and removes the "."
components instead.

Closes: #11910
(cherry picked from commit 106bf8e445a797f9d9c88b827ed42193f2f6b838)

Gbp-Pq: Name remove-.-path-components-from-required-mount-paths.patch

6 years agoudev: restore debug level when logging a failure in the external prog called by IMPOR...
Franck Bui [Tue, 5 Mar 2019 10:03:07 +0000 (11:03 +0100)]
udev: restore debug level when logging a failure in the external prog called by IMPORT{program}

It was already the case before commit a75211421fc9366068e6d9446e8e567246c72feb,
which upgraded the log to warning.

This seems an unintended side effect as the commit message doesn't mention it
and the old behavior looks more appropriate.

(cherry picked from commit 3c37dadf627677eef62fcfc0c0f07cc67c748a9e)

Gbp-Pq: Name udev-restore-debug-level-when-logging-a-failure-in-the-ex.patch

6 years agocgtop: Fix processing of controllers other than CPU
Szabolcs Fruhwald [Wed, 20 Feb 2019 20:38:50 +0000 (12:38 -0800)]
cgtop: Fix processing of controllers other than CPU

After debugging the issue with gdb, I found that the following change

 94ddb08 "cgtop: Still try to get CPU statistics if controller-free"

has introduced a bug, which prevents process(..) method processing
memory and io controllers when cpu_accounting_is_cheap() is true.
The obvious fix is to move this branch to be the last one, keeping
the intended behavior of the above change, without having a negative
effect on the other controllers.

Fixes #11773 [systemd-cgtop no longer shows memory (and io) usage]

(cherry picked from commit 5fe74e893c7939a360dc4eb75dbf3f540526c968)

Gbp-Pq: Name cgtop-Fix-processing-of-controllers-other-than-CPU.patch

6 years agotimedate: fix emitted value when ntp client is enabled/disabled (#11951)
Yu Watanabe [Sun, 10 Mar 2019 19:44:21 +0000 (04:44 +0900)]
timedate: fix emitted value when ntp client is enabled/disabled (#11951)

This fixes a regression originall caused by cf3872bd2 and
triggered by b4356b5720a.

Fixes #11944

(cherry picked from commit 49942d6b1eac12f3157c628ee6249c3bbb3602aa)

Gbp-Pq: Name timedate-fix-emitted-value-when-ntp-client-is-enabled-dis.patch

6 years agonetworkd-test: ignore failures of test_route_only_dns* in containers
Martin Pitt [Wed, 27 Feb 2019 22:15:31 +0000 (23:15 +0100)]
networkd-test: ignore failures of test_route_only_dns* in containers

This test exposes a race condition when running in LXC, see issue #11848
for details. Until that is understood and fixed, skip the test as it's
not a recent regression.

(cherry picked from commit 09b8826ea371e027c76a573a226bfd8f8c5652a2)

Gbp-Pq: Name networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch

6 years agonetworkd-test: fix test_dropin()
Martin Pitt [Thu, 21 Feb 2019 11:34:23 +0000 (12:34 +0100)]
networkd-test: fix test_dropin()

 - This test needs resolved, so make sure it is started. In some Debian
   environments it is not.
 - It was an unnecessary, and now failing assumption that name servers
   get atomically written to the resolved's resolv.conf. Wait until both
   expected name servers are in the file.

(cherry picked from commit f5cf985e9cc6fff747ca17acadb1b4751076103b)

Gbp-Pq: Name networkd-test-fix-test_dropin.patch

6 years agonetworkd-test: use a complete domain name in test_route_only_dns()
Martin Pitt [Thu, 21 Feb 2019 11:26:44 +0000 (12:26 +0100)]
networkd-test: use a complete domain name in test_route_only_dns()

Since version 241 (commit ea4678?), querying MX type records for
single-label domains does not actually forward the query to the DNS
server any more. Use "example.com" instead, which is the recommended
test domain anyway.

(cherry picked from commit ca56805c8de43fc21ab4657cf5ebd1e0248527ac)

Gbp-Pq: Name networkd-test-use-a-complete-domain-name-in-test_route_on.patch

6 years agonetworkd-test: disable DNSSEC in domain-restricted DNS test
Martin Pitt [Thu, 21 Feb 2019 11:24:16 +0000 (12:24 +0100)]
networkd-test: disable DNSSEC in domain-restricted DNS test

dnsmasq 2.80 changed behaviour when being queried by resolved with
enabled DNSSEC: It returns errors for SOA and DS queries which cause the
entire query to fail. As we don't configure DNSSEC in this test anyway,
just disable it so that we retain compatibility with old and new dnsmasq
versions.

(cherry picked from commit 6592c9c850675fb20236271efc4f65acbe3bfa00)

Gbp-Pq: Name networkd-test-disable-DNSSEC-in-domain-restricted-DNS-tes.patch

6 years agosd-device: also store properties read from udev database to sd_device::properties_db
Yu Watanabe [Fri, 15 Feb 2019 20:21:59 +0000 (05:21 +0900)]
sd-device: also store properties read from udev database to sd_device::properties_db

Follow-up for a3ce813697bcc1c4644e097a2f1cd0459326d6ee and
5ce41697bd3ddc19cd6e1e6834751082ca0c8b02.

Before a3ce813697bcc1c4644e097a2f1cd0459326d6ee, all properties in
src->properties and src->properties_db are mixed and copied to
dst->properties_db by device_copy_properties().
So, it is not necessary to store data from udev database file to
sd_device::properties_db before copying properties.

But now, properties are not mixed. So, the read data need to be
stored to also ::properties_db.

Fixes #11721.

(cherry picked from commit 03dd7b7ddec1b0e06f254972a2e05f516a05edaf)

Gbp-Pq: Name sd-device-also-store-properties-read-from-udev-database-t.patch

6 years agoudev,network: drop unused parent_driver argument from net_match_config()
Yu Watanabe [Sat, 16 Feb 2019 15:47:45 +0000 (00:47 +0900)]
udev,network: drop unused parent_driver argument from net_match_config()

The argument has never been used.

(cherry picked from commit 4f4daf418f2e750caae6bc26cd49daafc23ad4de)

Gbp-Pq: Name udev-network-drop-unused-parent_driver-argument-from-net_.patch

6 years agosd-bus: enforce a size limit on D-Bus object paths
Martin Pitt [Sun, 17 Feb 2019 09:17:45 +0000 (10:17 +0100)]
sd-bus: enforce a size limit on D-Bus object paths

Replace stack with heap allocation. This avoids accessing/modifying
memory outside of the allocated stack region by sending specially
crafted D-Bus messages with very large object paths.

Vulnerability discovered by Chris Coulson <chris.coulson@canonical.com>,
patch provided by Riccardo Schirone <rschiron@redhat.com>.

CVE-2019-6454

Gbp-Pq: Name sd-bus-enforce-a-size-limit-on-D-Bus-object-paths.patch

6 years agosystemd (241-7) unstable; urgency=medium
Michael Biebl [Thu, 18 Jul 2019 17:38:23 +0000 (18:38 +0100)]
systemd (241-7) unstable; urgency=medium

  [ Michael Biebl ]
  * network: Fix failure to bring up interface with Linux kernel 5.2.
    Backport two patches from systemd master in order to fix a bug with 5.2
    kernels where the network interface fails to come up with the following
    error: "enp3s0: Could not bring up interface: Invalid argument"
    (Closes: #931636)
  * Use /usr/sbin/nologin as nologin shell.
    In Debian the nologin shell is installed in /usr/sbin, not /sbin.
    (Closes: #931850)

  [ Mert Dirik ]
  * 40-systemd: Don't fail if SysV init script uses set -u and $1 is unset
    (Closes: #931719)

[dgit import unpatched systemd 241-7]

6 years agoImport systemd_241-7.debian.tar.xz
Michael Biebl [Thu, 18 Jul 2019 17:38:23 +0000 (18:38 +0100)]
Import systemd_241-7.debian.tar.xz

[dgit import tarball systemd 241-7 systemd_241-7.debian.tar.xz]

6 years agoMerge systemd (241-6+rpi1) import into refs/heads/workingbranch
Raspbian forward porter [Sat, 13 Jul 2019 01:30:09 +0000 (02:30 +0100)]
Merge systemd (241-6+rpi1) import into refs/heads/workingbranch

6 years agoDrop seccomp system call filter for udev
Michael Biebl [Wed, 18 Jul 2018 21:49:16 +0000 (23:49 +0200)]
Drop seccomp system call filter for udev

The seccomp based system call whitelist requires at least systemd 239 to
be the active init and during a dist-upgrade we can't guarantee that
systemd has been fully configured before udev is restarted.

This partially reverts upstream commit
ee8f26180d01e3ddd4e5f20b03b81e5e737657ae.

Once buster is released, this patch can be dropped.

Closes: #903224
Gbp-Pq: Topic debian
Gbp-Pq: Name Drop-seccomp-system-call-filter-for-udev.patch

6 years agoAdd env variable for machine ID path
Martin Pitt [Wed, 18 Jan 2017 10:21:35 +0000 (11:21 +0100)]
Add env variable for machine ID path

During package build, in minimal chroots, or other systems which do not already
have an /etc/machine-id we get six test failures. Introduce a
$SYSTEMD_MACHINE_ID_PATH environment variable which can specify a location
other than /etc/machine-id, so that the unit tests are independent from the
environment.

Also adjust test-fs-util to not assume that /etc/machine-id exists. Use
/etc/passwd instead which is created by base-files.

Closes: #851445
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62344

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-env-variable-for-machine-ID-path.patch

6 years agoLet graphical-session-pre.target be manually started
Iain Lane [Mon, 22 Aug 2016 05:03:27 +0000 (07:03 +0200)]
Let graphical-session-pre.target be manually started

This is needed until https://github.com/systemd/systemd/issues/3750 is fixed.

Forwarded: not-needed
Bug-Ubuntu: https://launchpad.net/bugs/1615341

Gbp-Pq: Topic debian
Gbp-Pq: Name Let-graphical-session-pre.target-be-manually-started.patch

6 years agoRevert "core: enable TasksMax= for all services by default, and set it to 512"
Martin Pitt [Mon, 9 May 2016 19:24:38 +0000 (21:24 +0200)]
Revert "core: enable TasksMax= for all services by default, and set it to 512"

This reverts commit 9ded9cd14cc03c67291b10a5c42ce5094ba0912f.

Introducing a default limit on number of threads broke a lot of software which
regularly needs more, such as MySQL and RabbitMQ, or services that spawn off an
indefinite number of subtasks that are not in a scope, like LXC or cron.

15% is way too much for most "simple" services, and it's too little for others
such as the ones mentioned above. There is also no particular rationale about
any particular global limit, so even if we'd bump it higher we'd just make the
limit even less useful while still breaking software.

It is both much safer and also much more effective in terms of guarding against
berserk programs/bugs/unintended fork bombs etc. to set limits in units
individually. Once someone looks at one, this is then a great time to also flip
on the other resource and privilege limitations that systemd offers.

Bug: https://github.com/systemd/systemd/issues/3211
Bug-Debian: https://bugs.debian.org/823530
Bug-Ubuntu: https://launchpad.net/bugs/1578080

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-enable-TasksMax-for-all-services-by-default-a.patch

6 years agoRevert "core: set RLIMIT_CORE to unlimited by default"
Martin Pitt [Sat, 27 Feb 2016 11:27:06 +0000 (12:27 +0100)]
Revert "core: set RLIMIT_CORE to unlimited by default"

Partially revert commit 15a900327ab as this completely breaks core dumps
without systemd-coredump. It's also contradicting core(8), and it's not
systemd's place to redefine the kernel definitions of core files.

Commit bdfd7b2c now honours the process' RLIMIT_CORE for systemd-coredump. This
isn't what RLIMIT_CORE is supposed to do (it limits the size of the core
*file*, but the kernel deliberately ignores it for piping), so set a static
2^63 core size limit for systemd-coredump to go back to the previous behaviour
(otherwise the change above would break systemd-coredump).

Bug-Debian: https://bugs.debian.org/815020

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch

6 years agoRevert "core: one step back again, for nspawn we actually can't wait for cgroups...
Martin Pitt [Mon, 27 Apr 2015 13:29:13 +0000 (15:29 +0200)]
Revert "core: one step back again, for nspawn we actually can't wait for cgroups running empty since systemd will get exactly zero notifications about it"

This reverts commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7.

Bug-Debian: https://bugs.debian.org/784720
Bug-Ubuntu: https://launchpad.net/bugs/1448259
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1141137

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-one-step-back-again-for-nspawn-we-actual.patch

6 years agoSkip filesystem check if already done by the initramfs
Nis Martensen [Tue, 19 Jan 2016 21:01:43 +0000 (22:01 +0100)]
Skip filesystem check if already done by the initramfs

Newer versions of initramfs-tools already fsck and mount / and /usr in
the initramfs. Skip the filesystem check in this case.

Based on a previous patch by Michael Biebl <biebl@debian.org>.

Closes: #782522
Closes: #810748
Gbp-Pq: Topic debian
Gbp-Pq: Name Skip-filesystem-check-if-already-done-by-the-initram.patch

6 years agofsckd daemon for inter-fsckd communication
Didier Roche [Fri, 22 May 2015 11:04:38 +0000 (13:04 +0200)]
fsckd daemon for inter-fsckd communication

Global logic:
Add systemd-fsckd multiplexer which accepts multiple (via systemd-fsck's
/run/systemd/fsck.progress socket) fsck instances to connect to it and sends
progress report. systemd-fsckd then computes and writes to /dev/console the
number of devices currently being checked and the minimum fsck progress.

Plymouth and user interaction:
Forward the progress to plymouth and support canellation of in progress fsck.
Try to connect and send to plymouth (if running) some checked report progress,
using direct plymouth protocole.

Update message is the following:
fsckd:<num_devices>:<progress>:<string>
* num_devices corresponds to the current number of devices being checked (int)
* progress corresponds to the current minimum percentage of all devices being
  checked (float, from 0 to 100)
* string is a translated message ready to be displayed by the plymouth theme
  displaying the information above. It can be overridden by plymouth themes
  supporting i18n.

Grab in fsckd plymouth watch key Control+C, and propagate this cancel request
to systemd-fsck which will terminate fsck.

Send a message to signal to user what key we are grabbing for fsck cancel.

Message is: fsckd-cancel-msg:<string>
Where string is a translated string ready to be displayed by the plymouth theme
indicating that Control+C can be used to cancel current checks. It can be
overridden (matching only fsckd-cancel-msg prefix) for themes supporting i18n.

Misc:
systemd-fsckd stops on idle when no fsck is connected.
Add man page explaining the plymouth theme protocol, usage of the daemon
as well as the socket activation part. Adapt existing fsck man page.

Note that fsckd had lived in the upstream tree for a while, but was removed.
More information at
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030175.html
-

Gbp-Pq: Topic debian
Gbp-Pq: Name fsckd-daemon-for-inter-fsckd-communication.patch

6 years agoOnly start logind if dbus is installed
Martin Pitt [Mon, 9 Feb 2015 09:53:43 +0000 (10:53 +0100)]
Only start logind if dbus is installed

logind fails to start in environments without dbus, such as LXC containers or
servers. Add a startup condition to avoid the very noisy startup failure.

Part of #772700

Gbp-Pq: Topic debian
Gbp-Pq: Name Only-start-logind-if-dbus-is-installed.patch

6 years agoDon't enable audit by default
Martin Pitt [Sun, 28 Dec 2014 11:49:35 +0000 (12:49 +0100)]
Don't enable audit by default

It causes flooding of dmesg and syslog, suppressing actually important
messages.

Don't enable it for now, until a better solution is found:
http://lists.freedesktop.org/archives/systemd-devel/2014-December/026591.html

Bug-Debian: https://bugs.debian.org/773528

Gbp-Pq: Topic debian
Gbp-Pq: Name Don-t-enable-audit-by-default.patch

6 years agoRe-enable journal forwarding to syslog
Martin Pitt [Fri, 28 Nov 2014 13:43:25 +0000 (14:43 +0100)]
Re-enable journal forwarding to syslog

Revert upstream commit 46b131574fdd7d77 for now, until Debian's sysloggers
can/do all read from the journal directly. See

  http://lists.freedesktop.org/archives/systemd-devel/2014-November/025550.html

for details. Once we grow a journal.conf.d/ directory, sysloggers can be moved
to pulling from the journal one by one and disable forwarding again in such a
conf.d snippet.

Gbp-Pq: Topic debian
Gbp-Pq: Name Re-enable-journal-forwarding-to-syslog.patch

6 years agoAdd support for TuxOnIce hibernation
Julien Muchembled [Tue, 29 Apr 2014 09:40:50 +0000 (11:40 +0200)]
Add support for TuxOnIce hibernation

systemd does not support non-mainline kernel features so upstream rejected this
patch.
It is however required for systemd integration by tuxonice-userui package.

Forwarded: http://lists.freedesktop.org/archives/systemd-devel/2014-April/018960.html

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-support-for-TuxOnIce-hibernation.patch