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

70234 Commits

Author SHA1 Message Date
Luca Boccassi
c9eb59e710
Merge pull request #30896 from yuwata/network-route-conf-parser
network: minor cleanups for conf parsers
2024-01-12 23:27:39 +00:00
Luca Boccassi
b0c45a633a modprobe: set 'ifb numifbs=0' to avoid autocreating ifb0
Fixes https://github.com/systemd/systemd/issues/30913
2024-01-12 23:24:54 +00:00
Nick Rosbrook
fec0d508a2 test: skip TEST-43-PRIVATEUSER-UNPRIV if unprivileged userns is restricted
With newer versions of AppArmor, unprivileged user namespace creation
may be restricted by default, in which case user manager instances will
not be able to apply PrivateUsers=yes (or the settings which require it).

This can be tested with the kernel.apparmor_restrict_unprivileged_userns
sysctl.
2024-01-13 06:55:04 +09:00
Yu Watanabe
7a10e25a41
Merge pull request #30908 from poettering/nsid
networkd: expose netns "nsid" together with inode id
2024-01-13 06:54:32 +09:00
Frantisek Sumsal
db6406e97e network: fix 6rd tunnel link section name
Spotted randomly when going through CI logs:

systemd-udevd[658]: /usr/lib/systemd/network/80-6rd-tunnel.link:21: Unknown section 'Network'. Ignoring.

Follow-up for 658169e6d3.
2024-01-12 21:42:04 +00:00
Lennart Poettering
91b34c7641 networkd: expose the nsid in the GetNamespaceId() varlink call
Let's return both ids in the GetNamespaceID(), since they are pretty
much the same concept.
2024-01-12 21:43:34 +01:00
Lennart Poettering
535252dc26 networkd: expose nsid via dbus 2024-01-12 21:43:34 +01:00
Lennart Poettering
fa2bc6f1d7 socket-util: add netns_get_nsid() helper to show nsid of netns 2024-01-12 21:43:34 +01:00
Lennart Poettering
1078628096 sd-netlink: hook up nsid APIs 2024-01-12 18:52:26 +01:00
Lennart Poettering
414ae39821
Merge pull request #30911 from poettering/vmspawn-tweaks
vmspawn: various clean-ups
2024-01-12 18:32:40 +01:00
chenjiayi
204594ecf1 udev: distinguish host-managed zoned block in scsi_id
According to SPC4, the value of 0x14 is reserved to distinguish
host managed zoned block, e.g., some SMR (Shingled Magnetic Recording)
disks.

Other utilities such as sg3_utils can successfully recognize such
kind of disks. This patch implements the same ability.
2024-01-12 15:52:38 +00:00
Luca Boccassi
ffcb8647ca
Merge pull request #30904 from YHNdnzj/no-selinux-reload
core/execute: don't reload selinux before spawning executor
2024-01-12 15:51:54 +00:00
Daan De Meyer
52842bb2c5 mkosi: Build a directory image by default
Both building and booting a directory image is much faster than
building or booting a disk image so let's default to a directory
image.

In CI, we stick to a disk image to make sure that keeps working as
well.

The only extra dependency this introduces is virtiofsd which is
packaged in all distributions except Debian stable. For users
hacking on systemd on Debian stable, a disk image can be built by
writing the following to mkosi.local.conf:

```
[Output]
Format=disk
```
2024-01-12 16:19:48 +01:00
Lennart Poettering
b71855b331 vmspawn: suppress unnecessary '-' 2024-01-12 16:04:05 +01:00
Lennart Poettering
8b18350503 vmspawn: use SD_EVENT_SIGNAL_PROCMASK flag where possible 2024-01-12 16:03:57 +01:00
Lennart Poettering
06d4fe57c9 vmspawn: use our generic vsock CID parser, instead of a howngrown one
Let's also use 'unsigned' as type for the CID everywhere, and
VMADDR_CID_ANY as marker for "invalid CID", as that's what the vsock
APIs natively do.
2024-01-12 16:03:19 +01:00
Lennart Poettering
1d748d7c99 vmspawn: fix empty lines before section titles in --help text
Always put an empty line before section titles (one was missing so far)
2024-01-12 16:03:12 +01:00
Lennart Poettering
1f459f3a45 vmspawn: make sure are fine with ovmf metadata extensions
The JSON ovmf data on Fedora at least has more fields than we expect,
ignore it.
2024-01-12 16:03:04 +01:00
Yu Watanabe
be89a76a46 network/ndisc: do not try to set too large value for ICMP ratelimting
Follow-up for 6197db53ba.

When we set too large value, the kernel just refuse it. So, this does
not change the net behavior.

Prompted by https://github.com/systemd/systemd/pull/30490#discussion_r1449477125.
2024-01-12 14:38:30 +00:00
Lennart Poettering
f4220d8c05 json: downgrade extension log message to LOG_DEBUG
This is not supposed to be something we should complain about loudly
after all.

Follow-up for: a617fd9047
2024-01-12 14:37:17 +00:00
Daan De Meyer
50cc0ee647 Add --root= support for list and prepare add-all for --root= support
Let's make sure these follow the rest of kernel-install and always
operate on the given root directory, even if the verb itself can't
support --root= just yet.
2024-01-12 14:37:00 +00:00
Frantisek Sumsal
a0b50e4d25 test: use systemd-id128 from the build dir
As distro sd-id128 might not have all the options we need.

Follow-up for: 378712c
Replaces: #30901
2024-01-12 14:34:04 +00:00
Lennart Poettering
14adc1ab4b man: fix typo AV_VSOCK → AF_VSOCK
A reported by Arian van Putten:

https://github.com/systemd/systemd/pull/30777#pullrequestreview-1816817988
2024-01-12 13:50:32 +00:00
Mike Yuan
73090a38b0
core/execute: don't reload selinux before spawning executor
With the introduction of sd-executor, SELinux needs to be re-initialized
after execve() anyway.
2024-01-12 17:17:37 +08:00
Mike Yuan
a399804225
selinux-util: reorder functions 2024-01-12 17:17:37 +08:00
Yu Watanabe
ffad01c81e network/route-nexthop: always reset gateway address when _dhcp or friends is specified to Gateway=
Just for safety.
2024-01-12 16:03:37 +09:00
Yu Watanabe
4207f6c05d network/route-nexthop: make GatewayOnLink= support an empty string
And invalidate the route section if an invalid string is specified.
2024-01-12 09:44:03 +09:00
Yu Watanabe
4444c2baf5 network/route: move two more conf parsers to networkd-route-nexthop.[ch]
Let's manage nexthop (gateway) handling in networkd-route-nexthop.[ch].
2024-01-12 09:44:03 +09:00
Lennart Poettering
64b74c86d0 homed: add helpers for checking reference status of homes
Just some refactoring to make things more readable.
2024-01-12 09:25:17 +09:00
Lennart Poettering
776c2b8e72 update TODO 2024-01-11 22:44:13 +01:00
Yu Watanabe
967cd1712c
Merge pull request #30867 from dtardon/udev-conf-dropins
Allow dropins for udev.conf
2024-01-12 06:37:23 +09:00
Yu Watanabe
fa552ea1b1
Merge pull request #30893 from yuwata/add-trailing-NUL
json,netlink: add trailing NUL byte when we read binary data
2024-01-12 06:36:46 +09:00
Lennart Poettering
28795e4dca
Merge pull request #30777 from poettering/ssh-generator
ssh-generator which makes VMs and containers accessible to ssh via AF_UNIX and AF_VSOCK
2024-01-11 21:31:28 +01:00
Lennart Poettering
25f8d3856a
Merge pull request #30884 from poettering/logind-background-light
logind: add "background-light" + "manager" session classes
2024-01-11 21:20:01 +01:00
David Tardon
dddf640cab test: use dropin dir 2024-01-12 05:12:44 +09:00
David Tardon
810a5895e6 man: update udev.conf man page 2024-01-12 05:12:44 +09:00
David Tardon
09dd8e77fc udev: factor out config parser call into function
... which is then called from both places. This makes sure that the
configuration is parsed by udevd and other tools in exactly the same
way.
2024-01-12 05:12:42 +09:00
David Tardon
a1c7dc7d16 udev-util: drop unused function 2024-01-12 05:11:18 +09:00
David Tardon
07f5e35fe7 udev-util: use config. parser to parse udev.conf 2024-01-12 05:11:14 +09:00
David Tardon
343c8514c1 udevd: use config. parser to parse udev.conf
This adds support for the usual config. file hierarchy (including
dropins).

Fixes #30460.
2024-01-12 05:08:18 +09:00
Yu Watanabe
70c24d0d9f sd-netlink: add trailing NUL byte for safety in sd_netlink_message_read_data()
Then, drop sd_netlink_message_read_data_suffix0().
2024-01-12 04:48:26 +09:00
Yu Watanabe
1f179b37f2 json: add trailing NUL byte in json_dispatch_byte_array_iovec()
For safety.

Addresses https://github.com/systemd/systemd/pull/30879#discussion_r1448518226.
2024-01-12 04:44:51 +09:00
Frantisek Sumsal
378712c830 test: use correct type for the root partition 2024-01-12 03:48:22 +09:00
Yu Watanabe
41c5937f02
Merge pull request #30887 from poettering/id128-no-legend
id128: add --no-pager, --no-legend, --json=/-j switches to systemd-id128 tool
2024-01-12 03:46:48 +09:00
Frantisek Sumsal
45a3c02564 shell-completion: add new systemd-id128 options 2024-01-11 18:35:37 +01:00
Lennart Poettering
68fbd9a09c logind: also restrict on which session classes one cange the session type 2024-01-11 18:24:44 +01:00
Lennart Poettering
87dc8bbd86 logind: allow taking control of devices only in some session types
Let's restrict the logic a bit, so that "manage" session types are not
misused.
2024-01-11 18:24:44 +01:00
Lennart Poettering
a50666e376 id128: add --no-pager, --no-legend, --json=/-j switches to systemd-id128 tool 2024-01-11 17:54:19 +01:00
Lennart Poettering
0f6827bdd1 man: document the expanded catalogue of session classes 2024-01-11 17:47:41 +01:00
Lennart Poettering
3b52ef6f00 test: add integration test for new 'background-light' session class 2024-01-11 17:47:41 +01:00