1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-04 05:17:43 +03:00
Commit Graph

63810 Commits

Author SHA1 Message Date
Morten Hauke Solvang
a019470312 resolved: if one transaction completes, expect other transactions within 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 0da73fab56506ff1e4f8e59c167d27961f0fbf33)
(cherry picked from commit 1748265915e09120d75766baaa4516b2779140eb)
(cherry picked from commit e65fd8eb4b559ba621e2bd802894105ac1d575da)
(cherry picked from commit 3761ffa0c9)
(cherry picked from commit 615ab029f4)
2024-12-23 14:21:27 +00:00
Lennart Poettering
75ec2e5b2d networkd: show wireguard private key read error number
Noticed while looking at #35641

(cherry picked from commit 0543b02cf8211353c0bb1065e09614f551944a41)
(cherry picked from commit b5dc1922f9bd0a64cf17be8c503baba58bf5ba82)
(cherry picked from commit d70b87ae322d16ee7aa8c15ea567ce5499f79df3)
(cherry picked from commit 549bf6fcb7)
(cherry picked from commit 7fe7becd7b)
2024-12-23 14:21:27 +00:00
Luca Boccassi
d7bc76c91d Revert "semaphore: skip some tests"
This reverts commit e19cae12ff2e832ce7d79aa483e1aa27ed0ea1f4.

(cherry picked from commit 7406e0a3afafc1e1c994a88a4e988e94177e5550)
(cherry picked from commit 61e321c452309b6686b345ff3be363d37dfb21d6)
(cherry picked from commit 53fd63ac0791195756925ae4b8ac888c3b4ebf1f)
(cherry picked from commit ade1c0e23e)
(cherry picked from commit c5156e127e)
2024-12-23 14:21:27 +00:00
Luca Boccassi
8918ecb76b semaphore: bump timeout
When semaphore is overloaded tests can take more than 1hr, bump
timeout

(cherry picked from commit 1855064d4eb95abe6909a93f72bee46658dad36b)
(cherry picked from commit 96b9fe831f888a0e9772a33acc752ebb822357b9)
(cherry picked from commit 54387482b9ddd164853ec7ffa45f67f8a698c69b)
(cherry picked from commit 5ac9650c84)
(cherry picked from commit 036b58ad63)
2024-12-23 14:21:27 +00:00
Florian Schmaus
331f36c35e logind: let system-wide idle begin at the time logind was initialized
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 718b31138b9a93f262259f297ad6b521454decc6)
(cherry picked from commit 9d36809256c6d92c6d8358769479ad2c2b695664)
(cherry picked from commit 77b963c31712ef81786fcc6623fe1b10a46b62e0)
(cherry picked from commit cd6f07effa)
(cherry picked from commit dcb86edde5)
2024-12-23 14:21:27 +00:00
Luca Boccassi
7b878c2544 test-loop-block: return -77 on skip in more places
(cherry picked from commit 81e0693465402d2e72cb3ba1b28e25e3c4c0206a)
(cherry picked from commit 1fb4673a6977c6a694f786dbc6cf2ff1990794ff)
(cherry picked from commit 8f92f75ae7e87e07b63974533f7ec344291267f2)
(cherry picked from commit 543784efc3)
(cherry picked from commit 27bb6c8917)
2024-12-23 14:21:27 +00:00
Ronan Pigott
9e788905b8 manager: add list of subscribers to dump info
This is handy for debugging.

(cherry picked from commit 91713841491d0d4775566ed59f621f0f9a2413b5)
(cherry picked from commit bcf740e4a3caa32b3a920512833b68fc6d530125)
(cherry picked from commit 0a4a3a8e3f8c2daedabba8ac0d785da55263467b)
(cherry picked from commit cc110c0ce6)
(cherry picked from commit 01ba55b882)
2024-12-23 14:21:27 +00:00
Ronan Pigott
7bdec4c526 dbus: log disconnect on api and system busses
This is an interesting event. Let's log about it.

(cherry picked from commit 11ee1bab60abde67cd0edc470c93c1afe10d975d)
(cherry picked from commit c189ecc7fe5039d98bbb448ab45ab0fa3842b3a3)
(cherry picked from commit 7054f66e6cd35c3fe68f3a9ba328d20e3813f4eb)
(cherry picked from commit d0684dfb9f)
(cherry picked from commit a88e98a609)
2024-12-23 14:21:27 +00:00
Yu Watanabe
b125bce488 journalctl: honor --quiet with --setup-keys
Closes #35504.

(cherry picked from commit a5b2973850e5952b9dffdfa3f6a0ef486957cb17)
(cherry picked from commit 644f2a02c8befba986ebbc5d58767807fb2999ee)
(cherry picked from commit c03e3169ddd663c6d3aaea3df7af0031fe00cf5c)
(cherry picked from commit dbab170b9e)
(cherry picked from commit 4c88d0ef3d)
2024-12-23 14:21:27 +00:00
Luca Boccassi
0791d45abf semaphore: skip some tests
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 e19cae12ff2e832ce7d79aa483e1aa27ed0ea1f4)
(cherry picked from commit e768cf55b19caec6c8936050b245f398aba8b884)
(cherry picked from commit 9552927230915c96d4f995b9fca49e4eb78a02ec)
(cherry picked from commit f9033baefb)
(cherry picked from commit bfcb6d025a)
2024-12-23 14:21:27 +00:00
andrejpodzimek
a0167e9f47 Fixing VLAN ranges in man systemd.network.
Otherwise it doesn't hold that VLANs 100-400 are allowed (because 201-299 are disallowed).

(cherry picked from commit ae2f3af63962ba6e2f67cfce07c9fee61722e30e)
(cherry picked from commit 9fad72cc52bdec7f44337b1e48c23ee15fc08d77)
(cherry picked from commit 0102ff403ee230bdd7a0c2b38463d9292fb9c0ae)
(cherry picked from commit b879b06ed1)
(cherry picked from commit d548785ed8)
2024-12-23 14:21:27 +00:00
Katariina Lounento
a85962c6a0 man: document unprivileged is not for reading properties
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
f7f5ba019206cacd486b0892fec76f70f525e04d):

    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
adacb9575a ("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 3ca09aa4dd57327989eceb1298754601046ac041)
(cherry picked from commit cd727031a4daafe19f491df360c512433562f469)
(cherry picked from commit f694a84faf082ce4a18cc2478d7843bb2b7e7fc4)
(cherry picked from commit 0aea62ba33)
(cherry picked from commit 413d82c462)
2024-12-23 14:21:27 +00:00
Luca Boccassi
c40e1d5e8e test-fd-util: skip test when lacking privileges to create a new namespace
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 630a2e7ee195ca96e102acac8df67a278a879124)
(cherry picked from commit 5573ac7d9c52bed8d38480788b02639ede3881fc)
(cherry picked from commit b8c85564906a7808bebc04a95be08c9a0635f2f5)
(cherry picked from commit 9818f55a35)
(cherry picked from commit dcdd4a6070)
2024-12-23 14:21:27 +00:00
Nick Rosbrook
48f5456cd3 test: set nsec3-salt-length=8 in knot.conf
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 59e5108fb4e61957cb40bb15ac7966d085d13af2)
(cherry picked from commit 1b945fb1a727f85be9230e43d2fdaf78d2567946)
(cherry picked from commit 12686f3f5aee20dbe7c4f21d6841fa87aca55eae)
(cherry picked from commit 6e5e510da7)
(cherry picked from commit cde944db32)
2024-12-23 14:21:27 +00:00
Frantisek Sumsal
d06f35adf7 shared: initialize a couple of values explicitly
As gcc has trouble figuring this itself with -O2 and -Wmaybe-initialized.

(cherry picked from commit 0a87b83497)
(cherry picked from commit 205da62819)
(cherry picked from commit e749fa6744)
2024-12-23 14:21:27 +00:00
Zbigniew Jędrzejewski-Szmek
5d9f8b2ba5 logind: make ReleaseSession "unprivileged" and allow closing of own session
Fixes https://github.com/systemd/systemd/issues/28514.

Quoting https://github.com/systemd/systemd/issues/28514#issuecomment-1831781486:
> Whenever PAM is enabled for a service, we set up the PAM session and then
> fork off a process whose only job is to eventually close the PAM session when
> the service dies. That services we run with service privileges, both to
> minimize attack surface and because we want to use PR_SET_DEATHSIG to be get
> a notification via signal whenever the main process dies. But that only works
> if we have the same credentials as that main process.
>
> Now, if pam_systemd runs inside the PAM stack (which it normally does) it's
> session close hook will ask logind to synchronously end the session via a bus
> call. Currently that call is not accessible to unprivileged clients. And
> that's the part we need to relax: allow users to end their own sessions.

The check is implemented in a way that allows the kill if the sender is in
the target session.

I found 'sudo systemctl --user -M "zbyszek@" is-system-running' to
be a convenient reproducer.

Before:
May 16 16:25:26 x1c systemd[1]: run-u24754.service: Deactivated successfully.
May 16 16:25:26 x1c dbus-broker[1489]: A security policy denied :1.24757 to send method call /org/freedesktop/login1:org.freedesktop.login1.Manager.ReleaseSession to org.freedesktop.login1.
May 16 16:25:26 x1c (sd-pam)[3036470]: pam_systemd(login:session): Failed to release session: Access denied
May 16 16:25:26 x1c systemd[1]: Stopping session-114.scope...
May 16 16:25:26 x1c systemd[1]: session-114.scope: Deactivated successfully.
May 16 16:25:26 x1c systemd[1]: Stopped session-114.scope.
May 16 16:25:26 x1c systemd[1]: session-c151.scope: Deactivated successfully.
May 16 16:25:26 x1c systemd-logind[1513]: Session c151 logged out. Waiting for processes to exit.
May 16 16:25:26 x1c systemd-logind[1513]: Removed session c151.
After:
May 16 17:02:15 x1c systemd[1]: run-u24770.service: Deactivated successfully.
May 16 17:02:15 x1c systemd[1]: Stopping session-115.scope...
May 16 17:02:15 x1c systemd[1]: session-c153.scope: Deactivated successfully.
May 16 17:02:15 x1c systemd[1]: session-115.scope: Deactivated successfully.
May 16 17:02:15 x1c systemd[1]: Stopped session-115.scope.
May 16 17:02:15 x1c systemd-logind[1513]: Session c153 logged out. Waiting for processes to exit.
May 16 17:02:15 x1c systemd-logind[1513]: Removed session c153.

Edit: this seems to also fix https://github.com/systemd/systemd/issues/8598.
It seems that with the call to ReleaseSession, we wait for the pam session
close hooks to finish. I inserted a 'sleep(10)' after the call to ReleaseSession
in pam_systemd, and things block on that, nothing is killed prematurely.

(cherry picked from commit fc0bb7ccc7)

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2221337.

(cherry picked from commit 97ad9a336a)
(cherry picked from commit 39f457fe60)
2024-11-30 16:56:34 +00:00
David Tardon
8a1bed121c execute: free syscall_log hashmap when done
Fixes #35394

(cherry picked from commit c3dc460b6c3f062af540e4233c65ac12c01077fa)
(cherry picked from commit f15fd96efd5ebdfb18746acb0cbb35a4331b4d8b)
(cherry picked from commit a9c650b207)
(cherry picked from commit 742f3232bc)
2024-11-30 16:56:34 +00:00
Luca Boccassi
4a4e4c6569 test: mask tmpfiles.d file shipped by selinux policy package in containers
This tmpfiles.d wants to write to sysfs, which is read-only in containers,
so systemd-tmpfiles --create fails in TEST-22-TMPFILES when ran in nspawn
if the selinux policy package is instealled. Mask it, as it's not our
config file, we don't need it in the test.

(cherry picked from commit 6fd3496cfd0d28808b5489ee87f826c2130f5f0b)
(cherry picked from commit 2d975f64d40cff41f36792d92dde65a65fb0dd9d)
(cherry picked from commit 37e27eeec8)
(cherry picked from commit 464d495cc2)
2024-11-30 16:56:34 +00:00
Michał Górny
49e993e55d nspawn: Include arm_fadvise64_64 in syscall allow_list
Add the `arm_fadvise64_64` syscall to the allow_list, in addition
to the existing `fadvise64` and `fadvise64_64` syscalls, as this is
the syscall actually defined for `arm` architecture.  Adding it fixes
the syscall being rejected in arm32 containers.

Fixes #35194

(cherry picked from commit 7fd70a532681c0ea4cd6ff04d1a7950dae3efc8c)
(cherry picked from commit 964ced4100fb5f5b5d41b988512f681a1b0b20f7)
(cherry picked from commit 8bf58cddbf)
(cherry picked from commit a775463cf1)
2024-11-30 16:56:34 +00:00
Zbigniew Jędrzejewski-Szmek
9754409f30 hwdb: update to main@{2024-11-28}
git restore -s origin/main hwdb.d/ test/hwdb.d test/hwdb-test.sh

(cherry picked from commit a70b65863f48c05f80202e2a0a6f59b701293e5f)
(cherry picked from commit 3b37660f96)
(cherry picked from commit e04908aceb)
2024-11-30 16:56:34 +00:00
Lennart Poettering
460b17eb91 nspawn: make sure --private-users-ownership=no and =off work the same way
We usually want to use "extended booleans" for cases like this, i.e.
that "off", "no" and "0" can be used interchangably for turning
something off.

(cherry picked from commit 62f3e2f84aa3413081fc1c1e1c3074fc9aeedbc9)
(cherry picked from commit 7a307c5939b0787727b144197090a0ae34cbd813)
(cherry picked from commit 4b384a3534)
(cherry picked from commit 39f5e423a2)
2024-11-30 16:56:34 +00:00
Lennart Poettering
3c585568e7 nspawn: don't try to unregister a machine we never registered
When registering we condition this on "arg_register". Let's do the same
when unregistering, otherwise we might end up trying to unregister a
machine we never registered.

(cherry picked from commit 0790f4e45f2f8c094bf929aa1fcaf4c7e9dbb001)
(cherry picked from commit 6f346ef75635b549166d1be04b1dcb620f1b724c)
(cherry picked from commit 85804e690d)
(cherry picked from commit 342c67d8ab)
2024-11-30 16:56:34 +00:00
Yu Watanabe
92aeef580c man: use MIT-0 license for example codes in daemon(7)
This page contains many short example codes. I do not think we should
add SPDX-License-Identifier for all codes.

Closes #35356.

(cherry picked from commit 6046cc3660810efcc6fe50b1c850ea642218245b)
(cherry picked from commit 6f2483eed8d790b94945aece37833c3604e3fc11)
(cherry picked from commit cb1077c9aa)
(cherry picked from commit 238f1f1dc5)
2024-11-30 16:56:34 +00:00
Yu Watanabe
aee584c30f curl-util: do not configure new io event source when the event loop is already dead
Similar to c5ecf09494, but for io event source.

Fixes #35322.

(cherry picked from commit 5b2926d9414f4333153ebe0bf169e1dd76129119)
(cherry picked from commit ce997e944f66da452ed01b86b838508ee132abb7)
(cherry picked from commit 5749fc1b29)
(cherry picked from commit e6119cabe5)
2024-11-30 16:56:34 +00:00
Lennart Poettering
91a643a2a8 nspawn: improve log message on bad incoming sd_notify() message
It's the PID that is wrong, not the UID/GID, be precise.

(cherry picked from commit 95116bdfd5d45cc1a7c6588e6b8bdcb0d0e007a6)
(cherry picked from commit 95c20d0b627654626924eadaf65bc1825bb38701)
(cherry picked from commit 5b6e91434e)
(cherry picked from commit b2d59a99c3)
2024-11-30 16:56:34 +00:00
Zbigniew Jędrzejewski-Szmek
59b7b0d318 Undeprecate commandline params forcequotacheck, fastboot, and forcefsck
Those are historical names, but there is nothing wrong with them. The files on
/ (/fastboot, /forcefsck, and /forcequotacheck) are problematic because they
require a modification of the root file system. But the commandline params work
fine. They have the obvious advantage compared to our "modern" option that they
are much easier to type without looking up the spelling in the docs. Undeprecate
them to avoid unnecessary churn.

(cherry picked from commit 5598454a3f8fc13257e0313d999e6ac9684082e1)
(cherry picked from commit eb841e9b8eb5ec47c46617b288135b2119694ea0)
(cherry picked from commit 59d4a05e3b)
(cherry picked from commit dc845754ad)
2024-11-30 16:56:34 +00:00
Lennart Poettering
bd4b4d68f6 userdbctl: fix counting
Fixes: #35294
(cherry picked from commit 7f8a4f12dfea6f644f92788bd9b03983898e9d32)
(cherry picked from commit 3d85366ab802aea92ade6a544b63ef73fff69e4a)
(cherry picked from commit 9d0e453244)
(cherry picked from commit 20bf8b00c3)
2024-11-30 16:56:34 +00:00
Lennart Poettering
1191cc3d55 userbdctl: show 'mapped' user range only inside of userns
Outside of userns the concept makes no sense, there cannot be users
mapped from further outside.

(cherry picked from commit e412fc5e042b8f642bcba42f5c175124583e05ae)
(cherry picked from commit aed4e9045656eb7934e3171a6fe442f7df4c4180)
(cherry picked from commit 421c23f4fa)
(cherry picked from commit de65927ffe)
2024-11-30 16:56:34 +00:00
Antonio Alvarez Feijoo
2625c00e8c man/kernel-command-line: fix typo
(cherry picked from commit a04d42821bb5350b0ffa82834e50e9b679279854)
(cherry picked from commit 03b993a9bfd97d42ebc0b3713e583c806c89e632)
(cherry picked from commit acb760fbe8)
(cherry picked from commit 90fd71a695)
2024-11-30 16:56:34 +00:00
Antonio Alvarez Feijoo
b2f6a12354 cryptenroll: show better log message if slot to wipe does not exist
```
$ systemd-cryptenroll /dev/vda3
SLOT TYPE
   0 password
$ systemd-cryptenroll --wipe-slot 1 /dev/vda3
Failed to wipe slot 1, continuing: No such file or directory
```

(cherry picked from commit 2b251491debf9cab695f5f34da9908ca46f085fe)
(cherry picked from commit 4a3d55a032053525ab331e4af6f95ec2dc053ee9)
(cherry picked from commit ade617cf3d)
(cherry picked from commit b265ca1792)
2024-11-30 16:56:34 +00:00
Lennart Poettering
f7538e8222 systemctl: grey out tasks limit the same way we grey out the fd store limit in the output
"systemctl status systemd-logind" otherwise looks a bit weird, since the
tasks and the fdstore lines are so close to each other but formatted
quite differently when it comes to coloring.

(cherry picked from commit 54646b1ca95373dfa3ebe5d6e7e27deeed9e77b0)
(cherry picked from commit ff4b66be4a35fd21ef001bbf6492e3e1f837ee1c)
(cherry picked from commit e00cc22e30)
(cherry picked from commit e9179d051a)
2024-11-30 16:56:34 +00:00
Lennart Poettering
d11c49dd64 nspawn: --private-users-ownership= value is called 'chown', not 'own'
(cherry picked from commit bae936b418e08063b68c95f4df53c3cd4f70e881)
(cherry picked from commit bdf3f9b8f274d958befa54c95811910013b39a80)
(cherry picked from commit 809b265172)
(cherry picked from commit 0368c1484d)
2024-11-30 16:56:34 +00:00
Lennart Poettering
39fde5faa9 pid1: make clear that $WATCHDOG_USEC is set for the shutdown binary, noone else
We use the $WATCHDOG_USEC variable for two very closely uses: as part of
the sd_watchdog_enabled() protocol for implementing service watchdogs.
And as part of the protocol between the service manager and
systemd-shutdown across the PID 1 execve() transition during shutdown.

Apparently some exitrds tools got confused by the latter use. Let's
address that by setting $WATCHDOG_PID to 1, in accordance to the
sd_watchdog_enabled() protocol to make clear this is only intended for
PID 1 and nothing else.

Replaces: #35135
(cherry picked from commit 4b20ae9a0e914e61d6bac095e5fc9664510ac03e)
(cherry picked from commit cf7b3cc18225ef8824f9cac9c88b7ea0b0dce3cd)
(cherry picked from commit cab88476b2)
(cherry picked from commit fa467a411f)
2024-11-30 16:56:34 +00:00
Luca Boccassi
f92cd4d022 ci: link systemd-keyutil into place
The mkosi action.yaml links systemd main, and instealls an hard-coded
set of binaries. ukify now depends on the new systemd-keyutil, which
cannot be in that list. Link it manually.

(cherry picked from commit 8f24348e72)
(cherry picked from commit 150b961a0b)
2024-11-16 10:30:57 +00:00
Luca Boccassi
5b199c6e23 test: fix test scripts filename pattern
In this branch it's testsuite-xy.foo, not TEST-XY-FOO

Follow-up for dffa62c85f

(cherry picked from commit 14e32845b5)
2024-11-16 10:30:57 +00:00
Yu Watanabe
2ba27c38fe nspawn: ignore failure in creating /dev/net/tun when --private-network is unspecified
Follow-up for efedb6b0f3cff37950112fd37cb750c16d599bc7.
Closes #35116.

(cherry picked from commit 985ea98e7f90c92fcc0b8441fafb190353d2feb8)
Really rewritten from scratch.
(cherry picked from commit 04ee5e25a1082d4c6c0c52a154d5ad5fc959a853)
(cherry picked from commit 45b39f98c9)
(cherry picked from commit c25b73f93b)
2024-11-16 10:30:57 +00:00
Yu Watanabe
fb8b0b6192 network-generator: drop wrong warning for rd.peerdns without value
(cherry picked from commit 2a774f064815573efc33d43dfe3548590e42e9c2)
(cherry picked from commit 56cc8acf45dbff227d1713d509bc3b71386df5d8)
(cherry picked from commit 2e956d0840)
(cherry picked from commit d3132ec494)
2024-11-16 10:30:57 +00:00
Yu Watanabe
2aaee78cb0 network-generator: parse vlan ID from vlan interface name
Fixes #33954.

(cherry picked from commit e31a55edf136e777aabdf19894ee886eac47c20e)
(cherry picked from commit 4cd435ca49950c2bba86a95b500c6d239f18efe1)
(cherry picked from commit f9f74a067c)
(cherry picked from commit 456c15b8fd)
2024-11-16 10:30:57 +00:00
Yu Watanabe
6bad63a0d0 network-generator: vlan= can be specified multiple times
(cherry picked from commit 9eee6b1b3f00d46459eebefb70be50ea6af30ddb)
(cherry picked from commit f3baba94425e6ccaf7a672903148dbb2b9e022f7)
(cherry picked from commit be571ff648)
(cherry picked from commit ca169c9e8b)
2024-11-16 10:30:57 +00:00
andre4ik3
9601ac90fe boot: allocate cleanup pages below 4GiB only on x86
Outside of x86, some machines (e.g. Apple silicon, AMD Opteron A1100) have
physical memory mapped above 4GiB, meaning this allocation will fail, causing
the entire boot process to fail on these machines.

This commit makes it so that the below-4GB address space allocation requirement
is only set on x86 platforms, and not on other platforms (that don't have the
specific Linux x86 boot protocol), thereby fixing boot on those that have no
memory mapped below 4GiB in their address space.

Tested on an Apple silicon M1 laptop and an AMD x86_64 desktop tower.

Fixes: #35026

Manual backport of 6e207b370e91e681efb08c497a6c8ad78e3c8d83.

(cherry picked from commit a9d9db7f4e4a75f6dbda5c31fbbf325eff9d63b4)
(cherry picked from commit 8923d93768)
(cherry picked from commit 6f0a01d3c0)
2024-11-16 10:30:57 +00:00
Mike Yuan
bddd7a10ad portable: do not use SYNTHETIC_ERRNO for sd_bus_error_set_errno()
The concept of synthetic errnos is about logging, which
is irrelevant irt bus error and we don't do any special
treatment in sd-bus for them, meaning the value propagated
would be spurious.

(cherry picked from commit 2f2058da0b88535cb3a95fc98e7b2f1ae4d35601)
(cherry picked from commit 018c7fb18ae8aff5414d5e74cb41fb98b72c0554)
(cherry picked from commit 39c2b7fd58)
(cherry picked from commit 06be1bfc83)
2024-11-16 10:30:57 +00:00
Luca Boccassi
57778c6f22 hwdb: update to main@{2024-11-12}
git restore -s origin/main hwdb.d/ test/hwdb.d

(cherry picked from commit 7e36a73e2e4d580b2df0f755569ca4040bfe7232)
(cherry picked from commit 6e29d791df)
(cherry picked from commit 223b317761)
2024-11-16 10:30:57 +00:00
Yu Watanabe
2e68de29d1 network/tunnel: allow Local=/Remote=any for all tunnel types
It seems there is no restriction for local and remote addresses.

Fixes #34930.

(cherry picked from commit 5e48fd0506ed6212c9db2276d5845ab77aa9bce4)
(cherry picked from commit 3093ac05abcaf5a43f75ec1d5702ed226cc3ce31)
(cherry picked from commit 81c84336f4)
(cherry picked from commit 6f19e9fa9c)
2024-11-16 10:30:57 +00:00
12paper
bf4d3b243b login: fix session_kill(..., KILL_LEADER,...) (#35105)
`loginctl kill-session --kill-whom=leader <N>` (or the D-Bus equivalent)
doesn't work because logind ends up calling `KillUnit(..., "main", ...)`
on a scope unit and these don't have a `MainPID` property. Here, I just
make it send a signal to the `Leader` directly.

(cherry picked from commit 8254755091847105c33e473c62cdc7621ed275bc)
(cherry picked from commit c89c5d04f33dbc5c6dfb67b8bc58cbd3d924b434)
(cherry picked from commit 80efb1da3f)
(cherry picked from commit 94b234df96)
2024-11-16 10:30:57 +00:00
Lidong Zhong
e0b8d7341e udev: skipping empty udev rules file while collecting the stats
To keep align with the logic used in udev_rules_parse_file(), we also
should skip the empty udev rules file while collecting the stats during
manager reload. Otherwise all udev rules files will be parsed again whenever
reloading udev manager with an empty udev rules file. It's time consuming
and the following uevents will fail with timeout.

(cherry picked from commit 2ae79a31b7c7947e2c16e18eb85ac5607ebc40b6)
(cherry picked from commit 688eb20fdb9c4bcc6d205323f9cec119d6273169)
(cherry picked from commit 484d31a58d)
(cherry picked from commit 8b6ae951d3)
2024-11-16 10:30:57 +00:00
Lennart Poettering
3ddb7955eb man: tone down claims on processes having exited already in ExecStop=
Processes can easily survive the first kill operation we execute, hence
we shouldn't make strong claims about them having exited already. Let's
just say "likely" hence.

Fixes: #15032
(cherry picked from commit ac804bc2f8d814d2afcdccd88f7469ac320da1c8)
(cherry picked from commit 307a6332a63dd0f6addbc5c77d21f72ce4578070)
(cherry picked from commit b38386ae2b)
(cherry picked from commit e23cbecd7f)
2024-11-16 10:30:57 +00:00
Lennart Poettering
51d8bd3283 man: document that .path units don't care for hidden files
Fixes: #32751
(cherry picked from commit 5adc4337996f561df43c617e37ef4b157073b2e6)
(cherry picked from commit a6f9c2031666a856f137109e77c856a8e238a59b)
(cherry picked from commit b8a62a9f4f)
(cherry picked from commit 85e29f7612)
2024-11-16 10:30:57 +00:00
Lennart Poettering
5fee803746 run: handle gracefully if we can't find binary client-side due to perms
Fixes: #35022
(cherry picked from commit 9810899ef2f28fbb42cf659e6892b1a5074cfc83)
(cherry picked from commit 070dbe1e77fc25201a89770beb691135ce84bed1)
(cherry picked from commit ccc2e1ff85)
(cherry picked from commit 8e353d2293)
2024-11-16 10:30:57 +00:00
Zbigniew Jędrzejewski-Szmek
12e76a5637 resolved: log error messages for openssl/gnutls context creation
In https://bugzilla.redhat.com/show_bug.cgi?id=2322937 we're getting
an error message:
Okt 29 22:21:03 fedora systemd-resolved[29311]: Could not create manager: Cannot allocate memory
I expect that this actually comes from dnstls_manager_init(), the
openssl version. But without real logs it's hard to know for sure.

Use EIO instead of ENOMEM, because the problem is unlikely to be actually
related to memory.

(cherry picked from commit ee95e86ae163e436384f1b782a77a7e18deba890)
(cherry picked from commit abd1e408203d5d445b05f4dc0ac07e35114532d1)
(cherry picked from commit 67954b4554)
(cherry picked from commit 17a3a8e91b)
2024-11-16 10:30:57 +00:00
Colin Foster
b9caa340e8 test-dhcp-client: utilize log_info instead of printf
log_info appears to be the preferred method to convey information from
tests. Convert all the printfs to log_info to follow this standard.

(cherry picked from commit 38557d9ffbc6351b8980faf90d54619790436d43)
(cherry picked from commit 4ea84288480115f7175a8cfc61d03e3a712396b8)
(cherry picked from commit cfa083d450)
(cherry picked from commit 6dda2e10a0)
2024-11-16 10:30:57 +00:00