Skip to content

v254 batch up to 8ce77b918e711b30a8e55e4f30ccf1a49dd0d623#462

Merged
bluca merged 22 commits intosystemd:v254-stablefrom
bluca:v254-stable
Dec 22, 2024
Merged

v254 batch up to 8ce77b918e711b30a8e55e4f30ccf1a49dd0d623#462
bluca merged 22 commits intosystemd:v254-stablefrom
bluca:v254-stable

Conversation

@bluca
Copy link
Member

@bluca bluca commented Dec 21, 2024

No description provided.

daandemeyer and others added 22 commits December 21, 2024 11:25
Let's shutdown the write end and wait for EOF from the other side
before continuing to make sure that the receiver has received all
data we sent on the socket.

(cherry picked from commit 13b67b6)
(cherry picked from commit b15490c)
Follow-up for 13b67b6

(cherry picked from commit 3baab23)
(cherry picked from commit 16d3a64)
As gcc has trouble figuring this itself with -O2 and -Wmaybe-initialized.

(cherry picked from commit 0a87b83)
(cherry picked from commit 205da62)
TEST-75-RESOLVED fails on Ubuntu autopkgtest due to this warning from
knot:

 notice: config, policy 'auto_rollover_nsec3' depends on default nsec3-salt-length=8, since version 3.5 the default becomes 0

Explicitly set nsec3-salt-length=8 to silence.

(cherry picked from commit 59e5108)
(cherry picked from commit 1b945fb)
(cherry picked from commit 12686f3)
(cherry picked from commit 6e5e510)
… containers

have ambient caps: yes
Capabilities:cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_raw,cap_sys_chroot,cap_mknod,cap_audit_write,cap_setfcap=ep
Failed to drop auxiliary groups list: Operation not permitted
Failed to change group ID: Operation not permitted
Capabilities:cap_dac_override,cap_net_raw=ep
Capabilities:cap_dac_override=ep
Successfully forked off '(getambient)' as PID 12505.
Skipping PR_SET_MM, as we don't have privileges.
Ambient capability cap_linux_immutable requested but missing from bounding set, suppressing automatically.
Assertion 'x < 0 || FLAGS_SET(c, UINT64_C(1) << CAP_LINUX_IMMUTABLE)' failed at src/test/test-capability.c:273, function test_capability_get_ambient(). Aborting.
(getambient) terminated by signal ABRT.
src/test/test-capability.c:258: Assertion failed: expected "r" to succeed, but got error: Protocol error

Partially fixes #35552

(cherry picked from commit 058a076)
(cherry picked from commit d80ab6a)
(cherry picked from commit dbc8f9a)
(cherry picked from commit 5c3f362)
…pace

To reproduce, as an unprivileged user start a docker container and build
and run the unit tests inside it:

$ docker run --rm -ti debian:bookworm bash
...
/* test_close_all_fds */
Successfully forked off '(caf-plain)' as PID 10496.
Skipping PR_SET_MM, as we don't have privileges.
(caf-plain) succeeded.
Failed to fork off '(caf-noproc)': Operation not permitted
Assertion 'r >= 0' failed at src/test/test-fd-util.c:392, function test_close_all_fds(). Aborting.

Partially fixes #35552

(cherry picked from commit 630a2e7)
(cherry picked from commit 5573ac7)
(cherry picked from commit b8c8556)
(cherry picked from commit 9818f55)
Document the fact that read-only properties may not have the flag
SD_BUS_VTABLE_UNPRIVILEGED as that is not obvious especially given the
flag is accepted for writable properties.

Based on the check in `add_object_vtable_internal` called by
`sd_bus_add_object_vtable` (as of the current tip of the main branch
f7f5ba0):

    case _SD_BUS_VTABLE_PROPERTY: {
            [...]
            if ([...] ||
                [...]
                (v->flags & SD_BUS_VTABLE_UNPRIVILEGED && v->type == _SD_BUS_VTABLE_PROPERTY)) {
                    r = -EINVAL;
                    goto fail;
            }

(where `_SD_BUS_VTABLE_PROPERTY` means read-only property whereas
`_SD_BUS_VTABLE_WRITABLE_PROPERTY` maps to writable property).

This was implemented in the commit
adacb95 ("bus: introduce "trusted" bus
concept and encode access control in object vtables") where
`SD_BUS_VTABLE_UNPRIVILEGED` was introduced:

    Writable properties are also subject to SD_BUS_VTABLE_UNPRIVILEGED
    and SD_BUS_VTABLE_CAPABILITY() for controlling write access to them.
    Note however that read access is unrestricted, as PropertiesChanged
    messages might send out the values anyway as an unrestricted
    broadcast.

(cherry picked from commit 3ca09aa)
(cherry picked from commit cd72703)
(cherry picked from commit f694a84)
(cherry picked from commit 0aea62b)
Otherwise it doesn't hold that VLANs 100-400 are allowed (because 201-299 are disallowed).

(cherry picked from commit ae2f3af)
(cherry picked from commit 9fad72c)
(cherry picked from commit 0102ff4)
(cherry picked from commit b879b06)
semaphore CI runs are always very close to the limit of 1hr, and often
time out when it's particularly oversubscribed.
Skip some low-value test cases to shorten the runtime.

(cherry picked from commit e19cae1)
(cherry picked from commit e768cf5)
(cherry picked from commit 9552927)
(cherry picked from commit f9033ba)
Closes #35504.

(cherry picked from commit a5b2973)
(cherry picked from commit 644f2a0)
(cherry picked from commit c03e316)
(cherry picked from commit dbab170)
This is an interesting event. Let's log about it.

(cherry picked from commit 11ee1ba)
(cherry picked from commit c189ecc)
(cherry picked from commit 7054f66)
(cherry picked from commit d0684df)
This is handy for debugging.

(cherry picked from commit 9171384)
(cherry picked from commit bcf740e)
(cherry picked from commit 0a4a3a8)
(cherry picked from commit cc110c0)
Otherwise --help/--version/etc which exit immediately will do pointless work

(cherry picked from commit 60d23b7)
(cherry picked from commit 29cdad8)
(cherry picked from commit 80e4e31)
(cherry picked from commit 06b1c4b)
(cherry picked from commit 81e0693)
(cherry picked from commit 1fb4673)
(cherry picked from commit 8f92f75)
(cherry picked from commit 543784e)
Initialize the start of the system-wide idle time with the time logind was
initialized and not with the start of the Unix epoch. This means that systemd
will not repport a unreasonable long idle time (around 54 years at the time of
writing this), especially at in the early boot, while no login manager session,
e.g,. gdm, had a chance to provide a more accurate start of the idle period.

Fixes #35163

(cherry picked from commit 718b311)
(cherry picked from commit 9d36809)
(cherry picked from commit 77b963c)
(cherry picked from commit cd6f07e)
When semaphore is overloaded tests can take more than 1hr, bump
timeout

(cherry picked from commit 1855064)
(cherry picked from commit 96b9fe8)
(cherry picked from commit 5438748)
(cherry picked from commit 5ac9650)
This reverts commit e19cae1.

(cherry picked from commit 7406e0a)
(cherry picked from commit 61e321c)
(cherry picked from commit 53fd63a)
(cherry picked from commit ade1c0e)
Noticed while looking at #35641

(cherry picked from commit 0543b02)
(cherry picked from commit b5dc192)
(cherry picked from commit d70b87a)
(cherry picked from commit 549bf6f)
If a specified unit does not exist, then it is definitely not masked.

Fixes #35632.

(cherry picked from commit b58b00e)
(cherry picked from commit 48b404d)
(cherry picked from commit 1461f52)
(cherry picked from commit 8ab5882)
…hin candidate to succeed quickly

Fixes #22575, as suggested by poettering in #35514.

Intended as a workaround for some buggy routers, which refuse to send empty
replies. If systemd-resolved starts two DnsTransactions, one for A and one
for AAAA, and the domain in question has no AAAA entry, then the server will
send a reply for A and no reply for AAAA. Correct behavior for the server would
be to send an empty reply for AAAA.

systemd-resolved would previously keep retrying the AAAA transaction, and
eventually timeout the whole query, returning an error to the caller.

Now, if the server replies to one query and not another, we cut short the
timeout and return the partial result. Returning the partial result allows
the rest of the system to keep working. It matches how e.g. glibc libnss_dns
behaves.

(cherry picked from commit 0da73fa)
(cherry picked from commit 1748265)
(cherry picked from commit e65fd8e)
(cherry picked from commit 3761ffa)
The issue is directly triggered by tzdata-2024b, where the setting of timezone
started to fail and the tests stopped passing. But those timestamps in 1/1/1970
appear to have some problems already before:

  $ sudo date -s 'Thu 1970-01-01 13:00:01 WET'
  Thu Jan  1 03:00:01 PM EET 1970
  $ sudo date -s 'Thu 1970-01-01 12:00:01 WET'
  date: cannot set date: Invalid argument
  Thu Jan  1 02:00:01 PM EET 1970
  $ rpm -q tzdata
  tzdata-2024a-9.fc41.noarch

The same issue appears with other timezones. So move the first timestamp one
day forward to avoid the issue.

After the previous problem is solved, we also get the problem already seen
previously where the roundtrip returns a time that is off by one hour:

@86401000000 → Fri 1970-01-02 00:00:01 WET → @82801000000 → Thu 1970-01-01 23:00:01 WET
Assertion 'x / USEC_PER_SEC == y / USEC_PER_SEC' failed at src/test/test-time-util.c:415, function test_format_timestamp_impl(). Aborting.

Extend the override to suppress this.

(cherry picked from commit 3cf362f)
(cherry picked from commit 43a99d4)
(cherry picked from commit 98cf43b)
Also
- use ASSERT_XYZ() macros,
- log tzname[] on failure.

(cherry picked from commit 3f1d499)
(cherry picked from commit 11d7050)
(cherry picked from commit 1d4bde5)
(cherry picked from commit b07b4ce)
@packit-as-a-service
Copy link

We were not able to find or create Copr project packit/systemd-systemd-stable-462 specified in the config with the following error:

Cannot create a new Copr project (owner=packit project=systemd-systemd-stable-462 chroots=[]): chroots: '[]' is not a valid choice for this field..

Unless the HTTP status code above is >= 500, please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

@bluca bluca merged commit af8cb09 into systemd:v254-stable Dec 22, 2024
27 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.