Commit graph

53375 commits

Author SHA1 Message Date
Marcel Menzel 3e90ded70c
doc: network: Move "Independent=" flag to the VXLAN section (#20881) 2021-09-29 23:19:20 +09:00
Yu Watanabe 78fac35811
Merge pull request #20823 from mrc0mmand/test-storage-iscsi
test: iSCSI-related udev tests
2021-09-29 23:17:43 +09:00
Hans de Goede f813515542 hwdb: sensors: Fix some modalias matches no longer working with newer kernels
Kernels >= 5.8 have added new fields to the dmi/id/modalias file in the
middle of the modalias (instead of adding them at the end).

Specifically new ":br<value>:" and (optional) ":efr<value>:" fields have
been added between the ":bd<value>:" and ":svn<value>:" fields.

Note the 5.13.0 and 5.14.0 kernels also added a new ":sku<value>:" field
between the ":pvr<value>:" and ":rvn<value>:" fields, this has been fixed
in later 5.13.y and 5.14.y releases, by moving the sku field to the end:
https://lore.kernel.org/lkml/20210831130508.14511-1-hdegoede@redhat.com/

Unfortunately the same cannot be done for the new br and efr fields since
those have been added more then a year ago and hwdb even already has some
newer entries relying on the new br field being there (and thus not working
with older kernels).

Fix the issue with the br and efr fields through the following changes:

1. Replace any matches on ":br<value>" from newer entries with an '*'
2. Replace "bd<value>:svn<value>" matches with: "bd<value>:*svn<value>"
   inserting an '*' where newer kernels will have the new br + efr fields

This makes these matches working with old as well as new kernels.

Link: https://github.com/systemd/systemd/issues/20550
Link: https://github.com/systemd/systemd/pull/20562
2021-09-29 16:03:06 +02:00
Anita Zhang 14bb729534 basic/unit-file: don't filter out names starting with dot
Fixes #20859
Reverts 3796bdc55d
2021-09-29 14:42:13 +02:00
Lennart Poettering e30a3ba16a core: drop "const" from NeedsDaemonReload unit dbus property
It's not "const", it can change any time if people change the fs, and we
don#t send out notifications for it. Hence don't claim it was const.
(Otherwise clients might cache it, but they should not)

Prompted-by: #20792
2021-09-29 14:37:07 +02:00
Lennart Poettering bee07a3995 resolvconf-compat: make "-u" operation a NOP
According to the various man pages of "resolvconf" the -u switch is for:

"-u Just run the update scripts (if updating is enabled)."

"-u Force resolvconf to update all its subscribers. resolvconf does not
    update the subscribers when adding a resolv.conf that matches what
    it already has for that interface."

We have no "subscribers", we ourselves are the only "subscriber" we
support. Hence it's probably better to ignore such a request and make it
a NOP, then to fail.

Fixes: #20748
2021-09-29 14:36:47 +02:00
Yu Watanabe 92fc611cac
Merge pull request #20802 from yuwata/network-receive-nl80211-multicast-messages
network: receive nl80211 multicast messages
2021-09-29 20:49:38 +09:00
Luca Boccassi c1036042f5 CI: run GCC unit test job on push to main
Allows to get coverage data on coveralls.io
2021-09-29 14:10:42 +03:00
Frantisek Sumsal 9cb41c3326 test: iSCSI-related udev tests 2021-09-29 10:05:21 +02:00
Frantisek Sumsal aedb60043a test: save journals of only failing test cases in TEST-64 2021-09-29 10:05:21 +02:00
Frantisek Sumsal 7074c047c1 test: explicitly report if we fail to install a file into the image 2021-09-29 10:05:21 +02:00
Frantisek Sumsal f4e64b6e34 test: add an iSCSI helper 2021-09-29 10:05:21 +02:00
Frantisek Sumsal 5f25c30ee8 test: sort the features alphabetically 2021-09-29 10:05:21 +02:00
Lennart Poettering 41a978fdb1
Merge pull request #20676 from gogsbread/sysctl-minimize-sideeffect
sysctl: minimize side effects when running `systemd-sysctl`
2021-09-29 09:17:48 +02:00
Yu Watanabe 96f5f9ef9a network: receive genl multicast messages about wlan connections 2021-09-29 15:56:20 +09:00
Yu Watanabe f12629ae38 network: move error handling of enumerating configs to caller side 2021-09-29 15:56:09 +09:00
Yu Watanabe bdcd4ab2f1 network: make manager_enumerate_internal() take sd_netlink object
Preparation for dumping information through generic netlink.
2021-09-29 15:38:59 +09:00
Yu Watanabe 96243149bd network: split manager_new() into two part
Initialize dbus or netlink is not necessary for fuzzers.
2021-09-29 15:38:59 +09:00
Yu Watanabe 16653f9782 wifi-util: introduce nl80211_cmd_to_string() 2021-09-29 15:38:59 +09:00
Yu Watanabe 77f75f4fff network: rename wifi_iftype -> wlan_iftype 2021-09-29 15:38:59 +09:00
Yu Watanabe abad436d4c wifi-util: move, rename, and expose wifi_iftype_to_string() 2021-09-29 15:38:59 +09:00
Yu Watanabe 8e310690b0 sd-netlink: add several attributes for nl80211 2021-09-29 15:38:59 +09:00
Yu Watanabe f3e235ffb2 sd-netlink, wifi-util: fix attribute type of NL80211_ATTR_SSID 2021-09-29 15:38:59 +09:00
Yu Watanabe ae2b86de43 wifi-util: add "ret_" prefix for arguments which store results 2021-09-29 15:38:59 +09:00
Yu Watanabe a1d2ae065b sd-netlink: introduce sd_netlink_message_read_data_suffix0() 2021-09-29 15:38:59 +09:00
Yu Watanabe 84f7bd7698 sd-netlink: make sd_genl_message_new() or friends return -EOPNOTSUPP if a module is not supported by the kernel 2021-09-29 15:38:55 +09:00
Yu Watanabe 4d4d898a4b sd-netlink: also check multicast group to find suitable match callback 2021-09-29 15:36:42 +09:00
Yu Watanabe ec44d3f407 sd-netlink: allow to set dump flag for genl or netfilter messages 2021-09-29 15:35:08 +09:00
Yu Watanabe dbc35fe3aa sd-netlink: add type safe macro for sd_genl_add_match() 2021-09-29 15:33:50 +09:00
Yu Watanabe 52888279df sd-netlink: minor coding style fixes 2021-09-29 15:33:50 +09:00
Yu Watanabe 61dcd98232 basic/linux: update nl80211.h 2021-09-29 15:33:50 +09:00
Antony Deepak Thomas ab14aa23ae sysctl-util: minimize side-effects when running systemd-sysctl
Currently `systemd-sysctl` binary is used in `systemd-sysctl.service`
which is mostly configured as `oneshot`. There are situations where one
would like to use systemd to maintain Sysctl configurations on a host,
using a configuration managers such as Chef or Puppet, by apply
configurations every X duration.
The problem with using `systemd-sysctl` is that it writes all the Sysctl
settings, even if the values for those settings have not changed. From
experience, we have observed that some Sysctl settings cause actions in
the kernel upon writing(like dropping caches) which in turn cause
undesired side effects.
This patch tries to minimize such side effects by comparing values
before writing.
2021-09-29 13:07:47 +09:00
Antony Deepak Thomas e565cfd2eb fileio: introduce new mode to suppress writing the same value 2021-09-29 13:06:25 +09:00
Antony Deepak Thomas 8034b42ca6 string-util: introduce streq_skip_trailing_chars() 2021-09-29 12:57:30 +09:00
Antony Deepak Thomas 46a0f5cac8 fileio: introduce read_virtual_file_fd() 2021-09-29 12:47:49 +09:00
Yu Watanabe 83455d0c8b
Merge pull request #20865 from keszybz/meson-net-naming-definitions
Allow defining new naming scheme entries as configuration time
2021-09-29 12:29:14 +09:00
Frantisek Sumsal ecea250d77 core: fix the return type for xxx_running_timeout() functions
otherwise we might return an invalid value, since `usec_t` is 64-bit,
whereas `int` might not be.

Follow-up to: 5918a93
Fixes: #20872
2021-09-29 12:28:21 +09:00
Yu Watanabe 17373589f3
Merge pull request #20860 from yuwata/libsystemd-network-get-ifname-negative-errno
libsystemd-network: make sd_dhcp_client_get_ifname() or friends return negative errno
2021-09-29 12:27:01 +09:00
Lennart Poettering 5b81fa7ae1
Merge pull request #20870 from jwrdegoede/hwdb-2-accel-quirks
Hwdb 2 accel quirks
2021-09-28 23:13:54 +02:00
Lennart Poettering ca3f47eff3
Merge pull request #20691 from poettering/gpt-sig
dissect: add support for GPT images with embedded dm-verity signatures
2021-09-28 20:52:01 +02:00
Yu Watanabe 5977b71f28 libsystemd-network: make sd_dhcp_client_get_ifname() or friends return negative errno on error 2021-09-29 03:37:09 +09:00
Yu Watanabe 01afd0f7f5 tree-wide: make format_ifname() or friends return negative errno on failure
Also,
- drop unnecessary +1 from buffer size, as IF_NAMESIZE or IFNAMSIZ
  includes the nul at the end.
- format_ifname() does not update buffer on failure,
- introduces format_ifname_alloc(), FORMAT_IFNAME(), and their friends.
2021-09-29 03:37:06 +09:00
Hans de Goede ddd19fce8a hwdb: Add accel orientation quirk for the Cyberbook T116 tablet
Add a quirk for the accelerometer orientation for the
Cyberbook T116 rugged tablet.
2021-09-28 19:50:27 +02:00
Hans de Goede 2bdc8dc341 hwdb: Add accel orientation quirk for the Chuwi Hi10 Plus (CWI527)
Add a quirk for the accelerometer orientation for the
Chuwi Hi10 Plus (CWI527) tablet.
2021-09-28 19:50:27 +02:00
Lennart Poettering 636c8a1f55 update TODO 2021-09-28 17:06:51 +02:00
Lennart Poettering 2c424ee0aa tests: extend TEST-50-DISSECT to look for verity signatures 2021-09-28 17:06:45 +02:00
Lennart Poettering 54dcf847b1 docs: document the three new env vars for tweaking GPT dissection/validation 2021-09-28 17:03:44 +02:00
Lennart Poettering 77617993ee docs: document the new Verity signature partition type, and its UUIDs 2021-09-28 17:03:39 +02:00
Lennart Poettering c2fa92e7e8 dissect-image: optionally, validate dm-verity signatures in userspace
Getting certificates for dm-verity roothash signing into the trusted
kernel keychain is a royal PITA (means recompiling or rebooting with
shim), hence let's add a minimal userspace PKCS7 validation as well.

The mechanism is really simple and compatible with the verification the
kernel does. The only difference is that the certificates are searched
in /etc/verity.d/*.crt (and similar dirs in /usr/lib/, …).

We'll first try validation by passing the PKCS#7 data to the kernel, but
if that doesn't work we'll see if one of the certificates found that way
works and then attempt to attach the image without passing the PKCS#7
data to the kernel.

This makes it very easy to have fully validated GPT disk images. For
example, just copy the 'mkosi.secure-boot.crt' file you have in your
mkosi build dir to /etc/verity.d/ and things should just work.
2021-09-28 17:03:31 +02:00
Lennart Poettering d5fcc5b053 dissect-image: add env var for disabling "sidecar" loading of verity params
Just to make debugging easier.
2021-09-28 17:03:26 +02:00