Commit graph

71586 commits

Author SHA1 Message Date
Luca Boccassi 0abe0cd402 test: enable PAM debug logs in TEST-46-HOMED 2024-03-01 10:07:27 +00:00
dependabot[bot] ba959322a4 build(deps): bump github/codeql-action from 3.22.12 to 3.24.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.22.12 to 3.24.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](012739e508...8a470fddaf)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 11:06:02 +01:00
dependabot[bot] 04dd8258b4 build(deps): bump redhat-plumbers-in-action/differential-shellcheck
Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.0.2 to 5.1.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](91e2582e40...b9df2a9417)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 10:57:00 +01:00
Yu Watanabe d5e6df24bd
Merge pull request #31498 from ssahani/bond
netdev: bond - add support for peer_notif_delay
2024-03-01 12:45:52 +09:00
Yu Watanabe 3807936cc5
Merge pull request #31502 from yuwata/network-lldp-json
network: support to dump LLDP neighbors in JSON format
2024-03-01 12:18:53 +09:00
Yu Watanabe 6a5134e83a
Merge pull request #31555 from yuwata/sd-ndisc-trivial-cleanups
sd-ndisc: trivial cleanups
2024-03-01 12:18:19 +09:00
Yu Watanabe ccb1ace77f sd-ndisc: drop unused sd_ndisc_router_get_raw() 2024-03-01 09:44:58 +09:00
Yu Watanabe f169c56447 sd-ndisc: use _packed_ attribute 2024-03-01 09:44:58 +09:00
Luca Boccassi 7a2ba85aee
Merge pull request #31551 from keszybz/rpm-macro-kernel-install
New rpm macro %_kernel_install_dir
2024-03-01 00:44:52 +00:00
Yu Watanabe bbb2a0fb41 icmp6-packet: check the alignment of struct nd_opt_hdr for safety
Addresses https://github.com/systemd/systemd/pull/31492#discussion_r1507481748.
2024-03-01 09:44:45 +09:00
Yu Watanabe d6360819a7 test-network: add more test cases for LLDP 2024-03-01 09:40:26 +09:00
Yu Watanabe ac23c5596e sd-lldp-rx: drop unused functions
These are not used anymore.
2024-03-01 09:40:26 +09:00
Yu Watanabe 5a0f6adbb2 network/lldp: do not save LLDP neighbors under /run/systemd
Now LLDP neighbors are exposed through varlink. Hence, it is not
necessary to save to a file.
2024-03-01 09:40:26 +09:00
Yu Watanabe 14a5c07afa networkctl: use varlink method to dump LLDP neighbors
`networkctl lldp` and `networkctl status INTERFACE` now use varlink
call to the networkd to query LLDP neighbors.

Then, this allows to dump LLDP neighbors in JSON format.

Co-authored-by: Tomáš Pecka <tomas.pecka@cesnet.cz>
2024-03-01 09:40:26 +09:00
Yu Watanabe 1dbd2cc72a networkctl: rename check_netns_match() -> varlink_connect_networkd()
Then optionally return the varlink connection to the caller.
2024-03-01 09:40:26 +09:00
Yu Watanabe c48ca17aa8 network/varlink: add varlink method to get LLDP neighbors
The method provides the list of LLDP neighbors.

Co-authored-by: Tomáš Pecka <tomas.pecka@cesnet.cz>
2024-03-01 09:40:26 +09:00
Tomáš Pecka 329146a9ac sd-lldp-rx: serialize LLDP neighbors to JSON format
Add functions serializing LLDP neighbors to JSON (JsonVariant).

The entry contains a chassis id, system name and port id of the remote
neighbor. Also it possibly contains an integer coding the enabled system
capabilities and port description.
2024-03-01 09:40:26 +09:00
Yu Watanabe 1e18e1aa11
Merge pull request #31492 from yuwata/icmp6-packet
sd-ndisc: introduce ICMP6Packet and relevant functions, and use them
2024-03-01 09:18:52 +09:00
Eli Schwartz 5656c593ce fix the value of default shells to use /bin and not /usr/bin
Partially reverts commit b0d3095fd6.

While it is generally worthwhile for systemd to drop split-usr support,
these options are NOT about split-usr support. The universal location of
POSIX sh is always /bin/sh. Bash is pretty reasonably standardized there
too.

This happens irrespective of /bin being a symlink to /usr/bin.
Ramifications of this change include things like:

- portably running shell scripts that might run very nearly anywhere
- /etc/shells support

For standardization and compatibility reasons, these commands with these
paths need to be consistently found on any system, and thus distros make
sure this works, although even on split-usr systems /usr/bin/bash may be
a symlink to /bin/bash.

Embedding the *access path* of bash as /usr/bin/bash in systemd, for
example in libnss_systemd.so, means that login shells must agree with
systemd on how they invoke the shell. End result: users fail to login
because of access violations.

This cannot be fixed by "fixing PAM" because PAM does not follow
symlinks by design: one example is that it needs to treat rbash as
different from bash.

Fixes: https://bugs.gentoo.org/919749
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-02-29 21:51:03 +01:00
Lennart Poettering d52320337e ssh-generator: don't do AF_VSOCK stuff if we run in a container
Tighten our VM check: whether we run in a VM is not enough to do
AF_VSOCK. We also need to check if we are run in a container, because if
we run in a container inside a VM then we should *not* do the AF_VSOCK
stuff, but leave the port free for the VM itself.

As discussed here:

https://github.com/systemd/systemd/pull/31544#issuecomment-1971455401
2024-02-29 20:43:12 +00:00
Zbigniew Jędrzejewski-Szmek 5248a0c5b3 rpm/macros: add %_kernel_install_dir
This makes it easier for people packaging kernel-install plugins
to get the path right.

E.g. https://src.fedoraproject.org/rpms/python-virt-firmware/pull-request/3
fixes an issue where %{_libdir}/kernel/install.d was used,
which gives incorrect results on 64-bit architectures.
%_kernel_install_dir will make this even easier.
2024-02-29 21:38:03 +01:00
Zbigniew Jędrzejewski-Szmek 1578622bfd rpm/macros: drop compat define with a typo
Search on sourcegraph.com doesn't yield any users. And each
use would emit a warning, so I think it's safe to assume that
it has no users.
2024-02-29 21:32:10 +01:00
Luca Boccassi d74d989c25
Merge pull request #31544 from mrc0mmand/more-test-tweaks
A couple of fixlets for TEST-46-HOMED's ssh tests
2024-02-29 20:29:24 +00:00
Lennart Poettering f557129ecb ssh-generator: handle gracefully if AF_VSOCK works, but /dev/vsock doesn't
Apparently this case exists, let's handle it gracefully.

Prompted by: https://github.com/systemd/systemd/pull/31544#issuecomment-1971241397
2024-02-29 18:28:01 +01:00
Ludwig Nussel 33f23e2230 Revert "options" rename in json bootctl output
Revert the rename from "options" to "finalCmdline" in 122650b4a0
while the bigger https://github.com/systemd/systemd/pull/31339 is still
under review.
2024-02-29 18:07:14 +01:00
Frantisek Sumsal 8fddb50fd4 test: create sshd's runtime directory (Debian variant)
sshd.service on Debian uses RuntimeDirectory=sshd, without which sshd
complains:

[ 4065.834904] sshd[711]: Missing privilege separation directory: /run/sshd
[ 4065.835785] systemd[1]: mysshserver@0-127.0.0.1:4711-127.0.0.1:58232.service: Deactivated successfully.
[ 4065.836433] testsuite-46.sh[708]: kex_exchange_identification: read: Connection reset by peer
[ 4065.836433] testsuite-46.sh[708]: Connection reset by 127.0.0.1 port 4711

Resolves: #31518
2024-02-29 13:44:29 +01:00
Frantisek Sumsal 38cbb9ab8a test: avoid SIGPIPE from ssh | tail -n 1
Addresses: https://github.com/systemd/systemd/issues/31518#issuecomment-1968295678
2024-02-29 13:43:40 +01:00
Frantisek Sumsal 905c9d2c92 test: use ECDSA keys for ssh-related tests
This should make the test faster, especially on machines without
acceleration.
2024-02-29 13:43:25 +01:00
Frantisek Sumsal 6e97142b84 test: shell & cleanup cleanup 2024-02-29 13:18:07 +01:00
Luca Boccassi 9b61d422ff
Merge pull request #31430 from CodethinkLabs/vmspawn/machinectl_vmspawn_support
machinectl: initial vmspawn support
2024-02-29 11:27:02 +00:00
Michael Biebl 836a06db0d Drop build-api support
It appears the build-api effort at
https://github.com/cgwalters/build-api hasn't really caught on.
systemd appears one of the very few projects actually supporting it.

It does confuse certain tools though. E.g. debhelper by finding a
configure script wrongly assumes this is an autoconf project and thus
needs to be told explicitly that this is in fact a Meson project [1].

Given that Meson is an established build system by now, it appears ok to
drop this compat layer, which will never be fully complete anyway.

[1] https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/rules?ref_type=heads#L281
2024-02-29 09:55:58 +01:00
Luca Boccassi 7eedcb4e3b semaphore: speed up build
- avoid stripping debug symbols and creating dbgsym packages
- avoid LTO, slows down build a lot
- avoid compressing packages, they are thrown out immediately after use
- avoid building udeb packages, not needed
2024-02-29 09:55:40 +01:00
Lennart Poettering b5a3418332 dissect-image: fix build
PRs #31531 and #31524 were merged in quick succession. They are fine
both on their own. But in combination they break the build. Fix it.
2024-02-28 23:02:08 +00:00
Sam Leonard eb77d24baa vmspawn: only add to cmdline if tpm was started 2024-02-28 22:05:33 +01:00
Lennart Poettering 5b97957376
Merge pull request #31531 from poettering/verity-userspace-optional
dissect: make use of userspace verity keyring optional
2024-02-28 22:04:58 +01:00
Luca Boccassi e72ae41b51
Merge pull request #31524 from poettering/secure-getenv-naming-fix
change naming order getenv_xyz_secure() → secure_getenv_xyz() to match glibc
2024-02-28 18:01:52 +00:00
Luca Boccassi de461d3269
Merge pull request #31526 from poettering/proc-cmdline-underscorify
make sure we use underscores for kernel cmdline option names, not dashes
2024-02-28 17:59:46 +00:00
Sam Leonard f82dcc3fc3
machinectl: support vmspawn as a backend 2024-02-28 17:49:00 +00:00
Sam Leonard b0dc766852
vmspawn: support machined registration 2024-02-28 17:49:00 +00:00
Lennart Poettering 6aa14b283b
Merge pull request #31514 from CodethinkLabs/ptyfwd_issues
ptyfwd/terminal-util: improve edge case handling
2024-02-28 18:36:50 +01:00
Lennart Poettering f0ecff8506 dissect: condition usespace verity keyring via kernel cmdline option + env var 2024-02-28 16:18:22 +01:00
Lennart Poettering f4a63ce25f dissect-image: add flag for explicitly enabling userspace verity signature checking
let's make userspace verity signature checking optional. This adds a
dissection flag to enable the logic and patches through all our users to
enable it by default, thus effectively not changing anything from the
status quo ante. However, know we have a knob to turn this off in
certain scenarios.
2024-02-28 16:17:40 +01:00
Lennart Poettering dbe253aa9d env-util: also rename getenv_uint64_secure() → secure_getenv_uint64()
As in the previous commit, let's not change the order of the words
compared to the underlying glibc API.
2024-02-28 15:38:00 +01:00
Lennart Poettering efb9b3bab2 env-util: rename getenv_bool_secure() → secure_getenv_bool()
The glibc API is behind the wrapper is called "secure_getenv()", hence
our wrapper really should keep the order too, otherwise things are just
too confusing.
2024-02-28 15:38:00 +01:00
Lennart Poettering dc9a56d83e man: add a few missing entries to kernel-command-line man page 2024-02-28 15:33:51 +01:00
Lennart Poettering 78266a54f1 tree-wide: use "_" rather than "-" as separator in kernel cmdline options
Most of our kernel cmdline options use underscores as word separators in
kernel cmdline options, but there were some exceptions. Let's fix those,
and also use underscores.

Since our /proc/cmdline parsers don't distinguish between the two
characters anyway this should not break anything, but makes sure our own
codebase (and in particular docs and log messages) are internally
consistent.
2024-02-28 15:33:51 +01:00
Frantisek Sumsal 78816ce72e
Merge pull request #31444 from bluca/semaphore
semaphore: set upstream build profile and set default branch to debian/master
2024-02-28 15:03:11 +01:00
Luca Boccassi 0cad991c4c
Merge pull request #31293 from ragazenta/netdev_rps
udevd: Add ReceivePacketSteeringCPUMask for systemd.link
2024-02-28 13:37:28 +00:00
Lennart Poettering 6a145157eb resolved: exit function if varlink_dispatch() returns > 0
varlink_dispatch() returns > 0 if it already replied to the method call,
hence this is reason to return from the handler function, and not
proceed.
2024-02-28 13:35:47 +00:00
Lennart Poettering f9f5ce61fa userbdb: pass log level from main daemon to worker 2024-02-28 12:42:06 +00:00