Commit graph

59089 commits

Author SHA1 Message Date
Yu Watanabe b2f77b5e21 backlight: add/update several logs for validating backlight devices 2022-08-17 14:21:26 +09:00
Yu Watanabe 85ff4150e1 backlight: accept embedded display port named e.g. card0-eDP-1 2022-08-09 14:30:05 +09:00
Luca BRUNO 5ed47c4d23 sysusers: properly process user entries with an explicit GID
This tweaks user creation logic to properly take into consideration
an explicitly requested GID.
It fixes a bug where the creation flow would mistakenly fall back
to use the username instead, resulting in wrong lookups in case of
users and groups using the same name.
2022-08-09 04:58:32 +09:00
Luca BRUNO 6b6e45eb73 sysusers: only check whether the requested GID is available
This relaxes the availability check when creating a group, if an
explicit GID has been requested.
It avoids mixing up users and groups entries with valid and unique
UIDs/GIDs, but each having the same ID number.
2022-08-09 04:58:15 +09:00
Yu Watanabe eff6bc9294
Merge pull request #24244 from yuwata/device-enumerator
sd-device-enumerator: fix sysattr match
2022-08-09 04:57:48 +09:00
Ludwig Nussel 8313a1a5cd kmod-setup: load dmi-sysfs if it's a module 2022-08-08 19:22:53 +01:00
Yu Watanabe 50f9c507b2 test: add tests for sd_device_enumerator_add_match_sysattr/property() 2022-08-09 02:21:25 +09:00
Yu Watanabe b07131facf sd-device-enumerator: FOREACH_DEVICE_PROPERTY() does not provide NULL value
Hence, when sd_device_enumerator_add_match_property() called with NULL
for value, then the filter always unmatches with the device.
2022-08-09 01:17:03 +09:00
Yu Watanabe 585f2035b3 sd-device-enumerator,monitor: fix sysattr match
Previously, if sd_device_enumerator_add_match_sysattr() is called for
the same sysattr with different values, then no device passed the filter.

Now, the accepted values (or patterns) are stored in strv, and if the
sysattr value of a device matches with the strv, then the device passes
the filter.
2022-08-09 01:17:00 +09:00
Chih-Hsuan Yen 7aa0b0121e cryptsetup: support keyfile-timeout for using a device as the key file
Closes https://github.com/systemd/systemd/issues/21993
2022-08-08 17:03:28 +01:00
Yu Watanabe 57a0e3f503
Merge pull request #24221 from yuwata/dhcp-client-cleanups
dhcp: use struct hw_addr_data
2022-08-08 23:59:58 +09:00
Yu Watanabe 52be2b43f5 hash-funcs: introduce string_hash_ops_free_strv_free 2022-08-08 23:41:28 +09:00
Lennart Poettering 65a667c49c
Merge pull request #23511 from diabonas/tpm2-pin-systemd-gpt-auto-generator
cryptsetup: make systemd-gpt-auto-generator work with TPM2 and PIN
2022-08-08 15:40:03 +02:00
Lennart Poettering 2361820e7b
Merge pull request #24220 from yuwata/on-ac-power
udev-util: assume running on AC power when no battery found
2022-08-08 15:35:55 +02:00
Jan Janssen 79a7ef89aa stub: Use EfiLoaderCode for kernel memory
Fixes: #24237
2022-08-08 15:33:35 +02:00
Lennart Poettering d096265708
Merge pull request #24044 from dtardon/default-device-timeout
Add a configuration option for setting default device timeout
2022-08-08 15:32:55 +02:00
João Loureiro 5ded3917a1
Fix issue with system time set back (#24131)
Fixes #6036
2022-08-08 15:32:19 +02:00
undef 7b45d6b6f6 shared/generator: Ensure growfs unit runs after repart
When deploying an image using systemd-repart and systemd-growfs one
should have the image expanded entirely and ready to use after the first
boot. This ensures that growfs does not occur before repart, thus
requiring a second boot.
2022-08-08 15:20:36 +02:00
Lennart Poettering 80821405da update TODO 2022-08-08 13:50:20 +02:00
Yu Watanabe 113522868a dhcp: add assertions about client state 2022-08-08 20:19:46 +09:00
Sonali Srivastava 39e3135bc2 docs: mkosi-13 or newer required 2022-08-08 12:15:20 +01:00
Jan Janssen 2fb1165238 boot: Build with at least -O1 as workaround
Fixes: #24202
2022-08-06 15:42:34 +01:00
Yu Watanabe 4473cd7f61 dhcp: fix potential buffer overflow
Fixes a bug introduced by 324f818781.

This also renames several macros for DHCP packet size.
2022-08-06 13:06:32 +09:00
Yu Watanabe 073a1daaba dhcp: make dhcp_network_bind_raw_socket() take struct hw_addr_data 2022-08-06 04:57:27 +09:00
Yu Watanabe 8cad358e4a dhcp: make dhcp_identifier_set_duid() take struct hw_addr_data 2022-08-06 04:53:36 +09:00
Yu Watanabe 3b75435db6 dhcp: make dhcp_identifier_set_iaid() take struct hw_addr_data 2022-08-06 04:53:36 +09:00
Yu Watanabe e0ead13088 sd-dhcp6-client: use hw_addr_set() 2022-08-06 04:53:36 +09:00
Yu Watanabe 7e5c25b244 sd-dhcp-client: use struct hw_addr_data to store MAC and broadcast address 2022-08-06 04:53:36 +09:00
Yu Watanabe 069f5df051 ether-addr-util: introduce hw_addr_set() helper function 2022-08-06 04:53:36 +09:00
Yu Watanabe 7fddb9704f dhcp4: stop client before updating MAC address 2022-08-06 04:53:36 +09:00
Yu Watanabe ebf404a4d0 sd-netlink: rename NLType and friends
In sd-netlink, we use 'type' for naming many variables with different type,
and worst of all, function like `type_get_type()` exists. That makes the
code hard to understood.

Let's rename
- NLType -> NLAPolicy
- NLTypeSystem -> NLAPolicySet
- NLTypeSystemUnion -> NLAPolicySetUnion
- type_get_type() -> policy_get_type()
- type_get_type_system() -> policy_get_policy_set(), and so on.

This also changes the type of attribute taken by e.g.
`sd_netlink_message_append_string()` from `unsigned short` -> `uint16_t`
to make the variable size clearer.
2022-08-06 03:53:51 +09:00
Yu Watanabe 96788d2aa4 udev-util: assume system is running on AC power when no battery found
Fixes #24214.
2022-08-06 03:42:32 +09:00
Yu Watanabe 1c6e17e5d1 udev-util: align string table 2022-08-06 03:35:04 +09:00
Yu Watanabe 1ab7e2b587
Merge pull request #23340 from yuwata/network-check-sr-iov-pf-state
network: check SR-IOV PF state
2022-08-06 03:18:30 +09:00
Yu Watanabe c75efa3f7e
Merge pull request #23508 from yuwata/core-device
core/device: fix devlink handling
2022-08-06 03:18:14 +09:00
Richard Phibel b6d1e2b441
mkosi: Add package libfdisk to Ubuntu dependencies (#24211)
* mkosi: Add package libfdisk to Ubuntu dependencies

The libfdisk package is needed by systemd-repart.
2022-08-05 18:40:17 +01:00
David Rheinsberg 347f48246f bus: use inline trace argument for ANONYMOUS auth
Rather than using a separate DATA round to transmit the trace-string of
the ANONYMOUS authentication scheme, transmit it inline as argument.
This requires a refactor of the client-side SASL parser, as we now have
a different set of replies depending on the mode used.

This fixes an issue where libdbus-1 does not query for trace-strings if
not transmit inline as AUTH-ANONYMOUS argument. It is unclear from the
wording of the spec whether this is a violation by libdbus-1. However,
we can work around it by simply changing our mode of transmittal.
2022-08-05 16:39:55 +01:00
Luca Boccassi ecb991621a
Merge pull request #24216 from poettering/ispowerof2
add ISPOWEROF2() macro and use it
2022-08-05 16:38:58 +01:00
Lennart Poettering 7496235134 man,journalctl: introduce man/--help sections
So far the --help text and the man page of journactl were mostly a large
pile of options shown next to each other. Let's add some basic
structure, and group switches by sections such as "Filtering Options",
"Output Options" and so on.

Do this the same way in the --help text and in the man page.

Since this moves everything around anyway, I also opted to rebreak all
paragraphs in the man page. This makes the patch larger than necessary,
but given that this whole patch doesn't really change contents besides
section titles I figured this would be OK.
2022-08-05 16:13:07 +01:00
David Tardon 141332ab55 man: update dbus docs 2022-08-05 15:56:23 +02:00
David Tardon 9e69bd4801 man: document DefaultDeviceTimeoutSec= 2022-08-05 15:55:44 +02:00
Yu Watanabe 1f6d268b4b core/device: add comments for boolean arguments 2022-08-05 22:16:58 +09:00
Yu Watanabe 4a1a1caf21 core/device: always accept syspath change
When multiple devices have the same devlink, then
adding/updating/removing one of the device may cause syspath change.

Fixes the following issue in
https://github.com/systemd/systemd/issues/23208#issue-1217909746
> the above shows an inconsistency between udev's and systemd's handling
> of the two different devices having the same alias. While udev replaces
> the by-uuid symlink which now points to sdh1 rather than sdd1, systemd
> keeps the previous mapping to sdd1 and emits a warning. This is not the
> problem cause but worth mentioning.
2022-08-05 22:15:02 +09:00
Yu Watanabe dce2d35ce5 core/device: move several functions
No functional change. A preparation for later commits.
2022-08-05 22:13:47 +09:00
Yu Watanabe 367a2597c3 core/device: store the original path
The unit name may be hashed. Hence, we cannot obtain the original path
from the unit name.

The path will be used in the later commits.
2022-08-05 22:13:47 +09:00
Franck Bui 7870de03c5 core: replace m->honor_device_enumeration with MANAGER_IS_SWITCHING_ROOT() 2022-08-05 22:13:47 +09:00
Franck Bui d35fe8c0af core: introduce MANAGER_IS_SWITCHING_ROOT() helper function
Will be used by the following commit.
2022-08-05 22:13:43 +09:00
Yu Watanabe e33232d405 network: also check SR-IOV PF port and other VF ports before configuring
When a PF port becomes down (this can happens e.g. the PF port is joining
a bond interface), some drivers make its VF ports also become down, and
may cause failures in configuring VF ports.

Similary, when a VF port become down, some drivers make its PF port and
other VF ports down.

Let's configure SR-IOV ports (both PF and VFs) after all link-layer
settings of all ports being applied.

Fixes #23315.
2022-08-05 21:49:27 +09:00
Yu Watanabe b0ff6dea38 network: manage SR-IOV PF and VF ports 2022-08-05 21:49:27 +09:00
Yu Watanabe 00117f8811 network: split out link_is_ready_to_create_stacked_netdev()
Preparation for later commits.
2022-08-05 21:49:27 +09:00