Commit Graph

59615 Commits

Author SHA1 Message Date
Yu Watanabe
39fdc6f82d test-29-portable: enable debugging logs of udevd 2022-08-31 23:33:13 +09:00
Yu Watanabe
9fff8e1fdd test-29-portable: extend timeout for slower environment 2022-08-31 23:32:57 +09:00
Yu Watanabe
2b6605102d dissect-image: add environment variable to control timeout for waiting devlink to be configured 2022-08-31 23:20:09 +09:00
Yu Watanabe
4f89ce0c91 udev-util: make device_wait_for_initialization() take relative timeout
Also make the timer event source floating.
2022-08-31 23:12:46 +09:00
Yu Watanabe
f81b3e90e4 udev-util: replace device_new_from_dev_path() with sd_device_new_from_devname() 2022-08-31 23:12:46 +09:00
Lennart Poettering
8812f8fc65 hashmap: add comment explaining that set_fnmatch() handles fnmatch() errors as non-matches 2022-08-31 15:13:42 +02:00
Yu Watanabe
a7614fbe85
Merge pull request #24499 from medhefgo/format-signedness
meson: Compile with -Werror=format-signedness
2022-08-31 18:46:27 +09:00
Swapnil Devesh
f1c36537a9
hwdb: fix Dell Professional Sound Bar AE515 scancode (#24497) 2022-08-31 04:31:50 +09:00
Jan Janssen
a4ea5d19bb meson: Compile with -Werror=format-signedness 2022-08-30 12:03:33 +02:00
Jan Janssen
f996072fe0 tree-wide: Fix field width specifier warnings
The casting here isn't pretty, but at least it makes it obvious what is
happening instead of implicit and it allows enabling -Wformat-signedness.
2022-08-30 12:03:33 +02:00
Jan Janssen
5570a09702 tree-wide: Fix format specifier warnings for %x
Unfortunately, hex output can only be produced with unsigned types. Some
cases can be fixed by producing the correct type, but a few simply have
to be cast. At least casting makes it explicit.
2022-08-30 12:03:33 +02:00
Jan Janssen
2676befc73 tree-wide: Fix a some remaining format warnings by casting 2022-08-30 12:03:33 +02:00
Jan Janssen
63b9838639 tree-wide: Mark some constants as unsigned
All these are really unsigned and used as such. This silences some
-Wformat-signedness warnings with gcc.
2022-08-30 12:03:33 +02:00
Jan Janssen
1dbab956ba journal: Show grcrypt error message instead of a raw code 2022-08-30 12:03:33 +02:00
Jan Janssen
9cf6c94eba efivars: Parse into unsigned
The format specifiers for UUID parsing use %x, which expects unsigned.
2022-08-30 12:03:33 +02:00
Jan Janssen
c0f86d66f3 tree-wide: Use correct format specifiers
gcc will complain about all these with -Wformat-signedness.
2022-08-30 12:03:28 +02:00
Yu Watanabe
125d108665
Merge pull request #24474 from yuwata/udevadm-settle-cleanups
udevadm-settle: several cleanups
2022-08-30 07:31:20 +09:00
Yu Watanabe
7078299658
Merge pull request #24471 from yuwata/udevadm-wait-periodic-timer
udevadm-wait: introduce periodic timer for checking devices
2022-08-30 07:31:05 +09:00
Yu Watanabe
69a20cc3e4
Merge pull request #23888 from topimiettinen/networkd-netlabel-v2
network: NetLabel integration
2022-08-30 07:30:49 +09:00
LockBlock-dev
1ee4635413 hwdb: Force release calculator key on all HP Victus laptops
The key doesn't create a release event. This is a fix to make it work properly. I made sure the product is generic to work on all Victus laptops.

This fix #23006.
2022-08-30 05:01:37 +09:00
Lennart Poettering
4bede0a0aa homed: don't use stat() data from an unrelated inode
This doesn't really change anything, since we know the stat data used
here also contains S_IFBLK, but it's frickin' confusing.
2022-08-30 01:13:58 +09:00
Yu Watanabe
3c82f2028d
Merge pull request #24495 from poettering/loopback-block-msg
improve loopback warning message
2022-08-30 01:10:43 +09:00
Lennart Poettering
bcfc0e8872 strv: modernize strv_fnmatch() a bit 2022-08-30 01:09:12 +09:00
Frantisek Sumsal
b0c9fd8103
Merge pull request #24466 from mrc0mmand/TEST-75-tweaks
test: fix delv trust anchors location on Ubuntu
2022-08-29 15:35:07 +00:00
Lennart Poettering
b3d6f70692 loopback: use ERRNO_IS_PRIVILEGE() where appropriate 2022-08-29 15:15:08 +02:00
Lennart Poettering
9d72a3cf70 loop: make 'Failed to configure loopback device' log message clearer
We print the very same log message for loopback block devices and for
loopback network devices. Let's better be clear what kind it is.
2022-08-29 15:15:08 +02:00
Lennart Poettering
79127368d8 docs: use Title Case for section titles
as per:

https://titlecase.com/
2022-08-29 14:48:26 +02:00
Topi Miettinen
a4640bed74 test: testing for networkd NetLabel feature 2022-08-29 14:23:17 +09:00
Topi Miettinen
4b3590c324 network: NetLabel integration
New directive `NetLabel=` provides a method for integrating static and dynamic
network configuration into Linux NetLabel subsystem rules, used by Linux
Security Modules (LSMs) for network access control. The label, with suitable
LSM rules, can be used to control connectivity of (for example) a service with
peers in the local network. At least with SELinux, only the ingress can be
controlled but not egress. The benefit of using this setting is that it may be
possible to apply interface independent part of NetLabel configuration at very
early stage of system boot sequence, at the time when the network interfaces
are not available yet, with netlabelctl(8), and the per-interface configuration
with systemd-networkd once the interfaces appear later.  Currently this feature
is only implemented for SELinux.

The option expects a single NetLabel label. The label must conform to lexical
restrictions of LSM labels. When an interface is configured with IP addresses,
the addresses and subnetwork masks will be appended to the NetLabel Fallback
Peer Labeling rules. They will be removed when the interface is
deconfigured. Failures to manage the labels will be ignored.

Example:
```
[DHCPv4]
NetLabel=system_u:object_r:localnet_peer_t:s0
```

With the above rules for interface `eth0`, when the interface is configured with
an IPv4 address of 10.0.0.123/8, `systemd-networkd` performs the equivalent of
`netlabelctl` operation

```
$ sudo netlabelctl unlbl add interface eth0 address:10.0.0.0/8 label:system_u:object_r:localnet_peer_t:s0
```

Result:
```
$ sudo netlabelctl -p unlbl list
...
 interface: eth0
   address: 10.0.0.0/8
    label: "system_u:object_r:localnet_peer_t:s0"
...
```
2022-08-29 14:23:17 +09:00
Topi Miettinen
5b198025de sd-netlink: add NetLabel support 2022-08-29 14:23:17 +09:00
Topi Miettinen
3f36b9ed47 basic: generate netmasks for IPv6 and generic IP family addresses
Added functions to generate netmasks for IPv6 and generic IP family addresses.
2022-08-29 14:23:17 +09:00
Wenchao Hao
9442b2f78f scsi_id: retry inquiry ioctl if host_byte is DID_TRANSPORT_DISRUPTED
The inquiry is issued to kernel via ioctl, kernelspace would set
this inquiry command's retry count to 0 which means the command
would not be retried in kernel space even if the LLDs returned
a status which need to be retried. So we should take the retry
in user space.
2022-08-29 14:10:05 +09:00
Daniel Braunwarth
1037178acf condition: fix device-tree firmware path
The path /sys/firmware/device-tree doesn't exist. This should be either
/proc/device-tree or /sys/firmware/devicetree.

The first path is only a link. So lets use the second path.

See https://github.com/torvalds/linux/blob/v4.14/drivers/of/base.c#L218.
2022-08-29 13:47:56 +09:00
Yu Watanabe
ba44a5c77c test-50-dissect: wait for and lock loop block partition devices 2022-08-29 13:44:42 +09:00
Yu Watanabe
3228f89b8c udevadm-wait: introduce periodic timer for checking devices
When --initialized=no is specified, it is not necessary to wait
for uevents to be processed by udevd.
2022-08-29 13:44:42 +09:00
Yu Watanabe
23902d1c84 Revert "test: wait for loop device to be removed"
This reverts commit 1a0e065e9f.

This does not work as expected.

After `losetup --detach`, the kernel lazily removes the loop device.
But, systemd-dissect should gracefully handle that. If it does not, then
it is a bug in systemd-dissect.
Let's not hide the real issue in systemd-dissect.
2022-08-29 13:44:42 +09:00
Yu Watanabe
5b61c9b2bb udevadm-settle: check validity of specified path 2022-08-29 13:40:54 +09:00
Yu Watanabe
9668c1a5d3 udevadm-settle: use sd-event 2022-08-29 13:40:54 +09:00
Yu Watanabe
d0dfd9fd32 udevadm-settle: rename arg_timeout -> arg_timeout_usec 2022-08-29 13:40:54 +09:00
Yu Watanabe
23b11e0b7c udevadm-settle: check if udevd is running 2022-08-29 13:40:54 +09:00
Yu Watanabe
f978688402 udevadm-settle: make failure in udev_ctrl_new() critical
It should not fail in general.
2022-08-29 13:40:54 +09:00
Yu Watanabe
6ecccf60d2 udevadm-settle: emit deprecated warning earlier 2022-08-29 13:40:54 +09:00
adrian5
b72e5d9d8e man: Minor punctuation and word tweak 2022-08-29 11:29:57 +09:00
Yu Watanabe
8676bdb708 udev-util: minor cleanups for on_ac_power()
Follow-ups for #24420.
2022-08-28 21:46:45 +01:00
Luca Boccassi
704b0d8464
Merge pull request #24475 from yuwata/devpath
sd-device: introduce two helper functions for devnum
2022-08-28 21:09:10 +01:00
Yu Watanabe
db68547998 network: drop unused timestamp 2022-08-28 09:18:34 +00:00
Yu Watanabe
0bfe2aa378 test-64: run one more subtest on non-KVM environment with relaxed condition 2022-08-28 09:18:18 +00:00
Uriel Corfa
c0a18932dc docs: fix incorrect env var name for credentials directory
CREDENTIAL_PATH appears nowhere in the systemd source code.
$CREDENTIALS_DIRECTORY is what is used instead.
2022-08-28 17:35:58 +09:00
Yu Watanabe
c4c9714464 shell-completion: drop unused $mode
Fixes #24473.
2022-08-28 08:11:26 +00:00
Yu Watanabe
381e48aa36 udevadm: replace find_device_from_path() with sd_device_new_from_path() 2022-08-28 08:10:22 +00:00