Commit Graph
71347 Commits
Author SHA1 Message Date
Mike Yuan 31323f21bb meson: drop default-hierarchy= option, always use unified 2024-02-27 23:10:49 +08:00
Mike Yuan f2512de82d core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE
Also, add a 30s sleep even if cgroup v1 is forced.

Closes #30852
2024-02-27 23:10:49 +08:00
Mike Yuan f4f3efa4d7 shared/cgroup-setup: introduce cg_is_legacy_force_enabled 2024-02-27 23:08:59 +08:00
Mike Yuan fbc8d90bd5 shared/mount-setup: split out mount_cgroup_legacy_controllers 2024-02-27 23:03:43 +08:00
Mike Yuan 72a9f4fa45 shared/mount-setup: minor modernization 2024-02-27 23:03:43 +08:00
Mike Yuan 821333263c core/cgroup: remove obsolete TODO 2024-02-27 23:03:42 +08:00
Mike Yuan 62b5bd3c8a core: mark JoinControllers= as DISABLED_LEGACY rather than _CONFIGURATION
Follow-up for 143fadf369
2024-02-27 23:03:39 +08:00
Štěpán Němec da9e1f8322 zsh/_journalctl: complete -g, --case-sensitive, 'help' (pseudo-)facility 2024-02-27 13:50:15 +00:00
Lennart Poettering 666a348d1c update TODO 2024-02-27 14:40:31 +01:00
Yu Watanabe 2706065514 sysext: fix typo 2024-02-27 13:28:02 +09:00
Luca Boccassi e5191faf44 Merge pull request #31000 from flatcar-hub/krnowak/mutable-overlays
systemd-sysext: Implement optional mutability for extensions
2024-02-26 16:17:11 +00:00
Luca Boccassi 86401d9c4c Merge pull request #31458 from poettering/vmspawn-ptyfwd
vmspawn: implement TTY logic via ptyfwd
2024-02-26 15:44:50 +00:00
Luca Boccassi 26d85d9ee7 Merge pull request #31480 from rpigott/dnssec-maxwork
resolved: limit the number of signature validations in a transaction
2024-02-26 12:26:36 +00:00
Yu Watanabe 7036d472d0 network: fix use-after-free in {address,route}_remove_and_cancel()
Fixes #31485.
2024-02-26 11:02:13 +00:00
Lennart Poettering b4679016f3 nspawn: hide ^] hint unless we are interactive mode
The hotkey only works in interactive mode hence don't mislead users
about it.
2024-02-26 11:55:11 +01:00
Lennart Poettering 795ec90cda vmspawn: use our own ptyfwd code for the console of a VM
Let's make systemd-nspawn use our own ptyfwd logic to handle the TTY by
default.

This adds a new setting --console=, inspired by nspawn's setting of the
same name. If --console=interactive= is used, then we'll do the TTY
dance on our own via ptyfwd, and thus get tinting, our usual hotkey
handling and similar.

Since qemu's own console is useful too, let's keep it around via
--console=native.

FInally, replace the --qemu-gui switch by --console=gui.
2024-02-26 11:54:37 +01:00
Lennart Poettering 2f7f08005b pretty-print: make tinting a bit less aggressive 2024-02-26 11:54:31 +01:00
Lennart Poettering 2537407075 run: use sd_event_set_signal_exit() at one more place 2024-02-26 11:53:31 +01:00
Yu Watanabe 52672db3f8 network/ndisc: rename Network.ipv6_accept_ra -> Network.ndisc
These settings are leated to sd-ndisc and Neighbor Discovery protocol.
Let's use more suitable name.
2024-02-26 11:38:57 +01:00
Alexander Zavyalov e66c7eb6db Fix: Chuwi UBook X (CWI535) screen rotation matrix 2024-02-26 11:38:15 +01:00
Daan De Meyer b9aa59080e ukify: Use VERSION_TAG instead of GIT_VERSION
GIT_VERSION isn't actually available so use VERSION_TAG instead which
is available.
2024-02-26 11:37:40 +01:00
Ronan Pigott eba291124b resolved: reduce the maximum nsec3 iterations to 100
According to RFC9267, the 2500 value is not helpful, and in fact it can
be harmful to permit a large number of iterations. Combined with limits
on the number of signature validations, I expect this will mitigate the
impact of maliciously crafted domains designed to cause excessive
cryptographic work.
2024-02-26 01:55:57 -07:00
Ronan Pigott 67d0ce8843 resolved: limit the number of signature validations in a transaction
It has been demonstrated that tolerating an unbounded number of dnssec
signature validations is a bad idea. It is easy for a maliciously
crafted DNS reply to contain as many keytag collisions as desired,
causing us to iterate every dnskey and signature combination in vain.

The solution is to impose a maximum number of validations we will
tolerate. While collisions are not hard to craft, I still expect they
are unlikely in the wild so it should be safe to pick fairly small
values.

Here two limits are imposed: one on the maximum number of invalid
signatures encountered per rrset, and another on the total number of
validations performed per transaction.
2024-02-26 01:55:57 -07:00
Yu Watanabe 815fce2c35 Merge pull request #31490 from yuwata/network-varlink-cleanups
network/varlink: several trivial cleanups
2024-02-26 15:12:12 +09:00
Yu Watanabe eaa260cd74 varlink/network: reindent methods 2024-02-26 13:42:37 +09:00
Yu Watanabe a569c2c5fd network/varlink: downgrade log level about failure in getting netns ID 2024-02-26 13:42:37 +09:00
Yu Watanabe 46877eb149 format-table: replace "(size_t) -1" with SIZE_MAX 2024-02-26 12:39:23 +08:00
Luca Boccassi 9529ae85f0 Merge pull request #31440 from yuwata/sd-ndisc-sd-radv-cleanups
sd-ndisc,sd-radv: several trivial cleanups
2024-02-25 13:07:53 +00:00
Yu Watanabe c7f46150bb in-addr-util: introduce in{4,6}_addr_is_multicast() 2024-02-25 11:43:37 +00:00
Yu Watanabe 9f0430b74b icmp6-util: make icmp6_receive() refuse packets without IPv6 sender address
Previously, the function supports packets without IPv6 sender address
for unit tests. However, now unit tests use their own version of
icmp6_receive(). Hence, let's make the check more strict.
2024-02-25 11:41:39 +00:00
Yu Watanabe 28eef15898 sd-ndisc: make callback takes arbitrary type of message
No functional change. Preparation for supporting Neighbor Advertisement
message.
2024-02-25 11:38:58 +00:00
Yu Watanabe c75d119658 network/ndisc: drop all configurations without lifetime on stop
As we call ndisc_drop_outdated() with USEC_INFINITY on stop.
2024-02-25 11:38:08 +00:00
Mike Yuan dc4eb788e6 docs: update link for Arch Linux bugtracker 2024-02-25 11:27:18 +00:00
Mike Yuan 0f6f099162 Merge pull request #31472 from YHNdnzj/systemctl-pidref
systemctl: generalize GetUnitByPIDFD handling
2024-02-25 06:54:14 +08:00
Yu Watanabe f2e5a28bdd network: use FOREACH_STRING() 2024-02-24 21:04:14 +09:00
Mike Yuan 3d3c42773d docs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK) 2024-02-24 13:26:19 +08:00
Mike Yuan d95705cc88 systemctl-show: use lookup_unit_by_pidref too
Follow-up for e0e7bc8223

This allows us to pin the process locally when GetUnitByPIDFD
is not available, just like what we have been doing for
'systemctl whoami'. Also, fix looking up remote pid.
We can't use pidfd for those.
2024-02-24 12:24:41 +08:00
Mike Yuan 716a4cdb0e systemctl: generalize GetUnitByPIDFD handling 2024-02-24 12:24:41 +08:00
Mike Yuan d9219935ab systemctl-util: use strv_free_and_replace at one more place 2024-02-24 12:07:32 +08:00
Luca Boccassi 857945cc5f Fallback from pidfd_open on permission errors too
Skip using pidfds if we get a permission denied error.
This can happen with an old policy and a new kernel that uses the
new pidfs filesystem to back pidfds, instead of anonymous inodes,
as the existing policy denies access.

This is already the case for most uses of pidfd_open, like pidref,
but not on these two. Fix them.
2024-02-24 12:58:13 +09:00
Yu Watanabe a860df82b4 test: split out {dump,verify}_ra_message()
Then, let's not modify the global object.
2024-02-24 12:37:50 +09:00
Yu Watanabe 36653443f7 sd-radv: several cleanups
- split out radv_setup_recv_event(),
- slightly update log messages,
- use DIV_ROUND_UP(),
- use structured initializer more.

No functional change, just preparation for later commits.
2024-02-24 12:37:50 +09:00
Yu Watanabe 6a27ca08c6 sd-ndisc: several trivial cleanups
- update several log messages,
- use event_reset_time_relative(),
- split out ndisc_setup_recv_event() and ndisc_setup_timer().

No functional change, just refactoring and preparation for later commits.
2024-02-24 12:37:50 +09:00
Yu Watanabe 37c011e74c icmp6-util: merge icmp6_bind_router_{solicitation,advertisement}() into icmp6_bind()
No functional change, just refactoring.
2024-02-24 12:37:50 +09:00
Georges Basile Stavracas Neto afdf63fcf2 hwdb: Add support for Elgato Stream Deck Plus
Add support for the following device:

 - ID 0fd9:0084 Elgato Systems GmbH Stream Deck Plus
2024-02-24 11:45:11 +09:00
Yu Watanabe 16a52db488 docs: fix typo 2024-02-24 11:30:39 +09:00
Luca Boccassi 6036f62c51 efi: de-inline xmalloc to fix build failure with gcc 12.2 and -O2
With meson build --werror --buildtype=plain -Dc_args=" -O2" the build fails:

../src/boot/efi/stub.c: In function ‘load_addons.constprop’:03:06
../src/boot/efi/stub.c:475:40: error: using a dangling pointer to ‘p’ [-Werror=dangling-pointer=]03:06
  475 |                         dt_bases[n_dt] = xmemdup((uint8_t*)loaded_addon->ImageBase + addrs[UNIFIED_SECTION_DTB],03:06
      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~03:06
  476 |                                                  dt_sizes[n_dt]);03:06
      |                                                  ~~~~~~~~~~~~~~~03:06
In file included from ../src/boot/efi/stub.c:20:03:06
../src/boot/efi/util.h:33:15: note: ‘p’ declared here03:06
   33 |         void *p;03:06
      |               ^

De-inline the function and initialize p to make gcc happy.
2024-02-24 08:16:07 +08:00
Luca Boccassi bb394133cb Merge pull request #31464 from poettering/vmspawn-limit-bank
vmspawn: disable all TPM PCR banks, except for SHA256
2024-02-23 22:04:44 +00:00
Lennart Poettering d4ece77f5e ptyfwd: optionally prefix window title with colored dot
in uid0/systemd-run/nspawn we already set a window title with a colorful
unicode dot indicating the changed privileges/execution context. This typically
gets overriden by the shell inside the environment however.

Let's tweak this a bit: when we see the window title OSC ANSI sequence
passing through, let's patch in the unicode dot as a prefix to the
title.

This is super pretty, since it makes sure root sessions via 0ad are
really easily recognizable as such, because the window title carries an
🔴 red dot as prefix then.
2024-02-23 21:15:25 +00:00
Luca Boccassi 461c85838e Merge pull request #31465 from xypron/detect-virt
Detect virtualization on RISC-V
2024-02-23 20:50:51 +00:00