Michael Biebl [Thu, 27 Jun 2019 13:54:06 +0000 (15:54 +0200)]
network: Behave more gracefully when IPv6 has been disabled
Ignore any configured IPv6 settings when IPv6 has been disabled in the
kernel via sysctl. Instead of failing completely, continue and log a
warning instead.
Make it clear, that setting "User=" has no effect on those specifiers.
Also ensure that "%h" is actually resolved to "/root" for the system
manager instance as documented in the systemd.unit man page.
Michael Biebl [Thu, 27 Jun 2019 13:04:49 +0000 (15:04 +0200)]
ask-password: Prevent buffer overflow when reading from keyring
Fixes a possible 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
Michael Biebl [Tue, 14 May 2019 11:13:19 +0000 (13:13 +0200)]
random-util: Eat up bad RDRAND values seen on AMD CPUs
Some AMD CPUs return bogus data via RDRAND after a suspend/resume cycle
while still reporting success via the carry flag.
Filter out invalid data like -1 (and also 0, just to be sure).
Michael Biebl [Mon, 8 Apr 2019 10:58:57 +0000 (12:58 +0200)]
pam-systemd: Use secure_getenv() rather than getenv()
Fixes a vulnerability in the systemd PAM module which insecurely uses
the environment and lacks seat verification permitting spoofing an
active session to PolicyKit.
Martin Pitt [Sun, 31 Mar 2019 20:52:16 +0000 (22:52 +0200)]
Enable boot-and-service autopkgtest in containers
- Skip tests which can't work in containers.
- Add missing rsyslog test dependency.
- e2scrub_reap.service fails in containers, ignore (filed as #926138)
- Relax pgrep pattern for gdm, as there's no wayland session in
containers.
Michael Biebl [Wed, 20 Mar 2019 22:39:12 +0000 (23:39 +0100)]
Properly remove duplicate directories from systemd package
When removing duplicate directories from the systemd package, sort the
list of directories in reverse order so we properly delete nested
directories.
Running debdiff shows the following result:
Files in first .deb but not in second
-------------------------------------
drwxr-xr-x root/root /etc/udev/
drwxr-xr-x root/root /usr/lib/systemd/tests/
drwxr-xr-x root/root /usr/lib/systemd/tests/testdata/
Those empty directories clearly do not belong into systemd package.
Michael Biebl [Wed, 20 Mar 2019 22:52:16 +0000 (23:52 +0100)]
Drop systemd-shim alternative from libpam-systemd
A fixed systemd-shim package which works with newer versions of systemd
is unlikely to happen given that the systemd-shim package has been
removed from the archive. Drop the alternative dependency from
libpam-systemd accordingly.
Michael Biebl [Mon, 11 Mar 2019 17:33:40 +0000 (18:33 +0100)]
udev.init: Use new s-s-d --notify-await to start udev daemon
Fixes a race condition during startup under SysV init.
Add versioned dependency on dpkg (>= 1.19.3) to ensure that a version
of start-stop-daemon which supports --notify-await is installed.
Assert that `timedatectl set-ntp` correctly controls the service, sets
the `org.freedesktop.timedate1 NTP` property, and sends the right
`PropertiesChanged` signal.
This reproduces <https://github.com/systemd/systemd/issues/11944> and
also the earlier <https://github.com/systemd/systemd/issues/9672>.
Martin Pitt [Sun, 3 Mar 2019 10:48:09 +0000 (11:48 +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.
Since https://github.com/systemd/systemd/commit/1c2c7c6cb it can happen
that pkg-config paths start with '//'. These are not really meaningful,
so normalize the path before comparison.
Martin Pitt [Thu, 21 Feb 2019 12:23:11 +0000 (13:23 +0100)]
systemd.postinst: Don't fail on an existing dynamic systemd-timesync user
Some systemd versions have DynamicUser=yes in systemd-timesyncd.service.
adduser does not consider these high UIDs as system user and fails,
which caused package installation failures.
Adam Borowski [Mon, 3 Dec 2018 13:43:06 +0000 (14:43 +0100)]
Make libpam-systemd Provide: logind, default-logind
This allows alternate logind implementations such as elogind, without
having to recompile every dependant package -- as long as the client API
remains compatible.
These new virtual packages got policy-approved in #917431.
Felipe Sateler [Wed, 13 Feb 2019 12:48:50 +0000 (09:48 -0300)]
Fix comment about why we disable hwclock.service
Systemd nowadays doesn't do it itself because the kernel does it on its own when necessary,
and when not, it is not safe to save the hwclock (eg, there is no certainty the system clock
is correct)
On fast ppc64el machines, cryptsetup start job may not complete by the time
tearDown is executed. In that case stop, causes to simply cancel the start job
without actually cleaning up the dmsetup node. This leads to failing subsequent
test as it no longer starts with a clean device. Thus ensure the
systemd-cryptsetup unit is started, before stopping it.
Also rmmod scsi_debug module at the end, to allow re-running the test in a
loop.
Michael Biebl [Sat, 12 Jan 2019 20:44:57 +0000 (21:44 +0100)]
meson: Stop setting -fPIE globally
Setting -fPIE globally can lead to miscompilations on certain
architectures. Instead use the b_pie=true build option, which was
introduced in meson 0.49. Bump the Build-Depends accordingly.
Michael Biebl [Sat, 12 Jan 2019 19:57:20 +0000 (20:57 +0100)]
Import patches from v240-stable branch (up to f02b5472c6)
- Fixes a problem in logind closing the controlling terminal when using
startx. (Closes: #918927)
- Fixes various journald vulnerabilities via attacker controlled alloca.
(CVE-2018-16864, CVE-2018-16865, Closes: #918841, Closes: #918848)
Benjamin Drung [Mon, 17 Dec 2018 15:58:59 +0000 (16:58 +0100)]
Fix shellcheck issues in initramfs-tools scripts
initramfs-tools will use shellcheck on its own code and will probably
ship a shellcheck autopkgtest that checks its hooks and script
directory. That's how the shellcheck issues in systemd's initramfs-tools
scripts were found.
Michael Biebl [Wed, 9 Jan 2019 17:31:34 +0000 (18:31 +0100)]
Remove old state directory of systemd-timesyncd on upgrades
Otherwise timesyncd will fail to update the clock file if it was created
as /var/lib/private/systemd/timesync/clock.
This was the case when the service was using DynamicUser=yes which it no
longer does in v240.
Michael Biebl [Thu, 3 Jan 2019 23:15:20 +0000 (00:15 +0100)]
udev.init: Trigger add events for subsystems
Update the SysV init script and mimic the behaviour of the initramfs and
systemd-udev-trigger.service which first trigger subsystems and then
devices during the coldplug stage.
Michael Biebl [Sat, 22 Dec 2018 13:48:40 +0000 (14:48 +0100)]
Don't bump fs.nr_open in PID 1
In v240, systemd bumped fs.nr_open in PID 1 to the highest possible
value. Processes that are spawned directly by systemd, will have
RLIMIT_NOFILE be set to 512K (hard).
pam_limits in Debian defaults to "set_all", i.e. for limits which are
not explicitly configured in /etc/security/limits.conf, the value from
PID 1 is taken, which means for login sessions, RLIMIT_NOFILE is set to
the highest possible value instead of 512K. Not every software is able
to deal with such an RLIMIT_NOFILE properly.
While this is arguably a questionable default in Debian's pam_limit,
work around this problem by not bumping fs.nr_open in PID 1.