]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agovarlink: if varlink_call() is called with ret_error_id=NULL propagate error via retur...
Lennart Poettering [Wed, 17 Jan 2024 09:57:56 +0000 (10:57 +0100)] 
varlink: if varlink_call() is called with ret_error_id=NULL propagate error via return value

It's OK if callers don't want to know the varlink error string. But in
that case return the fact the call failed via the return value, as a
negative errno as usual, to make sure it's not accidentally ignored.

Similar for varlink_observe()

4 months agovarlink: in varlink_observe() correctly collect error parameters
Lennart Poettering [Wed, 17 Jan 2024 09:56:25 +0000 (10:56 +0100)] 
varlink: in varlink_observe() correctly collect error parameters

In varlink errors can have parameters (and they regularly do, for
example the io.systemd.System error we generate carries the errno in its
parameter), hence it's essential that varlink_oberserve collects that
properly and returns it too.

4 months agovarlink: add helper that turns varlink errors back to errnos, client-side
Lennart Poettering [Tue, 19 Dec 2023 14:01:36 +0000 (15:01 +0100)] 
varlink: add helper that turns varlink errors back to errnos, client-side

4 months agologind-action: also check .target unit state when selecting sleep action
Mike Yuan [Wed, 17 Jan 2024 04:09:11 +0000 (12:09 +0800)] 
logind-action: also check .target unit state when selecting sleep action

4 months agoMerge pull request #30971 from ddstreet/tpm2_key_conversion
Lennart Poettering [Wed, 17 Jan 2024 12:36:47 +0000 (13:36 +0100)] 
Merge pull request #30971 from ddstreet/tpm2_key_conversion

Fix tpm unsealing when using RSA public key signatures

4 months agoMerge pull request #30974 from poettering/strv-extend-many
Lennart Poettering [Wed, 17 Jan 2024 12:13:30 +0000 (13:13 +0100)] 
Merge pull request #30974 from poettering/strv-extend-many

strv: add new strv_extend_many() helper

4 months agossh-generator: correct log level of one function
Lennart Poettering [Wed, 17 Jan 2024 08:49:17 +0000 (09:49 +0100)] 
ssh-generator: correct log level of one function

add_export_unix_socket() generally logs about errors, but we forgot one
case.

4 months agocore/unit: check for correct function in vtable
Mike Yuan [Wed, 17 Jan 2024 09:20:29 +0000 (17:20 +0800)] 
core/unit: check for correct function in vtable

Prompted by https://github.com/systemd/systemd/pull/30974/commits/61e44e01325eca50e88fc9cd400ee340081e9134

4 months agoMerge pull request #30972 from mrc0mmand/ci-unit-tests-ukify
Luca Boccassi [Wed, 17 Jan 2024 11:46:45 +0000 (11:46 +0000)] 
Merge pull request #30972 from mrc0mmand/ci-unit-tests-ukify

ci: install python3-pytest for ukify tests

4 months agosd-netlink: fix rtnl_resolve_link_alternative_name()
Yu Watanabe [Wed, 17 Jan 2024 02:57:21 +0000 (11:57 +0900)] 
sd-netlink: fix rtnl_resolve_link_alternative_name()

Fixes a bug introduced by afdf6c3b6040ef43b05428b834f0f302c8ce9a1b.

4 months agoexec-credential: strv_extend() handles NULL strings gracefully 30974/head
Lennart Poettering [Tue, 16 Jan 2024 22:24:04 +0000 (23:24 +0100)] 
exec-credential: strv_extend() handles NULL strings gracefully

4 months agotree-wide: propagate the error we got from strv_extend_xyz() to the caller
Lennart Poettering [Tue, 16 Jan 2024 22:22:43 +0000 (23:22 +0100)] 
tree-wide: propagate the error we got from strv_extend_xyz() to the caller

It's a bit sloppy to return -ENOMEM rather than the actual error we
already returned in the first place (even though it's always going to be
ENOMEM)

4 months agodbus-unit: don't eat up error codes needlessly
Lennart Poettering [Tue, 16 Jan 2024 22:16:40 +0000 (23:16 +0100)] 
dbus-unit: don't eat up error codes needlessly

4 months agotree-wide: port over various pieces of code to strv_extend_many()
Lennart Poettering [Tue, 16 Jan 2024 22:15:37 +0000 (23:15 +0100)] 
tree-wide: port over various pieces of code to strv_extend_many()

4 months agostrv: add strv_extend_many() helper
Lennart Poettering [Tue, 16 Jan 2024 21:38:31 +0000 (22:38 +0100)] 
strv: add strv_extend_many() helper

This is supposed to be a nicer, faster replacement for the often seen
pattern strv_extend_strv(l, STRV_MAKE(…), false)

4 months agostrv: remove strv_extend_front()
Lennart Poettering [Tue, 16 Jan 2024 18:17:12 +0000 (19:17 +0100)] 
strv: remove strv_extend_front()

It's entirely identical to strv_push_prepend() hence drop the duplicate
definition.

4 months agostrv: modernize strv_insert()
Lennart Poettering [Tue, 16 Jan 2024 18:15:34 +0000 (19:15 +0100)] 
strv: modernize strv_insert()

Let's use memmove() to move the string contents, rather than manual
loops.

Fix the overflow extension.

Prefer reallocarray() over malloc()

4 months agohwdb: Correct display rotation on Chuwi Ubook X N4100 (#24248)
hfavisado [Wed, 17 Jan 2024 04:20:38 +0000 (13:20 +0900)] 
hwdb: Correct display rotation on Chuwi Ubook X N4100 (#24248)

4 months agoMerge pull request #30958 from YHNdnzj/loginctl-list-session-more-info
Lennart Poettering [Wed, 17 Jan 2024 08:21:46 +0000 (09:21 +0100)] 
Merge pull request #30958 from YHNdnzj/loginctl-list-session-more-info

loginctl: show more info in list-sessions (ListSessionsEx())

4 months agoTEST-35-LOGIN: test changes to list-sessions 30958/head
Mike Yuan [Tue, 16 Jan 2024 11:38:17 +0000 (19:38 +0800)] 
TEST-35-LOGIN: test changes to list-sessions

4 months agologinctl: add --json= and -j, decouple list-* from --output=
Mike Yuan [Tue, 16 Jan 2024 10:07:40 +0000 (18:07 +0800)] 
loginctl: add --json= and -j, decouple list-* from --output=

--output= is documented to only affect journal output in *-status.
Let's use --json= and -j standard options for list-* instead.

4 months agologinctl: show more info in list-sessions (ListSessionsEx())
Mike Yuan [Sun, 14 Jan 2024 14:16:32 +0000 (22:16 +0800)] 
loginctl: show more info in list-sessions (ListSessionsEx())

At the same time, 8b6c039a1ac73da006bfe9d5735515bba12ef3c4 is reverted, i.e.
session state is removed from the output. It was added to workaround #26744,
and doesn't really make too much sense after the issue is properly fixed.

4 months agologind-dbus: introduce ListSessionsEx() call
Mike Yuan [Sun, 14 Jan 2024 13:52:27 +0000 (21:52 +0800)] 
logind-dbus: introduce ListSessionsEx() call

As per https://github.com/systemd/systemd/pull/30884#discussion_r1448938737

4 months agoman: don't use versioned standard-options
Mike Yuan [Sun, 14 Jan 2024 13:18:07 +0000 (21:18 +0800)] 
man: don't use versioned standard-options

no-pager-255 was added in #29184, which I reviewed and agreed.
However, as #30887 came up, I reconsidered it a bit, and now
I actually think that this should be removed.

We add new tools that refer to these standard options. During
the process, some options are also promoted to be standard ones.
I think a more sane practice is to generally keep old tools in
the loop, rather than overloading the standard-options with versions.

4 months agoMerge pull request #30967 from yuwata/network-can-required-operstate-for-online
Yu Watanabe [Tue, 16 Jan 2024 22:01:24 +0000 (07:01 +0900)] 
Merge pull request #30967 from yuwata/network-can-required-operstate-for-online

network: several cleanups for required operstate for online, and change the default for CAN devices

4 months agoMerge pull request #30962 from poettering/varlink-json-sensitive-rework
Luca Boccassi [Tue, 16 Jan 2024 21:23:54 +0000 (21:23 +0000)] 
Merge pull request #30962 from poettering/varlink-json-sensitive-rework

varlink/json: rework "sensitive" logic

4 months agoMerge pull request #30955 from yuwata/network-queue-request_detach
Luca Boccassi [Tue, 16 Jan 2024 21:17:32 +0000 (21:17 +0000)] 
Merge pull request #30955 from yuwata/network-queue-request_detach

network/queue: cleanups for detaching request

4 months agoMerge pull request #30949 from yuwata/network-route-cosmetic-cleanups
Luca Boccassi [Tue, 16 Jan 2024 21:16:09 +0000 (21:16 +0000)] 
Merge pull request #30949 from yuwata/network-route-cosmetic-cleanups

network/route: several cosmetic cleanups

4 months agotpm2: If unsealing results in policy hash mismatch when using RSA pubkey, possibly... 30971/head
Dan Streetman [Tue, 16 Jan 2024 15:39:06 +0000 (10:39 -0500)] 
tpm2: If unsealing results in policy hash mismatch when using RSA pubkey, possibly retry

The commit e3acb4d24c68291376b11bea5787112978e2775f changed how we format a
TPM2B_PUBLIC object from an openssl PEM RSA key if it used the TPM-defined
"default" RSA exponent, to instead set the TPM2B_PUBLIC RSA exponent to the
special-case value of 0. This broke backwards compatibility with
previously-sealed data. The previous commit fixed our code to no longer use the
"special case" exponent value of 0, while this commit adds a fallback check for
any sealed data that used the exponent value of 0. Now unsealing should work
for sealed data that used either method (either 0 or the actual value).

4 months agoukify: use datetime.timezone.utc instead of datetime.UTC 30972/head
Frantisek Sumsal [Tue, 16 Jan 2024 20:47:23 +0000 (21:47 +0100)] 
ukify: use datetime.timezone.utc instead of datetime.UTC

For compat with older Python versions, since datetime.UTC is an alias
introduced in Python 3.11.

4 months agoci: install python3-pytest for ukify tests
Frantisek Sumsal [Tue, 16 Jan 2024 20:36:05 +0000 (21:36 +0100)] 
ci: install python3-pytest for ukify tests

4 months agotest: check TPM2B_PUBLIC "name" during PEM->TPM2B_PUBLIC conversion tests
Dan Streetman [Tue, 16 Jan 2024 18:49:45 +0000 (13:49 -0500)] 
test: check TPM2B_PUBLIC "name" during PEM->TPM2B_PUBLIC conversion tests

Check the calculated TPM2B_PUBLIC key "name" to verify our PEM->TPM2B_PUBLIC
function remains consistent with previous code. This is important as the
TPM2B_PUBLIC "name" is used in the Authorize policy and so any change to a key
"name" would break unsealing for previously-sealed objects (see bug #30546).

Note that the tpm2_tpm2b_public_from_openssl_pkey() function results in a
TPM2B_PUBLIC with the same "name" as using the tpm2-tools program
tpm2_loadexternal, at least as of tpm2-tools version 5.6.18, with the test keys
from TEST(tpm2b_public_from_openssl_pkey) in src/test/test-tpm2.

4 months agotest: verify PEM->TPM2B_PUBLIC conversion for RSA key with non-default exponent
Dan Streetman [Tue, 16 Jan 2024 17:26:45 +0000 (12:26 -0500)] 
test: verify PEM->TPM2B_PUBLIC conversion for RSA key with non-default exponent

The tpm2 test currently verifies PEM->TPM2B_PUBLIC conversion for an RSA key
with the default exponent (0x10001); this adds verification for an RSA key with
a non-default exponent.

4 months agotpm2: Do not use RSA exponent special-case default value in PEM->TPM2B_PUBLIC conversion
Dan Streetman [Tue, 16 Jan 2024 15:02:47 +0000 (10:02 -0500)] 
tpm2: Do not use RSA exponent special-case default value in PEM->TPM2B_PUBLIC conversion

The openssl default value for an RSA key exponent value is 0x10001, and the TPM
specification defines a exponent value of 0 as representing this value. The
systemd code that converted an RSA PEM public key to a TPM2B_PUBLIC object
previously used the exponent value directly, but commit
e3acb4d24c68291376b11bea5787112978e2775f changed the conversion to use the
special case exponent value of 0 for any RSA key with an exponent value of
0x10001.

Because the entire TPM2B_PUBLIC object is used to calculate its "name", this
difference in exponent value (0x10001 vs 0) introduced a change in the key
"name". Since the Authorize policy uses the key "name" directly in its policy
session hash value, this change resulted in new systemd code being unable to
properly unseal any data (e.g. a LUKS volume) that was previously sealed.

This reverts the code to no longer override an RSA exponent value of 0x10001
with the special case value of 0.

Fixes a bug introduced by commit e3acb4d24c68291376b11bea5787112978e2775f.

Fixes: #30546
4 months agotest-network: test the default required operational state for CAN devices 30967/head
Yu Watanabe [Tue, 16 Jan 2024 16:38:55 +0000 (01:38 +0900)] 
test-network: test the default required operational state for CAN devices

4 months agonetwork: make 'carrier' as the default required operational state for CAN device
Yu Watanabe [Tue, 16 Jan 2024 16:35:34 +0000 (01:35 +0900)] 
network: make 'carrier' as the default required operational state for CAN device

As CAN devices do not support IP address, hence the state never goes to
higher than 'carrier'.

Prompted by https://github.com/linux-can/can-utils/issues/68#issuecomment-1327987724.

4 months agowait-online: several cleanups for LinkOperationalState
Yu Watanabe [Tue, 16 Jan 2024 16:04:18 +0000 (01:04 +0900)] 
wait-online: several cleanups for LinkOperationalState

- fix memleak in parser,
- fix missing return in parser on failure,
- drop unnecessary temporary argument in command line argument parser,
- use recently introduced macros and helper functions.

4 months agonetwork: several cleanups for LinkOperationalState
Yu Watanabe [Tue, 16 Jan 2024 16:01:32 +0000 (01:01 +0900)] 
network: several cleanups for LinkOperationalState

- introduce link_required_operstate_for_online() helper function,
- use recently introduced macros and helper functions,
- unconditionally serialize the minimum and maximum of required
  operational state.

4 months agonetwork: drop unnecessary temporary variables
Yu Watanabe [Tue, 16 Jan 2024 15:00:45 +0000 (00:00 +0900)] 
network: drop unnecessary temporary variables

4 months agosd-network: modernize parse_operational_state_range()
Yu Watanabe [Tue, 16 Jan 2024 14:54:39 +0000 (23:54 +0900)] 
sd-network: modernize parse_operational_state_range()

- rename 'out' -> 'ret',
- introduce LINK_OPERSTATE_RANGE_INVALID,
- constify LINK_OPERSTATE_RANGE_DEFAULT,
- drop spurious const specifier for allocated string,
- etc,.

4 months agosd-network: introduce three helper functions for LinkOperationalState
Yu Watanabe [Tue, 16 Jan 2024 15:54:34 +0000 (00:54 +0900)] 
sd-network: introduce three helper functions for LinkOperationalState

4 months agopo: Translated using Weblate (Punjabi)
A S Alam [Tue, 16 Jan 2024 14:35:41 +0000 (15:35 +0100)] 
po: Translated using Weblate (Punjabi)

Currently translated at 32.1% (73 of 227 strings)

Co-authored-by: A S Alam <aalam@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pa/
Translation: systemd/main

4 months agoMerge pull request #30944 from CodethinkLabs/vmspawn/fix_fedora_issues
Lennart Poettering [Tue, 16 Jan 2024 17:57:56 +0000 (18:57 +0100)] 
Merge pull request #30944 from CodethinkLabs/vmspawn/fix_fedora_issues

vmspawn: fix more issues

4 months agovarlink: restore debug output on incoming messages 30962/head
Lennart Poettering [Tue, 16 Jan 2024 11:06:17 +0000 (12:06 +0100)] 
varlink: restore debug output on incoming messages

Now that we can selectively suppress only sensitive fields in JSON
objects we can reenable debug logging for incoming messages, which was
removed in 2e3414660cb0c6a024661638d0b237d88b5a7cbc.

This makes Varlink fully debuggable again: we'll see both incoming and
outgoing messages, only the sensitive fields are suppressed.

See: #30578

4 months agojson: replace JSON_FORMAT_REFUSE_SENSITIVE with JSON_FORMAT_CENSOR_SENSITIVE
Lennart Poettering [Tue, 16 Jan 2024 10:55:54 +0000 (11:55 +0100)] 
json: replace JSON_FORMAT_REFUSE_SENSITIVE with JSON_FORMAT_CENSOR_SENSITIVE

Previously, the flag would completely refuse formatting a JSON object if
any field of it was marked sensitive. With this change we'll simply
replace the subobject with the string "<sensitive data>", and show
everything else.

This is tremendously useful when debugging, since it means that we can
again trace varlink calls through the stack: we can show all the message
metadata and just suppress the actually sensitive parameters.

The ability to debug this matters, and we should not hide more
information that we can get away with, to keep things debuggable and
maintainable.

4 months agojson: export json_variant_is_sensitive_recursive()
Lennart Poettering [Tue, 16 Jan 2024 10:54:20 +0000 (11:54 +0100)] 
json: export json_variant_is_sensitive_recursive()

Let's export this function, so that we can use it elsewhere. Also, while
at it, let's cache the result in a flag. This is only safe if the result
is positive, since we allow the flag to be enabled at any time down thre
tree somewhere, which we need to look at. (We never allow it to be
turned off however)

4 months agovarlink: optionally, mark all incoming message's "parameters" field as sensitive
Lennart Poettering [Tue, 16 Jan 2024 10:27:40 +0000 (11:27 +0100)] 
varlink: optionally, mark all incoming message's "parameters" field as sensitive

So far the varlink logic honoured the "sensitive" flag of output
messages. Let's add something similar for input messages. Since we don't
really know incoming messages, the flag simply controls whether the
"parmaeters" field of all incoming messages should be marked as
sensitive.

Then, turn this on in the credentials logic and in homed, since both
deal with credentials.

4 months agonetwork/route: find/distinguish routes in the same way that the kernel uses
Yu Watanabe [Sat, 13 Jan 2024 04:16:10 +0000 (13:16 +0900)] 
network/route: find/distinguish routes in the same way that the kernel uses

The kernel uses different logics to find or distinguish IPv4 and IPv6 routes.
Let's follow the same way that the kernel uses.
See comments in the code for more details.

4 months agolabeler: add bsod, hibernate-resume, nspawn and vmspawn
Mike Yuan [Tue, 16 Jan 2024 14:47:11 +0000 (22:47 +0800)] 
labeler: add bsod, hibernate-resume, nspawn and vmspawn

4 months agoMerge pull request #30960 from poettering/get-user-creds-modernization
Lennart Poettering [Tue, 16 Jan 2024 16:12:00 +0000 (17:12 +0100)] 
Merge pull request #30960 from poettering/get-user-creds-modernization

user-util: modernize get_user_creds() + get_group_creds()

4 months agologind: allow Sleep() and CanSleep() dbus calls
Mike Yuan [Tue, 16 Jan 2024 13:27:23 +0000 (21:27 +0800)] 
logind: allow Sleep() and CanSleep() dbus calls

Follow-up for cd4dd90b99ac5617431ce4f0ca1e9089197c85fd

4 months agoMerge pull request #30963 from poettering/creds-tweaks
Luca Boccassi [Tue, 16 Jan 2024 15:25:08 +0000 (15:25 +0000)] 
Merge pull request #30963 from poettering/creds-tweaks

two minor creds-util.c simplifications

4 months agoMerge pull request #30961 from poettering/varlink-bus-polkit-fixes
Luca Boccassi [Tue, 16 Jan 2024 15:24:22 +0000 (15:24 +0000)] 
Merge pull request #30961 from poettering/varlink-bus-polkit-fixes

varlink polkit client fixes

4 months agoMerge pull request #30959 from poettering/varlink-debug-better
Luca Boccassi [Tue, 16 Jan 2024 15:18:36 +0000 (15:18 +0000)] 
Merge pull request #30959 from poettering/varlink-debug-better

varlink tweaks for making debugging easier

4 months agonetwork/queue: detach request from the queue only when the request is actually queued 30955/head
Yu Watanabe [Tue, 16 Jan 2024 05:04:50 +0000 (14:04 +0900)] 
network/queue: detach request from the queue only when the request is actually queued

No effective functionality is changed in this commit.
Refactoring and preparation for later commits.

4 months agonetwork/queue: increase the reference counter of the request before processing it
Yu Watanabe [Tue, 16 Jan 2024 04:50:23 +0000 (13:50 +0900)] 
network/queue: increase the reference counter of the request before processing it

To prevent the request freed in req->process().

This also makes a request that is not requested by a link detached on failure.
Otherwise, the request may periodically processed and failed forever.

4 months agouser-util: honour PREFER_NSS flag in get_group_creds() the same way as we already... 30960/head
Lennart Poettering [Tue, 16 Jan 2024 13:56:25 +0000 (14:56 +0100)] 
user-util: honour PREFER_NSS flag in get_group_creds() the same way as we already do in get_user_creds()

let's onour the PREFER_NSS flag also in get_group_creds() the same
way we honour it in get_user_creds().

Simply to remove surprises.

4 months agouser-util: modernize get_user_creds() + get_group_creds()
Lennart Poettering [Mon, 15 Jan 2024 16:00:40 +0000 (17:00 +0100)] 
user-util: modernize get_user_creds() + get_group_creds()

Let's rename return parameters to ret_xyz, and let's guarantee the usual
rule to initialize all return parameters on success, and not touch any
on failure.

4 months agocreds-util: drop unnecessary include 30963/head
Lennart Poettering [Mon, 15 Jan 2024 14:21:35 +0000 (15:21 +0100)] 
creds-util: drop unnecessary include

Follow-up for: e653a194e490fae7d166f40762c334006d592051

4 months agocreds-util: simplify offset calculation a bit
Lennart Poettering [Mon, 15 Jan 2024 16:33:59 +0000 (17:33 +0100)] 
creds-util: simplify offset calculation a bit

Don't recalculate the overall offset entirely each time we process
another header. Instead, if we already validated an earlier offset, just
reuse the result, it's readily available in 'p'.

No change in behaviour, just a bit of code simplification.

4 months agobus-polkit: don't return positive in varlink_verify_polkit_async() just because we... 30961/head
Lennart Poettering [Tue, 16 Jan 2024 12:27:32 +0000 (13:27 +0100)] 
bus-polkit: don't return positive in varlink_verify_polkit_async() just because we already sent an error reply

A positive return value means "access granted", hence if we already
reply to the method call don't accidentally return positive.

Follow-up for: d04c1a1c8e7c95daa483d8d52d5fc4c25fbc67f2

4 months agobus-polkit: explicitly cast away return value we ignore
Lennart Poettering [Tue, 16 Jan 2024 12:27:26 +0000 (13:27 +0100)] 
bus-polkit: explicitly cast away return value we ignore

4 months agobus-polkit: treat various well-known PK errors as denied
Lennart Poettering [Tue, 16 Jan 2024 11:53:39 +0000 (12:53 +0100)] 
bus-polkit: treat various well-known PK errors as denied

Various recognizable errors from

https://www.freedesktop.org/software/polkit/docs/latest/eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-errordomain-org.freedesktop.PolicyKit1.Error.

should be considered access failures, hence treat them like that.

4 months agovarlink: also honour new env var $SYSTEMD_VARLINK_LISTEN in varlink_server_listen_auto() 30959/head
Lennart Poettering [Tue, 16 Jan 2024 10:01:28 +0000 (11:01 +0100)] 
varlink: also honour new env var $SYSTEMD_VARLINK_LISTEN in varlink_server_listen_auto()

varlink_server_listen_auto() is supposed to be the one-stop solution for
turning simple command line tools into IPC services. They aren't easy to
test/debug however, since you have to invoke them through a service
manager.

Let's make this easier: if the SYSTEMD_VARLINK_LISTEN env var is set,
let's listen on the socket specified therein. This makes things easier
to gdb: just run the service from the cmdline.

4 months agovarlink-idl: prefix all varlink IDL debug lines wit "Varlink-IDL:"
Lennart Poettering [Tue, 16 Jan 2024 10:00:02 +0000 (11:00 +0100)] 
varlink-idl: prefix all varlink IDL debug lines wit "Varlink-IDL:"

Let's improve debuggability of varlink IPC transactions, and separate
out log messages triggered by the IPC info from others, by prefixing
them with a specific prefix.

4 months agoMerge pull request #30953 from yuwata/network-nexthop-silently-removed-by-kernel
Luca Boccassi [Tue, 16 Jan 2024 12:39:46 +0000 (12:39 +0000)] 
Merge pull request #30953 from yuwata/network-nexthop-silently-removed-by-kernel

network/nexthop: forget nexthops silently removed by kernel

4 months agonetwork/route: introduce route_get_link() and use it in log_route_debug()
Yu Watanabe [Sat, 13 Jan 2024 06:39:06 +0000 (15:39 +0900)] 
network/route: introduce route_get_link() and use it in log_route_debug()

No functional change, just refactoring and preparation for later
commits.

4 months agovmspawn: supply a serial TTY to the kernel by default 30944/head
Sam Leonard [Mon, 15 Jan 2024 17:02:35 +0000 (17:02 +0000)] 
vmspawn: supply a serial TTY to the kernel by default

4 months agovmspawn: ignore firmwares with enrolled-keys by default
Sam Leonard [Mon, 15 Jan 2024 16:40:09 +0000 (16:40 +0000)] 
vmspawn: ignore firmwares with enrolled-keys by default

4 months agoudev: even if a device is a zac device, scsi-$ID_SERIAL will be reserved for it ...
我超厉害 [Tue, 16 Jan 2024 05:57:07 +0000 (13:57 +0800)] 
udev: even if a device is a zac device, scsi-$ID_SERIAL will be reserved for it (#30459)

Co-authored-by: wangyuhang <wangyuhang27@huawei.com>
4 months agoMerge pull request #30851 from lnussel/kernel-install
Yu Watanabe [Tue, 16 Jan 2024 05:55:35 +0000 (14:55 +0900)] 
Merge pull request #30851 from lnussel/kernel-install

kernel-install fixes

4 months agotree-wide: Load entry-token and layout.conf from /usr/lib/kernel/ as well
Daan De Meyer [Mon, 15 Jan 2024 12:46:49 +0000 (13:46 +0100)] 
tree-wide: Load entry-token and layout.conf from /usr/lib/kernel/ as well

4 months agotest-network: add test case for removal of nexthop that is a member of a group nexthop 30953/head
Yu Watanabe [Mon, 15 Jan 2024 10:48:48 +0000 (19:48 +0900)] 
test-network: add test case for removal of nexthop that is a member of a group nexthop

4 months agonetwork/nexthop: drop dependent nexthops on removal
Yu Watanabe [Mon, 15 Jan 2024 04:14:46 +0000 (13:14 +0900)] 
network/nexthop: drop dependent nexthops on removal

If a nexthop is removed, dependent nexthops are silently removed by the
kernel. Hence, networkd may be confused that nexthops that depends on the
nexthop still exist, and may fail to configure other routes or so.

4 months agonetwork/nexthop: introduce a reverse map of nexthop group members
Yu Watanabe [Mon, 15 Jan 2024 03:39:19 +0000 (12:39 +0900)] 
network/nexthop: introduce a reverse map of nexthop group members

It is not used in this commit, but will be used later.
Preparation for later commits.

4 months agonetwork/nexthop: read netlink message in nexthop_update_group()
Yu Watanabe [Mon, 15 Jan 2024 03:35:47 +0000 (12:35 +0900)] 
network/nexthop: read netlink message in nexthop_update_group()

No functional change, preparation for later commits.

4 months agonetwork/nexthop: reorder elements in NextHop
Yu Watanabe [Mon, 15 Jan 2024 02:59:21 +0000 (11:59 +0900)] 
network/nexthop: reorder elements in NextHop

4 months agonetwork/route: trivial cosmetic changes 30949/head
Yu Watanabe [Sun, 14 Jan 2024 05:18:16 +0000 (14:18 +0900)] 
network/route: trivial cosmetic changes

- downgrade log level,
- add short comment for boolean argument.

4 months agonetwork/route: reorder getters in manager_rtnl_process_route()
Yu Watanabe [Sat, 13 Jan 2024 21:26:00 +0000 (06:26 +0900)] 
network/route: reorder getters in manager_rtnl_process_route()

No functional change, just refactoring and preparation for later
commits.

4 months agonetwork/route: reorder setter called in route_set_netlink_message()
Yu Watanabe [Sat, 13 Jan 2024 01:33:49 +0000 (10:33 +0900)] 
network/route: reorder setter called in route_set_netlink_message()

Also, this renames 'req' -> 'm', and makes the function unconditionally
set route type and route metric, and override type later if necessary.

Should not change any effective behavior. Just refactoring.

4 months agonetwork/route: reorder elements in Route object and add comments
Yu Watanabe [Sat, 13 Jan 2024 01:51:05 +0000 (10:51 +0900)] 
network/route: reorder elements in Route object and add comments

4 months agonetwork/route: relocate route_new() and friends
Yu Watanabe [Sat, 13 Jan 2024 00:51:26 +0000 (09:51 +0900)] 
network/route: relocate route_new() and friends

No functional change, preparation for later commits.

4 months agobus-socket: Clarify that inotify is supposed to watch all components
Daan De Meyer [Mon, 15 Jan 2024 16:16:10 +0000 (17:16 +0100)] 
bus-socket: Clarify that inotify is supposed to watch all components

The previous wording of the components could mean that we should only
watch directories, not the socket itself. Reword so that we clearly
mention that all components of the path are watched, including the
socket itself.

4 months agokernel-install: silence num kernels installed 30851/head
Ludwig Nussel [Tue, 9 Jan 2024 11:49:09 +0000 (12:49 +0100)] 
kernel-install: silence num kernels installed

4 months agokernel-install: fix context_copy
Ludwig Nussel [Tue, 9 Jan 2024 11:29:36 +0000 (12:29 +0100)] 
kernel-install: fix context_copy

Don't reopen or dup values that weren't set before. Fixes add-all.

4 months agostrv: introduce strv_copy_unless_empty()
Ludwig Nussel [Tue, 9 Jan 2024 16:31:01 +0000 (17:31 +0100)] 
strv: introduce strv_copy_unless_empty()

4 months agoMerge pull request #30934 from yuwata/network-introduce-route-nexthop
Luca Boccassi [Mon, 15 Jan 2024 14:41:58 +0000 (14:41 +0000)] 
Merge pull request #30934 from yuwata/network-introduce-route-nexthop

network/route: introduce RouteNextHop object

4 months agosystemctl-is-system-running: display "offline" with --image
Antonio Alvarez Feijoo [Mon, 15 Jan 2024 09:55:31 +0000 (10:55 +0100)] 
systemctl-is-system-running: display "offline" with --image

With the `--image` option, the `running_in_chroot` check is not enough. E.g.:

```
> build/systemctl --image /tmp/20240108-openSUSE.raw is-system-running
running
```

4 months agotest-network: add simple test case for DHCP relay on bridge interface
Yu Watanabe [Mon, 15 Jan 2024 05:19:03 +0000 (14:19 +0900)] 
test-network: add simple test case for DHCP relay on bridge interface

For issue #30763.

4 months agoresolve: on_transaction_stream_error() may free multiple transactions
Yu Watanabe [Sun, 14 Jan 2024 00:40:27 +0000 (09:40 +0900)] 
resolve: on_transaction_stream_error() may free multiple transactions

Fixes #30928.

4 months agoMerge pull request #30933 from YHNdnzj/sleep-trivial-cleanup
Luca Boccassi [Mon, 15 Jan 2024 10:15:12 +0000 (10:15 +0000)] 
Merge pull request #30933 from YHNdnzj/sleep-trivial-cleanup

Trivial cleanup for systemd-sleep unit/man page

4 months agoMerge pull request #30936 from yuwata/network-automatically-reconfigure-interface...
Luca Boccassi [Mon, 15 Jan 2024 10:09:30 +0000 (10:09 +0000)] 
Merge pull request #30936 from yuwata/network-automatically-reconfigure-interface-on-failure

network: automatically reconfigure interface on failure

4 months agotest-network: try to flip interface state frequently 30936/head
Yu Watanabe [Mon, 15 Jan 2024 06:17:57 +0000 (15:17 +0900)] 
test-network: try to flip interface state frequently

4 months agonetwork/link: automatically reconfigure interface on failure
Yu Watanabe [Mon, 15 Jan 2024 06:40:54 +0000 (15:40 +0900)] 
network/link: automatically reconfigure interface on failure

Closes #29246.

4 months agonetwork/link: shorten code a bit
Yu Watanabe [Mon, 15 Jan 2024 06:40:07 +0000 (15:40 +0900)] 
network/link: shorten code a bit

4 months agonetwork/route: do not read RTA_OIF twice 30934/head
Yu Watanabe [Sat, 13 Jan 2024 21:22:03 +0000 (06:22 +0900)] 
network/route: do not read RTA_OIF twice

It is also read in route_nexthops_read_netlink_message(), and already
stored in the Route object. Let's use it.

4 months agonetwork/route-nexthop: store ifindex of the assigned interface in Route.nexthop.ifindex
Yu Watanabe [Sat, 13 Jan 2024 02:18:53 +0000 (11:18 +0900)] 
network/route-nexthop: store ifindex of the assigned interface in Route.nexthop.ifindex

And use it if set on building netlink message.

4 months agonetwork/route: also use RouteNextHop for managing gateway
Yu Watanabe [Fri, 12 Jan 2024 06:23:17 +0000 (15:23 +0900)] 
network/route: also use RouteNextHop for managing gateway

No functional change, just refactoring.

4 months agonetwork/route-nexthop: introduce struct RouteNextHop and replace MultipathRoute with it
Yu Watanabe [Fri, 12 Jan 2024 04:58:23 +0000 (13:58 +0900)] 
network/route-nexthop: introduce struct RouteNextHop and replace MultipathRoute with it

It is mostly equivalent to MultipathRoute. So, no functional change,
just refactoring and preparation for later commits.

4 months agotest: create /run/sshd in TEST-74-AUX-UTILS
Luca Boccassi [Sat, 13 Jan 2024 12:12:25 +0000 (12:12 +0000)] 
test: create /run/sshd in TEST-74-AUX-UTILS

12264s [ 4819.948632] sshd[1365]: fatal: Missing privilege separation directory: /run/sshd
12264s [ 4819.952120] testsuite-74.sh[1362]: kex_exchange_identification: read: Connection reset by peer
12264s [ 4819.952120] testsuite-74.sh[1362]: Connection reset by /run/ssh-unix-local/socket port 0

https://autopkgtest.ubuntu.com/results/autopkgtest-jammy-upstream-systemd-ci-systemd-ci/jammy/amd64/s/systemd-upstream/20240113_093341_50fc7@/log.gz

We copy binaries manually so some setups are missing, create the directory
as needed