1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

71321 Commits

Author SHA1 Message Date
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
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
Lennart Poettering
db7136ec73 signal-util: imply sentinel -1 in sigprocmask_many() + sigset_add_many() args list 2024-02-23 09:35:12 -08:00
Lennart Poettering
f58411a22f signal-util: use RET_NERRNO() + RET_GATHER() more 2024-02-23 09:35:12 -08:00
Heinrich Schuchardt
5041e771a8 detect-virt: allow detection via SMBIOS on RISC-V
SMBIOS support in QEMU for RISC-V is merged upstream.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-23 17:29:20 +01:00
Lennart Poettering
a9791a4192 update TODO 2024-02-23 17:29:06 +01:00
Lennart Poettering
519bad6c2c vmspawn: disable all PCR banks but SHA256
By default swtpm runs with four banks: SHA1, SHA256, SHA384, SHA512.
This means all data that is part of the boot will be hashed four times,
which slows everything down.

Let's restrict things to SHA256 only, which is the one that really
matters. SHA1 is no up to today's standards anyway, and noone really
consumes the other two, hence no point in enabling this.

To disable the banks we need to call swtpm_setup with --pcr-banks. Do
so.
2024-02-23 17:27:56 +01:00
Lennart Poettering
d90a05b68f vmspawn: drop "const" from string we free
I am a bit surprised this compiled at all...
2024-02-23 17:27:18 +01:00
Heinrich Schuchardt
819874adc0 detect-virt: allow detection via device-tree on RISC-V
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-23 17:25:59 +01:00
Lennart Poettering
72bdf0ac67
Merge pull request #31455 from keszybz/restore-docs-urls
Restore docs urls
2024-02-23 15:59:44 +01:00
Lennart Poettering
bebe5f1a74
Merge pull request #31456 from poettering/tpm1.2-no-more
sd-stub: drop any support for TPM 1.2
2024-02-23 14:52:20 +01:00
Sam Leonard
5df0159ef2 ssh-generator: add mention of ssh.authorized_keys.root to man page 2024-02-23 12:52:28 +00:00
Lennart Poettering
085a4d4723 update TODO 2024-02-23 13:20:19 +01:00
Luca Boccassi
e0699e067e
Merge pull request #31411 from poettering/build-path
userdbd,homed,importd,sysupdate,pid1: make it easier to run daemons that have callouts from build dir
2024-02-23 11:57:42 +00:00
Lennart Poettering
eb9b95f9d8 update TODO 2024-02-23 11:09:08 +01:00
Lennart Poettering
ffef7a68d3 update TODO 2024-02-23 11:08:14 +01:00
Zbigniew Jędrzejewski-Szmek
0ace2560ea
Merge pull request #31352 from DaanDeMeyer/versioning
Rework meson-vcs-tag.sh
2024-02-23 11:07:56 +01:00
Lennart Poettering
13fc754dc3 sd-stub: drop any support for TPM 1.2
TPM 1.2 is obsolete, and doesn't really provide much security guarantees
given it's build around SHA1 which is not up to today's standards.

The rest of systemd's TPM codebase never supported TPM 1.2 hence let's
drop this partial support in sd-stub too. It has created problems after
all (sd-stub reported the measuements and userspace assumed these were
for TPM2), without bringing any benefits (given that the measurements we
make are not consumed by us anyway, unlike those for TPM 2.0)

let's cut off this old support.
2024-02-23 10:56:54 +01:00
Yu Watanabe
d0a337bb72 sd-dhcp,sd-ndisc: drop mistakenly set copyright
Follow-ups for
  6efa51f862 (sd-dhcp-client-id.h),
  97c3506dcd (sd-dhcp-duid.h),
  461dbb2fa9 (sd-dhcp-option.h),
  dd8ab4a206 (sd-dhcp-server-lease.h),
  ca34b43481 (sd-ndisc-protocol.h and sd-ndisc-router.h).
2024-02-23 10:09:26 +01:00