summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
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
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
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
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
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
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
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
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
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
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
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
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 11:51:47 +0000 (12:51 +0100)]
shared/calendarspec: when mktime() moves us backwards, jump forward
When trying to calculate the next firing of 'Sun *-*-* 01:00:00', we'd fall
into an infinite loop, because mktime() moves us "backwards":
Before this patch:
tm_within_bounds: good=0 2021-03-29 01:00:00 → 2021-03-29 00:00:00
tm_within_bounds: good=0 2021-03-29 01:00:00 → 2021-03-29 00:00:00
tm_within_bounds: good=0 2021-03-29 01:00:00 → 2021-03-29 00:00:00
...
We rely on mktime() normalizing the time. The man page does not say that it'll
move the time forward, but our algorithm relies on this. So let's catch this
case explicitly.
With this patch:
$ TZ=Europe/Dublin faketime 2021-03-21 build/systemd-analyze calendar --iterations=5 'Sun *-*-* 01:00:00'
Normalized form: Sun *-*-* 01:00:00
Next elapse: Sun 2021-03-21 01:00:00 GMT
(in UTC): Sun 2021-03-21 01:00:00 UTC
From now: 59min left
Iter. #2: Sun 2021-04-04 01:00:00 IST
(in UTC): Sun 2021-04-04 00:00:00 UTC
From now: 1 weeks 6 days left <---- note the 2 week jump here
Iter. #3: Sun 2021-04-11 01:00:00 IST
(in UTC): Sun 2021-04-11 00:00:00 UTC
From now: 2 weeks 6 days left
Iter. #4: Sun 2021-04-18 01:00:00 IST
(in UTC): Sun 2021-04-18 00:00:00 UTC
From now: 3 weeks 6 days left
Iter. #5: Sun 2021-04-25 01:00:00 IST
(in UTC): Sun 2021-04-25 00:00:00 UTC
From now: 1 months 4 days left
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=
1941335.
(cherry picked from commit
129cb6e249bef30dc33e08f98f0b27a6de976f6f)
Gbp-Pq: Name shared-calendarspec-when-mktime-moves-us-backwards-jump-f.patch
Zbigniew Jędrzejewski-Szmek [Sun, 21 Mar 2021 19:59:32 +0000 (20:59 +0100)]
shared/calendarspec: abort calculation after 1000 iterations
We have a bug where we seem to enter an infinite loop when running in the
Europe/Dublin timezone. The timezone is "special" because it has negative SAVE
values. The handling of this should obviously be fixed, but let's use a
belt-and-suspenders approach, and gracefully fail if we fail to find an answer
within a specific number of attempts. The code in this function is rather
complex, and it's hard to rule out another bug in the future.
(cherry picked from commit
169615c9a8cdc54d748d4dfc8279be9b3c2bec44)
Gbp-Pq: Name shared-calendarspec-abort-calculation-after-1000-iteratio.patch
Ali Abdallah [Thu, 21 Jan 2021 06:37:21 +0000 (07:37 +0100)]
Always free deserialized_subscribed on reload
Otherwise, it will keep consuming memory on systemctl daemon-reload.
(cherry picked from commit
3deed59afdc2c18ecb76fe90b9bba0cd66045dfa)
Gbp-Pq: Name Always-free-deserialized_subscribed-on-reload.patch
David Tardon [Mon, 2 Aug 2021 11:31:04 +0000 (13:31 +0200)]
machined-varlink: fix double free
Fixes: #18599
Gbp-Pq: Name machined-varlink-fix-double-free.patch
Yu Watanabe [Thu, 7 Jul 2022 09:27:02 +0000 (18:27 +0900)]
time-util: fix buffer-over-run
Fixes #23928.
(cherry picked from commit
9102c625a673a3246d7e73d8737f3494446bad4e)
(cherry picked from commit
72d4c15a946d20143cd4c6783c802124bc894dc7)
(cherry picked from commit
c32530f5bdd11c74e8f5a86eecd7c36b3bae739f)
(cherry picked from commit
b2a25b5e64345bd0bb7697a956d33afd6980286a)
(cherry picked from commit
858dc1ad609290cc4ca288acf87046ee295c3d51)
Gbp-Pq: Name time-util-fix-buffer-over-run.patch
Zbigniew Jędrzejewski-Szmek [Mon, 28 Nov 2022 11:12:55 +0000 (12:12 +0100)]
coredump: do not allow user to access coredumps with changed uid/gid/capabilities
When the user starts a program which elevates its permissions via setuid,
setgid, or capabilities set on the file, it may access additional information
which would then be visible in the coredump. We shouldn't make the the coredump
visible to the user in such cases.
Reported-by: Matthias Gerstner <mgerstner@suse.de>
This reads the /proc/<pid>/auxv file and attaches it to the process metadata as
PROC_AUXV. Before the coredump is submitted, it is parsed and if either
at_secure was set (which the kernel will do for processes that are setuid,
setgid, or setcap), or if the effective uid/gid don't match uid/gid, the file
is not made accessible to the user. If we can't access this data, we assume the
file should not be made accessible either. In principle we could also access
the auxv data from a note in the core file, but that is much more complex and
it seems better to use the stand-alone file that is provided by the kernel.
Attaching auxv is both convient for this patch (because this way it's passed
between the stages along with other fields), but I think it makes sense to save
it in general.
We use the information early in the core file to figure out if the program was
32-bit or 64-bit and its endianness. This way we don't need heuristics to guess
whether the format of the auxv structure. This test might reject some cases on
fringe architecutes. But the impact would be limited: we just won't grant the
user permissions to view the coredump file. If people report that we're missing
some cases, we can always enhance this to support more architectures.
I tested auxv parsing on amd64, 32-bit program on amd64, arm64, arm32, and
ppc64el, but not the whole coredump handling.
(cherry picked from commit
3e4d0f6cf99f8677edd6a237382a65bfe758de03)
(cherry picked from commit
9b75a3d0502d6741c8ecb7175794345f8eb3827c)
(cherry picked from commit
efca5283dc791a07171f80eef84e14fdb58fad57)
(cherry picked from commit
1d5e0e9910500f3c3584485f77bfc35e601036e3)
(cherry picked from commit
8215e1527d859e77dd1378fd7e42bbd32130edb3)
(cherry picked from commit
786df410b1cb3a2294c9a5d118c958525e7439e6)
Gbp-Pq: Name coredump-do-not-allow-user-to-access-coredumps-with-chang.patch
Michael Biebl [Wed, 12 Oct 2022 09:07:57 +0000 (11:07 +0200)]
logind: fix getting property OnExternalPower via D-Bus
The BUS_DEFINE_PROPERTY_GET_GLOBAL macro requires a value as third
argument, so we need to call manager_is_on_external_power(). Otherwise
the function pointer is interpreted as a boolean and always returns
true:
```
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager OnExternalPower
b true
$ /lib/systemd/systemd-ac-power --verbose
no
```
Thanks: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1021644
(cherry picked from commit
63168cb517a556b2f4f175b365f5a4b4c7e85150)
Gbp-Pq: Name logind-fix-getting-property-OnExternalPower-via-D-Bus.patch
Yu Watanabe [Thu, 3 Nov 2022 00:39:36 +0000 (09:39 +0900)]
udev: first set properties based on usb subsystem
After
479da1107a0d4e2f7ef5cd938512b87a0e45f180, the usb_id builtin
command does not set ID_SERIAL if ID_BUS is already set.
Before the commit, all properties set based on pci bus were overwritten
by the usb_id, hence now it is sufficient setting them only when ID_BUS is
not set yet.
Fixes #25238.
(cherry picked from commit
01e704eba982fbc1517287cd261d229ff8e0a779)
Gbp-Pq: Name udev-first-set-properties-based-on-usb-subsystem.patch
Zbigniew Jędrzejewski-Szmek [Wed, 10 Mar 2021 09:17:23 +0000 (10:17 +0100)]
Revert "udev: do not execute hwdb builtin import twice or thrice"
This reverts commit
876c75fe870846b09b54423a6b719d80bc879b27.
The patch seems to cause usb devices to get some attributes set from the parent
PCI device. 'hwdb' builtin has support for breaking iteration upwards on usb
devices. But when '--subsystem=foo' is specified, iteration is continued. I'm
sure it *could* be figured out, but it seems hard to get all the combinations
correct. So let's revert to functional status quo ante, even if does the lookup
more than once unnecessarily.
Fixes #18125.
(cherry picked from commit
451ba55fecd8b494add2001b3ca3c1915c8fd655)
Gbp-Pq: Name Revert-udev-do-not-execute-hwdb-builtin-import-twice-or-t.patch
Yu Watanabe [Sun, 30 Oct 2022 00:43:05 +0000 (09:43 +0900)]
udev: always create device symlinks for USB disks
Previously, ata_id might not be able to retrieve attributes correctly,
and properties from usb_id were used as a fallback. See issue #24921
and PR #24923. To keep backward compatibility, still we need to create
symlinks based on USB serial.
Fixes #25179.
Gbp-Pq: Name udev-always-create-device-symlinks-for-USB-disks.patch
Aleksey Vasenev [Wed, 5 Oct 2022 19:33:53 +0000 (22:33 +0300)]
ata_id: Fixed getting Response Code from SCSI Sense Data (#24921)
The Response Code is contained in the first byte of the SCSI Sense Data.
Bit number 7 is reserved or has a different meaning for some Response Codes
and is set to 1 for some drives.
(cherry picked from commit
2be1ae54badf7a3a12908a8094ebaba8f91887ca)
Gbp-Pq: Name ata_id-Fixed-getting-Response-Code-from-SCSI-Sense-Data-2.patch
Michael Biebl [Sun, 7 Aug 2022 13:21:12 +0000 (15:21 +0200)]
virt: detect OpenStack Nova instance
(cherry picked from commit
01d9fbccddd694bc584aed24eaa0543f831dc929)
Gbp-Pq: Name virt-detect-OpenStack-Nova-instance.patch
Boqun Feng [Tue, 23 Nov 2021 07:09:26 +0000 (15:09 +0800)]
virt: Fix the detection for Hyper-V VMs
Use product_version instead of product_name in DMI table and the string
"Hyper-V" to avoid misdetection.
Fixes: #21468
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
(cherry picked from commit
76eec0649936d9ae2f9087769f463feaf0cf5cb4)
Gbp-Pq: Name virt-Fix-the-detection-for-Hyper-V-VMs.patch
Boqun Feng [Wed, 13 Oct 2021 03:32:09 +0000 (11:32 +0800)]
virt: Support detection for ARM64 Hyper-V guests
The detection of Microsoft Hyper-V VMs is done by cpuid currently,
however there is no cpuid on ARM64. And since ARM64 is now a supported
architecture for Microsoft Hyper-V guests[1], then use DMI tables to
detect a Hyper-V guest, which is more generic and works for ARM64.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
7aff79e297ee1aa0126924921fd87a4ae59d2467
(cherry picked from commit
506bbc8569014253ea8614b680ccbc4fc2513a87)
Gbp-Pq: Name virt-Support-detection-for-ARM64-Hyper-V-guests.patch
Zbigniew Jędrzejewski-Szmek [Wed, 15 Sep 2021 14:33:05 +0000 (16:33 +0200)]
Drop bundled copy of linux/if_arp.h
As far as I can see, we use this to get a list of ARPHRD_* defines (used in
particular for Type= in .link files). If we drop our copy, and build against
old kernel headers, the user will have a shorter list of types available. This
seems OK, and I don't think it's worth carrying our own version of this file
just to have newest possible entries.
7c5b9952c4f6e2b72f90edbe439982528b7cf223 recently updated this file, but we'd
have to update it every time the kernel adds new entries. But if we look at
the failure carefully:
src/basic/arphrd-from-name.gperf:65:16: error: ‘ARPHRD_MCTP’ undeclared (first use in this function); did you mean ‘ARPHRD_FCPP’?
65 | MCTP, ARPHRD_MCTP
| ^~
| ARPHRD_FCPP
we see that the list we were generating was from the system headers, so it was
only as good as the system headers anyway, without the newer entries in our
bundled copy, if there were any. So let's make things simpler by always using
system headers.
And if somebody wants to fix things so that we always have the newest list,
then we should just generate and store the converted list, not the full header.
(cherry picked from commit
e7f46ee3ae1cc66a94b293957721d68dc09d7449)
Gbp-Pq: Name Drop-bundled-copy-of-linux-if_arp.h.patch
Luca Boccassi [Wed, 13 Jan 2021 23:52:00 +0000 (23:52 +0000)]
machine: enter target PID namespace when adding a live mount
machinectl fails since
21935150a0c42b91a322105f6a9129116bfc8e2e as it's now
mounting onto a file descriptor in a target namespace, without joining the
target's PID namespace.
Note that it's not enough to setns CLONE_NEWPID, but a double-fork is required
as well, as implemented by namespace_fork().
Add a test case to TEST-13-NSPAWN to cover this use case.
(cherry picked from commit
98f654fdeab1e1b6df2be76e29e4ccbb6624898d)
Gbp-Pq: Name machine-enter-target-PID-namespace-when-adding-a-live-mou.patch
Luca Boccassi [Thu, 13 Aug 2020 13:47:01 +0000 (14:47 +0100)]
shared/mount-util: use namespace_fork utils
(cherry picked from commit
2338a175fdec3859eab03115ca82a0d58453f5d7)
Gbp-Pq: Name shared-mount-util-use-namespace_fork-utils.patch
Luca Boccassi [Tue, 15 Dec 2020 18:26:34 +0000 (18:26 +0000)]
machine: adjust error message to use 'normalized' instead of ../
(cherry picked from commit
724e689715c8d9f23d035ab20d8c87b6b6c06e33)
Gbp-Pq: Name machine-adjust-error-message-to-use-normalized-instead-of.patch
Luca Boccassi [Thu, 13 Aug 2020 13:01:34 +0000 (14:01 +0100)]
machine/basic: factor out helper function to add airlocked mount to namespace
(cherry picked from commit
6af52c3a458691b016bedeba34c1e72294a67c81)
Gbp-Pq: Name machine-basic-factor-out-helper-function-to-add-airlocked.patch
Luca Boccassi [Sat, 19 Dec 2020 21:40:47 +0000 (21:40 +0000)]
basic: add make_mount_point_inode helper
Creates a file or a directory depending on the source path, useful
for creating mount points.
(cherry picked from commit
8bab8029105e44ce78c5e11bffa203a1135fe201)
Gbp-Pq: Name basic-add-make_mount_point_inode-helper.patch
Zbigniew Jędrzejewski-Szmek [Tue, 30 Nov 2021 21:29:05 +0000 (22:29 +0100)]
shared/rm-rf: loop over nested directories instead of instead of recursing
To remove directory structures, we need to remove the innermost items first,
and then recursively remove higher-level directories. We would recursively
descend into directories and invoke rm_rf_children and rm_rm_children_inner.
This is problematic when too many directories are nested.
Instead, let's create a "TODO" queue. In the the queue, for each level we
hold the DIR* object we were working on, and the name of the directory. This
allows us to leave a partially-processed directory, and restart the removal
loop one level down. When done with the inner directory, we use the name to
unlinkat() it from the parent, and proceed with the removal of other items.
Because the nesting is increased by one level, it is best to view this patch
with -b/--ignore-space-change.
This fixes CVE-2021-3997, https://bugzilla.redhat.com/show_bug.cgi?id=
2024639.
The issue was reported and patches reviewed by Qualys Team.
Mauro Matteo Cascella and Riccardo Schirone from Red Hat handled the disclosure.
(cherry picked from commit
5b1cf7a9be37e20133c0208005274ce4a5b5c6a1)
(cherry picked from commit
911516e1614e435755814ada5fc6064fa107a105)
(cherry picked from commit
6a28f8b55904c818b25e4db2e1511faac79fd471)
(cherry picked from commit
c752f27b7647c99b4a17477c99d84fd8c950ddf0)
(cherry picked from commit
921810ea23357988ce67f49190f43abef1788a9c)
Gbp-Pq: Name shared-rm-rf-loop-over-nested-directories-instead-of-inst.patch
Zbigniew Jędrzejewski-Szmek [Tue, 23 Nov 2021 15:56:42 +0000 (16:56 +0100)]
shared/rm_rf: refactor rm_rf() to shorten code a bit
(cherry picked from commit
84ced330020c0bae57bd4628f1f44eec91304e69)
(cherry picked from commit
664529efa9431edc043126013ea54e6c399ae2d3)
(cherry picked from commit
811b137d6137cc3e8932599e6ef9254ba43ff5eb)
(cherry picked from commit
39a53d4f1445a8981efd0adcc1734dfad46647c5)
(cherry picked from commit
aaad978868bd6ac84d463a94357ddcbc43b24248)
Gbp-Pq: Name shared-rm_rf-refactor-rm_rf-to-shorten-code-a-bit.patch
Zbigniew Jędrzejewski-Szmek [Tue, 23 Nov 2021 14:55:45 +0000 (15:55 +0100)]
shared/rm_rf: refactor rm_rf_children_inner() to shorten code a bit
(cherry picked from commit
3bac86abfa1b1720180840ffb9d06b3d54841c11)
(cherry picked from commit
47741ff9eae6311a03e4d3d837128191826a4a3a)
(cherry picked from commit
89395b63f04f1acc0db533c32637ea20379f97c0)
(cherry picked from commit
3976f244990aa1210ebe018647f32ab060e1c3d3)
(cherry picked from commit
988e43630bb7592947c75fe530a6f7dfebc00c4f)
Gbp-Pq: Name shared-rm_rf-refactor-rm_rf_children_inner-to-shorten-cod.patch
Zbigniew Jędrzejewski-Szmek [Tue, 23 Nov 2021 14:05:58 +0000 (15:05 +0100)]
tmpfiles: 'st' may have been used uninitialized
(cherry picked from commit
160dadc0350c77d612aa9d5569f57d9bc84c3dca)
(cherry picked from commit
7563de501246dccf5a9ea229933481aa1e7bd5c9)
(cherry picked from commit
f54b97b1d05052bfee824ecc03ae9f07f6c37be8)
(cherry picked from commit
ab927db9a7698ee1eceae14ecef7ab43ee3f104e)
Gbp-Pq: Name tmpfiles-st-may-have-been-used-uninitialized.patch
Lennart Poettering [Tue, 5 Oct 2021 08:32:56 +0000 (10:32 +0200)]
rm-rf: optionally fsync() after removing directory tree
(cherry picked from commit
bdfe7ada0d4d66e6d6e65f2822acbb1ec230f9c2)
(cherry picked from commit
2426beacca09d84091759be45b25c88116302184)
(cherry picked from commit
0e180f8e9c25c707b0465ad1b9447a4360f785f1)
(cherry picked from commit
9a9c2220cd3cb61c2de9c482f8ed7fa60807b14a)
Gbp-Pq: Name rm-rf-optionally-fsync-after-removing-directory-tree.patch
Lennart Poettering [Tue, 26 Jan 2021 15:30:06 +0000 (16:30 +0100)]
rm-rf: refactor rm_rf_children(), split out body of directory iteration loop
This splits out rm_rf_children_inner() as body of the loop. We can use
that to implement rm_rf_child() for deleting one specific entry in a
directory.
(cherry picked from commit
1f0fb7d544711248cba34615e43c5a76bc902d74)
(cherry picked from commit
ca4a0e7d41f0b2a1fe2f99dbc3763187c16cf7ab)
(cherry picked from commit
85ccac3393e78d4bf2776ffb8c3a1d8a2a909a2a)
(cherry picked from commit
a87d7ff1a60fe359978e12eb34224255a8f33e27)
Gbp-Pq: Name rm-rf-refactor-rm_rf_children-split-out-body-of-directory.patch
Lennart Poettering [Tue, 26 Jan 2021 15:47:07 +0000 (16:47 +0100)]
rm-rf: fstatat() might fail if containing dir has limited access mode, patch that too
(cherry picked from commit
1b55621dabf741dd963f59ac706ea62cd6e3e95c)
(cherry picked from commit
ce53b81a600e2162ee86e2f4d202e7f28eceb2c6)
Gbp-Pq: Name rm-rf-fstatat-might-fail-if-containing-dir-has-limited-ac.patch
Lennart Poettering [Fri, 26 Feb 2021 16:39:55 +0000 (17:39 +0100)]
btrfs-util: add helper that abstracts "might be btrfs subvol?" check
Let#s not hardcode inode nr 256 everywhere, but abstract this check
slightly.
(cherry picked from commit
674b04ff1b6deab17f5d36c036c0275ba94e1ebc)
(cherry picked from commit
190c6bcfc3518bec964ab740085ac88ccc86dcc7)
Gbp-Pq: Name btrfs-util-add-helper-that-abstracts-might-be-btrfs-subvo.patch
Yu Watanabe [Sat, 20 Feb 2021 07:30:23 +0000 (16:30 +0900)]
udevadm-trigger: do not return immediately on EACCES
Prompted by https://github.com/systemd/systemd/pull/18559.
(cherry picked from commit
0e789e6d48046d43c50dd949a71ac56f1127bb96)
Gbp-Pq: Name udevadm-trigger-do-not-return-immediately-on-EACCES.patch
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jun 2021 09:52:56 +0000 (11:52 +0200)]
basic/unit-name: adjust comments
We already checked for "too long" right above…
(cherry picked from commit
4e2544c30bfb95e7cb4d1551ba066b1a56520ad6)
Gbp-Pq: Name basic-unit-name-adjust-comments.patch
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jun 2021 09:46:41 +0000 (11:46 +0200)]
basic/unit-name: do not use strdupa() on a path
The path may have unbounded length, for example through a fuse mount.
CVE-2021-33910: attacked controlled alloca() leads to crash in systemd and
ultimately a kernel panic. Systemd parses the content of /proc/self/mountinfo
and each mountpoint is passed to mount_setup_unit(), which calls
unit_name_path_escape() underneath. A local attacker who is able to mount a
filesystem with a very long path can crash systemd and the whole system.
https://bugzilla.redhat.com/show_bug.cgi?id=
1970887
The resulting string length is bounded by UNIT_NAME_MAX, which is 256. But we
can't easily check the length after simplification before doing the
simplification, which in turns uses a copy of the string we can write to.
So we can't reject paths that are too long before doing the duplication.
Hence the most obvious solution is to switch back to strdup(), as before
7410616cd9dbbec97cf98d75324da5cda2b2f7a2.
(cherry picked from commit
441e0115646d54f080e5c3bb0ba477c892861ab9)
(cherry picked from commit
764b74113e36ac5219a4b82a05f311b5a92136ce)
(cherry picked from commit
4a1c5f34bd3e1daed4490e9d97918e504d19733b)
(cherry picked from commit
b00674347337b7531c92fdb65590ab253bb57538)
Gbp-Pq: Name basic-unit-name-do-not-use-strdupa-on-a-path.patch
Lennart Poettering [Tue, 1 Jun 2021 17:43:55 +0000 (19:43 +0200)]
unit-name: generate a clear error code when converting an overly long fs path to a unit name
(cherry picked from commit
9d5acfab20c5f1177d877d0bec18063c0a6c5929)
(cherry picked from commit
1579dce2c2a162bb09afb9a8a46fd4f7e8fbf1d5)
(cherry picked from commit
0488b743e9c6ab1e885933eebda4ba9232003a2a)
Gbp-Pq: Name unit-name-generate-a-clear-error-code-when-convertin.patch
Kevin P. Fleming [Sat, 6 Feb 2021 15:58:43 +0000 (10:58 -0500)]
network: Delay addition of IPv6 Proxy NDP addresses
Setting of IPv6 Proxy NDP addresses must be done at the same
time as static addresses, static routes, and other link attributes
that must be configured when the link is up. Doing this ensures
that they are reconfigured on the link if the link goes down
and returns to service.
(cherry picked from commit
12f7469bbe0142d7f360a29ca2b407ce7f5ff096)
Fixes https://github.com/systemd/systemd-stable/issues/89
(cherry picked from commit
d5ea028e46673ef627843e90c3d01ebac8fe0e62)
Gbp-Pq: Name network-Delay-addition-of-IPv6-Proxy-NDP-addresses.patch
Luca Boccassi [Thu, 1 Apr 2021 21:18:29 +0000 (22:18 +0100)]
LoadCredentials: do not assert on invalid syntax
LoadCredentials=foo causes an assertion to be triggered, as we
are not checking that the rvalue's right hand side part is non-empty
before using it in unit_full_printf.
Fixes #19178
# printf [Service]nLoadCredential=passwd.hashed-password.rootn > hello.service
# systemd-analyze verify ./hello.service
...
Assertion 'format' failed at src/core/unit-printf.c:232, function unit_full_printf(). Aborting.
Aborted (core dumped)
(cherry picked from commit
f7a6f1226e800f7695c2073675523062ea697aa4)
Gbp-Pq: Name LoadCredentials-do-not-assert-on-invalid-syntax.patch
Jan Tojnar [Sat, 2 Jan 2021 01:46:33 +0000 (02:46 +0100)]
pkg-config: make prefix overridable again
While we don't support prefix being != /usr, and this is hardcoded
all over the place, variables in pkg-config file are expected
to have overridable base directory.
This is important for at least the following two use cases:
- Installing projects to non-FHS package-specific prefixes for Nix-style
package managers. Of course, it is then their responsibility
to ensure systemd can find the service files.
- Installing to local path for development purposes.
This is a compromise between running a program from a build directory,
and running it fully installed to system prefix.
You will not want to write to system prefix in either case.
For more information, see also
https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
Fixes https://github.com/systemd/systemd/issues/18082
Partially reverts
6e65df89c348242dbd10036abc7dd5e8181cf733
(cherry picked from commit
60bce7c6d9606185114df1bdcd5ea100407688b8)
Gbp-Pq: Name pkg-config-make-prefix-overridable-again.patch
Yu Watanabe [Mon, 1 Feb 2021 16:47:58 +0000 (01:47 +0900)]
table: drop trailing white spaces of the last cell in row
Fixes #18415.
(cherry picked from commit
71894e18313e41a72cecdc77fea5037f95d6903f)
Gbp-Pq: Name table-drop-trailing-white-spaces-of-the-last-cell-in-row.patch
Vincent Pelletier [Sat, 27 Feb 2021 00:17:06 +0000 (00:17 +0000)]
rules: Move ID_SMARTCARD_READER definition to a <70 configuration.
70-uaccess.rules sets the uaccess tag on devices with ID_SMARTCARD_READER
set, but it is set in 99-systemd.rules .
Move this to a 60-*.rules which already matches USB CCID class, factorising
the matching, so 70-uaccess.rules sets up these devices as expected.
(cherry picked from commit
dbdcd51f78bde5e9033d98d61bbb750c868bde9d)
Gbp-Pq: Name rules-Move-ID_SMARTCARD_READER-definition-to-a-70-configu.patch
Lennart Poettering [Wed, 10 Feb 2021 09:50:23 +0000 (10:50 +0100)]
analyze: slightly reword PrivateTmp= message
Apparently there way confusion about "does not apply". Let's say "is not
appropriate".
Fixes: #13095
(cherry picked from commit
77552b9520ba0d47cbf33cdbe1ddedb9ce9b5bf3)
Gbp-Pq: Name analyze-slightly-reword-PrivateTmp-message.patch
Zbigniew Jędrzejewski-Szmek [Wed, 3 Mar 2021 23:36:24 +0000 (00:36 +0100)]
core: fix mtime calculation of dropin files
Nominally, the bug was in unit_load_dropin(), which just took the last mtime
instead of calculating the maximum. But instead of adding code to wrap the
loop, this patch goes in the other direction.
All (correct) callers of config_parse() followed a very similar pattern to
calculate the maximum mtime. So let's simplify things by making config_parse()
assume that mtime is initialized and update it to the maximum. This makes all
the callers that care about mtime simpler and also fixes the issue in
unit_load_dropin().
config_parse_many_nulstr() and config_parse_many() are different, because it
makes sense to call them just once, and current ret_mtime behaviour make sense.
Fixes #17730, https://bugzilla.redhat.com/show_bug.cgi?id=
1933137.
(cherry picked from commit
da46a1bc3cd28ac36114002c216196dae004b05c)
Gbp-Pq: Name core-fix-mtime-calculation-of-dropin-files.patch
Matthias Klumpp [Fri, 8 Jan 2021 22:59:38 +0000 (23:59 +0100)]
localed: Run locale-gen if available to generate missing locale
This change improves integration with distributions using locale-gen to
generate missing locale on-demand, like Debian-based distributions
(Debian/Ubuntu/PureOS/Tanglu/...) and Arch Linux.
We only ever enable new locales for generation, and never disable them.
Furthermore, we only generate UTF-8 locale.
This feature is only used if explicitly enabled at compile-time, and
will also be inert at runtime if the locale-gen binary is missing.
(cherry picked from commit
8f20232fcb52dbe6255f3df6101fc057af90bcfa)
Gbp-Pq: Name localed-Run-locale-gen-if-available-to-generate-missing-l.patch
Matthias Klumpp [Sat, 10 Oct 2020 02:40:23 +0000 (04:40 +0200)]
Add helper for case-independent string equality checks
(cherry picked from commit
bd47b0dac4a1ff6e686c99b9958693e86d44007b)
Gbp-Pq: Name Add-helper-for-case-independent-string-equality-checks.patch
Luca Boccassi [Sun, 18 Jun 2023 14:55:54 +0000 (15:55 +0100)]
systemd (247.3-7+deb11u4) bullseye; urgency=medium
* backport patches to fix a calendar spec calculation hang on DST change
if TZ=Europe/Dublin (Closes: #
1033540)
[dgit import unpatched systemd 247.3-7+deb11u4]
Luca Boccassi [Sun, 18 Jun 2023 14:55:54 +0000 (15:55 +0100)]
Import systemd_247.3-7+deb11u4.debian.tar.xz
[dgit import tarball systemd 247.3-7+deb11u4 systemd_247.3-7+deb11u4.debian.tar.xz]
Michael Biebl [Wed, 3 Feb 2021 16:11:39 +0000 (16:11 +0000)]
Import systemd_247.3.orig.tar.gz
[dgit import orig systemd_247.3.orig.tar.gz]