Commit Graph
38461 Commits
Author SHA1 Message Date
Yu Watanabe bb60956b39 path-util: make readlink_value() refuse O_DIRECTORY returned from path_extract_filename()
The function is now only used by sd-device.c and pam_systemd.c, and they
expects the result are not directory. Hence, it is safe to change the
behavior.

Addresses https://github.com/systemd/systemd/pull/23089#discussion_r853006017.
2022-04-20 01:40:39 +09:00
Sonali Srivastava c52950c292 hostnamed: display firmware version 2022-04-19 13:54:16 +02:00
Zbigniew Jędrzejewski-Szmek c5503601e2 shared/seccomp: add note about clone2() being unimportant
In case anyone else starts wondering whether it should be listed
as I did…
2022-04-19 11:56:23 +02:00
Yu Watanabe 056a18e465 test: add several tests for track item 2022-04-19 18:02:10 +09:00
Yu Watanabe 63ec7a8490 test: shorten code a bit 2022-04-19 18:02:10 +09:00
Yu Watanabe c399ed923d sd-bus: use hashmap_contains() and drop unnecessary cast 2022-04-19 18:02:10 +09:00
Yu Watanabe 55bfacc6c3 sd-bus: do not return negative errno when unknown name is specified
When 'recursive' is false, then sd_bus_track_remove_name() does not
return negative errno when unknown name is specified. Let's follow the
same pattern for the case that 'recursive' is true.
2022-04-19 18:02:10 +09:00
Yu Watanabe 6a7ca27740 sd-bus: do not read unused value 2022-04-19 18:02:10 +09:00
Yu Watanabe c2d7dd35d2 sd-bus: introduce ref/unref function for track_item 2022-04-19 18:01:46 +09:00
Yu Watanabe b21f237d99 sd-bus: fix reference counter to be incremented
Fixes #23097.
2022-04-19 17:58:08 +09:00
Yu Watanabe c8431e9e35 macro: check over flow in reference counter 2022-04-19 17:58:02 +09:00
Yu Watanabe 6dd18b34cf json: use unsigned for refernce counter
For other places, we use unsigned for reference counter.
2022-04-19 17:56:40 +09:00
Luca Boccassi 2362fdde1b nspawn: fix locating config files with --ephemeral
When --ephemeral is used, a random 16 characters suffix is added to the image
name, so matching on .nspawn files based on the image name no longer works.

Fixes https://github.com/systemd/systemd/issues/13297
2022-04-19 06:17:16 +09:00
Yu Watanabe 915774ecb8 Merge pull request #23101 from yuwata/sd-device-cleanups
sd-device: several cleanups
2022-04-18 07:01:42 +09:00
Yu Watanabe 98e5a6c93c resolve: fix typo in dns_class_is_pseudo() 2022-04-18 07:01:17 +09:00
Luca Boccassi cd3c6322db compression: add build-time option to select default
Compression and decompression are controlled by the same build flag,
so if one wants to use, say, LZ4 to compress, ZSTD has to be disabled,
which means one loses the ability to read zstd-compressed journals.

Add a default-compression meson option, that allows to select any of
the available compression algorithms as the default.
2022-04-18 05:43:59 +09:00
Yu Watanabe 23d20adc05 sd-device: rename arguments and variables 2022-04-18 04:34:14 +09:00
Yu Watanabe 9c5d7151c1 sd-device: fix possible use-of-uninitialized-value 2022-04-18 04:34:14 +09:00
Yu Watanabe 17761fb3bf sd-device: use ERRNO_IS_DEVICE_ABSENT() at one more place 2022-04-18 04:34:14 +09:00
Yu Watanabe d82827a107 sd-device: rename function arguments for storing results 2022-04-18 04:34:14 +09:00
Yu Watanabe c77c1cc201 sd-device: use correct type and parser for device node uid and gid 2022-04-18 04:34:14 +09:00
Yu Watanabe d37c69c1bf sd-device: shorten code a bit 2022-04-18 04:34:14 +09:00
Yu Watanabe ce1d08ba94 sd-device: use path_extract_filename() at one more place
This also does several cleanups.
2022-04-18 04:34:14 +09:00
Yu Watanabe 60e50fb20d sd-device: reset sysname and sysnum on renaming 2022-04-18 04:34:14 +09:00
Yu Watanabe f5a75f2027 sd-device: reduce indentation 2022-04-18 04:34:14 +09:00
Yu Watanabe ff58f2ae2a sd-device: verify new syspath on renaming 2022-04-18 04:34:14 +09:00
Yu Watanabe bd4297e761 udevadm: info: also show parent devices by --tree 2022-04-17 21:27:33 +02:00
Luca Boccassi ee5b175b8c Merge pull request #23100 from yuwata/network-fix-tunnel-address-parser
network: fix tunnel address parser
2022-04-17 21:24:38 +02:00
amarjargal 354ca98085 systemctl: colorize "enabled" in 'systemctl status ...'
"enabled" state is highlighted in green and "disabled" state is
highlighted in yellow because I felt that white and grey colors were not
so distinguishable. Other states are not highlighted. Any other coloring
suggestions are welcome!

Closes #16932.
2022-04-17 14:30:46 +09:00
Yu Watanabe 5984b92726 network: l2tp: refuse null address 2022-04-17 09:31:35 +09:00
Yu Watanabe 96d96ec4e7 network: tunnel: handle null address as "any"
Fixes oss-fuzz#44881 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44881).

Fixes #23098.
2022-04-17 09:31:30 +09:00
Yu Watanabe 747bee2662 Merge pull request #23089 from yuwata/sd-device-use-path_extract_filename
sd-device: use path_extract_filename()
2022-04-16 14:33:58 +09:00
Yu Watanabe 7be87278a3 Merge pull request #23021 from fbuihuu/tmpfiles-fix-precedence-with-plus-sign
Tmpfiles fix precedence with plus sign
2022-04-16 01:36:51 +09:00
Zbigniew Jędrzejewski-Szmek 6e961aeb26 shared/install: fix crash when reenable is called without --root 2022-04-15 18:26:07 +02:00
Yu Watanabe b9d8209065 test: add tests for sd_device_get_sysnum() 2022-04-16 00:52:24 +09:00
Yu Watanabe 5fa9d220c2 sd-device: shorten code a bit 2022-04-16 00:52:24 +09:00
Yu Watanabe c58e0ce677 sd-device: use path_extract_filename() at one more place 2022-04-16 00:52:16 +09:00
Simon Ellmann 27cd31c0b2 networkctl: obey --full with lldp command
Do not ellipsize output when -l or --full is handed to networkctl lldp.

Fixes #22806.
2022-04-15 17:51:26 +02:00
Yu Watanabe ce8394f9c7 fs-util: use path_extract_filename() at one more place 2022-04-16 00:50:01 +09:00
Yu Watanabe 012f32d808 firewall-util: inline iterator and add several missing assertions 2022-04-15 17:44:51 +09:00
Yu Watanabe cc41c084cd sd-netlink: use correct type of iterator 2022-04-15 17:37:52 +09:00
Jan Janssen 4d54310da5 boot: Add missing continue statements
Fortunately, this was not causing any issues as it will just try
the other option branches unsuccessfuly before going to the next
config line.
2022-04-14 19:48:51 +02:00
Yu Watanabe bac8fe924e Merge pull request #23073 from medhefgo/boot-fixes
boot: Some fixes
2022-04-14 16:58:21 +09:00
Eduard Tolosa bb5824c9ab Add ConditionCPUFeature to load-fragment-gperf.gperf (#23076)
Fixes #23075
2022-04-14 15:30:03 +09:00
Jan Janssen 7b21973c42 boot: Use correct device root when loading device trees
If the boot entry comes from a XBOOT partition, we have to load the device
tree from that instead of the ESP.
2022-04-13 23:08:13 +02:00
Jan Janssen ec4106afa0 boot: Fix integer format specifiers
gnu-efi only knows two sizes for formatting integers: 32bit without
a length prefix and 64bit with 'l' prefix. Provide a PRI-style format
specifier for (U)INTN so that Print() can read the right amount of
bytes instead of printing garbage or worse.
2022-04-13 23:06:26 +02:00
Lennart Poettering 4bcf5c11c8 Merge pull request #23011 from mrc0mmand/TEST-64-md
test: add MD-related tests to TEST-64
2022-04-13 22:26:50 +02:00
Lennart Poettering 1fde09b3b4 Merge pull request #22759 from msekletar/issue-18077-long-sysfs-paths-hashing
Create "hashed" unit names from long paths
2022-04-13 22:21:38 +02:00
Yu Watanabe bd1f75d5fb Merge pull request #23070 from poettering/devnum-split
basic: some devnum handling tweaks and refactorings
2022-04-14 03:45:39 +09:00
Yu Watanabe 03b894fc09 sd-device: skip diskseq verification when ID_IGNORE_DISKSEQ property is set
Some drivers do not announce the diskseq change.
E.g. for md devices, the kernel increments the diskseq *after*
emitting a 'change' uevent when backing block devices are added to
a md device, and udevd does not receive no uevent which contains
the new diskseq.
2022-04-14 00:10:28 +09:00