1
0
mirror of https://github.com/systemd/systemd synced 2025-11-21 01:34:44 +01:00

Compare commits

...

33 Commits

Author SHA1 Message Date
Yu Watanabe
4a875b9b85 mkosi: bump fedora from 42 to 43
It seems
- the address sanitizer on fedora 42 reports false-positive, or
- probing partitions in libblkid 2.40.4 has a bug.

Not sure which causes the issue, but anyway the address sanitizer
kills udev-worker when sym_blkid_partition_get_name() is called
in udev-builtin-blkid.c.
```
systemd-udevd[488]: ==488==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ffdd716e020 at pc 0x563e3ca66fcb bp 0x7ffdd716d970 sp 0x7ffdd716d968
systemd-udevd[488]: READ of size 8 at 0x7ffdd716e020 thread T0 ((udev-worker))
(snip)
systemd-udevd[488]: HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
systemd-udevd[488]:       (longjmp and C++ exceptions *are* supported)
systemd-udevd[488]: SUMMARY: AddressSanitizer: stack-buffer-underflow (/usr/bin/udevadm+0x187fca) (BuildId: 1fb56dbdf0447aba1185d6e34560b782b76098be)
(snip)
systemd-udevd[488]: Command: (udev-worker)
systemd-udevd[488]: ==488==ABORTING
```

Let's bump fedora from 42 to 43.

Fixes mkosi fedora 42 job failures after c349edfe49dc2c4b8a79e5d08ecf7c8e93c4c909.

(cherry picked from commit 97940e77a9e347085a0b174bafa90a2823f43657)
2025-10-13 10:04:47 +02:00
Daan De Meyer
679ee7c5bb mkosi: Add stress-ng to sanitizer wrapper programs
(cherry picked from commit db35a83fe91f651cb98ac7a594dc5169ced34285)
2025-10-13 10:04:47 +02:00
Luca Boccassi
284652e947 mkosi: pull in new knot package for TEST-75-RESOLVED
5728s TEST-75-RESOLVED.sh[439]: /usr/lib/systemd/tests/testdata/units/TEST-75-RESOLVED.sh: line 154: keymgr: command not found

The command was split out into a new package

(cherry picked from commit 6602a5f7208edd456569343f61b7e5661b0ce299)
(cherry picked from commit 7151cbf5f7b8806f65e75c1407b50ab273dbd6b1)
2025-10-13 10:04:47 +02:00
Luca Boccassi
b4e2f92465 mkosi: pull in bsdutils for script, used by various integration tests
4971s TEST-74-AUX-UTILS.sh[1212]: + script -ec 'networkctl edit --runtime "$NETWORK_NAME"' /dev/null
4971s TEST-74-AUX-UTILS.sh[1269]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.networkctl.sh: line 55: script: command not found

Currently works due to a transitive dependency somewhere else
that is being dropped, pull it in directly given the tool is
used by the tests

(cherry picked from commit d5eb732724b22adca886c6e10941881b42b47c65)
(cherry picked from commit 94378de9392584f8abcf7a4652d268282de575a4)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
2124a0be7f hwdb: update to main@{2025-10-10}
git restore -s origin/main hwdb.d/ test/hwdb.d && git checkout hwdb.d/meson.build
2025-10-13 10:04:47 +02:00
Frantisek Sumsal
154828d95a man: fix a missing word
Follow-up for 6d48c7cf736ced70c1c2fef1e1f03618911d04bc.

(cherry picked from commit 67111e1bd918f9e1b4b542d1e0fe84f1d571876e)
(cherry picked from commit 89e8a47f7a456c6fab2346a4a6393aa32f796bf3)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
603034cc42 licensing: update address of FSF
rpmlint complains about the old address, even though it totally
doesn't matter and nobody cares.

(cherry picked from commit 4a8c41f3eb83aa1524501d9dc1c56c9026579f18)
(cherry picked from commit d4802151b0be56d79dc171880fa3df0ed6f5f8fa)
2025-10-13 10:04:47 +02:00
Yu Watanabe
61c0fba634 sysctl: add missing help entry for --strict
Follow-up for e88748c17e58aad6818e64fd3071de011808165e.

(cherry picked from commit 95c71c8f6e2f689789eb9f882c605252a83d5827)
(cherry picked from commit 91d1176b4f93a7eb6d507143735ca9c7fb862d6d)
2025-10-13 10:04:47 +02:00
jsks
9d7d85dda1 man: add sd_bus_track_handler_t signature to manpage (#39204)
This is consistent with how the other handler/callback types are
documented.

(cherry picked from commit fc890aedd3176e2c7fe465b268218aca30b006cd)
(cherry picked from commit c69ecfc6d3229bdedbf15aba99f21f32ef596700)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
d077c43214 man/sd-login: minor grammar updates
(cherry picked from commit 60597825ef87e53cb4b530888fcfe78a2a090da0)
(cherry picked from commit 98322a056182d4a2327b804aa9a88495cea68341)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
d7380c479f man: fix advice regarding thread safety of libsystemd
The prohibition to move libsystemd objects between threads was added in
64a7ef8bc06b5dcfcd9f99ea10a43bde75c4370f ('man: be more explicit about thread
safety of sd_journal'). At the time, this was valid, because we were using the
mempool for allocation and it apparently didn't handle access from different
threads. Sadlly, the commit links to a bugzilla entry referenced in the commit
is not publicly visible anymore, so the details are murky. But we stopped using
the mempool in a5d8835c78112206bbf0812dd4cb471f803bfe88 ('mempool: only enable
mempool use when linked to libsystemd-shared.so'), with subsequent followup in
b01f31954f1c7c4601925173ae2638b572224e9a ('Turn mempool_enabled() into a weak
symbol'). The restriction added in the man page is not necessary since then.

The text in the man page was arguably incorrect in calling the code
"thread-agnostic". If the code does not support being touched from threads at
all and has global state to tied to the main thread, it is not "agnostic", but
just doesn't support threads.

(I'm looking into https://github.com/systemd/python-systemd/issues/143, and
with the current scheme, the python-systemd module and all python code using
libsystemd would be very hard to use. With the change to free-threaded python
in python3.13, i.e. the replacement of single Global Interpreter Lock by
locking on individual objects, this limitation would become even more
constraining.)

(cherry picked from commit 4a3620c55a83317dc397f840bffe445a2ab1c038)
(cherry picked from commit ac74faec86169b8a5cf703171f4d8672fd99eb89)
2025-10-13 10:04:47 +02:00
Lennart Poettering
f80a90f560 man: document --prompt-new-user which was added back in v256
(cherry picked from commit 6f496236bc3241a9aa191d9e084f566771286d3a)
(cherry picked from commit f207d22c780c1a641d79bb5f1b759bc3d2c05d59)
2025-10-13 10:04:47 +02:00
Sebastian Gross
d5164f7aeb network-generator: ip: do not fail on ntp value
linux https://www.kernel.org/doc/html/latest/admin-guide/nfs/nfsroot.html
states `ntp0-ip` as parameter to `ip=` command line.

Until now systemd-network-generator would fail if ntp was provided with
-EINVAL due to trailing arguments.

Stay in line with kernel doc and handle ntp value properly.

(cherry picked from commit 582a1e187701b02ab3ed948dc452f1387848c788)
(cherry picked from commit 9face7bb648adf5e1fe99358b0f2ab46dfba80d5)
2025-10-13 10:04:47 +02:00
Anton Tiurin
8a7e86749e networkd: fia xRequiredOperationalStateForOnline serializtion
In integration tests (for example TEST-85-NETWORK-NetworkctlTests)

LINK_OPERSTATE_RANGE_INVALID and required_for_online == -1 are serialized as
```
"RequiredForOnline": "true",
"RequiredOperationalStateForOnline": [null, null]
```
Such link should be reported as required_for_online=False and not
serialize nulls.

(cherry picked from commit 59d946ee6b3612ef2fd646055e39282b0e0189ff)
(cherry picked from commit 2cd1762a1f87096226a66a67e101a6a40295a21c)
2025-10-13 10:04:47 +02:00
Anton Tiurin
f581542835 networkctl: change bitrate format from 'bps' to 'Bps'
(cherry picked from commit 9893859beb0de2d04d5e7c8f64412981a3f964a3)
(cherry picked from commit fc563bf78609250765dc905ecba85911d9529913)
2025-10-13 10:04:47 +02:00
Luca Boccassi
aa8fbe2851 fs-util: prefer glibc's fchmodat() if possible
Since v2.39 glibc's fchmodat() will call into the kernel's fchmodat2()
if flags are passed:

https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=65341f7bbea824d2ff9d37db15d8be162df42bd3;hp=c52c2c32db15aba8bbe1a0b4d3235f97d9c1a525

On older versions, if the flag is anything other than AT_SYMLINK_NOFOLLOW,
it returns EINVAL, so we can detect it and call the kernel syscall directly
ourselves.

Using the glibc wrappers when possible is prefereable so that programs
like fakeroot can intercept its calls and redirect them.

Follow-up for adecfb3bc0be0def49433277fcad5333893756cc

(cherry picked from commit 696b1263dc78858f96345a366933c66d53ae4899)
(cherry picked from commit b465e4816ea2e2e8c39ae348c6600ecd2dcd9c1b)
2025-10-13 10:04:47 +02:00
Joshua Krusell
700141e1ad Fix sd_bus_can_send signature in manpage
(cherry picked from commit e216876fc6b12a9153fb94f089bab7b41b50c19b)
(cherry picked from commit 0db08364fcd915edf691719d0281f4c209c2ae74)
2025-10-13 10:04:47 +02:00
Daan De Meyer
878a28d75e tree-wide: Fix two curl warnings
(cherry picked from commit 1403faeb152e24ef74230891cc6bf1875292324f)
(cherry picked from commit a45a2a9e652f31b251332633946f9db761a21897)
2025-10-13 10:04:47 +02:00
Andreas Schneider
3a7488a15f man: Point to the nss-systemd manpage for more details.
(cherry picked from commit 3b3af5d020c08327b1a50210fe807abb4a98db81)
(cherry picked from commit abaa3f14cb4ce7672dd06d5c3eaa7f909c84112e)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
1579c0717a basic/efivars: read EFI variables using one read(), not two
In https://github.com/systemd/systemd/issues/38842 it is reported that we're again
having trouble accessing EFI variables:
  [  292.212415] H (udev-worker)[253]: Reading EFI variable /sys/firmware/efi/efivars/LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
  ...
  [  344.397961] H (udev-worker)[253]: Detected slow EFI variable read access on LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f: 52.185510s

We don't know what causes the slowdown, but it seems reasonable to avoid
unnecessary read() calls. We would read the 4-byte attr first, and then the
actual value later. But our code always reads the value (and discards the attr
in all cases except one, when _writing_ the variable), so let's optimize for
the case where we read the value and read the whole contents in one readv().

(cherry picked from commit 9db9d6806e398465a6366dfc5bdde2e24338ac29)
(cherry picked from commit 61e8972bfceba0090ce297d8e30a7eafa47db074)
2025-10-13 10:04:47 +02:00
Luca Boccassi
dfe0eec246 repart: do not fail when CopyBlocks= is used in the initrd
When running in the initrd --root= is automatically set to /sysroot or /sysusr
but then using CopyBlocks fails due to a security measure:

root@particle-caba-1e47:~# systemd-repart --dry-run=no /dev/vda
No machine ID set, using randomized partition UUIDs.
Automatic discovery of backing block devices not permitted in --root= mode, refusing.

Follow-up for 5c08da586fc8fe7cda4010e0057cb79ba1d74335

(cherry picked from commit ab0ffca1308240455d6d423490300ea53b873f59)
(cherry picked from commit a513e7e57cc86da08aa151431c70c3d4862e3846)
2025-10-13 10:04:47 +02:00
Lennart Poettering
aa1691ef5d pull: fix SHA256SUMS fallback for file:// URLs
For file:// there's no http error code 404, but there's
CURLE_FILE_COULDNT_READ_FILE hence call ->on_not_found() in that case
too.

Follow-up for: c456862f87237831ce2bbaeb53a37d1b3d669285

(cherry picked from commit aa7574417b86ac0bb7ed492b7cfc872e9ace15d7)
(cherry picked from commit d43e0d7d58f9d7b42cacde29e25a64d926b19051)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
6802acdc31 networkctl: list drop unused dbus connection
Do not acquire dbus connection as it is unused in list_links

(cherry picked from commit 505deaff019dadfb9121cd3e265d6b3f7524f5fd)
(cherry picked from commit 708fb198c4050e51d1d4eabab8599c3bacc8c479)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
1b1c974974 sd-device: improve and downgrade error message
I'm seeing this in the initrd (with the dev_ksmg_record line added to clarify
where the error is coming from):
[    6.114232] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.2
[    6.116842] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.2".
[    6.134115] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.2".
[    6.139427] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.3
[    6.144327] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.3".
[    6.149442] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.3".
[    6.155091] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.3
[    6.160118] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.3".
[    6.164814] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.3".
[    6.169201] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.3
[    6.173990] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.3".
[    6.183104] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.3".
[    6.187746] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.3
[    6.192825] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.3".
[    6.197733] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.3".
[    6.203015] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.3
[    6.207184] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.3".
[    6.211943] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.3".
[    6.216703] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.4
[    6.221944] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.4".
[    6.226803] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.4".
[    6.231238] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.4
[    6.236078] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.4".
[    6.241845] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.4".
[    6.247976] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.4
[    6.252545] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.4".
[    6.256146] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.4".
[    6.260651] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.4
[    6.265151] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.4".
[    6.269755] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.4".
[    6.276206] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.4
[    6.280034] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.4".
[    6.284603] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.4".
[    6.288710] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.5
[    6.293312] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.5".
[    6.297763] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.5".
[    6.302438] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.5
[    6.306948] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.5".
[    6.310797] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.5".
[    6.315097] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.5
[    6.319033] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.5".
[    6.323593] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.5".
[    6.328834] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.5
[    6.333057] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.5".
[    6.337644] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.5".
[    6.341152] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.5
[    6.345436] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.5".
[    6.349824] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.5".
[    6.354306] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.6
[    6.358131] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.6".
[    6.366568] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.6".
[    6.371139] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.6
[    6.375207] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.6".
[    6.378681] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.6".
[    6.382820] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.6
[    6.387143] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.6".
[    6.392192] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.6".
[    6.397109] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.6
[    6.400991] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.6".
[    6.405992] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.6".
[    6.410889] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.6
[    6.414730] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.6".
[    6.418266] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.6".
[    6.422575] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.7
[    6.429942] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.7".
[    6.433780] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.7".
[    6.438509] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.7
[    6.442293] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.7".
[    6.447236] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.7".
[    6.453336] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.7
[    6.458031] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.7".
[    6.461948] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.7".
[    6.465883] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.7
[    6.470072] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.7".
[    6.476196] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.7".
[    6.481182] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:02.7
[    6.484938] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:02.7".
[    6.491322] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:02.7".
[    6.497289] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:03.0
[    6.501935] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:03.0".
[    6.505217] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:03.0".
[    6.509819] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:03.0
[    6.516078] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:03.0".
[    6.520942] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:03.0".
[    6.525178] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:03.0
[    6.528505] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:03.0".
[    6.534669] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:03.0".
[    6.539353] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:03.0
[    6.543035] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:03.0".
[    6.547441] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:03.0".
[    6.553211] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:03.0
[    6.557452] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/class/pci/0000:00:03.0".
[    6.562468] systemd-journald[251]: sd-device: Failed to chase symlinks in "/sys/firmware/pci/0000:00:03.0".
[    6.566955] systemd-journald[251]: dev_kmsg_record: kernel_device=+pci:0000:00:03.1
[    6.570846] systemd-journald[251]: Too many messages being logged to kmsg, ignoring

The error message was misleading, since it sounds like there's an issue with
symlinks, but the device simply doesn't exist. But I think we should suppress
the message altogether. journald spewing messages like this fills up the logs
for no benefit. The sd_device_new* functions can legitimately be used for
"invalid" devices, e.g. to check if they even exist. We have no idea for what
purpose the caller is creating the device object, so let's not log this at all.
The caller can log if appropriate.

(cherry picked from commit 75924efd5a8ddc796c5f2a179a50f137294c868c)
(cherry picked from commit 35f3a771fa53dbc753fe958fd50d24b9321dcc5c)
2025-10-13 10:04:47 +02:00
Danilo Spinella
a059f9b2ab boot: Strip boot counter from entry id
When boot counter is found in the boot entry filename, strip it from the
id to match bootctl id.

Fixes #38813.

(cherry picked from commit 4301ad00ef715885be5c3bdf84c152030b7d36ff)
(cherry picked from commit e67e5145675b1849a554aeab4a32badd7d260f9f)
2025-10-13 10:04:47 +02:00
Lennart Poettering
61a130d066 varlink: add IDL comments to basic Varlink service interface
(cherry picked from commit 23860b49753189e2aaf2e0c8d7b50fe6b1e5a065)
(cherry picked from commit b365d34a0cfd65a6a0f10bbc69751a33d0cb9f40)
2025-10-13 10:04:47 +02:00
Yu Watanabe
c0edaa95e6 macro: flip ONCE macro to make log_once() and friend actually log once
Previously, ONCE is false for the first time, and true for later times,
hence log_once() and log_once_errno() suppress logging in the first call,
rather than later calls.

Fortunately, ONCE macro is only used in log_once() and log_once_errno(),
hence this only fixes spurious logging.

(cherry picked from commit acd33c5df8ba35bcfa595ea0be9f74afa6aab289)
(cherry picked from commit d21fa647d204f9d7275a5370580e9211ffe14aec)
2025-10-13 10:04:47 +02:00
Zbigniew Jędrzejewski-Szmek
dbe579dc4e journalctl: fix erroneuous mention of "local" hostnames
--no-hostname applies equally to remote and local logs.

This change is a separate commit to make it easy to backport.

(cherry picked from commit 8b6c1d392e1471876b57648b2102fe36f39c5cba)
(cherry picked from commit c32062c5334bc23f9eeb42233509d05545fc1db4)
2025-10-13 10:04:47 +02:00
Yu Watanabe
dc29cbed80 udev-config: use secure_getenv() at one more place
Follow-up for b16c6076cb334c9da9602d4bafbf60381d6d630e.

(cherry picked from commit 052b15f4fefd3981ec45bbac5155fe6ec061e2cf)
2025-10-13 10:04:47 +02:00
Yu Watanabe
c568ea1857 test: add test cases for path_is_root_at()
Prompted by PR #29842 and issue #29559.

(cherry picked from commit d486ae5adfc198915caa466b4fe2a34b53cb47f4)
2025-10-13 10:04:47 +02:00
Lennart Poettering
acd810391b fd-util: fix path_is_root_at() when dealing with detached mounts
path_is_root_at() is supposed to detect if the inode referenced by the
specified fd is the "root inode". For that it checks if the inode and
its parent are the same inode and the same mount. Traditionally this
check was correct. But these days we actually have detached mounts (i.e.
those returned by fsmount() and related calls), whose root inode also
behaves like that.

Our uses for path_is_root_at() use the function to detect if an absolute
path would be identical to a relative path based on the specified fd
(specifically: chaseat()), which goes really wrong if used on a detached
mount.

hence, let's adjust the function a bit, and let's go by path to "/" to
check if the referenced inode is the actual root inode in our chroot.

(cherry picked from commit e1f3d790f35234a380ddfb909ae5fa95a2538c1a)
2025-10-13 10:04:47 +02:00
Luca Boccassi
ee2e4a1351 sysext: do not attempt to unlock images interactively
These images are not using a passphrase, they are using keys
or at most TPM-based sealing (not yet implemented, for contexts).

Do not use the interactive helper, as it will block and ask the
user for a password if it fails to find the signing cert, which
is not useful for this tool.

Fixes https://github.com/systemd/systemd/issues/33179

(cherry picked from commit 09f655ad4af59ef4ff8ebd02ca5421f8901cb16b)
2025-10-13 10:04:47 +02:00
Luca Boccassi
0844e077a6 Update syscall numbers
ninja -C build update-syscall-tables update-syscall-header

(cherry picked from commit 01caeddbe33aae69b2e1a2ee580330967fc0d363)
2025-10-13 10:04:47 +02:00
72 changed files with 4984 additions and 2026 deletions

View File

@ -87,7 +87,7 @@ jobs:
relabel: no relabel: no
vm: 0 vm: 0
- distro: fedora - distro: fedora
release: "42" release: "43"
sanitizers: address,undefined sanitizers: address,undefined
llvm: 1 llvm: 1
cflags: "-Og" cflags: "-Og"

View File

@ -2,7 +2,7 @@
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.

View File

@ -2,7 +2,7 @@
Version 2.1, February 1999 Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc. Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@ -485,7 +485,7 @@ convey the exclusion of warranty; and each file should have at least the
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.

View File

@ -3,7 +3,7 @@ GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc. Copyright (C) 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
@ -158,7 +158,7 @@ To apply these terms, attach the following notices to the library. It is safest
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.

File diff suppressed because it is too large Load Diff

View File

@ -396,6 +396,9 @@ acpi:UBLX*:
acpi:UBOO*: acpi:UBOO*:
ID_VENDOR_FROM_DATABASE=Das U-Boot ID_VENDOR_FROM_DATABASE=Das U-Boot
acpi:ULRV*:
ID_VENDOR_FROM_DATABASE=UltraRISC Technology (Shanghai) Co., Ltd
acpi:VAIO*: acpi:VAIO*:
ID_VENDOR_FROM_DATABASE=VAIO Corporation ID_VENDOR_FROM_DATABASE=VAIO Corporation

View File

@ -1,5 +1,5 @@
--- 20-acpi-vendor.hwdb.base 2025-08-20 13:04:02.003302877 +0100 --- 20-acpi-vendor.hwdb.base 2025-09-17 09:39:11.942879943 +0100
+++ 20-acpi-vendor.hwdb 2025-08-20 13:04:02.007302969 +0100 +++ 20-acpi-vendor.hwdb 2025-09-17 09:39:11.950880802 +0100
@@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
# Data imported from: # Data imported from:
# https://uefi.org/uefi-pnp-export # https://uefi.org/uefi-pnp-export
@ -19,7 +19,7 @@
acpi:AMDI*: acpi:AMDI*:
ID_VENDOR_FROM_DATABASE=AMD ID_VENDOR_FROM_DATABASE=AMD
@@ -424,6 +423,9 @@ @@ -427,6 +426,9 @@
acpi:AAA*: acpi:AAA*:
ID_VENDOR_FROM_DATABASE=Avolites Ltd ID_VENDOR_FROM_DATABASE=Avolites Ltd
@ -29,7 +29,7 @@
acpi:AAE*: acpi:AAE*:
ID_VENDOR_FROM_DATABASE=Anatek Electronics Inc. ID_VENDOR_FROM_DATABASE=Anatek Electronics Inc.
@@ -451,6 +453,9 @@ @@ -454,6 +456,9 @@
acpi:ABO*: acpi:ABO*:
ID_VENDOR_FROM_DATABASE=D-Link Systems Inc ID_VENDOR_FROM_DATABASE=D-Link Systems Inc
@ -39,7 +39,7 @@
acpi:ABS*: acpi:ABS*:
ID_VENDOR_FROM_DATABASE=Abaco Systems, Inc. ID_VENDOR_FROM_DATABASE=Abaco Systems, Inc.
@@ -496,7 +501,7 @@ @@ -499,7 +504,7 @@
acpi:ACO*: acpi:ACO*:
ID_VENDOR_FROM_DATABASE=Allion Computer Inc. ID_VENDOR_FROM_DATABASE=Allion Computer Inc.
@ -48,7 +48,7 @@
ID_VENDOR_FROM_DATABASE=Aspen Tech Inc ID_VENDOR_FROM_DATABASE=Aspen Tech Inc
acpi:ACR*: acpi:ACR*:
@@ -775,6 +780,9 @@ @@ -778,6 +783,9 @@
acpi:AMT*: acpi:AMT*:
ID_VENDOR_FROM_DATABASE=AMT International Industry ID_VENDOR_FROM_DATABASE=AMT International Industry
@ -58,7 +58,7 @@
acpi:AMX*: acpi:AMX*:
ID_VENDOR_FROM_DATABASE=AMX LLC ID_VENDOR_FROM_DATABASE=AMX LLC
@@ -823,6 +831,9 @@ @@ -826,6 +834,9 @@
acpi:AOA*: acpi:AOA*:
ID_VENDOR_FROM_DATABASE=AOpen Inc. ID_VENDOR_FROM_DATABASE=AOpen Inc.
@ -68,7 +68,7 @@
acpi:AOE*: acpi:AOE*:
ID_VENDOR_FROM_DATABASE=Advanced Optics Electronics, Inc. ID_VENDOR_FROM_DATABASE=Advanced Optics Electronics, Inc.
@@ -832,6 +843,9 @@ @@ -835,6 +846,9 @@
acpi:AOT*: acpi:AOT*:
ID_VENDOR_FROM_DATABASE=Alcatel ID_VENDOR_FROM_DATABASE=Alcatel
@ -78,7 +78,7 @@
acpi:APC*: acpi:APC*:
ID_VENDOR_FROM_DATABASE=American Power Conversion ID_VENDOR_FROM_DATABASE=American Power Conversion
@@ -1013,7 +1027,7 @@ @@ -1016,7 +1030,7 @@
ID_VENDOR_FROM_DATABASE=ALPS ALPINE CO., LTD. ID_VENDOR_FROM_DATABASE=ALPS ALPINE CO., LTD.
acpi:AUO*: acpi:AUO*:
@ -87,7 +87,7 @@
acpi:AUR*: acpi:AUR*:
ID_VENDOR_FROM_DATABASE=Aureal Semiconductor ID_VENDOR_FROM_DATABASE=Aureal Semiconductor
@@ -1093,6 +1107,9 @@ @@ -1096,6 +1110,9 @@
acpi:AXE*: acpi:AXE*:
ID_VENDOR_FROM_DATABASE=Axell Corporation ID_VENDOR_FROM_DATABASE=Axell Corporation
@ -97,7 +97,7 @@
acpi:AXI*: acpi:AXI*:
ID_VENDOR_FROM_DATABASE=American Magnetics ID_VENDOR_FROM_DATABASE=American Magnetics
@@ -1252,6 +1269,9 @@ @@ -1255,6 +1272,9 @@
acpi:BML*: acpi:BML*:
ID_VENDOR_FROM_DATABASE=BIOMED Lab ID_VENDOR_FROM_DATABASE=BIOMED Lab
@ -107,7 +107,7 @@
acpi:BMS*: acpi:BMS*:
ID_VENDOR_FROM_DATABASE=BIOMEDISYS ID_VENDOR_FROM_DATABASE=BIOMEDISYS
@@ -1264,6 +1284,9 @@ @@ -1267,6 +1287,9 @@
acpi:BNO*: acpi:BNO*:
ID_VENDOR_FROM_DATABASE=Bang & Olufsen ID_VENDOR_FROM_DATABASE=Bang & Olufsen
@ -117,7 +117,7 @@
acpi:BNS*: acpi:BNS*:
ID_VENDOR_FROM_DATABASE=Boulder Nonlinear Systems ID_VENDOR_FROM_DATABASE=Boulder Nonlinear Systems
@@ -1510,6 +1533,9 @@ @@ -1513,6 +1536,9 @@
acpi:CHA*: acpi:CHA*:
ID_VENDOR_FROM_DATABASE=Chase Research PLC ID_VENDOR_FROM_DATABASE=Chase Research PLC
@ -127,7 +127,7 @@
acpi:CHD*: acpi:CHD*:
ID_VENDOR_FROM_DATABASE=ChangHong Electric Co.,Ltd ID_VENDOR_FROM_DATABASE=ChangHong Electric Co.,Ltd
@@ -1675,6 +1701,9 @@ @@ -1678,6 +1704,9 @@
acpi:COD*: acpi:COD*:
ID_VENDOR_FROM_DATABASE=CODAN Pty. Ltd. ID_VENDOR_FROM_DATABASE=CODAN Pty. Ltd.
@ -137,7 +137,7 @@
acpi:COI*: acpi:COI*:
ID_VENDOR_FROM_DATABASE=Codec Inc. ID_VENDOR_FROM_DATABASE=Codec Inc.
@@ -2093,7 +2122,7 @@ @@ -2096,7 +2125,7 @@
ID_VENDOR_FROM_DATABASE=Dragon Information Technology ID_VENDOR_FROM_DATABASE=Dragon Information Technology
acpi:DJE*: acpi:DJE*:
@ -146,7 +146,7 @@
acpi:DJP*: acpi:DJP*:
ID_VENDOR_FROM_DATABASE=Maygay Machines, Ltd ID_VENDOR_FROM_DATABASE=Maygay Machines, Ltd
@@ -2446,6 +2475,9 @@ @@ -2449,6 +2478,9 @@
acpi:EIN*: acpi:EIN*:
ID_VENDOR_FROM_DATABASE=Elegant Invention ID_VENDOR_FROM_DATABASE=Elegant Invention
@ -156,7 +156,7 @@
acpi:EKA*: acpi:EKA*:
ID_VENDOR_FROM_DATABASE=MagTek Inc. ID_VENDOR_FROM_DATABASE=MagTek Inc.
@@ -2716,6 +2748,9 @@ @@ -2719,6 +2751,9 @@
acpi:FCG*: acpi:FCG*:
ID_VENDOR_FROM_DATABASE=First International Computer Ltd ID_VENDOR_FROM_DATABASE=First International Computer Ltd
@ -166,7 +166,7 @@
acpi:FCS*: acpi:FCS*:
ID_VENDOR_FROM_DATABASE=Focus Enhancements, Inc. ID_VENDOR_FROM_DATABASE=Focus Enhancements, Inc.
@@ -3092,7 +3127,7 @@ @@ -3095,7 +3130,7 @@
ID_VENDOR_FROM_DATABASE=General Standards Corporation ID_VENDOR_FROM_DATABASE=General Standards Corporation
acpi:GSM*: acpi:GSM*:
@ -175,7 +175,7 @@
acpi:GSN*: acpi:GSN*:
ID_VENDOR_FROM_DATABASE=Grandstream Networks, Inc. ID_VENDOR_FROM_DATABASE=Grandstream Networks, Inc.
@@ -3202,6 +3237,9 @@ @@ -3205,6 +3240,9 @@
acpi:HEC*: acpi:HEC*:
ID_VENDOR_FROM_DATABASE=Hisense Electric Co., Ltd. ID_VENDOR_FROM_DATABASE=Hisense Electric Co., Ltd.
@ -185,7 +185,7 @@
acpi:HEL*: acpi:HEL*:
ID_VENDOR_FROM_DATABASE=Hitachi Micro Systems Europe Ltd ID_VENDOR_FROM_DATABASE=Hitachi Micro Systems Europe Ltd
@@ -3337,6 +3375,9 @@ @@ -3340,6 +3378,9 @@
acpi:HSD*: acpi:HSD*:
ID_VENDOR_FROM_DATABASE=HannStar Display Corp ID_VENDOR_FROM_DATABASE=HannStar Display Corp
@ -195,7 +195,7 @@
acpi:HSM*: acpi:HSM*:
ID_VENDOR_FROM_DATABASE=AT&T Microelectronics ID_VENDOR_FROM_DATABASE=AT&T Microelectronics
@@ -3463,6 +3504,9 @@ @@ -3466,6 +3507,9 @@
acpi:ICI*: acpi:ICI*:
ID_VENDOR_FROM_DATABASE=Infotek Communication Inc ID_VENDOR_FROM_DATABASE=Infotek Communication Inc
@ -205,7 +205,7 @@
acpi:ICM*: acpi:ICM*:
ID_VENDOR_FROM_DATABASE=Intracom SA ID_VENDOR_FROM_DATABASE=Intracom SA
@@ -3559,6 +3603,9 @@ @@ -3562,6 +3606,9 @@
acpi:IKE*: acpi:IKE*:
ID_VENDOR_FROM_DATABASE=Ikegami Tsushinki Co. Ltd. ID_VENDOR_FROM_DATABASE=Ikegami Tsushinki Co. Ltd.
@ -215,7 +215,7 @@
acpi:IKS*: acpi:IKS*:
ID_VENDOR_FROM_DATABASE=Ikos Systems Inc ID_VENDOR_FROM_DATABASE=Ikos Systems Inc
@@ -3607,6 +3654,9 @@ @@ -3610,6 +3657,9 @@
acpi:IMX*: acpi:IMX*:
ID_VENDOR_FROM_DATABASE=arpara Technology Co., Ltd. ID_VENDOR_FROM_DATABASE=arpara Technology Co., Ltd.
@ -225,7 +225,7 @@
acpi:INA*: acpi:INA*:
ID_VENDOR_FROM_DATABASE=Inventec Corporation ID_VENDOR_FROM_DATABASE=Inventec Corporation
@@ -4135,6 +4185,9 @@ @@ -4138,6 +4188,9 @@
acpi:LAN*: acpi:LAN*:
ID_VENDOR_FROM_DATABASE=Sodeman Lancom Inc ID_VENDOR_FROM_DATABASE=Sodeman Lancom Inc
@ -235,7 +235,7 @@
acpi:LAS*: acpi:LAS*:
ID_VENDOR_FROM_DATABASE=LASAT Comm. A/S ID_VENDOR_FROM_DATABASE=LASAT Comm. A/S
@@ -4186,6 +4239,9 @@ @@ -4189,6 +4242,9 @@
acpi:LED*: acpi:LED*:
ID_VENDOR_FROM_DATABASE=Long Engineering Design Inc ID_VENDOR_FROM_DATABASE=Long Engineering Design Inc
@ -245,7 +245,7 @@
acpi:LEG*: acpi:LEG*:
ID_VENDOR_FROM_DATABASE=Legerity, Inc ID_VENDOR_FROM_DATABASE=Legerity, Inc
@@ -4204,6 +4260,9 @@ @@ -4207,6 +4263,9 @@
acpi:LGD*: acpi:LGD*:
ID_VENDOR_FROM_DATABASE=LG Display ID_VENDOR_FROM_DATABASE=LG Display
@ -255,7 +255,7 @@
acpi:LGI*: acpi:LGI*:
ID_VENDOR_FROM_DATABASE=Logitech Inc ID_VENDOR_FROM_DATABASE=Logitech Inc
@@ -4270,6 +4329,9 @@ @@ -4273,6 +4332,9 @@
acpi:LND*: acpi:LND*:
ID_VENDOR_FROM_DATABASE=Land Computer Company Ltd ID_VENDOR_FROM_DATABASE=Land Computer Company Ltd
@ -265,7 +265,7 @@
acpi:LNK*: acpi:LNK*:
ID_VENDOR_FROM_DATABASE=Link Tech Inc ID_VENDOR_FROM_DATABASE=Link Tech Inc
@@ -4304,7 +4366,7 @@ @@ -4307,7 +4369,7 @@
ID_VENDOR_FROM_DATABASE=Design Technology ID_VENDOR_FROM_DATABASE=Design Technology
acpi:LPL*: acpi:LPL*:
@ -274,7 +274,7 @@
acpi:LSC*: acpi:LSC*:
ID_VENDOR_FROM_DATABASE=LifeSize Communications ID_VENDOR_FROM_DATABASE=LifeSize Communications
@@ -4480,6 +4542,9 @@ @@ -4483,6 +4545,9 @@
acpi:MCX*: acpi:MCX*:
ID_VENDOR_FROM_DATABASE=Millson Custom Solutions Inc. ID_VENDOR_FROM_DATABASE=Millson Custom Solutions Inc.
@ -284,7 +284,7 @@
acpi:MDA*: acpi:MDA*:
ID_VENDOR_FROM_DATABASE=Media4 Inc ID_VENDOR_FROM_DATABASE=Media4 Inc
@@ -4726,6 +4791,9 @@ @@ -4729,6 +4794,9 @@
acpi:MOM*: acpi:MOM*:
ID_VENDOR_FROM_DATABASE=Momentum Data Systems ID_VENDOR_FROM_DATABASE=Momentum Data Systems
@ -294,7 +294,7 @@
acpi:MOS*: acpi:MOS*:
ID_VENDOR_FROM_DATABASE=Moses Corporation ID_VENDOR_FROM_DATABASE=Moses Corporation
@@ -4966,6 +5034,9 @@ @@ -4969,6 +5037,9 @@
acpi:NAL*: acpi:NAL*:
ID_VENDOR_FROM_DATABASE=Network Alchemy ID_VENDOR_FROM_DATABASE=Network Alchemy
@ -304,7 +304,7 @@
acpi:NAT*: acpi:NAT*:
ID_VENDOR_FROM_DATABASE=NaturalPoint Inc. ID_VENDOR_FROM_DATABASE=NaturalPoint Inc.
@@ -5506,6 +5577,9 @@ @@ -5509,6 +5580,9 @@
acpi:PCX*: acpi:PCX*:
ID_VENDOR_FROM_DATABASE=PC Xperten ID_VENDOR_FROM_DATABASE=PC Xperten
@ -314,7 +314,7 @@
acpi:PDM*: acpi:PDM*:
ID_VENDOR_FROM_DATABASE=Psion Dacom Plc. ID_VENDOR_FROM_DATABASE=Psion Dacom Plc.
@@ -5569,9 +5643,6 @@ @@ -5572,9 +5646,6 @@
acpi:PHE*: acpi:PHE*:
ID_VENDOR_FROM_DATABASE=Philips Medical Systems Boeblingen GmbH ID_VENDOR_FROM_DATABASE=Philips Medical Systems Boeblingen GmbH
@ -324,7 +324,7 @@
acpi:PHL*: acpi:PHL*:
ID_VENDOR_FROM_DATABASE=Philips Consumer Electronics Company ID_VENDOR_FROM_DATABASE=Philips Consumer Electronics Company
@@ -5662,9 +5733,6 @@ @@ -5665,9 +5736,6 @@
acpi:PNL*: acpi:PNL*:
ID_VENDOR_FROM_DATABASE=Panelview, Inc. ID_VENDOR_FROM_DATABASE=Panelview, Inc.
@ -334,7 +334,7 @@
acpi:PNR*: acpi:PNR*:
ID_VENDOR_FROM_DATABASE=Planar Systems, Inc. ID_VENDOR_FROM_DATABASE=Planar Systems, Inc.
@@ -6142,9 +6210,6 @@ @@ -6145,9 +6213,6 @@
acpi:RTI*: acpi:RTI*:
ID_VENDOR_FROM_DATABASE=Rancho Tech Inc ID_VENDOR_FROM_DATABASE=Rancho Tech Inc
@ -344,7 +344,7 @@
acpi:RTL*: acpi:RTL*:
ID_VENDOR_FROM_DATABASE=Realtek Semiconductor Company Ltd ID_VENDOR_FROM_DATABASE=Realtek Semiconductor Company Ltd
@@ -6319,9 +6384,6 @@ @@ -6322,9 +6387,6 @@
acpi:SEE*: acpi:SEE*:
ID_VENDOR_FROM_DATABASE=SeeColor Corporation ID_VENDOR_FROM_DATABASE=SeeColor Corporation
@ -354,7 +354,7 @@
acpi:SEI*: acpi:SEI*:
ID_VENDOR_FROM_DATABASE=Seitz & Associates Inc ID_VENDOR_FROM_DATABASE=Seitz & Associates Inc
@@ -6805,6 +6867,9 @@ @@ -6808,6 +6870,9 @@
acpi:SVD*: acpi:SVD*:
ID_VENDOR_FROM_DATABASE=SVD Computer ID_VENDOR_FROM_DATABASE=SVD Computer
@ -364,7 +364,7 @@
acpi:SVI*: acpi:SVI*:
ID_VENDOR_FROM_DATABASE=Sun Microsystems ID_VENDOR_FROM_DATABASE=Sun Microsystems
@@ -6889,6 +6954,9 @@ @@ -6892,6 +6957,9 @@
acpi:SZM*: acpi:SZM*:
ID_VENDOR_FROM_DATABASE=Shenzhen MTC Co., Ltd ID_VENDOR_FROM_DATABASE=Shenzhen MTC Co., Ltd
@ -374,7 +374,7 @@
acpi:TAA*: acpi:TAA*:
ID_VENDOR_FROM_DATABASE=Tandberg ID_VENDOR_FROM_DATABASE=Tandberg
@@ -6979,6 +7047,9 @@ @@ -6982,6 +7050,9 @@
acpi:TDG*: acpi:TDG*:
ID_VENDOR_FROM_DATABASE=Six15 Technologies ID_VENDOR_FROM_DATABASE=Six15 Technologies
@ -384,7 +384,7 @@
acpi:TDM*: acpi:TDM*:
ID_VENDOR_FROM_DATABASE=Tandem Computer Europe Inc ID_VENDOR_FROM_DATABASE=Tandem Computer Europe Inc
@@ -7021,6 +7092,9 @@ @@ -7024,6 +7095,9 @@
acpi:TEV*: acpi:TEV*:
ID_VENDOR_FROM_DATABASE=Televés, S.A. ID_VENDOR_FROM_DATABASE=Televés, S.A.
@ -394,7 +394,7 @@
acpi:TEZ*: acpi:TEZ*:
ID_VENDOR_FROM_DATABASE=Tech Source Inc. ID_VENDOR_FROM_DATABASE=Tech Source Inc.
@@ -7150,9 +7224,6 @@ @@ -7153,9 +7227,6 @@
acpi:TNC*: acpi:TNC*:
ID_VENDOR_FROM_DATABASE=TNC Industrial Company Ltd ID_VENDOR_FROM_DATABASE=TNC Industrial Company Ltd
@ -404,7 +404,7 @@
acpi:TNM*: acpi:TNM*:
ID_VENDOR_FROM_DATABASE=TECNIMAGEN SA ID_VENDOR_FROM_DATABASE=TECNIMAGEN SA
@@ -7465,14 +7536,14 @@ @@ -7468,14 +7539,14 @@
acpi:UNC*: acpi:UNC*:
ID_VENDOR_FROM_DATABASE=Unisys Corporation ID_VENDOR_FROM_DATABASE=Unisys Corporation
@ -425,7 +425,7 @@
acpi:UNI*: acpi:UNI*:
ID_VENDOR_FROM_DATABASE=Uniform Industry Corp. ID_VENDOR_FROM_DATABASE=Uniform Industry Corp.
@@ -7507,6 +7578,9 @@ @@ -7510,6 +7581,9 @@
acpi:USA*: acpi:USA*:
ID_VENDOR_FROM_DATABASE=Utimaco Safeware AG ID_VENDOR_FROM_DATABASE=Utimaco Safeware AG
@ -435,7 +435,7 @@
acpi:USD*: acpi:USD*:
ID_VENDOR_FROM_DATABASE=U.S. Digital Corporation ID_VENDOR_FROM_DATABASE=U.S. Digital Corporation
@@ -7768,9 +7842,6 @@ @@ -7771,9 +7845,6 @@
acpi:WAL*: acpi:WAL*:
ID_VENDOR_FROM_DATABASE=Wave Access ID_VENDOR_FROM_DATABASE=Wave Access
@ -445,7 +445,7 @@
acpi:WAV*: acpi:WAV*:
ID_VENDOR_FROM_DATABASE=Wavephore ID_VENDOR_FROM_DATABASE=Wavephore
@@ -7898,7 +7969,7 @@ @@ -7901,7 +7972,7 @@
ID_VENDOR_FROM_DATABASE=WyreStorm Technologies LLC ID_VENDOR_FROM_DATABASE=WyreStorm Technologies LLC
acpi:WYS*: acpi:WYS*:
@ -454,7 +454,7 @@
acpi:WYT*: acpi:WYT*:
ID_VENDOR_FROM_DATABASE=Wooyoung Image & Information Co.,Ltd. ID_VENDOR_FROM_DATABASE=Wooyoung Image & Information Co.,Ltd.
@@ -7912,9 +7983,6 @@ @@ -7915,9 +7986,6 @@
acpi:XDM*: acpi:XDM*:
ID_VENDOR_FROM_DATABASE=XDM Ltd. ID_VENDOR_FROM_DATABASE=XDM Ltd.
@ -464,7 +464,7 @@
acpi:XES*: acpi:XES*:
ID_VENDOR_FROM_DATABASE=Extreme Engineering Solutions, Inc. ID_VENDOR_FROM_DATABASE=Extreme Engineering Solutions, Inc.
@@ -7948,9 +8016,6 @@ @@ -7951,9 +8019,6 @@
acpi:XNT*: acpi:XNT*:
ID_VENDOR_FROM_DATABASE=XN Technologies, Inc. ID_VENDOR_FROM_DATABASE=XN Technologies, Inc.
@ -474,7 +474,7 @@
acpi:XQU*: acpi:XQU*:
ID_VENDOR_FROM_DATABASE=SHANGHAI SVA-DAV ELECTRONICS CO., LTD ID_VENDOR_FROM_DATABASE=SHANGHAI SVA-DAV ELECTRONICS CO., LTD
@@ -8017,6 +8082,9 @@ @@ -8020,6 +8085,9 @@
acpi:ZBX*: acpi:ZBX*:
ID_VENDOR_FROM_DATABASE=Zebax Technologies ID_VENDOR_FROM_DATABASE=Zebax Technologies

View File

@ -40403,9 +40403,15 @@ usb:v0B0Dp0000*
usb:v0B0E* usb:v0B0E*
ID_VENDOR_FROM_DATABASE=GN Netcom ID_VENDOR_FROM_DATABASE=GN Netcom
usb:v0B0Ep0301*
ID_MODEL_FROM_DATABASE=Jabra EVOLVE 20
usb:v0B0Ep0305* usb:v0B0Ep0305*
ID_MODEL_FROM_DATABASE=Jabra EVOLVE Link MS ID_MODEL_FROM_DATABASE=Jabra EVOLVE Link MS
usb:v0B0Ep030C*
ID_MODEL_FROM_DATABASE=Jabra EVOLVE 65
usb:v0B0Ep0311* usb:v0B0Ep0311*
ID_MODEL_FROM_DATABASE=Jabra EVOLVE 65 ID_MODEL_FROM_DATABASE=Jabra EVOLVE 65
@ -40460,6 +40466,21 @@ usb:v0B0Ep2456*
usb:v0B0Ep245E* usb:v0B0Ep245E*
ID_MODEL_FROM_DATABASE=Jabra Link 370 ID_MODEL_FROM_DATABASE=Jabra Link 370
usb:v0B0Ep248A*
ID_MODEL_FROM_DATABASE=Jabra Elite 85h
usb:v0B0Ep24B8*
ID_MODEL_FROM_DATABASE=Jabra Evolve2 65
usb:v0B0Ep24BB*
ID_MODEL_FROM_DATABASE=Jabra Evolve2 85
usb:v0B0Ep24C9*
ID_MODEL_FROM_DATABASE=Jabra Link 380
usb:v0B0Ep24CA*
ID_MODEL_FROM_DATABASE=Jabra Link 380
usb:v0B0Ep620C* usb:v0B0Ep620C*
ID_MODEL_FROM_DATABASE=Jabra BT620s ID_MODEL_FROM_DATABASE=Jabra BT620s

View File

@ -778,6 +778,10 @@ sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80XE:*
sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80U1:* sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80U1:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
# Legion Go
sensor:modalias:platform:HID-SENSOR-200073:dmi:*svnLENOVO:pn83E1:*
ACCEL_MOUNT_MATRIX=0,1,0;-1,0,0;0,0,1
# Yoga 300-11IBR, display sensor # Yoga 300-11IBR, display sensor
sensor:modalias:acpi:DUAL250E*:dmi:*:svnLENOVO:*:pvrLenovoYoga300-11IBR:* sensor:modalias:acpi:DUAL250E*:dmi:*:svnLENOVO:*:pvrLenovoYoga300-11IBR:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
@ -1050,6 +1054,11 @@ sensor:modalias:acpi:KIOX010A*:dmi:bvn*:bvr*:svnPositivoTecnologiaSA:pn*:pvr*:rv
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
ACCEL_LOCATION=display ACCEL_LOCATION=display
# Positivo Duo K116J
sensor:modalias:acpi:MDA6655*:dmi:bvn*:bvr*:svnPositivoTecnologiaSA:pn*:pvr*:rvnPositivoTecnologiaSA:rnK116J*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
ACCEL_LOCATION=display
######################################## ########################################
# Predia # Predia
######################################### #########################################

View File

@ -16,6 +16,61 @@
usb:v1209p4D69* usb:v1209p4D69*
ID_SIGNAL_ANALYZER=1 ID_SIGNAL_ANALYZER=1
###########################################################
# Hantek DSO-6022 oscilloscopes and compatible devices
###########################################################
# Hantek DSO-6022BE w/o FW
usb:v04B4p6022*
ID_SIGNAL_ANALYZER=1
# Hantek DSO-6022BE with FW
usb:v04B5p6022*
ID_SIGNAL_ANALYZER=1
# Hantek DSO-6022BL w/o FW
usb:v04B4p602A*
ID_SIGNAL_ANALYZER=1
# Hantek DSO-6022BL with FW
usb:v04B5p602A*
ID_SIGNAL_ANALYZER=1
# Hantek DSO-6021 w/o FW
usb:v04B4p6021*
ID_SIGNAL_ANALYZER=1
# Hantek DSO-6021 with FW
usb:v04B5p6021*
ID_SIGNAL_ANALYZER=1
# Voltcraft DSO-2020, w/o FW, becomes DSO-6022BE with FW
usb:v04B4p2020*
ID_SIGNAL_ANALYZER=1
# YiXingDianZiKeJi MDSO w/o FW
usb:vD4A2p5660*
ID_SIGNAL_ANALYZER=1
# YiXingDianZiKeJi MDSO with FW
usb:v1D50p608E*
ID_SIGNAL_ANALYZER=1
# BUUDAI DDS120 w/o FW
usb:v8102p8102*
ID_SIGNAL_ANALYZER=1
# BUUDAI DDS120 with FW
usb:v04B5p0120*
ID_SIGNAL_ANALYZER=1
# Instrustar isds-205b w/o FW
usb:vD4A2p5661*
ID_SIGNAL_ANALYZER=1
# Instrustar isds-205b with FW
usb:v1D50p1D50*
ID_SIGNAL_ANALYZER=1
########################################################### ###########################################################
# Total Phase # Total Phase
########################################################### ###########################################################

View File

@ -821,6 +821,20 @@ mouse:usb:v22d4p1308:name:Laview Technology Mionix Avior 7000:*
mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:* mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:*
MOUSE_DPI=*800@126 1600@126 MOUSE_DPI=*800@126 1600@126
##########################################
# Nulea
##########################################
# Note: it is possible that other devices may use the same wireless dongle,
# as such this could require revisiting if it causes issues with other mice
# Nulea M501 Wireless Trackball (USB Receiver)
mouse:usb:v25a7pfa61:name:Compx 2.4G Receiver Mouse:*
ID_INPUT_TRACKBALL=1
# Nulea M501 Wireless Trackball (Bluetooth)
mouse:bluetooth:v000ep3412:name:Nulea BT5.0 Mouse:*
ID_INPUT_TRACKBALL=1
########################################## ##########################################
# Oklick # Oklick
########################################## ##########################################

View File

@ -21,6 +21,17 @@
# Allowed properties are: # Allowed properties are:
# ID_SOFTWARE_RADIO=0|1 # ID_SOFTWARE_RADIO=0|1
##########################################
# Airspy
##########################################
# Airspy R2
usb:v1D50p60A1*
ID_SOFTWARE_RADIO=1
# Airspy HF+
usb:v03EBp800C*
ID_SOFTWARE_RADIO=1
########################################## ##########################################
# Analog Devices # Analog Devices
########################################## ##########################################
@ -48,10 +59,54 @@ usb:v2500p0002*
usb:v2500p0020* usb:v2500p0020*
usb:v2500p0021* usb:v2500p0021*
usb:v2500p0022* usb:v2500p0022*
usb:v2500p0023*
usb:v3923p7813* usb:v3923p7813*
usb:v3923p7814* usb:v3923p7814*
ID_SOFTWARE_RADIO=1 ID_SOFTWARE_RADIO=1
##########################################
# FUNcube
##########################################
# FUNcube Dongle Pro
usb:v04D8pFB56*
ID_SOFTWARE_RADIO=1
# FUNcube Dongle Pro+
usb:v04D8pFB31*
ID_SOFTWARE_RADIO=1
##########################################
# Great Scott Gadgets
##########################################
# HackRF Jawbreaker
usb:v1D50p604B*
ID_SOFTWARE_RADIO=1
# HackRF One
usb:v1D50p6089*
ID_SOFTWARE_RADIO=1
##########################################
# HydraSDR
##########################################
# HydraSDR RFOne
usb:v38AFp0001*
ID_SOFTWARE_RADIO=1
##########################################
# LimeSDR
##########################################
# XTRX (USB3380)
usb:v0525p3380*
ID_SOFTWARE_RADIO=1
##########################################
# Microtelecom
##########################################
# Perseus
usb:v04B4p325C*
ID_SOFTWARE_RADIO=1
########################################## ##########################################
# Nuand # Nuand
########################################## ##########################################
@ -237,3 +292,34 @@ usb:v1F4DpD286*
# PROlectrix DV107669 (FC0012) # PROlectrix DV107669 (FC0012)
usb:v1F4DpD803* usb:v1F4DpD803*
ID_SOFTWARE_RADIO=1 ID_SOFTWARE_RADIO=1
##########################################
# SDRplay
##########################################
# RSP1
usb:v1DF7p2500*
ID_SOFTWARE_RADIO=1
# RSP1A
usb:v1DF7p3000*
ID_SOFTWARE_RADIO=1
# RSP2/RSP2pro
usb:v1DF7p3010*
ID_SOFTWARE_RADIO=1
# RSPduo
usb:v1DF7p3020*
ID_SOFTWARE_RADIO=1
# RSPdx
usb:v1DF7p3030*
ID_SOFTWARE_RADIO=1
# RSP1B
usb:v1DF7p3050*
ID_SOFTWARE_RADIO=1
# RSPdxR2
usb:v1DF7p3060*
ID_SOFTWARE_RADIO=1

View File

@ -138,3 +138,4 @@ IDEMIA,IDEM,06/26/2018
"Fsas Technologies Inc.",FSAS,04/30/2025 "Fsas Technologies Inc.",FSAS,04/30/2025
"JP Morgan Chase N.A.",JPMC,05/30/2025 "JP Morgan Chase N.A.",JPMC,05/30/2025
"Roku, Inc.",ROKU,07/15/2025 "Roku, Inc.",ROKU,07/15/2025
"UltraRISC Technology (Shanghai) Co., Ltd",ULRV,09/15/2025
1 Company ACPI ID Approved On Date
138 Fsas Technologies Inc. FSAS 04/30/2025
139 JP Morgan Chase N.A. JPMC 05/30/2025
140 Roku, Inc. ROKU 07/15/2025
141 UltraRISC Technology (Shanghai) Co., Ltd ULRV 09/15/2025

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,8 +9,8 @@
# The latest version can be obtained from # The latest version can be obtained from
# http://www.linux-usb.org/usb.ids # http://www.linux-usb.org/usb.ids
# #
# Version: 2025.07.26 # Version: 2025.09.15
# Date: 2025-07-26 20:34:01 # Date: 2025-09-15 20:34:02
# #
# Vendors, devices and interfaces. Please keep sorted. # Vendors, devices and interfaces. Please keep sorted.
@ -13488,7 +13488,9 @@
0b0d ProjectLab 0b0d ProjectLab
0000 CenturyCD 0000 CenturyCD
0b0e GN Netcom 0b0e GN Netcom
0301 Jabra EVOLVE 20
0305 Jabra EVOLVE Link MS 0305 Jabra EVOLVE Link MS
030c Jabra EVOLVE 65
0311 Jabra EVOLVE 65 0311 Jabra EVOLVE 65
0312 enc060:Buttons Volume up/down/mute + phone [Jabra] 0312 enc060:Buttons Volume up/down/mute + phone [Jabra]
0343 Jabra UC VOICE 150a 0343 Jabra UC VOICE 150a
@ -13507,6 +13509,11 @@
2007 GN 2000 Stereo Corded Headset 2007 GN 2000 Stereo Corded Headset
2456 Jabra SPEAK 810 2456 Jabra SPEAK 810
245e Jabra Link 370 245e Jabra Link 370
248a Jabra Elite 85h
24b8 Jabra Evolve2 65
24bb Jabra Evolve2 85
24c9 Jabra Link 380
24ca Jabra Link 380
620c Jabra BT620s 620c Jabra BT620s
9330 Jabra GN9330 Headset 9330 Jabra GN9330 Headset
a346 Jabra Engage 75 Stereo a346 Jabra Engage 75 Stereo

View File

@ -179,6 +179,16 @@
<xi:include href="version-info.xml" xpointer="v256"/></listitem> <xi:include href="version-info.xml" xpointer="v256"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--prompt-new-user</option></term>
<listitem><para>If used in conjunction with <command>firstboot</command> and no regular user account
exists on the system so far the tool will interactively query for user information and create an
account.</para>
<xi:include href="version-info.xml" xpointer="v256"/></listitem>
</varlistentry>
<xi:include href="user-system-options.xml" xpointer="host" /> <xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" /> <xi:include href="user-system-options.xml" xpointer="machine" />
@ -1212,9 +1222,10 @@
<listitem><para>This command is supposed to be invoked during the initial boot of the system. It <listitem><para>This command is supposed to be invoked during the initial boot of the system. It
checks whether any regular home area exists so far, and if not queries the user interactively on the checks whether any regular home area exists so far, and if not queries the user interactively on the
console for user name and password and creates one. Alternatively, if one or more service credentials console for user name and password and creates one (only if <option>--prompt-new-user</option> is
whose name starts with <literal>home.create.</literal> are passed to the command (containing a user specified). Alternatively, if one or more service credentials whose name starts with
record in JSON format) these users are automatically created at boot.</para> <literal>home.create.</literal> are passed to the command (containing a user record in JSON format)
these users are automatically created at boot.</para>
<para>This command is invoked by the <filename>systemd-homed-firstboot.service</filename> service <para>This command is invoked by the <filename>systemd-homed-firstboot.service</filename> service
unit.</para> unit.</para>

View File

@ -737,8 +737,8 @@
<varlistentry> <varlistentry>
<term><option>--no-hostname</option></term> <term><option>--no-hostname</option></term>
<listitem><para>Do not show the hostname field of log messages originating from the local host. This <listitem><para>Do not show the hostname field of log messages. This switch has an effect only on the
switch has an effect only on the <option>short</option> family of output modes (see above).</para> <option>short</option> family of output modes (see above).</para>
<para>Note: this option does not remove occurrences of the hostname from log entries themselves, so <para>Note: this option does not remove occurrences of the hostname from log entries themselves, so
it does not prevent the hostname from being visible in the logs.</para> it does not prevent the hostname from being visible in the logs.</para>

View File

@ -75,13 +75,14 @@
<refsect1> <refsect1>
<title>Thread safety</title> <title>Thread safety</title>
<para>Functions that operate on <structname>sd_journal</structname> objects are thread agnostic — given <para>Functions that operate on <structname>sd_journal</structname> objects are thread agnostic — a given
<structname>sd_journal</structname> pointer may only be used from one specific thread at all times (and it has to <structname>sd_journal</structname> pointer may only be used from one thread at a time, but multiple
be the very same one during the entire lifetime of the object), but multiple, independent threads may use multiple, independent threads may use multiple objects concurrently. Some functions — those that are used to send
independent objects safely. Other functions — those that are used to send entries to the journal, like entries to the journal, like
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry> and similar, <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
or those that are used to retrieve global information like similar, or those that are used to retrieve global information like
<citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> and <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>sd_journal_get_catalog_for_message_id</refentrytitle><manvolnum>3</manvolnum></citerefentry> <citerefentry><refentrytitle>sd_journal_get_catalog_for_message_id</refentrytitle><manvolnum>3</manvolnum></citerefentry>
— are fully thread-safe and may be called from multiple threads in parallel.</para> — are fully thread-safe and may be called from multiple threads in parallel.</para>
</refsect1> </refsect1>

View File

@ -41,10 +41,10 @@
system.</para> system.</para>
<para>Note that these APIs only allow purely passive access and <para>Note that these APIs only allow purely passive access and
monitoring of seats, sessions and users. To actively make changes monitoring of seats, sessions, and users. To actively make changes
to the seat configuration, terminate login sessions, or switch to the seat configuration, terminate login sessions, or switch
session on a seat you need to utilize the D-Bus API of session on a seat you need to utilize the D-Bus API of
systemd-logind, instead.</para> systemd-logind instead.</para>
<para>These functions synchronously access data in <para>These functions synchronously access data in
<filename>/proc/</filename>, <filename>/sys/fs/cgroup/</filename> <filename>/proc/</filename>, <filename>/sys/fs/cgroup/</filename>
@ -62,7 +62,7 @@
other.</para> other.</para>
<para>If the functions return string arrays, these are generally <para>If the functions return string arrays, these are generally
<constant>NULL</constant> terminated and need to be freed by the <constant>NULL</constant>-terminated and need to be freed by the
caller with the libc caller with the libc
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry> <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call after use, including the strings referenced therein. call after use, including the strings referenced therein.

View File

@ -27,7 +27,7 @@
<funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo> <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
<funcprototype> <funcprototype>
<funcdef>void <function>sd_bus_can_send</function></funcdef> <funcdef>int <function>sd_bus_can_send</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef> <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>char <parameter>type</parameter></paramdef> <paramdef>char <parameter>type</parameter></paramdef>
</funcprototype> </funcprototype>

View File

@ -33,6 +33,12 @@
<funcsynopsis> <funcsynopsis>
<funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo> <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
<funcprototype>
<funcdef>typedef int (*<function>sd_bus_track_handler_t</function>)</funcdef>
<paramdef>sd_bus_track *<parameter>track</parameter></paramdef>
<paramdef>void *<parameter>userdata</parameter></paramdef>
</funcprototype>
<funcprototype> <funcprototype>
<funcdef>int <function>sd_bus_track_new</function></funcdef> <funcdef>int <function>sd_bus_track_new</function></funcdef>
<paramdef>sd_bus* <parameter>bus</parameter></paramdef> <paramdef>sd_bus* <parameter>bus</parameter></paramdef>
@ -221,6 +227,7 @@
<refsect1> <refsect1>
<title>History</title> <title>History</title>
<para><function>sd_bus_track_new()</function>, <para><function>sd_bus_track_new()</function>,
<function>sd_bus_track_handler_t()</function>,
<function>sd_bus_track_ref()</function>, <function>sd_bus_track_ref()</function>,
<function>sd_bus_track_unref()</function>, <function>sd_bus_track_unref()</function>,
<function>sd_bus_track_unrefp()</function>, <function>sd_bus_track_unrefp()</function>,

View File

@ -84,14 +84,12 @@
<refsect1> <refsect1>
<title>Notes</title> <title>Notes</title>
<para>Function <function>sd_journal_get_catalog()</function> is thread-agnostic and only <para>Function <function>sd_journal_get_catalog()</function> is thread-agnostic and only a single thread
a single specific thread may operate on a given object during its entire lifetime. It is safe to allocate multiple may operate on a given object at any given time. Multiple independent objects may be used from different
independent objects and use each from a specific thread in parallel. However, it is not safe to allocate such an threads in parallel.</para>
object in one thread, and operate or free it from any other, even if locking is used to ensure these threads do not
operate on it at the very same time.</para>
<para>Function <function>sd_journal_get_catalog_for_message_id()</function> is are thread-safe and may be called in <para>Function <function>sd_journal_get_catalog_for_message_id()</function> is thread-safe and may be
parallel from multiple threads.</para> called from multiple threads in parallel.</para>
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/> <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
</refsect1> </refsect1>

View File

@ -35,7 +35,9 @@
compatibility. It may also pick up statically defined JSON user/group records from files in compatibility. It may also pick up statically defined JSON user/group records from files in
<filename>/etc/userdb/</filename>, <filename>/run/userdb/</filename>, <filename>/etc/userdb/</filename>, <filename>/run/userdb/</filename>,
<filename>/run/host/userdb/</filename> and <filename>/usr/lib/userdb/</filename> with the <filename>/run/host/userdb/</filename> and <filename>/usr/lib/userdb/</filename> with the
<literal>.user</literal> or <literal>.group</literal> extension.</para> <literal>.user</literal> or <literal>.group</literal> extension. For more details about the extensions
read the <citerefentry><refentrytitle>nss-systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
manpage.</para>
<para>Most of <command>systemd-userdbd</command>'s functionality is accessible through the <para>Most of <command>systemd-userdbd</command>'s functionality is accessible through the
<citerefentry><refentrytitle>userdbctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> <citerefentry><refentrytitle>userdbctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>

View File

@ -583,7 +583,7 @@ CPUWeight=20 DisableControllers=cpu / \
an absolute number of tasks or a percentage value that is taken relative to the configured maximum an absolute number of tasks or a percentage value that is taken relative to the configured maximum
number of tasks on the system. If assigned the special value <literal>infinity</literal>, no tasks number of tasks on the system. If assigned the special value <literal>infinity</literal>, no tasks
limit is applied. This controls the <literal>pids.max</literal> control group attribute. For limit is applied. This controls the <literal>pids.max</literal> control group attribute. For
details about this control group attribute, the details about this control group attribute, see the
<ulink url="https://docs.kernel.org/admin-guide/cgroup-v2.html#pid">pids controller <ulink url="https://docs.kernel.org/admin-guide/cgroup-v2.html#pid">pids controller
</ulink>. </ulink>.
The effective configuration is reported as <varname>EffectiveTasksMax=</varname>.</para> The effective configuration is reported as <varname>EffectiveTasksMax=</varname>.</para>

View File

@ -6,10 +6,9 @@
<refsect1> <refsect1>
<title/> <title/>
<para id="strict">All functions listed here are thread-agnostic and only a single specific thread may operate on a <para id="strict">All functions listed here are thread-agnostic and only a single thread may operate on a
given object during its entire lifetime. It is safe to allocate multiple independent objects and use each from a given object at any given time. Different threads may access the same object at different times. Multiple
specific thread in parallel. However, it is not safe to allocate such an object in one thread, and operate or free it independent objects may be used from different threads in parallel.</para>
from any other, even if locking is used to ensure these threads do not operate on it at the very same time.</para>
<para id="safe">All functions listed here are thread-safe and may be called in parallel from multiple threads.</para> <para id="safe">All functions listed here are thread-safe and may be called in parallel from multiple threads.</para>

View File

@ -37,6 +37,7 @@ Packages=
btrfs-progs btrfs-progs
apt apt
bind9-dnsutils bind9-dnsutils
bsdutils
cryptsetup-bin cryptsetup-bin
dbus-broker dbus-broker
dbus-user-session dbus-user-session

View File

@ -0,0 +1,26 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# New package needed for TEST-75-RESOLVED
[TriggerMatch]
Distribution=debian
Release=!bullseye
Release=!bookworm
Release=!trixie
# TODO: drop once Duke ships
Release=!oldstable
# TODO: drop once Forky ships
Release=!stable
[TriggerMatch]
Distribution=ubuntu
Release=!jammy
Release=!noble
Release=!plucky
Release=!questing
[TriggerMatch]
Distribution=kali
[Content]
Packages=knot-keymgr

View File

@ -75,6 +75,7 @@ wrap=(
setpriv setpriv
sshd sshd
stat stat
stress-ng
su su
tar tar
tgtd tgtd

View File

@ -99,7 +99,7 @@ _arguments -s \
'(- *)'{-h,--help}'[Show this help]' \ '(- *)'{-h,--help}'[Show this help]' \
'(- *)--version[Show package version]' \ '(- *)--version[Show package version]' \
'--no-pager[Do not pipe output into a pager]' \ '--no-pager[Do not pipe output into a pager]' \
--no-hostname"[Don't show the hostname of local log messages]" \ --no-hostname"[Don't show the hostname of log messages]" \
'(-l --full)'{-l,--full}'[Show long fields in full]' \ '(-l --full)'{-l,--full}'[Show long fields in full]' \
'(-a --all)'{-a,--all}'[Show all fields, including long and unprintable]' \ '(-a --all)'{-a,--all}'[Show all fields, including long and unprintable]' \
'(-f --follow)'{-f,--follow}'[Follow journal]' \ '(-f --follow)'{-f,--follow}'[Follow journal]' \

View File

@ -6,6 +6,7 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/uio.h>
#include <unistd.h> #include <unistd.h>
#include "sd-id128.h" #include "sd-id128.h"
@ -37,12 +38,7 @@ int efi_get_variable(
void **ret_value, void **ret_value,
size_t *ret_size) { size_t *ret_size) {
_cleanup_close_ int fd = -EBADF;
_cleanup_free_ void *buf = NULL;
struct stat st;
usec_t begin = 0; /* Unnecessary initialization to appease gcc */ usec_t begin = 0; /* Unnecessary initialization to appease gcc */
uint32_t a;
ssize_t n;
assert(variable); assert(variable);
@ -62,79 +58,100 @@ int efi_get_variable(
begin = now(CLOCK_MONOTONIC); begin = now(CLOCK_MONOTONIC);
} }
fd = open(p, O_RDONLY|O_NOCTTY|O_CLOEXEC); _cleanup_close_ int fd = open(p, O_RDONLY|O_NOCTTY|O_CLOEXEC);
if (fd < 0) if (fd < 0)
return log_debug_errno(errno, "open(\"%s\") failed: %m", p); return log_debug_errno(errno, "open(\"%s\") failed: %m", p);
uint32_t attr;
_cleanup_free_ char *buf = NULL;
ssize_t n;
/* The kernel ratelimits reads from the efivarfs because EFI is inefficient, and we'll occasionally
* fail with EINTR here. A slowdown is better than a failure for us, so retry a few times and
* eventually fail with -EBUSY.
*
* See https://github.com/torvalds/linux/blob/master/fs/efivarfs/file.c#L75 and
* https://github.com/torvalds/linux/commit/bef3efbeb897b56867e271cdbc5f8adaacaeb9cd.
*
* The variable may also be overwritten between the stat and read. If we find out that the new
* contents are longer, try again.
*/
for (unsigned try = 0;; try++) {
struct stat st;
if (fstat(fd, &st) < 0) if (fstat(fd, &st) < 0)
return log_debug_errno(errno, "fstat(\"%s\") failed: %m", p); return log_debug_errno(errno, "fstat(\"%s\") failed: %m", p);
if (st.st_size == 0)
return log_debug_errno(SYNTHETIC_ERRNO(ENOENT),
"EFI variable %s is uncommitted", p);
if (st.st_size < 4) if (st.st_size < 4)
return log_debug_errno(SYNTHETIC_ERRNO(ENODATA), "EFI variable %s is shorter than 4 bytes, refusing.", p); return log_debug_errno(SYNTHETIC_ERRNO(ENODATA), "EFI variable %s is shorter than 4 bytes, refusing.", p);
if (st.st_size > 4*1024*1024 + 4) if (st.st_size > 4*1024*1024 + 4)
return log_debug_errno(SYNTHETIC_ERRNO(E2BIG), "EFI variable %s is ridiculously large, refusing.", p); return log_debug_errno(SYNTHETIC_ERRNO(E2BIG), "EFI variable %s is ridiculously large, refusing.", p);
if (ret_value || ret_attribute) { if (!ret_attribute && !ret_value) {
/* The kernel ratelimits reads from the efivarfs because EFI is inefficient, and we'll /* No need to read anything, return the reported size. */
* occasionally fail with EINTR here. A slowdown is better than a failure for us, so n = st.st_size;
* retry a few times and eventually fail with -EBUSY. break;
* }
* See https://github.com/torvalds/linux/blob/master/fs/efivarfs/file.c#L75
* and /* We want +1 for the read call, and +3 for the additional terminating bytes added below. */
* https://github.com/torvalds/linux/commit/bef3efbeb897b56867e271cdbc5f8adaacaeb9cd. char *t = realloc(buf, (size_t) st.st_size + MAX(1, 3));
*/ if (!t)
for (unsigned try = 0;; try++) { return -ENOMEM;
n = read(fd, &a, sizeof(a)); buf = t;
const struct iovec iov[] = {
{ &attr, sizeof(attr) },
{ buf, (size_t) st.st_size + 1 },
};
n = readv(fd, iov, 2);
assert(n <= st.st_size + 1);
if (n == st.st_size + 1)
/* We need to try again with a bigger buffer. */
continue;
if (n >= 0) if (n >= 0)
break; break;
log_debug_errno(errno, "Reading from \"%s\" failed: %m", p); log_debug_errno(errno, "Reading from \"%s\" failed: %m", p);
if (errno != EINTR) if (errno != EINTR)
return -errno; return -errno;
if (try >= EFI_N_RETRIES_TOTAL) if (try >= EFI_N_RETRIES_TOTAL)
return -EBUSY; return -EBUSY;
if (try >= EFI_N_RETRIES_NO_DELAY) if (try >= EFI_N_RETRIES_NO_DELAY)
(void) usleep_safe(EFI_RETRY_DELAY); (void) usleep_safe(EFI_RETRY_DELAY);
} }
/* Unfortunately kernel reports EOF if there's an inconsistency between efivarfs var list /* Unfortunately kernel reports EOF if there's an inconsistency between efivarfs var list and
* and what's actually stored in firmware, c.f. #34304. A zero size env var is not allowed in * what's actually stored in firmware, c.f. #34304. A zero size env var is not allowed in EFI
* efi and hence the variable doesn't really exist in the backing store as long as it is zero * and hence the variable doesn't really exist in the backing store as long as it is zero
* sized, and the kernel calls this "uncommitted". Hence we translate EOF back to ENOENT here, * sized, and the kernel calls this "uncommitted". Hence we translate EOF back to ENOENT
* as with kernel behavior before * here, as with kernel behavior before
* https://github.com/torvalds/linux/commit/3fab70c165795431f00ddf9be8b84ddd07bd1f8f * https://github.com/torvalds/linux/commit/3fab70c165795431f00ddf9be8b84ddd07bd1f8f.
* *
* If the kernel changes behaviour (to flush dentries on resume), we can drop * If the kernel changes behaviour (to flush dentries on resume), we can drop this at some
* this at some point in the future. But note that the commit is 11 * point in the future. But note that the commit is 11 years old at this point so we'll need
* years old at this point so we'll need to deal with the current behaviour for * to deal with the current behaviour for a long time.
* a long time.
*/ */
if (n == 0) if (n == 0)
return log_debug_errno(SYNTHETIC_ERRNO(ENOENT), return log_debug_errno(SYNTHETIC_ERRNO(ENOENT),
"EFI variable %s is uncommitted", p); "EFI variable %s is uncommitted", p);
if (n < 4)
if (n != sizeof(a))
return log_debug_errno(SYNTHETIC_ERRNO(EIO), return log_debug_errno(SYNTHETIC_ERRNO(EIO),
"Read %zi bytes from EFI variable %s, expected %zu.", n, p, sizeof(a)); "Read %zi bytes from EFI variable %s, expected >= 4", n, p);
}
if (ret_attribute)
*ret_attribute = attr;
if (ret_value) { if (ret_value) {
buf = malloc(st.st_size - 4 + 3); assert(buf);
if (!buf) /* Always NUL-terminate (3 bytes, to properly protect UTF-16, even if truncated in
return -ENOMEM; * the middle of a character) */
buf[n - 4] = 0;
n = read(fd, buf, (size_t) st.st_size - 4); buf[n - 4 + 1] = 0;
if (n < 0) buf[n - 4 + 2] = 0;
return log_debug_errno(errno, "Failed to read value of EFI variable %s: %m", p); *ret_value = TAKE_PTR(buf);
assert(n <= st.st_size - 4); }
/* Always NUL-terminate (3 bytes, to properly protect UTF-16, even if truncated in the middle
* of a character) */
((char*) buf)[n] = 0;
((char*) buf)[n + 1] = 0;
((char*) buf)[n + 2] = 0;
} else
/* Assume that the reported size is accurate */
n = st.st_size - 4;
if (DEBUG_LOGGING) { if (DEBUG_LOGGING) {
usec_t end = now(CLOCK_MONOTONIC); usec_t end = now(CLOCK_MONOTONIC);
@ -146,14 +163,8 @@ int efi_get_variable(
/* Note that efivarfs interestingly doesn't require ftruncate() to update an existing EFI variable /* Note that efivarfs interestingly doesn't require ftruncate() to update an existing EFI variable
* with a smaller value. */ * with a smaller value. */
if (ret_attribute)
*ret_attribute = a;
if (ret_value)
*ret_value = TAKE_PTR(buf);
if (ret_size) if (ret_size)
*ret_size = n; *ret_size = n - 4;
return 0; return 0;
} }

View File

@ -1058,10 +1058,9 @@ int fd_get_diskseq(int fd, uint64_t *ret) {
} }
int path_is_root_at(int dir_fd, const char *path) { int path_is_root_at(int dir_fd, const char *path) {
_cleanup_close_ int fd = -EBADF, pfd = -EBADF;
assert(dir_fd >= 0 || dir_fd == AT_FDCWD); assert(dir_fd >= 0 || dir_fd == AT_FDCWD);
_cleanup_close_ int fd = -EBADF;
if (!isempty(path)) { if (!isempty(path)) {
fd = openat(dir_fd, path, O_PATH|O_DIRECTORY|O_CLOEXEC); fd = openat(dir_fd, path, O_PATH|O_DIRECTORY|O_CLOEXEC);
if (fd < 0) if (fd < 0)
@ -1070,19 +1069,19 @@ int path_is_root_at(int dir_fd, const char *path) {
dir_fd = fd; dir_fd = fd;
} }
pfd = openat(dir_fd, "..", O_PATH|O_DIRECTORY|O_CLOEXEC); _cleanup_close_ int root_fd = openat(AT_FDCWD, "/", O_PATH|O_DIRECTORY|O_CLOEXEC);
if (pfd < 0) if (root_fd < 0)
return errno == ENOTDIR ? false : -errno; return -errno;
/* Even if the parent directory has the same inode, the fd may not point to the root directory "/", /* Even if the root directory has the same inode as our fd, the fd may not point to the root
* and we also need to check that the mount ids are the same. Otherwise, a construct like the * directory "/", and we also need to check that the mount ids are the same. Otherwise, a construct
* following could be used to trick us: * like the following could be used to trick us:
* *
* $ mkdir /tmp/x /tmp/x/y * $ mkdir /tmp/x
* $ mount --bind /tmp/x /tmp/x/y * $ mount --bind / /tmp/x
*/ */
return fds_are_same_mount(dir_fd, pfd); return fds_are_same_mount(dir_fd, root_fd);
} }
int fds_are_same_mount(int fd1, int fd2) { int fds_are_same_mount(int fd1, int fd2) {

View File

@ -293,15 +293,20 @@ int fchmod_opath(int fd, mode_t m) {
* - fchmod(2) only operates on open files (i. e., fds with an open file description); * - fchmod(2) only operates on open files (i. e., fds with an open file description);
* - fchmodat(2) does not have a flag arg like fchownat(2) does, so no way to pass AT_EMPTY_PATH; * - fchmodat(2) does not have a flag arg like fchownat(2) does, so no way to pass AT_EMPTY_PATH;
* + it should not be confused with the libc fchmodat(3) interface, which adds 4th flag argument, * + it should not be confused with the libc fchmodat(3) interface, which adds 4th flag argument,
* but does not support AT_EMPTY_PATH (only supports AT_SYMLINK_NOFOLLOW); * and supports AT_EMPTY_PATH since v2.39 (previously only supported AT_SYMLINK_NOFOLLOW). So if
* the kernel has fchmodat2(2), since v2.39 glibc will call into it directly. If the kernel
* doesn't, or glibc is older than v2.39, glibc's internal fallback will return EINVAL if
* AT_EMPTY_PATH is passed.
* - fchmodat2(2) supports all the AT_* flags, but is still very recent. * - fchmodat2(2) supports all the AT_* flags, but is still very recent.
* *
* We try to use fchmodat2(), and, if it is not supported, resort * We try to use fchmodat(3) first, and on EINVAL fall back to fchmodat2(), and, if that is also not
* to the /proc/self/fd dance. */ * supported, resort to the /proc/self/fd dance. */
assert(fd >= 0); assert(fd >= 0);
if (fchmodat2(fd, "", m, AT_EMPTY_PATH) >= 0) if (fchmodat(fd, "", m, AT_EMPTY_PATH) >= 0)
return 0;
if (errno == EINVAL && fchmodat2(fd, "", m, AT_EMPTY_PATH) >= 0) /* glibc too old? */
return 0; return 0;
if (!IN_SET(errno, ENOSYS, EPERM)) /* Some container managers block unknown syscalls with EPERM */ if (!IN_SET(errno, ENOSYS, EPERM)) /* Some container managers block unknown syscalls with EPERM */
return -errno; return -errno;

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind bind
bpf bpf
breakpoint
brk brk
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat
get_mempolicy get_mempolicy
get_robust_list get_robust_list
get_thread_area get_thread_area
get_tls
getcpu getcpu
getcwd getcwd
getdents getdents
@ -403,6 +405,7 @@ set_mempolicy_home_node
set_robust_list set_robust_list
set_thread_area set_thread_area
set_tid_address set_tid_address
set_tls
setdomainname setdomainname
setfsgid setfsgid
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat
unshare unshare
uretprobe uretprobe
userfaultfd userfaultfd
usr26
usr32
ustat ustat
utime utime
utimensat utimensat

View File

@ -16,9 +16,10 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 282 bind 282
bpf 386 bpf 386
breakpoint 983041
brk 45 brk 45
cachectl cachectl
cacheflush cacheflush 983042
cachestat 451 cachestat 451
capget 184 capget 184
capset 185 capset 185
@ -113,6 +114,7 @@ futimesat 326
get_mempolicy 320 get_mempolicy 320
get_robust_list 339 get_robust_list 339
get_thread_area get_thread_area
get_tls 983046
getcpu 345 getcpu 345
getcwd 183 getcwd 183
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 338 set_robust_list 338
set_thread_area set_thread_area
set_tid_address 256 set_tid_address 256
set_tls 983045
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 216 setfsgid32 216
@ -511,6 +514,8 @@ unlinkat 328
unshare 337 unshare 337
uretprobe uretprobe
userfaultfd 388 userfaultfd 388
usr26 983043
usr32 983044
ustat 62 ustat 62
utime utime
utimensat 348 utimensat 348

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 200 bind 200
bpf 280 bpf 280
breakpoint
brk 214 brk 214
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat
get_mempolicy 236 get_mempolicy 236
get_robust_list 100 get_robust_list 100
get_thread_area get_thread_area
get_tls
getcpu 168 getcpu 168
getcwd 17 getcwd 17
getdents getdents
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 99 set_robust_list 99
set_thread_area set_thread_area
set_tid_address 96 set_tid_address 96
set_tls
setdomainname 162 setdomainname 162
setfsgid 152 setfsgid 152
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 35
unshare 97 unshare 97
uretprobe uretprobe
userfaultfd 282 userfaultfd 282
usr26
usr32
ustat ustat
utime utime
utimensat 88 utimensat 88

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 361 bind 361
bpf 357 bpf 357
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat 299
get_mempolicy 275 get_mempolicy 275
get_robust_list 312 get_robust_list 312
get_thread_area 244 get_thread_area 244
get_tls
getcpu 318 getcpu 318
getcwd 183 getcwd 183
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 311 set_robust_list 311
set_thread_area 243 set_thread_area 243
set_tid_address 258 set_tid_address 258
set_tls
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 216 setfsgid32 216
@ -511,6 +514,8 @@ unlinkat 301
unshare 310 unshare 310
uretprobe uretprobe
userfaultfd 374 userfaultfd 374
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 320 utimensat 320

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 200 bind 200
bpf 280 bpf 280
breakpoint
brk 214 brk 214
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat
get_mempolicy 236 get_mempolicy 236
get_robust_list 100 get_robust_list 100
get_thread_area get_thread_area
get_tls
getcpu 168 getcpu 168
getcwd 17 getcwd 17
getdents getdents
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 99 set_robust_list 99
set_thread_area set_thread_area
set_tid_address 96 set_tid_address 96
set_tls
setdomainname 162 setdomainname 162
setfsgid 152 setfsgid 152
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 35
unshare 97 unshare 97
uretprobe uretprobe
userfaultfd 282 userfaultfd 282
usr26
usr32
ustat ustat
utime utime
utimensat 88 utimensat 88

View File

@ -16,6 +16,7 @@ atomic_barrier 336
atomic_cmpxchg_32 335 atomic_cmpxchg_32 335
bind 358 bind 358
bpf 354 bpf 354
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush 123 cacheflush 123
@ -113,6 +114,7 @@ futimesat 292
get_mempolicy 269 get_mempolicy 269
get_robust_list 305 get_robust_list 305
get_thread_area 333 get_thread_area 333
get_tls
getcpu 314 getcpu 314
getcwd 183 getcwd 183
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 304 set_robust_list 304
set_thread_area 334 set_thread_area 334
set_tid_address 253 set_tid_address 253
set_tls
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 216 setfsgid32 216
@ -511,6 +514,8 @@ unlinkat 294
unshare 303 unshare 303
uretprobe uretprobe
userfaultfd 373 userfaultfd 373
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 316 utimensat 316

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 5048 bind 5048
bpf 5315 bpf 5315
breakpoint
brk 5012 brk 5012
cachectl 5198 cachectl 5198
cacheflush 5197 cacheflush 5197
@ -113,6 +114,7 @@ futimesat 5251
get_mempolicy 5228 get_mempolicy 5228
get_robust_list 5269 get_robust_list 5269
get_thread_area get_thread_area
get_tls
getcpu 5271 getcpu 5271
getcwd 5077 getcwd 5077
getdents 5076 getdents 5076
@ -403,6 +405,7 @@ set_mempolicy_home_node 5450
set_robust_list 5268 set_robust_list 5268
set_thread_area 5242 set_thread_area 5242
set_tid_address 5212 set_tid_address 5212
set_tls
setdomainname 5166 setdomainname 5166
setfsgid 5121 setfsgid 5121
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 5253
unshare 5262 unshare 5262
uretprobe uretprobe
userfaultfd 5317 userfaultfd 5317
usr26
usr32
ustat 5133 ustat 5133
utime 5130 utime 5130
utimensat 5275 utimensat 5275

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 6048 bind 6048
bpf 6319 bpf 6319
breakpoint
brk 6012 brk 6012
cachectl 6198 cachectl 6198
cacheflush 6197 cacheflush 6197
@ -113,6 +114,7 @@ futimesat 6255
get_mempolicy 6232 get_mempolicy 6232
get_robust_list 6273 get_robust_list 6273
get_thread_area get_thread_area
get_tls
getcpu 6275 getcpu 6275
getcwd 6077 getcwd 6077
getdents 6076 getdents 6076
@ -403,6 +405,7 @@ set_mempolicy_home_node 6450
set_robust_list 6272 set_robust_list 6272
set_thread_area 6246 set_thread_area 6246
set_tid_address 6213 set_tid_address 6213
set_tls
setdomainname 6166 setdomainname 6166
setfsgid 6121 setfsgid 6121
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 6257
unshare 6266 unshare 6266
uretprobe uretprobe
userfaultfd 6321 userfaultfd 6321
usr26
usr32
ustat 6133 ustat 6133
utime 6130 utime 6130
utimensat 6279 utimensat 6279

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 4169 bind 4169
bpf 4355 bpf 4355
breakpoint
brk 4045 brk 4045
cachectl 4148 cachectl 4148
cacheflush 4147 cacheflush 4147
@ -113,6 +114,7 @@ futimesat 4292
get_mempolicy 4269 get_mempolicy 4269
get_robust_list 4310 get_robust_list 4310
get_thread_area get_thread_area
get_tls
getcpu 4312 getcpu 4312
getcwd 4203 getcwd 4203
getdents 4141 getdents 4141
@ -403,6 +405,7 @@ set_mempolicy_home_node 4450
set_robust_list 4309 set_robust_list 4309
set_thread_area 4283 set_thread_area 4283
set_tid_address 4252 set_tid_address 4252
set_tls
setdomainname 4121 setdomainname 4121
setfsgid 4139 setfsgid 4139
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 4294
unshare 4303 unshare 4303
uretprobe uretprobe
userfaultfd 4357 userfaultfd 4357
usr26
usr32
ustat 4062 ustat 4062
utime 4030 utime 4030
utimensat 4316 utimensat 4316

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 22 bind 22
bpf 341 bpf 341
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush 356 cacheflush 356
@ -113,6 +114,7 @@ futimesat 279
get_mempolicy 261 get_mempolicy 261
get_robust_list 290 get_robust_list 290
get_thread_area get_thread_area
get_tls
getcpu 296 getcpu 296
getcwd 110 getcwd 110
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 289 set_robust_list 289
set_thread_area set_thread_area
set_tid_address 237 set_tid_address 237
set_tls
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 281
unshare 288 unshare 288
uretprobe uretprobe
userfaultfd 344 userfaultfd 344
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 301 utimensat 301

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 327 bind 327
bpf 361 bpf 361
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat 290
get_mempolicy 260 get_mempolicy 260
get_robust_list 299 get_robust_list 299
get_thread_area get_thread_area
get_tls
getcpu 302 getcpu 302
getcwd 182 getcwd 182
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 300 set_robust_list 300
set_thread_area set_thread_area
set_tid_address 232 set_tid_address 232
set_tls
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 292
unshare 282 unshare 282
uretprobe uretprobe
userfaultfd 364 userfaultfd 364
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 304 utimensat 304

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 327 bind 327
bpf 361 bpf 361
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat 290
get_mempolicy 260 get_mempolicy 260
get_robust_list 299 get_robust_list 299
get_thread_area get_thread_area
get_tls
getcpu 302 getcpu 302
getcwd 182 getcwd 182
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 300 set_robust_list 300
set_thread_area set_thread_area
set_tid_address 232 set_tid_address 232
set_tls
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 292
unshare 282 unshare 282
uretprobe uretprobe
userfaultfd 364 userfaultfd 364
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 304 utimensat 304

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 200 bind 200
bpf 280 bpf 280
breakpoint
brk 214 brk 214
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat
get_mempolicy 236 get_mempolicy 236
get_robust_list 100 get_robust_list 100
get_thread_area get_thread_area
get_tls
getcpu 168 getcpu 168
getcwd 17 getcwd 17
getdents getdents
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 99 set_robust_list 99
set_thread_area set_thread_area
set_tid_address 96 set_tid_address 96
set_tls
setdomainname 162 setdomainname 162
setfsgid 152 setfsgid 152
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 35
unshare 97 unshare 97
uretprobe uretprobe
userfaultfd 282 userfaultfd 282
usr26
usr32
ustat ustat
utime utime
utimensat utimensat

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 200 bind 200
bpf 280 bpf 280
breakpoint
brk 214 brk 214
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat
get_mempolicy 236 get_mempolicy 236
get_robust_list 100 get_robust_list 100
get_thread_area get_thread_area
get_tls
getcpu 168 getcpu 168
getcwd 17 getcwd 17
getdents getdents
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 99 set_robust_list 99
set_thread_area set_thread_area
set_tid_address 96 set_tid_address 96
set_tls
setdomainname 162 setdomainname 162
setfsgid 152 setfsgid 152
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 35
unshare 97 unshare 97
uretprobe uretprobe
userfaultfd 282 userfaultfd 282
usr26
usr32
ustat ustat
utime utime
utimensat 88 utimensat 88

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 361 bind 361
bpf 351 bpf 351
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat 292
get_mempolicy 269 get_mempolicy 269
get_robust_list 305 get_robust_list 305
get_thread_area get_thread_area
get_tls
getcpu 311 getcpu 311
getcwd 183 getcwd 183
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 304 set_robust_list 304
set_thread_area set_thread_area
set_tid_address 252 set_tid_address 252
set_tls
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 216 setfsgid32 216
@ -511,6 +514,8 @@ unlinkat 294
unshare 303 unshare 303
uretprobe uretprobe
userfaultfd 355 userfaultfd 355
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 315 utimensat 315

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 361 bind 361
bpf 351 bpf 351
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat 292
get_mempolicy 269 get_mempolicy 269
get_robust_list 305 get_robust_list 305
get_thread_area get_thread_area
get_tls
getcpu 311 getcpu 311
getcwd 183 getcwd 183
getdents 141 getdents 141
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 304 set_robust_list 304
set_thread_area set_thread_area
set_tid_address 252 set_tid_address 252
set_tls
setdomainname 121 setdomainname 121
setfsgid 216 setfsgid 216
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 294
unshare 303 unshare 303
uretprobe uretprobe
userfaultfd 355 userfaultfd 355
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 315 utimensat 315

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 341 bind 341
bpf 375 bpf 375
breakpoint
brk 45 brk 45
cachectl cachectl
cacheflush 123 cacheflush 123
@ -113,6 +114,7 @@ futimesat 299
get_mempolicy 275 get_mempolicy 275
get_robust_list 312 get_robust_list 312
get_thread_area get_thread_area
get_tls
getcpu 318 getcpu 318
getcwd 183 getcwd 183
getdents 141 getdents 141
@ -404,6 +406,7 @@ set_mempolicy_home_node 450
set_robust_list 311 set_robust_list 311
set_thread_area set_thread_area
set_tid_address 258 set_tid_address 258
set_tls
setdomainname 121 setdomainname 121
setfsgid 139 setfsgid 139
setfsgid32 216 setfsgid32 216
@ -512,6 +515,8 @@ unlinkat 301
unshare 310 unshare 310
uretprobe uretprobe
userfaultfd 377 userfaultfd 377
usr26
usr32
ustat 62 ustat 62
utime 30 utime 30
utimensat 320 utimensat 320

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 353 bind 353
bpf 349 bpf 349
breakpoint
brk 17 brk 17
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat 288
get_mempolicy 304 get_mempolicy 304
get_robust_list 301 get_robust_list 301
get_thread_area get_thread_area
get_tls
getcpu 308 getcpu 308
getcwd 119 getcwd 119
getdents 174 getdents 174
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 300 set_robust_list 300
set_thread_area set_thread_area
set_tid_address 166 set_tid_address 166
set_tls
setdomainname 163 setdomainname 163
setfsgid 229 setfsgid 229
setfsgid32 94 setfsgid32 94
@ -511,6 +514,8 @@ unlinkat 290
unshare 299 unshare 299
uretprobe uretprobe
userfaultfd 352 userfaultfd 352
usr26
usr32
ustat 168 ustat 168
utime 30 utime 30
utimensat 310 utimensat 310

View File

@ -16,6 +16,7 @@ atomic_barrier
atomic_cmpxchg_32 atomic_cmpxchg_32
bind 49 bind 49
bpf 321 bpf 321
breakpoint
brk 12 brk 12
cachectl cachectl
cacheflush cacheflush
@ -113,6 +114,7 @@ futimesat 261
get_mempolicy 239 get_mempolicy 239
get_robust_list 274 get_robust_list 274
get_thread_area 211 get_thread_area 211
get_tls
getcpu 309 getcpu 309
getcwd 79 getcwd 79
getdents 78 getdents 78
@ -403,6 +405,7 @@ set_mempolicy_home_node 450
set_robust_list 273 set_robust_list 273
set_thread_area 205 set_thread_area 205
set_tid_address 218 set_tid_address 218
set_tls
setdomainname 171 setdomainname 171
setfsgid 123 setfsgid 123
setfsgid32 setfsgid32
@ -511,6 +514,8 @@ unlinkat 263
unshare 272 unshare 272
uretprobe 335 uretprobe 335
userfaultfd 323 userfaultfd 323
usr26
usr32
ustat 136 ustat 136
utime 132 utime 132
utimensat 280 utimensat 280

View File

@ -1359,6 +1359,10 @@ static void boot_entry_parse_tries(
if (!strcaseeq16(counter, suffix)) if (!strcaseeq16(counter, suffix))
return; return;
entry->id = xasprintf("%.*ls%ls",
(int) prefix_len - 1,
file,
suffix);
entry->tries_left = tries_left; entry->tries_left = tries_left;
entry->tries_done = tries_done; entry->tries_done = tries_done;
entry->path = xstrdup16(path); entry->path = xstrdup16(path);
@ -1531,6 +1535,8 @@ static void boot_entry_add_type1(
return; return;
entry->device = device; entry->device = device;
if (!entry->id)
entry->id = xstrdup16(file); entry->id = xstrdup16(file);
strtolower16(entry->id); strtolower16(entry->id);

View File

@ -151,15 +151,15 @@
#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq)) #define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
#define UNIQ __COUNTER__ #define UNIQ __COUNTER__
/* Note that this works differently from pthread_once(): this macro does /* The macro is true when the code block is called first time, and is false for the second and later times.
* not synchronize code execution, i.e. code that is run conditionalized * Note that this works differently from pthread_once(): this macro does not synchronize code execution, i.e.
* on this macro will run concurrently to all other code conditionalized * code that is run conditionalized on this macro will run concurrently to all other code conditionalized the
* the same way, there's no ordering or completion enforced. */ * same way, there's no ordering or completion enforced. */
#define ONCE __ONCE(UNIQ_T(_once_, UNIQ)) #define ONCE __ONCE(UNIQ_T(_once_, UNIQ))
#define __ONCE(o) \ #define __ONCE(o) \
({ \ ({ \
static bool (o) = false; \ static bool (o) = false; \
__atomic_exchange_n(&(o), true, __ATOMIC_SEQ_CST); \ !__atomic_exchange_n(&(o), true, __ATOMIC_SEQ_CST); \
}) })
#define U64_KB UINT64_C(1024) #define U64_KB UINT64_C(1024)

View File

@ -134,17 +134,37 @@ void pull_job_curl_on_finished(CurlGlue *g, CURL *curl, CURLcode result) {
if (!j || IN_SET(j->state, PULL_JOB_DONE, PULL_JOB_FAILED)) if (!j || IN_SET(j->state, PULL_JOB_DONE, PULL_JOB_FAILED))
return; return;
if (result != CURLE_OK) {
r = log_error_errno(SYNTHETIC_ERRNO(EIO), "Transfer failed: %s", curl_easy_strerror(result));
goto finish;
}
code = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); code = curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme);
if (code != CURLE_OK || !scheme) { if (code != CURLE_OK || !scheme) {
r = log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to retrieve URL scheme."); r = log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to retrieve URL scheme.");
goto finish; goto finish;
} }
if (strcaseeq(scheme, "FILE") && result == CURLE_FILE_COULDNT_READ_FILE && j->on_not_found) {
_cleanup_free_ char *new_url = NULL;
/* This resource wasn't found, but the implementor wants to maybe let us know a new URL, query for it. */
r = j->on_not_found(j, &new_url);
if (r < 0)
goto finish;
if (r > 0) { /* A new url to use */
assert(new_url);
r = pull_job_restart(j, new_url);
if (r < 0)
goto finish;
return;
}
/* if this didn't work, handle like any other error below */
}
if (result != CURLE_OK) {
r = log_error_errno(SYNTHETIC_ERRNO(EIO), "Transfer failed: %s", curl_easy_strerror(result));
goto finish;
}
if (STRCASE_IN_SET(scheme, "HTTP", "HTTPS")) { if (STRCASE_IN_SET(scheme, "HTTP", "HTTPS")) {
long status; long status;
@ -773,7 +793,7 @@ int pull_job_begin(PullJob *j) {
if (curl_easy_setopt(j->curl, CURLOPT_XFERINFODATA, j) != CURLE_OK) if (curl_easy_setopt(j->curl, CURLOPT_XFERINFODATA, j) != CURLE_OK)
return -EIO; return -EIO;
if (curl_easy_setopt(j->curl, CURLOPT_NOPROGRESS, 0) != CURLE_OK) if (curl_easy_setopt(j->curl, CURLOPT_NOPROGRESS, 0L) != CURLE_OK)
return -EIO; return -EIO;
r = curl_glue_add(j->glue, j->curl); r = curl_glue_add(j->glue, j->curl);

View File

@ -261,7 +261,7 @@ int start_upload(Uploader *u,
} }
if (STRPTR_IN_SET(arg_trust, "-", "all")) if (STRPTR_IN_SET(arg_trust, "-", "all"))
easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0, easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L,
LOG_ERR, return -EUCLEAN); LOG_ERR, return -EUCLEAN);
else if (arg_trust || startswith(u->url, "https://")) else if (arg_trust || startswith(u->url, "https://"))
easy_setopt(curl, CURLOPT_CAINFO, arg_trust ?: TRUST_FILE, easy_setopt(curl, CURLOPT_CAINFO, arg_trust ?: TRUST_FILE,

View File

@ -153,8 +153,8 @@ int device_set_syspath(sd_device *device, const char *_syspath, bool verify) {
r = chase(_syspath, NULL, 0, &syspath, &fd); r = chase(_syspath, NULL, 0, &syspath, &fd);
if (r == -ENOENT) if (r == -ENOENT)
/* the device does not exist (any more?) */ /* the device does not exist (any more?) */
return log_debug_errno(SYNTHETIC_ERRNO(ENODEV), return log_trace_errno(SYNTHETIC_ERRNO(ENODEV),
"sd-device: Failed to chase symlinks in \"%s\".", _syspath); "sd-device: Device \"%s\" not found.", _syspath);
if (r < 0) if (r < 0)
return log_debug_errno(r, "sd-device: Failed to get target of '%s': %m", _syspath); return log_debug_errno(r, "sd-device: Failed to get target of '%s': %m", _syspath);

View File

@ -4,31 +4,42 @@
static SD_VARLINK_DEFINE_METHOD( static SD_VARLINK_DEFINE_METHOD(
GetInfo, GetInfo,
SD_VARLINK_FIELD_COMMENT("String identifying the vendor of this service"),
SD_VARLINK_DEFINE_OUTPUT(vendor, SD_VARLINK_STRING, 0), SD_VARLINK_DEFINE_OUTPUT(vendor, SD_VARLINK_STRING, 0),
SD_VARLINK_FIELD_COMMENT("String identifying the product implementing this service"),
SD_VARLINK_DEFINE_OUTPUT(product, SD_VARLINK_STRING, 0), SD_VARLINK_DEFINE_OUTPUT(product, SD_VARLINK_STRING, 0),
SD_VARLINK_FIELD_COMMENT("Version string of this product"),
SD_VARLINK_DEFINE_OUTPUT(version, SD_VARLINK_STRING, 0), SD_VARLINK_DEFINE_OUTPUT(version, SD_VARLINK_STRING, 0),
SD_VARLINK_FIELD_COMMENT("Web URL pointing to additional information about this service"),
SD_VARLINK_DEFINE_OUTPUT(url, SD_VARLINK_STRING, 0), SD_VARLINK_DEFINE_OUTPUT(url, SD_VARLINK_STRING, 0),
SD_VARLINK_FIELD_COMMENT("List of interfaces implemented by this service"),
SD_VARLINK_DEFINE_OUTPUT(interfaces, SD_VARLINK_STRING, SD_VARLINK_ARRAY)); SD_VARLINK_DEFINE_OUTPUT(interfaces, SD_VARLINK_STRING, SD_VARLINK_ARRAY));
static SD_VARLINK_DEFINE_METHOD( static SD_VARLINK_DEFINE_METHOD(
GetInterfaceDescription, GetInterfaceDescription,
SD_VARLINK_FIELD_COMMENT("Name of interface to query interface description of"),
SD_VARLINK_DEFINE_INPUT(interface, SD_VARLINK_STRING, 0), SD_VARLINK_DEFINE_INPUT(interface, SD_VARLINK_STRING, 0),
SD_VARLINK_FIELD_COMMENT("Interface description in Varlink IDL format"),
SD_VARLINK_DEFINE_OUTPUT(description, SD_VARLINK_STRING, 0)); SD_VARLINK_DEFINE_OUTPUT(description, SD_VARLINK_STRING, 0));
static SD_VARLINK_DEFINE_ERROR( static SD_VARLINK_DEFINE_ERROR(
InterfaceNotFound, InterfaceNotFound,
SD_VARLINK_FIELD_COMMENT("Name of interface that was called but does not exist"),
SD_VARLINK_DEFINE_FIELD(interface, SD_VARLINK_STRING, 0)); SD_VARLINK_DEFINE_FIELD(interface, SD_VARLINK_STRING, 0));
static SD_VARLINK_DEFINE_ERROR( static SD_VARLINK_DEFINE_ERROR(
MethodNotFound, MethodNotFound,
SD_VARLINK_FIELD_COMMENT("Name of method that was called but does not exist"),
SD_VARLINK_DEFINE_FIELD(method, SD_VARLINK_STRING, 0)); SD_VARLINK_DEFINE_FIELD(method, SD_VARLINK_STRING, 0));
static SD_VARLINK_DEFINE_ERROR( static SD_VARLINK_DEFINE_ERROR(
MethodNotImplemented, MethodNotImplemented,
SD_VARLINK_FIELD_COMMENT("Name of method that was called but is not implemented."),
SD_VARLINK_DEFINE_FIELD(method, SD_VARLINK_STRING, 0)); SD_VARLINK_DEFINE_FIELD(method, SD_VARLINK_STRING, 0));
static SD_VARLINK_DEFINE_ERROR( static SD_VARLINK_DEFINE_ERROR(
InvalidParameter, InvalidParameter,
SD_VARLINK_FIELD_COMMENT("Name of the invalid parameter"),
SD_VARLINK_DEFINE_FIELD(parameter, SD_VARLINK_STRING, 0)); SD_VARLINK_DEFINE_FIELD(parameter, SD_VARLINK_STRING, 0));
static SD_VARLINK_DEFINE_ERROR(PermissionDenied); static SD_VARLINK_DEFINE_ERROR(PermissionDenied);
@ -39,11 +50,20 @@ static SD_VARLINK_DEFINE_ERROR(ExpectedMore);
SD_VARLINK_DEFINE_INTERFACE( SD_VARLINK_DEFINE_INTERFACE(
org_varlink_service, org_varlink_service,
"org.varlink.service", "org.varlink.service",
SD_VARLINK_INTERFACE_COMMENT("General Varlink service interface"),
SD_VARLINK_SYMBOL_COMMENT("Get service meta information"),
&vl_method_GetInfo, &vl_method_GetInfo,
SD_VARLINK_SYMBOL_COMMENT("Get description of an implemented interface in Varlink IDL format"),
&vl_method_GetInterfaceDescription, &vl_method_GetInterfaceDescription,
SD_VARLINK_SYMBOL_COMMENT("Error returned if a method is called on an unknown interface"),
&vl_error_InterfaceNotFound, &vl_error_InterfaceNotFound,
SD_VARLINK_SYMBOL_COMMENT("Error returned if an unknown method is called on an known interface"),
&vl_error_MethodNotFound, &vl_error_MethodNotFound,
SD_VARLINK_SYMBOL_COMMENT("Error returned if an method is called that is known but not implemented"),
&vl_error_MethodNotImplemented, &vl_error_MethodNotImplemented,
SD_VARLINK_SYMBOL_COMMENT("Error returned if a method is called with an invalid parameter"),
&vl_error_InvalidParameter, &vl_error_InvalidParameter,
SD_VARLINK_SYMBOL_COMMENT("General permission error"),
&vl_error_PermissionDenied, &vl_error_PermissionDenied,
SD_VARLINK_SYMBOL_COMMENT("A method was called with the 'more' flag off, but it may only be called with the flag turned on"),
&vl_error_ExpectedMore); &vl_error_ExpectedMore);

View File

@ -21,7 +21,7 @@
ip={dhcp|on|any|dhcp6|auto6|either6|link6|link-local} ip={dhcp|on|any|dhcp6|auto6|either6|link6|link-local}
ip=<interface>:{dhcp|on|any|dhcp6|auto6|link6|link-local}[:[<mtu>][:<macaddr>]] ip=<interface>:{dhcp|on|any|dhcp6|auto6|link6|link-local}[:[<mtu>][:<macaddr>]]
ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|link6|ibft|link-local}[:[<mtu>][:<macaddr>]] ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|link6|ibft|link-local}[:[<mtu>][:<macaddr>]]
ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|link6|ibft|link-local}[:[<dns1>][:<dns2>]] ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|link6|ibft|link-local}[:[<dns1>][:[<dns2>][:[<ntp>]]]]
rd.route=<net>/<netmask>:<gateway>[:<interface>] rd.route=<net>/<netmask>:<gateway>[:<interface>]
nameserver=<IP> [nameserver=<IP> ...] nameserver=<IP> [nameserver=<IP> ...]
rd.peerdns=0 rd.peerdns=0
@ -197,6 +197,7 @@ static Network* network_free(Network *network) {
strv_free(network->vlan); strv_free(network->vlan);
free(network->bridge); free(network->bridge);
free(network->bond); free(network->bond);
free(network->ntp);
while ((address = network->addresses)) while ((address = network->addresses))
address_free(address); address_free(address);
@ -635,6 +636,27 @@ static int network_set_bond(Context *context, const char *ifname, const char *va
return free_and_strdup(&network->bond, value); return free_and_strdup(&network->bond, value);
} }
static int network_set_ntp(Context *context, const char *ifname, const char *value) {
Network *network;
int r;
assert(context);
assert(ifname);
if (isempty(value))
return 0;
r = in_addr_from_string_auto(value, NULL, NULL);
if (r < 0)
return log_debug_errno(r, "Invalid NTP address '%s' for '%s'", value, ifname);
r = network_acquire(context, ifname, &network);
if (r < 0)
return log_debug_errno(r, "Failed to acquire network for '%s': %m", ifname);
return free_and_strdup(&network->ntp, value);
}
static int parse_cmdline_ip_mtu_mac(Context *context, const char *ifname, const char *value) { static int parse_cmdline_ip_mtu_mac(Context *context, const char *ifname, const char *value) {
_cleanup_free_ char *mtu = NULL; _cleanup_free_ char *mtu = NULL;
int r; int r;
@ -850,6 +872,18 @@ static int parse_cmdline_ip_address(Context *context, int family, const char *va
if (r < 0) if (r < 0)
return r; return r;
/* Next, try [:<ntp>] */
_cleanup_free_ char *ntp = NULL;
r = extract_ip_address_str(AF_UNSPEC, &p, &ntp);
if (r < 0)
return log_debug_errno(r, "Failed to parse NTP address in ip=%s: %m", value);
if (r == 0)
return 0;
r = network_set_ntp(context, ifname, ntp);
if (r < 0)
return r;
/* refuse unexpected trailing strings */ /* refuse unexpected trailing strings */
if (!isempty(p)) if (!isempty(p))
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Unexpected trailing string in 'ip=%s'.", value); return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Unexpected trailing string in 'ip=%s'.", value);
@ -1358,6 +1392,9 @@ void network_dump(Network *network, FILE *f) {
if (network->bond) if (network->bond)
fprintf(f, "Bond=%s\n", network->bond); fprintf(f, "Bond=%s\n", network->bond);
if (network->ntp)
fprintf(f, "NTP=%s\n", network->ntp);
fputs("\n[DHCP]\n", f); fputs("\n[DHCP]\n", f);
if (!isempty(network->hostname)) if (!isempty(network->hostname))

View File

@ -65,6 +65,7 @@ struct Network {
char **vlan; char **vlan;
char *bridge; char *bridge;
char *bond; char *bond;
char *ntp;
/* [DHCP] */ /* [DHCP] */
char *hostname; char *hostname;

View File

@ -215,6 +215,51 @@ int main(int argc, char *argv[]) {
"Gateway=192.168.0.1\n" "Gateway=192.168.0.1\n"
); );
test_network_one("eth0", "ip", "192.168.0.10::192.168.0.1:255.255.255.0::eth0:on:10.10.10.10:10.10.10.11:10.10.10.161",
"[Match]\n"
"Name=eth0\n"
"\n[Link]\n"
"\n[Network]\n"
"DHCP=yes\n"
"DNS=10.10.10.10\n"
"DNS=10.10.10.11\n"
"NTP=10.10.10.161\n"
"\n[DHCP]\n"
"\n[Address]\n"
"Address=192.168.0.10/24\n"
"\n[Route]\n"
"Gateway=192.168.0.1\n"
);
test_network_one("eth0", "ip", "192.168.0.10::192.168.0.1:255.255.255.0::eth0:on:10.10.10.10::10.10.10.161",
"[Match]\n"
"Name=eth0\n"
"\n[Link]\n"
"\n[Network]\n"
"DHCP=yes\n"
"DNS=10.10.10.10\n"
"NTP=10.10.10.161\n"
"\n[DHCP]\n"
"\n[Address]\n"
"Address=192.168.0.10/24\n"
"\n[Route]\n"
"Gateway=192.168.0.1\n"
);
test_network_one("eth0", "ip", "192.168.0.10::192.168.0.1:255.255.255.0::eth0:on:::10.10.10.161",
"[Match]\n"
"Name=eth0\n"
"\n[Link]\n"
"\n[Network]\n"
"DHCP=yes\n"
"NTP=10.10.10.161\n"
"\n[DHCP]\n"
"\n[Address]\n"
"Address=192.168.0.10/24\n"
"\n[Route]\n"
"Gateway=192.168.0.1\n"
);
test_network_one("eth0", "ip", "[2001:1234:56:8f63::10]::[2001:1234:56:8f63::1]:64:hogehoge:eth0:on", test_network_one("eth0", "ip", "[2001:1234:56:8f63::10]::[2001:1234:56:8f63::1]:64:hogehoge:eth0:on",
"[Match]\n" "[Match]\n"
"Name=eth0\n" "Name=eth0\n"

View File

@ -11,7 +11,6 @@
#include "networkctl-util.h" #include "networkctl-util.h"
int list_links(int argc, char *argv[], void *userdata) { int list_links(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL; _cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
_cleanup_(link_info_array_freep) LinkInfo *links = NULL; _cleanup_(link_info_array_freep) LinkInfo *links = NULL;
_cleanup_(table_unrefp) Table *table = NULL; _cleanup_(table_unrefp) Table *table = NULL;
@ -22,10 +21,6 @@ int list_links(int argc, char *argv[], void *userdata) {
if (r != 0) if (r != 0)
return r; return r;
r = acquire_bus(&bus);
if (r < 0)
return r;
r = sd_netlink_open(&rtnl); r = sd_netlink_open(&rtnl);
if (r < 0) if (r < 0)
return log_error_errno(r, "Failed to connect to netlink: %m"); return log_error_errno(r, "Failed to connect to netlink: %m");

View File

@ -757,7 +757,7 @@ static int link_status_one(
if (r < 0) if (r < 0)
return table_log_add_error(r); return table_log_add_error(r);
r = table_add_cell_stringf(table, NULL, "%sbps/%sbps", r = table_add_cell_stringf(table, NULL, "%sBps/%sBps",
FORMAT_BYTES_FULL(info->tx_bitrate, 0), FORMAT_BYTES_FULL(info->tx_bitrate, 0),
FORMAT_BYTES_FULL(info->rx_bitrate, 0)); FORMAT_BYTES_FULL(info->rx_bitrate, 0));
if (r < 0) if (r < 0)

View File

@ -440,14 +440,15 @@ static int network_append_json(Network *network, sd_json_variant **v) {
v, v,
SD_JSON_BUILD_PAIR_STRING("NetworkFile", network->filename), SD_JSON_BUILD_PAIR_STRING("NetworkFile", network->filename),
SD_JSON_BUILD_PAIR_STRV("NetworkFileDropins", network->dropins), SD_JSON_BUILD_PAIR_STRV("NetworkFileDropins", network->dropins),
SD_JSON_BUILD_PAIR_BOOLEAN("RequiredForOnline", network->required_for_online), SD_JSON_BUILD_PAIR_BOOLEAN("RequiredForOnline", network->required_for_online > 0),
SD_JSON_BUILD_PAIR("RequiredOperationalStateForOnline", SD_JSON_BUILD_PAIR_CONDITION(
SD_JSON_BUILD_ARRAY(SD_JSON_BUILD_STRING(link_operstate_to_string(network->required_operstate_for_online.min)), operational_state_range_is_valid(&network->required_operstate_for_online),
"RequiredOperationalStateForOnline",
SD_JSON_BUILD_ARRAY(
SD_JSON_BUILD_STRING(link_operstate_to_string(network->required_operstate_for_online.min)),
SD_JSON_BUILD_STRING(link_operstate_to_string(network->required_operstate_for_online.max)))), SD_JSON_BUILD_STRING(link_operstate_to_string(network->required_operstate_for_online.max)))),
SD_JSON_BUILD_PAIR_STRING("RequiredFamilyForOnline", SD_JSON_BUILD_PAIR_STRING("RequiredFamilyForOnline", link_required_address_family_to_string(network->required_family_for_online)),
link_required_address_family_to_string(network->required_family_for_online)), SD_JSON_BUILD_PAIR_STRING("ActivationPolicy", activation_policy_to_string(network->activation_policy)));
SD_JSON_BUILD_PAIR_STRING("ActivationPolicy",
activation_policy_to_string(network->activation_policy)));
} }
static int device_append_json(sd_device *device, sd_json_variant **v) { static int device_append_json(sd_device *device, sd_json_variant **v) {

View File

@ -179,6 +179,7 @@ static char *arg_copy_source = NULL;
static char *arg_make_ddi = NULL; static char *arg_make_ddi = NULL;
static char *arg_generate_fstab = NULL; static char *arg_generate_fstab = NULL;
static char *arg_generate_crypttab = NULL; static char *arg_generate_crypttab = NULL;
static bool arg_relax_copy_block_security = false;
STATIC_DESTRUCTOR_REGISTER(arg_node, freep); STATIC_DESTRUCTOR_REGISTER(arg_node, freep);
STATIC_DESTRUCTOR_REGISTER(arg_root, freep); STATIC_DESTRUCTOR_REGISTER(arg_root, freep);
@ -8114,6 +8115,9 @@ static int parse_argv(int argc, char *argv[], X509 **ret_certificate, EVP_PKEY *
r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_image); r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_image);
if (r < 0) if (r < 0)
return r; return r;
arg_relax_copy_block_security = false;
break; break;
case ARG_IMAGE_POLICY: case ARG_IMAGE_POLICY:
@ -8515,6 +8519,8 @@ static int parse_argv(int argc, char *argv[], X509 **ret_certificate, EVP_PKEY *
arg_root = strdup("/sysusr"); arg_root = strdup("/sysusr");
if (!arg_root) if (!arg_root)
return log_oom(); return log_oom();
arg_relax_copy_block_security = true;
} }
if (argc > optind) { if (argc > optind) {
@ -9189,7 +9195,9 @@ static int run(int argc, char *argv[]) {
r = context_open_copy_block_paths( r = context_open_copy_block_paths(
context, context,
loop_device ? loop_device->devno : /* if --image= is specified, only allow partitions on the loopback device */ loop_device ? loop_device->devno : /* if --image= is specified, only allow partitions on the loopback device */
arg_root && !arg_image ? 0 : /* if --root= is specified, don't accept any block device */ /* if --root= is specified, don't accept any block device, unless it
* was set automatically because we are in the initrd */
arg_root && !arg_image && !arg_relax_copy_block_security ? 0 :
(dev_t) -1); /* if neither is specified, make no restrictions */ (dev_t) -1); /* if neither is specified, make no restrictions */
if (r < 0) if (r < 0)
return r; return r;

View File

@ -353,6 +353,7 @@ static int help(void) {
" --tldr Show non-comment parts of configuration\n" " --tldr Show non-comment parts of configuration\n"
" --prefix=PATH Only apply rules with the specified prefix\n" " --prefix=PATH Only apply rules with the specified prefix\n"
" --no-pager Do not pipe output into a pager\n" " --no-pager Do not pipe output into a pager\n"
" --strict Fail on any kind of failures\n"
"\nSee the %s for details.\n", "\nSee the %s for details.\n",
program_invocation_short_name, program_invocation_short_name,
link); link);

View File

@ -1771,10 +1771,7 @@ static int merge_subprocess(
if (r < 0) if (r < 0)
return r; return r;
r = dissected_image_decrypt_interactively( r = dissected_image_decrypt(m, /* passphrase= */ NULL, &verity_settings, flags);
m, NULL,
&verity_settings,
flags);
if (r < 0) if (r < 0)
return r; return r;

View File

@ -681,6 +681,134 @@ TEST(dir_fd_is_root) {
assert_se(dir_fd_is_root_or_cwd(fd) == 0); assert_se(dir_fd_is_root_or_cwd(fd) == 0);
} }
static void test_path_is_root_at_one(bool expected) {
ASSERT_OK_POSITIVE(path_is_root("/"));
ASSERT_OK_POSITIVE(path_is_root("/."));
ASSERT_OK_EQ(path_is_root("/./.."), expected);
ASSERT_OK_EQ(path_is_root("/.."), expected);
ASSERT_OK_EQ(path_is_root("/../"), expected);
ASSERT_OK_EQ(path_is_root("/../."), expected);
ASSERT_OK_EQ(path_is_root("/../.."), expected);
ASSERT_OK_ZERO(path_is_root("/usr"));
ASSERT_OK_ZERO(path_is_root("/./usr"));
ASSERT_OK_ZERO(path_is_root("/../usr"));
ASSERT_OK_ZERO(path_is_root("/.././usr"));
ASSERT_OK_ZERO(path_is_root("/../../usr"));
_cleanup_close_ int fd = -EBADF;
ASSERT_OK_ERRNO(fd = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW));
ASSERT_OK_POSITIVE(path_is_root_at(fd, NULL));
ASSERT_OK_POSITIVE(path_is_root_at(fd, ""));
ASSERT_OK_POSITIVE(path_is_root_at(fd, "."));
ASSERT_OK_EQ(path_is_root_at(fd, "./../"), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "../"), expected);
ASSERT_OK_POSITIVE(path_is_root_at(fd, "/"));
ASSERT_OK_POSITIVE(path_is_root_at(fd, "/."));
ASSERT_OK_EQ(path_is_root_at(fd, "/./.."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/.."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/../"), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/../."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/../.."), expected);
ASSERT_OK_ZERO(path_is_root_at(fd, "usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "./usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "../usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/./usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/../usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/.././usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/../../usr"));
safe_close(fd);
ASSERT_OK_ERRNO(fd = open("/../", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW));
ASSERT_OK_EQ(path_is_root_at(fd, NULL), expected);
ASSERT_OK_EQ(path_is_root_at(fd, ""), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "./.."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "../"), expected);
ASSERT_OK_POSITIVE(path_is_root_at(fd, "/"));
ASSERT_OK_POSITIVE(path_is_root_at(fd, "/."));
ASSERT_OK_EQ(path_is_root_at(fd, "/./.."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/.."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/../"), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/../."), expected);
ASSERT_OK_EQ(path_is_root_at(fd, "/../.."), expected);
ASSERT_OK_ZERO(path_is_root_at(fd, "usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "./usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "../usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/./usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/../usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/.././usr"));
ASSERT_OK_ZERO(path_is_root_at(fd, "/../../usr"));
}
TEST(path_is_root_at) {
int r;
test_path_is_root_at_one(true);
r = detach_mount_namespace();
if (r < 0)
return (void) log_tests_skipped_errno(r, "Failed to detach mount namespace");
/* Interestingly, even after bind mount a path on "/", still "/" points to the previous root
* directory, but "/../" points to the new root directory. Hence, path_is_root("/") is true but
* path_is_root("/../") is false. Such spurious situation is resolved after chroot()ing to the new
* root directory. */
ASSERT_OK(mount_nofollow_verbose(LOG_DEBUG, "/", "/", NULL, MS_BIND|MS_REC, NULL));
log_debug("/* %s: bind mount(\"/\", \"/\") */", __func__);
test_path_is_root_at_one(false);
/* chroot("/") does not change anything. */
ASSERT_OK_ERRNO(chroot("/"));
log_debug("/* %s: chroot(\"/\") */", __func__);
test_path_is_root_at_one(false);
/* chdir("/") neither change anything. */
ASSERT_OK_ERRNO(chdir("/"));
log_debug("/* %s: chdir(\"/\") */", __func__);
test_path_is_root_at_one(false);
/* chdir("/../") neither change anything. */
ASSERT_OK_ERRNO(chdir("/../"));
log_debug("/* %s: chdir(\"/../\") */", __func__);
test_path_is_root_at_one(false);
/* After chroot("/../"), both "/" and "/../" point to the new root directory. */
ASSERT_OK_ERRNO(chroot("/../"));
log_debug("/* %s: chroot(\"/../\") */", __func__);
test_path_is_root_at_one(true);
/* chdir("/../") does not change anything. */
ASSERT_OK_ERRNO(chdir("/../"));
log_debug("/* %s: chdir(\"/../\") again */", __func__);
test_path_is_root_at_one(true);
/* bind mounting to non-root directory has no problem, of course. */
_cleanup_(rm_rf_physical_and_freep) char *tmp = NULL;
ASSERT_OK(mkdtemp_malloc("/tmp/test-path_is_root-XXXXXX", &tmp));
ASSERT_OK(mount_nofollow_verbose(LOG_DEBUG, "/", tmp, NULL, MS_BIND|MS_REC, NULL));
log_debug("/* %s: bind mount(\"/\", \"%s\") */", __func__, tmp);
test_path_is_root_at_one(true);
ASSERT_OK_ERRNO(chdir(tmp));
log_debug("/* %s: chdir(\"%s\") */", __func__, tmp);
test_path_is_root_at_one(true);
ASSERT_OK_ERRNO(chroot(tmp));
log_debug("/* %s: chroot(\"%s\") */", __func__, tmp);
test_path_is_root_at_one(true);
ASSERT_OK_ERRNO(chdir(tmp));
log_debug("/* %s: chdir(\"%s\") again */", __func__, tmp);
test_path_is_root_at_one(true);
}
TEST(fds_are_same_mount) { TEST(fds_are_same_mount) {
_cleanup_close_ int fd1 = -EBADF, fd2 = -EBADF, fd3 = -EBADF, fd4 = -EBADF; _cleanup_close_ int fd1 = -EBADF, fd2 = -EBADF, fd3 = -EBADF, fd4 = -EBADF;

View File

@ -45,6 +45,22 @@ static void test_file(void) {
assert_se(startswith(__FILE__, RELATIVE_SOURCE_PATH "/")); assert_se(startswith(__FILE__, RELATIVE_SOURCE_PATH "/"));
} }
static void test_log_once_impl(void) {
log_once(LOG_INFO, "This should be logged in LOG_INFO at first, then in LOG_DEBUG later.");
log_once(LOG_DEBUG, "This should be logged only once in LOG_DEBUG.");
ASSERT_ERROR(log_once_errno(LOG_INFO, SYNTHETIC_ERRNO(ENOANO),
"This should be logged with errno in LOG_INFO at first, then in LOG_DEBUG later: %m"),
ENOANO);
ASSERT_ERROR(log_once_errno(LOG_DEBUG, SYNTHETIC_ERRNO(EBADMSG),
"This should be logged only once with errno in LOG_DEBUG: %m"),
EBADMSG);
}
static void test_log_once(void) {
for (unsigned i = 0; i < 4; i++)
test_log_once_impl();
}
static void test_log_struct(void) { static void test_log_struct(void) {
log_struct(LOG_INFO, log_struct(LOG_INFO,
"MESSAGE=Waldo PID="PID_FMT" (no errno)", getpid_cached(), "MESSAGE=Waldo PID="PID_FMT" (no errno)", getpid_cached(),
@ -236,6 +252,8 @@ int main(int argc, char* argv[]) {
assert_se(log_info_errno(SYNTHETIC_ERRNO(EUCLEAN), "foo") == -EUCLEAN); assert_se(log_info_errno(SYNTHETIC_ERRNO(EUCLEAN), "foo") == -EUCLEAN);
test_log_once();
for (int target = 0; target < _LOG_TARGET_MAX; target++) { for (int target = 0; target < _LOG_TARGET_MAX; target++) {
log_set_target(target); log_set_target(target);
log_open(); log_open();

View File

@ -1228,4 +1228,20 @@ TEST(ASSERT) {
ASSERT_SIGNAL(ASSERT_NE_ID128(SD_ID128_NULL, SD_ID128_NULL), SIGABRT); ASSERT_SIGNAL(ASSERT_NE_ID128(SD_ID128_NULL, SD_ID128_NULL), SIGABRT);
} }
static void test_once_impl(void) {
static unsigned count = 0;
if (ONCE) {
log_info("This should be logged only once.");
count++;
}
ASSERT_EQ(count, 1u);
}
TEST(once) {
for (unsigned i = 0; i < 20; i++)
test_once_impl();
}
DEFINE_TEST_MAIN(LOG_INFO); DEFINE_TEST_MAIN(LOG_INFO);

View File

@ -335,7 +335,7 @@ static usec_t extra_timeout_usec(void) {
parsed = true; parsed = true;
e = getenv("SYSTEMD_UDEV_EXTRA_TIMEOUT_SEC"); e = secure_getenv("SYSTEMD_UDEV_EXTRA_TIMEOUT_SEC");
if (!e) if (!e)
return saved; return saved;