Commit Graph
79591 Commits
Author SHA1 Message Date
Lennart Poettering be093d457f user-record: add helper for dispatching a disposition mask 2025-01-27 23:42:06 +01:00
Luca Boccassi 5ff144515e mkosi: add loongarch64 to Debian's list of EFI arches 2025-01-27 22:32:34 +00:00
Nick Rosbrook 2aa1a265bc udev: add input/by-{id,path} symlinks for hidraw devices
Take some of the same rule structure from 60-persistent-input.rules, and
apply it to hidraw devices in 60-persistent-hidraw.rules.

Since one of the motivations for this is being able to easily reference
FIDO tokens, add a special case when ID_FIDO_TOKEN==1, and add 'fido'
to the symlink.
2025-01-27 18:57:13 +00:00
ver4a 1352eb059f Fix typo 2025-01-28 03:28:26 +09:00
Nick Rosbrook f63acba4ad resolved: add link_get_default_route helper
The dbus property getter for DefaultRoute does not simply check
link->default_route. Instead, if l->default_route is not explicitly
configured, it checks dns_scope_is_default_route(l->unicast_scope).

Add a link_get_default_route() helper with this logic so that it can be
used for consistency.
2025-01-27 09:32:24 -05:00
Nick Rosbrook b9335a329d resolved: add a helper to check if DNS server is accessible
We check this by opening a UDP socket and attempting to connect. We do
not send any traffic on it, but this will tell us if there are routes to
the DNS server.

This will be used in a later commit.
2025-01-27 09:32:24 -05:00
Nick Rosbrook 428c99997d varlink-util: add varlink_many_notify
We already have varlink_many_notifyb. Just re-factor it slightly and add
a plain varlink_many_notify.
2025-01-27 09:32:24 -05:00
Nick Rosbrook cf22b5c5ad resolve: rename varlink_subscription -> varlink_query_results_subscription
No functional change. Make it more clear that these varlink connections
are subscribed to query results. This prepares for adding SubscribeDNS
to the varlink API.
2025-01-27 09:32:24 -05:00
Daan De Meyer 935e1d64e8 Cleanups around tty_is_vc() and get_kernel_consoles() (#36171)
Prompted by #36167
Replaces #36167 and #36175
2025-01-27 14:43:39 +01:00
Daan De Meyer be4579ff37 mkosi: Update to latest (#36190) 2025-01-27 14:15:37 +01:00
16mc1r 61c176744e Adds asus T103HAF rotation matrix to 60-sensor.hwdb (#36177)
Rotation Matrix to enable correct auto-rotation with
[iio-sensor-proxy](https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/)
on an Asus Transformer Mini T103HAF with iio-sensor `HID-SENSOR-200073`.
- Tested on KDE Plasma Mobile (Fedora 41), details see inxi report.

Device Details: 
- low powered 2in1 convertible with 10.1" screen size, 4core atom cpu
and 4gb ram. Usefull as x86 based tablet with stylus for annotation and
reading.
- [official asus website for the
device](https://www.asus.com/us/laptops/for-home/everyday-use/asus-transformer-mini-t103/)

#### inxi device report 
```sh
System:
  Host: ------ Kernel: 6.12.10-200.fc41.x86_64 arch: x86_64 bits: 64
  Console: pty pts/3 Distro: Fedora Linux 41 (KDE Plasma Mobile)
Machine:
  Type: Detachable System: ASUSTeK product: T103HAF v: 1.0 serial: J1N0CX212087050
  Mobo: ASUSTeK model: T103HAF v: 1.0 serial: ---------- UEFI: American Megatrends
    v: T103HAF.306 date: 12/05/2017
CPU:
  Info: quad core model: Intel Atom x5-Z8350 bits: 64
Info:
  Memory: total: 4 GiB
```

### udevadm info output for iio-device
```sh
# iio-device / accelerometer
P: /devices/pci0000:00/0000:00:0a.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8086:0001.0004/HID-SENSOR-200073.3.auto/iio:device0
M: iio:device0
R: 0
U: iio
T: iio_device
D: c 234:0
N: iio:device0
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:0a.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8086:0001.0004/HID-SENSOR-200073.3.auto/iio:device0
E: DEVNAME=/dev/iio:device0
E: DEVTYPE=iio_device
E: MAJOR=234
E: MINOR=0
E: SUBSYSTEM=iio
E: USEC_INITIALIZED=18119681
E: ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, -1
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
```
### Full `udevadm info  --export-db` 
- as requested in
[60-sensor.hwdb](https://github.com/systemd/systemd/blob/ba0266b376d7cc5205d8a4a3d999aec13c24fe5d/hwdb.d/60-sensor.hwdb#L35)
-
[udevadm-info_103HAF.txt](https://github.com/user-attachments/files/18550448/udevadm-info_103HAF.txt)
2025-01-27 13:01:05 +00:00
Yu Watanabe 9fdb1c63bb core/dbus-manager: make output argument of transient_unit_from_message() optional 2025-01-27 12:55:53 +00:00
Daan De Meyer 28f96afbbb mkosi: Add VCS_TAG to PassEnvironment= 2025-01-27 11:27:49 +01:00
Daan De Meyer e9fb163857 mkosi: Bump minimum version to 25
Let's require everyone to be on the now officially released mkosi 25.
2025-01-27 11:26:29 +01:00
Daan De Meyer b10a0a4ad6 mkosi: Update to latest 2025-01-27 11:26:13 +01:00
Yu Watanabe 4658651466 machine: revert type change of "leader" in io.systemd.Machine.Register method
The varlink method io.systemd.Machine.Register() is in v256, hence type
of "leader" cannot be changed.
Let's revert the change by 755cb018c9, and
introduce another field "leaderProcessId", which takes detailed information
of the process.

Fixes a regression caused by 755cb018c9.
Fixes #36155.
2025-01-27 10:18:25 +01:00
Yu WatanabeandAndrii Chubatiuk 146ec85ef5 journal-remote: coding style fixlets
Co-authored-by: Andrii Chubatiuk <andrew.chubatiuk@gmail.com>
2025-01-27 10:09:08 +01:00
Ivan Trubach 594d2ff9d6 man: insert missing varname tag 2025-01-27 10:09:08 +01:00
Yu Watanabe b883a9f5be strv: drop redundant string_strv_hash_ops
It is completely equivalent to string_hash_ops_free_strv_free.
2025-01-27 07:49:04 +01:00
Yu Watanabe f6b0de5546 mount-util: make path_get_mount_info_at() also read utab (#36154)
As "_netdev" is only stored in utab.

Fixes a bug introduced by 5261c521e3.
Fixes #35949.
2025-01-27 08:45:13 +09:00
Yu Watanabe 2ea15435fd test-network: add test case for Gateway=_dhcp4 with Table= 2025-01-27 08:39:09 +09:00
Yu Watanabe 7befabafad network/dhcp4: Gateway=_dhcp4 also assign DHCP address as preferred source
With the following, now preferred source address is set to the DHCP
address.
====
[Route]
Gatewa=_dhcp4
Table=100
====

Before:
====
$ ip route show table 100 default
default via 192.168.0.1 dev eth0 proto dhcp metric 1024
====

After:
====
$ ip route show table 100 default
default via 192.168.0.1 dev eth0 proto dhcp src 192.168.0.100 metric 1024
====

To avoid the assignment, this also introduces PreferredSource=no.
2025-01-27 08:38:24 +09:00
Yu Watanabe 863293dbd3 network/dhcp4: create prefix route and route to gateway in the specified table with Gateway=_dhcp4
Previously, the following setting
====
[Route]
Gateway=_dhcp4
Table=100
====
only configured the route in the specified table. But it was mostly
useless. This makes prefix route and route to the gateway are also
configured in the specified table.

Before:
====
$ ip route show table 100
default via 192.168.0.1 dev eth0 proto dhcp metric 1024
====

After:
====
$ ip route show table 100
default via 192.168.0.1 dev eth0 proto dhcp metric 1024
192.168.0.0/24 dev eth0 proto dhcp src 192.168.0.100 metric 1024
192.168.0.1 dev eth0 proto dhcp scope link src 192.168.0.100 metric 1024
====
2025-01-27 08:38:14 +09:00
Yu Watanabe c7adb64e12 network/dhcp4: rename link_prefixroute() -> prefixroute_by_kernel()
No functional change, just refactoring.
2025-01-27 06:58:09 +09:00
Yu Watanabe c9ee0d2eeb network/dhcp4: make dhcp4_request_route_to_gateway() take Route object
No functional change, preparation for later commits.
2025-01-27 06:29:26 +09:00
Yu Watanabe e92f40c6b0 network/route: adjust configuration source based on Gateway= setting
If Gateway=_dhcp4/_ra, the route will be anyway configured with
NETWORK_CONFIG_SOURCE_DHCP4/_NDISC. See dhcp4_request_route() and
ndisc_route_prepare().

This is mostly for avoiding link_drop_routes(), which drops unnecessary static
and/or foreign routes, unexpectedly filtering an existing route with the
route specified with Gateway=_dhcp4/_ra.
2025-01-27 06:29:26 +09:00
Yu Watanabe 08570f2841 systemctl: fix memleak
Fixes a bug introduced by adb6cd9be2.

Fixes #36178.
2025-01-26 21:04:11 +00:00
honjow 385ba2a3a3 hwdb: add MSI Claw 8 AT Keyboard Scancodes (#36180)
This change maps the right face button to F15 and the left one to F16.
Similar to #33669.
2025-01-27 04:22:19 +09:00
Mike Yuan 26cd3a2fce getty-generator: port to get_kernel_consoles() 2025-01-26 04:29:56 +01:00
Mike Yuan 1cd3c49d09 getty-generator: use generator_add_symlink() where appropriate 2025-01-26 04:29:56 +01:00
Mike Yuan 68cf1fc34d tty-ask-password-agent: do not needlessly spawn subprocesses if there's only one console 2025-01-26 04:29:56 +01:00
Mike Yuan daf1320237 terminal-util: make get_kernel_consoles() return > 0 if /dev/console is resolved 2025-01-26 04:15:41 +01:00
Mike Yuan d25b55b95a login/pam_systemd: drop redundant vtnr == 0 handling
vtnr_from_tty() treats 0 as invalid.
2025-01-26 04:15:41 +01:00
Mike Yuan b27f791691 terminal-util: stop doing 0/upper bound check in tty_is_vc()
tty_is_vc() is more often than not used for simple "categorization"
than validity check. E.g. in logind, we first recognize the tty
"looks like vc", and then use vtnr_from_tty() where range check
is performed and vtnr is extracted. In such cases, we want to reject
invalid vtnr from clients rather than silently carry on, hence
let's remove bound check in tty_is_vc().

Fixes #36166
Replaces #36167 and #36175
2025-01-26 04:15:40 +01:00
Yu Watanabe ba0266b376 network: fix offset of preference in backward compat option
Fixes a bug introduced by a10d6e0124.

Fixes oss-fuzz#391916479 (https://issues.oss-fuzz.com/issues/391916479).
Fixes #36172.
2025-01-26 11:09:04 +09:00
Daan De Meyer ff83795469 boot: Improve log message 2025-01-26 10:20:06 +09:00
Yu Watanabe fc55da3d7c Add loong64 as an option in a few more places (#36163) 2025-01-26 09:35:42 +09:00
Luca Boccassi 126f545a01 resolved: do not disable mdns/llmnr globally if it's enabled on any link (#36158)
Fixes a regression caused by 2976730a4d.
Fixes #36078.
Fixes #36126.

Replaces #36153.
Replaces #36156.
2025-01-25 10:49:44 +00:00
Luca Boccassi 829f57003d tools: add loongarch64 to debug-sd-boot script 2025-01-25 01:25:38 +00:00
Luca Boccassi d1429288ae ukify: add riscv32 to --efi-arch
It is supported in the arch mapping at the top and in elf2efi, so add it here too
2025-01-25 01:25:38 +00:00
Luca Boccassi abe0033556 ukify: add loongarch64 to --efi-arch 2025-01-25 01:25:38 +00:00
Yu Watanabe 269da24c5a resolved: stop mdns/llmnr if no interface request it after bus method 2025-01-25 10:07:38 +09:00
Yu WatanabeandLuca Boccassi 962b757d9b resolved: do not disable mdns/llmnr globally if it's enabled on any link
Fixes a regression caused by 2976730a4d.

Fixes #36078.
Fixes #36126.

Co-authored-by: Luca Boccassi <luca.boccassi@gmail.com>
2025-01-25 10:07:38 +09:00
Luca Boccassi fd39606c25 man: fix reference to non-existing ukify parameter
The --extend parameter was removed by https://github.com/systemd/systemd/pull/34608
and a --join-profile was added instead, fix leftover reference in manpage

Follow-up for 3891d57c4f
2025-01-25 00:59:47 +00:00
Yu Watanabe 93f6cee97e libmount-util: introduce two helper functions
This introduces libmount_parse_mountinfo() and libmount_parse_with_utab().
The former one parses only mountinfo, but the latter one also parse
utab. Hopefully this avoids pitfalls like issue #35949.
2025-01-25 09:34:01 +09:00
Yu Watanabe 22f980dd0b mount-util: make path_get_mount_info_at() also read utab
As "_netdev" is only stored in utab.

Fixes a bug introduced by 5261c521e3.
Fixes #35949.
2025-01-25 07:02:48 +09:00
Lennart Poettering 1153d2d2cc homed: when setting up an idmapping map foreign UID range on itself
Now that nspawn can run unprivileged off directory trees owned by
the new "foreign" UID range let's make sure homed actually allows
files owned by that range in the home directories.

This is not enough to make nspawn just work in homed home dirs
unfortunately though. that's because homed applies an idmapping, and
nspawn would need to then to take that idmapped mount and apply another
one, and the kernel simply doesn't support stacked idmapped mounts.
There's work ongoing to address that in the kernel.

However, this is a first step, and should be enough to make things just
work should the kernel eventually support stacked idmapped mounts.
2025-01-25 05:31:59 +09:00
Yu Watanabe 9b3715d529 sd-json: silence false positive warning by coverity
An object json is a set of key and value pair, hence has its number of
element is multiple of two, and we know at least two elements there.

Follow-up for b6a2df6307.
Fixes CID#1590724
2025-01-25 05:31:41 +09:00
Yu Watanabe 11eb2fcc80 delta: cleanup coding style and add missing error check (#36146) 2025-01-25 05:30:58 +09:00
Yu Watanabe 06c172342e udev-rules: use sd_device_set_sysattr_value() to write sysfs attribute (#36142)
Then, we can avoid that files outside of sysfs are written by udev ATTR
key.
2025-01-25 05:30:21 +09:00