Commit graph

67066 commits

Author SHA1 Message Date
Mike Yuan 1dc604d821
catalog/systemd.catalog: rephrase a bunch of messages
Follow-up for #28873
2023-09-04 22:45:45 +08:00
Mike Yuan acee9a9c09
core/crash-handler: correct indentation 2023-09-04 22:45:45 +08:00
Mike Yuan 15cae43f18
sd-messages.h: correct alignment 2023-09-04 22:45:45 +08:00
Susant Sahani 6e8f5e4c1f network: ndisc - Allow to parse PREF64 prefix 2023-09-04 23:41:02 +09:00
Susant Sahani 6a6d27bc5b network: sd-radv - Allow to configure Mobile IPv6 Home Agent 2023-09-04 23:40:40 +09:00
Yu Watanabe 47d8770aac
Merge pull request #28896 from pelaufer/dhcp_dbus_notify
Add DHCP client state and change notification to networkd dbus interface
2023-09-04 21:48:43 +09:00
Luca Boccassi 6d05778469
Merge pull request #29055 from mrc0mmand/bash-comp
shell-completions: add missing systemctl verbs/options
2023-09-04 11:22:39 +01:00
Frantisek Sumsal 97e2785292 shell-completions: add missing systemctl verbs/options
Resolves: #29048
2023-09-04 11:49:51 +02:00
Frantisek Sumsal 05ebcbd5c5 shell-completions: code cleanup 2023-09-04 11:49:26 +02:00
Victor Westerhuis 9dd8858281 userdbd: Order systemd-userdbd.service after systemd-remount-fs.service
Otherwise the root filesystem might still be readonly and
systemd-userdbd fails to start.

Explicitly pick systemd-remount-fs.service instead of local-fs-pre.target
to prevent a dependency cycle.
2023-09-04 09:47:05 +08:00
Luca Boccassi f7f842f888 mkosi: temporarily disable Arch
The mkosi Arch CI doesn't work as the keyring package is out
of date and cannot be built due to various build toolchain
issues. Disable the job as it always fails and confuses
submitters.
2023-09-03 14:40:24 +01:00
Luca Boccassi 626a9eba09
Merge pull request #28988 from keszybz/sd128-arbitrary-values
Add sd-id128 and systemd-id128 functionality to do "app specific" with any "base"
2023-09-03 14:05:32 +01:00
Luca Boccassi 809eb17134
Merge pull request #28976 from yuwata/network-ndisc-drop-on-zero-lifetime
network/ndisc: also drop configurations with infinite lifetime on RA …
2023-09-03 14:04:58 +01:00
Luca Boccassi 4b246347ba
Merge pull request #28963 from YHNdnzj/loginctl-table
loginctl: use vertical table for {user,session,seat}-status
2023-09-03 14:04:24 +01:00
Mike Yuan 62f643a34d
Merge pull request #28793 from poettering/switch-root-flags-tweak
various switch-root tweaks/fixes
2023-09-03 11:18:18 +08:00
Robby Red f06bee168b
hwdb: Added config for RCA W101SA23T1 (#29041) 2023-09-03 11:17:15 +08:00
pelaufer e1ef777192 Adding tests for dhcp client and dhcp6 client dbus state interface 2023-09-02 14:53:23 -06:00
pelaufer f8da534e25 Adding dhcp client and dhcp6 client dbus status interface 2023-09-02 14:52:35 -06:00
pelaufer fd9b7f5bea Adding dhcp client and dhcp6 client state interface 2023-09-02 14:51:03 -06:00
pelaufer 8412d4c878 Adding dhcp_state_to_string and dhcp client state change logging 2023-09-02 14:46:47 -06:00
dependabot[bot] 475974eb5b build(deps): bump actions/checkout from 3.5.3 to 3.6.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-02 19:13:09 +00:00
dependabot[bot] c5de4ee02b build(deps): bump meson from 1.2.0 to 1.2.1 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.2.0...1.2.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-02 19:12:43 +00:00
dependabot[bot] 3bb5656ff1 build(deps): bump github/codeql-action from 2.21.2 to 2.21.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.2 to 2.21.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0ba4244466...00e563ead9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-02 19:12:34 +00:00
Mike Yuan bf366954fa
loginctl: use vertical table for {user,session,seat}-status
To make alignment better and more manageable.

Requested in https://github.com/systemd/systemd/pull/27769#discussion_r1203952407
2023-09-02 22:59:57 +08:00
Mike Yuan 00614746e9
string-util: introduce strrepa 2023-09-02 22:59:15 +08:00
Mike Yuan 62efc7629b
format-table: use format_timestamp_relative_monotonic 2023-09-02 22:58:00 +08:00
Yu Watanabe 218f3738d8 network/ndisc: drop captive portals with zero lifetime earlier
This also adds a comment about that we use the main lifetime for captive
portals.
2023-09-02 22:25:17 +09:00
Lennart Poettering c6c5d20de5
Revert "shutdown: do not umount recursively before MS_MOVE"
This reverts commit 6b219b74de.

This commit doesn't look right to me. We have to unmount everything
recursively *before* we MS_MOVE because the MS_MOVE will not get rid of
it for us, and we simply cannot access these mounts after the MS_MOVE is
complete anymore.

This is a fundamental difference between MS_MOVE and pivot_root(). The
latter repivots the entire mount table getting rid of anything outside
of the new root. MS_MOVE otoh just mounts a bunch of mount points to the
top, leaving in place whatever might be underneath it.

Thus, if we go through the MS_MOVE codepath we must unmount everything
explicitly before doing so because otherwise the mounts will be pinned
forever, but be entirely invisble to userspace.
2023-09-02 19:47:58 +08:00
Lennart Poettering 95648f9ed0
switch-root: when pivot_root() fails, but old root shall be mounted, do so
If pivot_root() fails, we'll fall back to switching root via MS_MOVE.
Unlike pivot_root() that won't place the old root fs anyway, but just
hide it. That's problematic during shutdown for example, since after all
we might still want to access it from the exitrd, to disassemble it
properly.

Hence let's make things somewhat systematic: regardless if pivot_root()
or MS_MOVE is used, always make the old root fs show up in the selected
new dir.
2023-09-02 19:47:58 +08:00
Lennart Poettering c2d62118f7
switch-root: rework SWITCH_ROOT_SKIP_RECURSIVE_RUN flag
Negative flags always raise eyebrows. Let's normalize
SWITCH_ROOT_SKIP_RECURSIVE_RUN to become SWITCH_ROOT_RECURSIVE_RUN, i.e.
make recursive behaviour opt-in, rather than opt-out. We only want it
for the initrd→host transition, and in all other cases we'd prefer to
avoid it.

This allows us to simplify some code. Also, normalize the mount point
table in switch_root() a bit, to be static const, and then just select
between two mount flag sets via SWITCH_ROOT_RECURSIVE_RUN, where the
mount flag without MS_BIND (i.e. zero) just means "skip this entry".

This does not actually change anything in behaviour, it's just
refactoring.

Follow-up for: b12d41a8bb
2023-09-02 19:47:57 +08:00
Zbigniew Jędrzejewski-Szmek a53dc9b130
Merge pull request #29017 from msizanoen1/fix-onboot-rotate
journal: Relax boot ID and monotonic clock consistency checks
2023-09-02 14:26:44 +03:00
Zbigniew Jędrzejewski-Szmek 698287d7dc
Merge pull request #28971 from YHNdnzj/soft-reboot-is-better-switch-root
core,systemctl: use path_is_root & limit switch-root to initrd transitions
2023-09-02 14:22:53 +03:00
Zbigniew Jędrzejewski-Szmek 437e217a48 man: add version information
I'm keeping this as a separate commit. It is the first time version
information is manually added after 6a73a4f7c4
and we might want to revert this later.
2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek ed856ea15c TODO: add entry about service and socket units 2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek 716126c069 id128: rework conditional to reduce indentation 2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek fa96afb4c4 sd-id128: do not allow null 'app_id' param
If it is null, we get the 'base' param unchanged:
$ build/systemd-id128 show 00000000000000000000000000000001 \
  --app-specific=00000000000000000000000000000000
00000000000000000000000000000001

This is not good, because it breaks our promise that the base (usually either
machine-id or boot-id) cannot be derived from the result. Some application
using the library could use a null app id, inadvertently exposing the machine
or boot id. (This could happen because of forgotten initialization, or maybe
because the app id is configurable, and the user configures it wrongly.)

Note: the other way the secret is not exposed:
$ build/systemd-id128 show 00000000000000000000000000000000 \
  --app-specific=00000000000000000000000000000002
4f63080959264900b0d88d999dae2d3a

Normally systemd would not allow a null machine-id or boot-id, but we can let
the user do the calculation that if they want to.
2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek b37e8184a5 id128: allow combining --app with show
This effectively exposes sd_id128_get_app_specific() on the commandline.

Fixes https://github.com/systemd/systemd/issues/27514.
2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek aea3f594db various: use id128_from_string_not_null()
No functional change. In config_parse_address_generation_type() we would set
the output parameter and then say it's ignored, so it _looked_ like an error in
the code, but the variable was always initialized to SD_ID128_NULL anyway, so
the code was actually fine.
2023-09-02 14:16:25 +03:00
Mike Yuan 4da159bc53
core,systemctl: refuse switching root if we're not in initrd 2023-09-02 15:56:24 +08:00
Mike Yuan b0c5f0e1f4
core,systemctl: refuse switching root to current root properly
Fixes #28970
2023-09-02 15:56:24 +08:00
Yu Watanabe 2b4fca55d0 Revert "network: ndisc - drop routes of lifetime 0"
This reverts commit 4ccd48cb26.

From RFC 4861 section 4.2.
> The Router Lifetime applies only to the router's usefulness as a default
> router; it does not apply to information contained in other message fields
> or options.  Options that need time limits for their information include
> their own lifetime fields.

Hence, based on the lifetime field of the message header, we should not
drop any other information.
Note that, in ndisc_router_process_default(), we have already dropp the
default gateway when the lifetime is zero. Hence, we can safely drop the
change.
2023-09-02 14:34:56 +09:00
Christian Hergert b63beb4d28 oomd: avoid unnecessary wake-ups for ManagedOOMSwap
If there are no "ManagedOOMSwap" entries to monitor, then the event source
can be completely disabled. This scenario appears to be common and avoiding
the wake-ups can save idle energy consumption.

This was discovered while using Sysprof for various GNOME 45 performance
tuning. systemd-oomd goes from waking up a few times a second to no
wake-ups helping keep a laptop in deep(er) sleep.

Signed-off-by: Christian Hergert <chergert@redhat.com>
2023-09-02 02:25:58 +01:00
pelaufer 4502f82beb Adding client_set_state to sd-dhcp-client.c to support a client state change hook 2023-09-01 12:34:13 -06:00
OMOJOLA JOSHUA ad5db9404e Journal: Add message IDs for emergency-level log messages 2023-09-01 13:59:21 +01:00
msizanoen 904b8bb5a8 sd-login: Fix sd_pidfd_* function signature parameter types
The type of a file descriptor is `int`, not `pid_t`. This should not
have any effects on API consumers as `pid_t` is already typedef'd as
`int` on all glibc-based systems.
2023-09-01 13:29:47 +01:00
Yu Watanabe c97f268f29 man: mention version info for NFTSet= setting
Follow-up for fc289dd0ad.
2023-09-01 13:29:27 +01:00
Yu Watanabe 1d4c874d3c
Merge pull request #24570 from topimiettinen/nft-sets-v2
network: firewall integration with NFT sets
2023-09-01 20:13:39 +09:00
Lennart Poettering c27465d72d glyph-util: bring glyphs into same order everywhere
The enum definition, the two string tables and the test all were using
different orders (and in case of the test even missed entries).

Let's unify this, and make sure we always use the same order. This
settles the confusion, and makes the order used for the unicode string
table the canonical one, adjusting the other lists to match it. And adds
the missing entries to the tets.
2023-08-31 14:39:49 +02:00
Lennart Poettering 359b5e7539
Merge pull request #29004 from poettering/measure-log
tpm2: whenever we measure, also write a tpm log record
2023-08-31 09:47:35 +02:00
Milton D. Miller II c23b07df3a NEWS: Typo
Let's not encourage the lawyers.
2023-08-30 20:50:47 +01:00