Commit Graph
79158 Commits
Author SHA1 Message Date
Yu Watanabe d8b34aaef2 unit-file: introduce unit_file_remove_from_name_map() 2025-01-29 04:58:20 +09:00
Yu Watanabe c540875cd3 strv: introduce string_strv_hashmap_remove() 2025-01-29 04:36:24 +09:00
AndreFerreiraMsc 3e1d7b6aae man: Update nss-myhostname.xml to reflect files 2025-01-29 04:28:10 +09:00
Yu Watanabe d90c01d02c network: bridge: add support for configuring locked ports (#36150)
"Recently" (as of 5.18) the Linux kernel gained the ability of locking
bridge ports to restrict network access to authenticated hosts only.

This is implemented by disabling automated learning and dropping
incoming traffic from unknown hosts. User space is then expected to add
fdb entries for authenticated hosts. Once a fdb entry exist, traffic for
that host will be forwarded as expected.

This was later extended with "Mac Authentication Bypass", where the
locking was extended to fdb entries. In this mode the kernel adds fdb
entries again automatically, but they are locked by default.

To properly configure this, add two network options and one netdev
option:

* `LinkLocalLearning=` to prevent the kernel from creating unlocked
entries based on link-local traffic, which would bypass any
authentication. Needed when enabling learning on a locked port.
* `Locked=` to allow setting a bridge port to locked.
* `MACAuthenticationBypass=` to allow enabling Mac Authentication
 Bypass on a port. Requires learning to be enabled on the port as well
 (and consequently `LinkLocalLearning` disabled on the bridge).

An authenticator (e.g. hostapd) is still needed to do the actual
authentication, the kernel only provides the access control.
2025-01-29 04:16:20 +09:00
Luca Boccassi c4c3eb03fd Minor fixes for ukify tests (#36197) 2025-01-28 18:49:42 +00:00
Luca Boccassi 103bf54e2c wait-online: add initial support for waiting for DNS (#34640)
Add a new flag, `--dns`, to systemd-networkd-wait-online to allow
waiting for DNS to be configured. The `--dns` flag respects the `--ipv4`
and `--ipv6` flags, as well as `--interface=` and `--any`.
2025-01-28 17:33:39 +00:00
Luca Boccassi 25a253084a test: support slow test-ukify on Debian/Ubuntu
Kernels are installed in /boot/ so find them there too
2025-01-28 17:28:55 +00:00
Luca Boccassi bcca98c632 test: use local stub if available in test-ukify
It might not be available on a CI system in the system
path, so use the local one if it was built
2025-01-28 17:28:55 +00:00
Daan De Meyer b61efe6591 ukify: Add --sign-profile
Let's allow configuring which UKI profiles we generate signed PCR
measurements for since there are various types of profiles for
which we do not want to generate signed PCR measurements so that they
can not unlock the encrypted rootfs.

Fixes #36173.
2025-01-28 17:20:46 +00:00
Lennart Poettering 7249651bff bootctl: move print block device path calls to command section of its own 2025-01-28 16:25:15 +00:00
Luca Boccassi 78ce88e265 test: install stub package for test-ukify unit test 2025-01-28 15:04:28 +00:00
Nick Rosbrook d6608da1e6 networkd-test: add basic tests for systemd-networkd-wait-online --dns 2025-01-28 08:49:49 -05:00
Nick Rosbrook 5ee20919a2 test: add test for resolved SubscribeDNSConfiguration API 2025-01-28 08:49:49 -05:00
Nick Rosbrook 266cfdfc77 test: cleanup after testcase_12_resolvectl2 2025-01-28 08:49:49 -05:00
Nick Rosbrook 359db7e9b9 wait-online: add support for waiting for DNS configuration
Add a new flag to systemd-networkd-wait-online, --dns, to allow waiting
for DNS to be configured.

DNS is considered configured when at least one DNS server is accessible.
If a link has the property DefaultRoute=yes (either by explicit
configuration, or because there are no routing-only domains), or if the
search domain '.' is configured, wait for link-specific DNS to be
configured. Otherwise, global DNS servers may be considered.
2025-01-28 08:49:49 -05:00
Jonas Gorski 08a26ecc47 network: bridge: add support for IFLA_BRPORT_MAB
Since linux commit a35ec8e38cdd1766f29924ca391a01de20163931 ("bridge:
Add MAC Authentication Bypass (MAB) support"), included since v6.2, it
is possible to enable MAC Authentication Bypass for bridge ports. In
this mode the locked port learns again, but the learned fdb entries are
locked, allowing user space to unlock hosts based seen MAC addresses.

This requires learning to be enabled on the port, and link-local
learning disabled for the bridge.

Add support to systemd-network for setting the new attribute for bridge
ports.
2025-01-28 12:22:26 +01:00
Jonas Gorski a434de6056 network: bridge: add support for IFLA_BRPORT_LOCKED
Since linux commit a21d9a670d81103db7f788de1a4a4a6e4b891a0b ("net:
bridge: Add support for bridge port in locked mode"), included since
v5.18,  it is possible to set bridge ports to locked.

Locked ports do not learn automatically, and discard any traffic from
unknown source MACs. To allow traffic, the userspace authenticator is
expected to create fdb entries for authenticated hosts.

Add support to systemd-network for setting the new attribute for bridge
ports.
2025-01-28 10:38:01 +01:00
Jonas Gorski d7de242ce7 network: bridge: add support for NO_LL_LEARN
When using locked ports on a bridge link-local learning needs to be
disabled to prevent the kernel from learning and automatically unlocking
hosts based on link-local traffic.

So add support for enabling NO_LL_LEARN for bridges.
2025-01-28 10:38:01 +01:00
Luca Boccassi 6566b4306a core: add trigger to path unit debug log
Useful for debugging, given it's already logging and the trigger
is known, add it
2025-01-28 07:23:50 +01:00
Adam Williamson f89d4c5f10 kbd-model-map: add a georgian mapping
https://github.com/legionus/kbd/pull/127 adds a Georgian mapping
to kbd. console-setup already has one. Let's support it here, so
it's used for Georgian installs on distros that use this table.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-01-28 07:23:16 +01:00
Lennart Poettering 31ce98f5f5 tty-ask-password-agent: use free_and_strdup_warn() for arg_device (#36198) 2025-01-28 07:22:17 +01:00
Mike Yuan ce8199a164 tty-ask-password-agent: use free_and_strdup_warn() for arg_device
Follow-up for 68cf1fc34d

Fixes CID#1590840
2025-01-28 02:23:57 +01:00
Mike Yuan 59bd932af2 tty-ask-password-agent: assert that ask_on_consoles() is called without arg_device 2025-01-28 02:10:29 +01:00
Nick Rosbrook 54401c6fdf resolved: add SubscribeDNSConfiguration to varlink API
Add a new method to io.systemd.Resolve.Monitor that allows subscribing
to changes in the systemd-resolved DNS configuration. The new method
emits the full DNS configuration (one entry for global configuration,
and one entry for each interface), any time the configuration is
updated.
2025-01-27 19:26:31 -05: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 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