Changes between v2.38 and v2.39-rc1 -------------------------------------------- commit 0116b114ad98bb696a20b4653d20fd8140c564dc Author: Karel Zak Date: Fri Mar 10 13:26:06 2023 +0100 build-sys: release++ (v2.39-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit bbde6df7a26ab390f642ba64914b60024d002df3 Author: Karel Zak Date: Fri Mar 10 13:24:06 2023 +0100 docs: update v2.39-rc1-ReleaseNotes Addresses: https://github.com/util-linux/util-linux/issues/2109 Signed-off-by: Karel Zak Documentation/releases/v2.39-ReleaseNotes | 103 ++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 33 deletions(-) commit c0fed74fa0e650905e4d263dd63396e6e8d08bed Author: Karel Zak Date: Thu Mar 9 15:03:45 2023 +0100 docs: update v2.39-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.39-ReleaseNotes | 1233 +++++++++++++++++++++++++++++ 1 file changed, 1233 insertions(+) commit d7eb0aa32c2a686fb53f23e0da64d9ef1b58d9a9 Author: Karel Zak Date: Thu Mar 9 13:46:24 2023 +0100 docs: update AUTHORS file * add new contributors * remove "noreply", localhost, etc. addresses Signed-off-by: Karel Zak AUTHORS | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 15 deletions(-) commit 14578ef1fd7799246fc497fb1ea91833edc26f5c Author: Karel Zak Date: Thu Mar 9 13:40:25 2023 +0100 po-man: merge changes Signed-off-by: Karel Zak po-man/de.po | 8417 +++++--- po-man/es.po | 7834 ++++--- po-man/fr.po | 50526 +++++++++++++++++++++++++++++++++++--------- po-man/pt_BR.po | 7940 ++++--- po-man/sr.po | 33884 ++++++++++++++++++++++------- po-man/uk.po | 28090 ++++++++++++++++++------ po-man/util-linux-man.pot | 7479 ++++--- 7 files changed, 109884 insertions(+), 34286 deletions(-) commit a49cc243283c65231b7cdc1fcb6328bfa62d7a6c Author: Karel Zak Date: Thu Mar 9 13:38:53 2023 +0100 po: merge changes Signed-off-by: Karel Zak po/ca.po | 6436 ++++++++++++++----------- po/cs.po | 6652 +++++++++++++++----------- po/da.po | 6580 ++++++++++++++----------- po/de.po | 6724 +++++++++++++++----------- po/es.po | 6635 +++++++++++++++----------- po/et.po | 6168 ++++++++++++++---------- po/eu.po | 6163 ++++++++++++++---------- po/fi.po | 6234 +++++++++++++----------- po/fr.po | 6660 +++++++++++++++----------- po/gl.po | 6148 ++++++++++++++---------- po/hr.po | 6598 ++++++++++++++----------- po/hu.po | 6225 +++++++++++++----------- po/id.po | 6231 +++++++++++++----------- po/it.po | 6211 +++++++++++++----------- po/ja.po | 6669 +++++++++++++++----------- po/ko.po | 6620 +++++++++++++++----------- po/nl.po | 6361 ++++++++++++++----------- po/pl.po | 6592 ++++++++++++++----------- po/pt.po | 6612 +++++++++++++++----------- po/pt_BR.po | 6672 +++++++++++++++----------- po/ru.po | 6231 ++++++++++++++---------- po/sk.po | 13474 +++++++++++++++++++++++++++++++--------------------- po/sl.po | 6183 ++++++++++++++---------- po/sr.po | 11223 +++++++++++++++++++++++++++---------------- po/sv.po | 6647 +++++++++++++++----------- po/tr.po | 6555 ++++++++++++++----------- po/uk.po | 6582 ++++++++++++++----------- po/util-linux.pot | 6011 +++++++++++++---------- po/vi.po | 6524 ++++++++++++++----------- po/zh_CN.po | 6628 +++++++++++++++----------- po/zh_TW.po | 6411 ++++++++++++++----------- 31 files changed, 124571 insertions(+), 87089 deletions(-) commit 2fa4168c8bc9d5438bc1dfadda293c7c21b6fa59 Author: Michael Trapp Date: Mon Mar 6 10:40:20 2023 +0000 libuuid: fix lib internal cache size The lib internal cache improves throughput in high load scenarios but for applications with a low request rate, the cache size must be adapted to this situation. Therefore the cache size should be changed to the current requirements of the application during runtime. libuuid/src/gen_uuid.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 11208370c90f44201ca7fbfaf01b76502034d544 Author: Karel Zak Date: Thu Mar 9 13:10:41 2023 +0100 lib/env: fix memory leak [coverity scan] Signed-off-by: Karel Zak lib/env.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 92168e2c0d669e4b16340964ff726b06a581306c Merge: 37f69ce50 e3a969f98 Author: Karel Zak Date: Thu Mar 9 12:21:10 2023 +0100 Merge branch 'warning' of https://github.com/t-8ch/util-linux * 'warning' of https://github.com/t-8ch/util-linux: libmount: inhibit warning about mask being unused commit 37f69ce501511ce483f4765f1839bc5b8a865a6a Merge: d53c6a4af 0cc63f0bb Author: Karel Zak Date: Thu Mar 9 12:20:19 2023 +0100 Merge branch 'libtool-workaround' of https://github.com/t-8ch/util-linux * 'libtool-workaround' of https://github.com/t-8ch/util-linux: build-sys: work around broken cross-compiles on Debian commit d53c6a4af67f4a22e5714a6ae94c29d0f6899d9b Merge: 31cedf9af 355bba496 Author: Karel Zak Date: Thu Mar 9 12:19:10 2023 +0100 Merge branch 'unshare' of https://github.com/jwilk-forks/util-linux * 'unshare' of https://github.com/jwilk-forks/util-linux: mount: (man) add missing commas commit 31cedf9af9006a708332481ca15b99840140a120 Merge: 162536cd9 27376b26a Author: Karel Zak Date: Thu Mar 9 12:18:23 2023 +0100 Merge branch 'waitpid/exclusive' of https://github.com/t-8ch/util-linux * 'waitpid/exclusive' of https://github.com/t-8ch/util-linux: waitpid: detect exlusive options with standard mechanism commit 162536cd99440a79184e4d01bea38dc47ea09228 Merge: 12c6597d5 457764764 Author: Karel Zak Date: Thu Mar 9 12:17:46 2023 +0100 Merge branch 'lsfd-packet' of https://github.com/masatake/util-linux * 'lsfd-packet' of https://github.com/masatake/util-linux: tests: (lsfd) add more cases for packet sockets tests: (mkfds) don't specify a protocol in connect(2) for AF_PACKET socket lsfd: (man) write more about NAME column lsfd: use extra information loaded from /proc/net/packet lsfd: add a helper function decoding interface indexes lsfd: make items in netns_tree extensible lsfd: simplify functions for comparing items lsfd: (style) reformat colinfo array commit 12c6597d5ca2d310b399b3f18f87fce8eee4d500 Merge: dd405ea74 aab9a492c Author: Karel Zak Date: Thu Mar 9 12:15:51 2023 +0100 Merge branch 'fix_cal_num_months' of https://github.com/JadingTsunami/util-linux * 'fix_cal_num_months' of https://github.com/JadingTsunami/util-linux: cal: Update column test to show full year output in 5-column mode. cal: fix multi-month printing. commit dd405ea745e451fb0cf32e9dedd94d69850fe333 Author: Toomas Losin Date: Sun Mar 5 15:57:55 2023 -0800 libfdisk: Fix randomly generated GPT UUID's Fdisk commands that create random GPT UUID's result in values that are not UEFI-compliant being written to disk: The "g" command creates a new GPT whose in-core DiskGUID value is entirely big-endian; the "n" command creates a GPT partition whose in-core UniquePartitionGUID value is entirely big-endian. Those big-endian values are written to disk by the "w" command rather than the mix of little- and big-endian spec'd by UEFI. This was caused by a libfdisk patch in 2017 that was addressing warnings about "taking address of packed member". Reading gpt.c finds two instances of dead code which suggests that perhaps there was some confusion between a struct and a pointer to a struct. The intent must have been to convert the randomly generated big-endian RFC 4122 UUID values to UEFI's mixed-endian but the confusion(?) resulted in some dead code and non-conversion of the UUID's. This patch corrects the breakage while still avoiding "taking address of packed member" warnings. The "w" command will once again write UEFI-compliant values to disk. Fixes: 92e486f80ef8 ("libfdisk: fix guid usage of packed struct gpt_entry") Signed-off-by: Toomas Losin libfdisk/src/gpt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0cc63f0bbe531d60271d9cc127fe248028e97727 Author: Thomas Weißschuh Date: Tue Mar 7 22:10:42 2023 +0000 build-sys: work around broken cross-compiles on Debian See #2102 Signed-off-by: Thomas Weißschuh configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) commit 355bba4960738893433e1daae38ee2def8e8e780 Author: Jakub Wilk Date: Mon Mar 6 10:20:38 2023 +0100 mount: (man) add missing commas sys-utils/unshare.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 457764764782c941d3172f32e101fc5c982cce5d Author: Masatake YAMATO Date: Fri Mar 3 15:58:18 2023 +0900 tests: (lsfd) add more cases for packet sockets Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-mapped-packet-socket | 6 ++++++ tests/ts/lsfd/mkfds-mapped-packet-socket | 21 ++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) commit f85dc5034f9573be3b97c5c4faa8cace978b501a Author: Masatake YAMATO Date: Fri Mar 3 15:48:44 2023 +0900 tests: (mkfds) don't specify a protocol in connect(2) for AF_PACKET socket The protocol is specified in socket(2) stage already. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 1 - 1 file changed, 1 deletion(-) commit 879e32179eac126bfe4856fc3fbc69721a626e32 Author: Masatake YAMATO Date: Sun Mar 5 16:26:40 2023 +0900 lsfd: (man) write more about NAME column Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit adfc156a57c24893db72bee32909c8ca1cf50fff Author: Masatake YAMATO Date: Thu Mar 2 16:45:59 2023 +0900 lsfd: use extra information loaded from /proc/net/packet Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 405 +++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 9 + misc-utils/lsfd.c | 6 + misc-utils/lsfd.h | 2 + 4 files changed, 422 insertions(+) commit 97f5438565e524e108a47fef2d194369425264a3 Author: Masatake YAMATO Date: Wed Mar 1 23:34:09 2023 +0900 lsfd: add a helper function decoding interface indexes Thomas Weißschuh suggested using arrays instead of tree. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 63 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) commit e6e551e84b843f9cb176724d16317c8a00b85cff Author: Masatake YAMATO Date: Wed Mar 1 22:42:49 2023 +0900 lsfd: make items in netns_tree extensible misc-utils/lsfd-sock-xinfo.c | 47 +++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit 0caccbf1a006d0690ac5fc50325ba8c2e9b9f18a Author: Masatake YAMATO Date: Sun Mar 5 12:44:37 2023 +0900 lsfd: simplify functions for comparing items Suggested-by: Thomas Weißschuh Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 13 ++----------- misc-utils/lsfd.c | 6 +----- 2 files changed, 3 insertions(+), 16 deletions(-) commit 737776941289d1b3f4fc250366f8f9fe9e26ec8d Author: Masatake YAMATO Date: Sun Mar 5 09:50:51 2023 +0900 lsfd: (style) reformat colinfo array Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 331 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 198 insertions(+), 133 deletions(-) commit e3a969f9878872170d9fb94b10ce552dcb88bc9f Author: Thomas Weißschuh Date: Sun Mar 5 14:08:45 2023 +0000 libmount: inhibit warning about mask being unused libmount/src/optlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aab9a492c0e0738f76c40f5197ec627480713a79 Author: JadingTsunami Date: Fri Mar 3 09:55:08 2023 -0800 cal: Update column test to show full year output in 5-column mode. tests/expected/cal/column-5 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 27376b26a2f243d202748b993088688c65c6e04a Author: Thomas Weißschuh Date: Fri Mar 3 15:54:26 2023 +0000 waitpid: detect exlusive options with standard mechanism Signed-off-by: Thomas Weißschuh misc-utils/waitpid.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 2af05775a12581020d8d83a0a55519f15fc74178 Merge: 7dcb35dd1 0ece530d8 Author: Karel Zak Date: Fri Mar 3 13:03:33 2023 +0100 Merge branch 'lsfd--inet-optimize' of https://github.com/masatake/util-linux * 'lsfd--inet-optimize' of https://github.com/masatake/util-linux: lsfd: optimize -i/--inet option commit 7dcb35dd176443238859de18cc73f0906287b91d Merge: 3b077eca0 f0e793a3d Author: Karel Zak Date: Fri Mar 3 13:01:18 2023 +0100 Merge branch 'waitpid/count' of https://github.com/t-8ch/util-linux * 'waitpid/count' of https://github.com/t-8ch/util-linux: waitpid: allow to only wait for a specific number of process exits commit 3b077eca0c01b386bd86a4639def65b14128d521 Merge: 514e9abfa ba528e5b4 Author: Karel Zak Date: Fri Mar 3 12:50:06 2023 +0100 Merge branch 'agetty/plain' of https://github.com/t-8ch/util-linux * 'agetty/plain' of https://github.com/t-8ch/util-linux: TODO: drop agetty LOGIN_PLAIN_PROMPT todo commit 514e9abfaffd54f81bc185eb0441cc91267cfb00 Merge: ab8b10b25 e99ca712a Author: Karel Zak Date: Fri Mar 3 12:49:40 2023 +0100 Merge branch 'libblkid/nvidia-raid' of https://github.com/t-8ch/util-linux * 'libblkid/nvidia-raid' of https://github.com/t-8ch/util-linux: libblkid: nvidia_raid: validate full signature libblkid: nvidia_raid: validate checksum libblkid: nvidia_raid: verify superblock size commit ab8b10b25737276edde7d577bf5badffa137579b Merge: 4e9ec856a 597ae3464 Author: Karel Zak Date: Fri Mar 3 12:45:57 2023 +0100 Merge branch 'nsenter/target-uid-gid' of https://github.com/t-8ch/util-linux [kzak@redhat.com: - resolve conflict with 4e9ec856a1b91fb3ff10de10f2dac94f711705e1 - fix --help output] * 'nsenter/target-uid-gid' of https://github.com/t-8ch/util-linux: nsenter: read default UID and GID from target process commit 151baa02b9244de6357e82cd4a29084aea8545f6 Author: JadingTsunami Date: Thu Mar 2 22:13:45 2023 -0800 cal: fix multi-month printing. misc-utils/cal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ece530d83ef4167eee52720f14240a9431d4daa Author: Masatake YAMATO Date: Fri Mar 3 14:58:06 2023 +0900 lsfd: optimize -i/--inet option The original code filters sockets in convert() stage. This code adds weak-filtering in collect_processes() stage to improve the performe. Without this optimization: # time ./lsfd --json -i > /tmp/lsfd.txt 0.43user 0.57system 0:01.02elapsed 99%CPU (0avgtext+0avgdata 52724maxresident)k 0inputs+0outputs (0major+14263minor)pagefaults 0swaps With this optimization: # time ./lsfd --json -i > /tmp/lsfd-i.txt 0.08user 0.27system 0:00.36elapsed 98%CPU (0avgtext+0avgdata 7060maxresident)k 0inputs+0outputs (0major+2831minor)pagefaults 0swaps About three times faster. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 58 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 17 deletions(-) commit 597ae346491f142ff3bf00f07110f8de22121fd7 Author: Thomas Weißschuh Date: Fri Mar 3 01:39:27 2023 +0000 nsenter: read default UID and GID from target process Signed-off-by: Thomas Weißschuh Documentation/TODO | 5 ----- sys-utils/nsenter.1.adoc | 14 +++++++++----- sys-utils/nsenter.c | 40 ++++++++++++++++++++++++++++++++-------- 3 files changed, 41 insertions(+), 18 deletions(-) commit ba528e5b4f3dc416fc655f7577b6293b6502f014 Author: Thomas Weißschuh Date: Fri Mar 3 01:19:52 2023 +0000 TODO: drop agetty LOGIN_PLAIN_PROMPT todo It was implemented in 556925fe. Documentation/TODO | 4 ---- 1 file changed, 4 deletions(-) commit f0e793a3d9083aa5d8bfe1ec27ce107f2df6780f Author: Thomas Weißschuh Date: Thu Mar 2 21:06:31 2023 +0000 waitpid: allow to only wait for a specific number of process exits Signed-off-by: Thomas Weißschuh bash-completion/waitpid | 4 ++++ misc-utils/waitpid.1.adoc | 3 +++ misc-utils/waitpid.c | 19 ++++++++++++++++++- tests/expected/misc/waitpid-count | 1 + tests/expected/misc/waitpid-count.err | 1 + tests/ts/misc/waitpid | 8 ++++++++ 6 files changed, 35 insertions(+), 1 deletion(-) commit e99ca712a9a379f7659c967560b5bd08a824f99c Author: Thomas Weißschuh Date: Thu Mar 2 21:27:12 2023 +0000 libblkid: nvidia_raid: validate full signature Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/nvidia_raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a08c34aad61cb59c977212458bf55f5a81186e8 Author: Thomas Weißschuh Date: Thu Mar 2 15:54:39 2023 +0000 libblkid: nvidia_raid: validate checksum See #1843 Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/nvidia_raid.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit d8d164db5ee217034dea7788263b532114bcd2fd Author: Thomas Weißschuh Date: Thu Mar 2 15:27:58 2023 +0000 libblkid: nvidia_raid: verify superblock size Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/nvidia_raid.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4e9ec856a1b91fb3ff10de10f2dac94f711705e1 Author: u2386 Date: Mon Feb 27 02:18:31 2023 +0000 nsenter: add --env for allowing environment variables inheritance This commit adds support for the -e or --env option in nsenter, allowing a new process to inherit the environment va If the option is not given, the environment variables will stay the same as in the current namespace. Example: Setup the namespace: $ docker run -d -e PROJECT='util linux' --rm alpine sleep 10000 cb0b69aa7aec $ docker inspect --format '{{ .State.Pid }}' cb0b69aa7aec 470012 Enter the namespace: $ nsenter --all -t 470012 --env env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=cb0b69aa7aec PROJECT=util linux HOME=/root Reviewed-by: Thomas Weißschuh Reviewed-by: Karel Zak Signed-off-by: u2386 bash-completion/nsenter | 1 + include/all-io.h | 30 ++++++++++++++++++++++++++++++ include/env.h | 2 +- lib/env.c | 24 ++++++++++++++++++++++++ sys-utils/nsenter.1.adoc | 3 +++ sys-utils/nsenter.c | 29 ++++++++++++++++++++++++++--- 6 files changed, 85 insertions(+), 4 deletions(-) commit e4e00b073800480523d15948b289eafcc717047c Merge: fd392d05c dfe3a759d Author: Karel Zak Date: Thu Mar 2 14:42:29 2023 +0100 Merge branch 'wdctl/sysfs-firmware_version' of https://github.com/t-8ch/util-linux * 'wdctl/sysfs-firmware_version' of https://github.com/t-8ch/util-linux: wdctl: read options from sysfs wdctl: read firmware version from sysfs commit fd392d05cbad7038656fa74acfc6e65727ff594b Author: Yuri Chornoivan Date: Thu Mar 2 14:38:22 2023 +0100 po-man: update uk.po (from translationproject.org) po-man/uk.po | 18291 ++++++++++++++++++--------------------------------------- 1 file changed, 5702 insertions(+), 12589 deletions(-) commit 03aee9c8641791d433cd86c861fe33211ef29453 Author: Мирослав Николић Date: Thu Mar 2 14:38:22 2023 +0100 po-man: update sr.po (from translationproject.org) po-man/sr.po | 26818 ++++++++++++--------------------------------------------- 1 file changed, 5533 insertions(+), 21285 deletions(-) commit f4ad7719d13e42a90085707d61b0e9a490145c69 Author: Frédéric Marchal Date: Thu Mar 2 14:38:22 2023 +0100 po-man: update fr.po (from translationproject.org) po-man/fr.po | 43498 +++++++++++---------------------------------------------- 1 file changed, 8012 insertions(+), 35486 deletions(-) commit ae573899393ec2ae5bf55e10fb33d9968c9b8094 Author: Temuri Doghonadze Date: Thu Mar 2 14:37:33 2023 +0100 po: add ka.po (from translationproject.org) po/ka.po | 22074 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 22074 insertions(+) commit 9201d912f2eabd63b2bc46bacb2ed47e86c9a7bd Author: Yuri Chornoivan Date: Thu Mar 2 14:37:33 2023 +0100 po: update uk.po (from translationproject.org) po/uk.po | 174 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 83 insertions(+), 91 deletions(-) commit 38f414127d46e4404e5b77375574b6302ee54d3a Author: Takeshi Hamasaki Date: Thu Mar 2 14:37:33 2023 +0100 po: update ja.po (from translationproject.org) po/ja.po | 2999 ++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 2141 insertions(+), 858 deletions(-) commit 4c8d753e39b409c136a6146ab48b153095760c31 Author: Božidar Putanec Date: Thu Mar 2 14:37:33 2023 +0100 po: update hr.po (from translationproject.org) po/hr.po | 472 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 232 insertions(+), 240 deletions(-) commit 287f2edfedf73b2fbb29fdbc4fd51ae26d504d9c Author: Antonio Ceballos Roa Date: Thu Mar 2 14:37:33 2023 +0100 po: update es.po (from translationproject.org) po/es.po | 798 +++++++++++++++++++++------------------------------------------ 1 file changed, 263 insertions(+), 535 deletions(-) commit f9afee16c62c26531c979bc3a2004b45915b6aa0 Author: Mario Blättermann Date: Thu Mar 2 14:37:32 2023 +0100 po: update de.po (from translationproject.org) po/de.po | 176 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 84 insertions(+), 92 deletions(-) commit 0c001b8d13a68dd79eb87b68b0c968fd8752c32c Author: Jordi Mas i Hernàndez Date: Thu Mar 2 14:37:32 2023 +0100 po: update ca.po (from translationproject.org) po/ca.po | 15437 +++++++++++++++++++++++++------------------------------------ 1 file changed, 6291 insertions(+), 9146 deletions(-) commit 702eecc37a0509da36d884c3e0c2d85fd8c5f13d Author: Karel Zak Date: Thu Mar 2 14:33:18 2023 +0100 github: call checklibdoc and checkxalloc Signed-off-by: Karel Zak .github/workflows/cibuild.sh | 4 ++++ .github/workflows/cibuild.yml | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit e0dc84daeb8029957de3bf0d357516e3a0275c93 Author: Karel Zak Date: Thu Mar 2 14:16:33 2023 +0100 lsfd: use xstrdup() if included xalloc.h This commit improves code consistence. Signed-off-by: Karel Zak misc-utils/lsfd-bdev.c | 4 ++-- misc-utils/lsfd-cdev.c | 4 ++-- misc-utils/lsfd-fifo.c | 2 +- misc-utils/lsfd-file.c | 2 +- misc-utils/lsfd-sock-xinfo.c | 24 ++++++++++++------------ misc-utils/lsfd-sock.c | 2 +- misc-utils/lsfd-unkn.c | 10 +++++----- tests/helpers/test_mkfds.c | 6 +----- 8 files changed, 25 insertions(+), 29 deletions(-) commit f898ae53dc1daed73ab88b2e76b72e0eeca6645b Author: Karel Zak Date: Thu Mar 2 14:08:38 2023 +0100 libmount: (optstr) do not use xalloc.h in test It's technically valid to use xalloc.h in the tests, but then we mix regular malloc and xalloc in the same source file, and it makes "make checkxalloc" using difficult. Signed-off-by: Karel Zak libmount/src/optstr.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit cb48f21ed94bbd7290fda75afef20bac8b87ca03 Author: Karel Zak Date: Thu Mar 2 14:07:38 2023 +0100 include/c: make err_oom() usable everywhere Signed-off-by: Karel Zak include/c.h | 10 +++++++++- include/xalloc.h | 9 --------- 2 files changed, 9 insertions(+), 10 deletions(-) commit e288dbac4f69a98fa5b0f8c8285b6578ea676ae4 Author: Karel Zak Date: Thu Mar 2 13:48:21 2023 +0100 include/fileutils: remove duplicated include Signed-off-by: Karel Zak include/fileutils.h | 1 - 1 file changed, 1 deletion(-) commit 8ae8b20134c8224b74741c50702e0bd004c94e39 Author: Karel Zak Date: Thu Mar 2 13:47:14 2023 +0100 include/c: remove duplicate include, improve readablity Signed-off-by: Karel Zak include/c.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e7a473b1e077d9b39f35d92ab1eaab15f41a6b5f Author: Karel Zak Date: Thu Mar 2 13:38:15 2023 +0100 libmount: add missing symbols to docs Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 1 + 1 file changed, 1 insertion(+) commit b76277e9c253e23ea722d4865422f6a49c4d21b3 Author: Karel Zak Date: Thu Mar 2 13:38:08 2023 +0100 libmount: add missing symbols to docs Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 3 +++ 1 file changed, 3 insertions(+) commit ace43494e48fbc5627d5490394d36e817808a5ff Author: Karel Zak Date: Thu Mar 2 13:36:39 2023 +0100 libmount: remove unimplemented symbol Signed-off-by: Karel Zak libmount/src/libmount.sym | 1 - 1 file changed, 1 deletion(-) commit 40e8e8b380b94ce2abbc8b2da7117bdd2d598132 Merge: 567700dfd 300498a8c Author: Karel Zak Date: Thu Mar 2 12:34:04 2023 +0100 Merge branch 'lsfds-netlink' of https://github.com/masatake/util-linux * 'lsfds-netlink' of https://github.com/masatake/util-linux: tests: (lsfd) add cases for NETLINK sockets lsfd: use extra information loaded from /proc/net/netlink tests: (mkfds) add netlink factory tests: (lsfd,mkfds) define new error code for EPROTONOSUPPORT tests: (mkfds) add unsigned int parameter type tests: (lsfd) use ${PIPESTATUS[]} instead of $? commit 567700dfdbcd0a237e274380673a0cb83e78ce06 Author: Pedro Tammela Date: Wed Mar 1 17:09:47 2023 +0100 libmount: idmap: fix sock write to child The current code writes to sock_fds[0], which is set to -1 on line 227, instead of the correct sock_fds[1]. As a cause, a simple `mount` command which uses idmapping and doesn't specify a user ns hangs indefinitely. libmount/src/hook_idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 300498a8c84af143d3ce25adafccfaf7de2a762c Author: Masatake YAMATO Date: Mon Feb 27 23:47:11 2023 +0900 tests: (lsfd) add cases for NETLINK sockets Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-netlink-groups | 3 ++ tests/expected/lsfd/mkfds-netlink-protocol | 3 ++ tests/ts/lsfd/mkfds-netlink-groups | 59 ++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-netlink-protocol | 58 +++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) commit b53cc89686800ecca487b6ff4891d2fe7ec56109 Author: Masatake YAMATO Date: Tue Feb 21 00:12:13 2023 +0900 lsfd: use extra information loaded from /proc/net/netlink Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 170 +++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 12 +++ misc-utils/lsfd.c | 6 ++ misc-utils/lsfd.h | 3 + 4 files changed, 191 insertions(+) commit 4763f06709c162ea9f171b8b968c2ea5a1633a4e Author: Masatake YAMATO Date: Mon Feb 27 06:23:13 2023 +0900 tests: (mkfds) add netlink factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 40853fe4f73163c765befbc252d0af06e28de331 Author: Masatake YAMATO Date: Wed Mar 1 23:42:51 2023 +0900 tests: (lsfd,mkfds) define new error code for EPROTONOSUPPORT Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 1 + tests/ts/lsfd/lsfd-functions.bash | 1 + 2 files changed, 2 insertions(+) commit 91d159bf684273ab7d2a053d66211a63125f9d64 Author: Masatake YAMATO Date: Tue Feb 28 17:41:42 2023 +0900 tests: (mkfds) add unsigned int parameter type Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 9be2c8b2774cf9c9ad521d6dc17005013d6484dd Author: Masatake YAMATO Date: Tue Feb 28 10:45:13 2023 +0900 tests: (lsfd) use ${PIPESTATUS[]} instead of $? Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-socketpair | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5603aee05b2d603ec59bfde47d07c076d43df00c Author: Karel Zak Date: Wed Mar 1 13:11:42 2023 +0100 mount: (man) add note about options order Fixes: https://github.com/util-linux/util-linux/issues/2087 Signed-off-by: Karel Zak sys-utils/mount.8.adoc | 2 ++ 1 file changed, 2 insertions(+) commit 253b16cb94bf24f13287048ea0827ccd87aa942d Merge: 63ed725fc 512ba8c73 Author: Karel Zak Date: Wed Mar 1 12:59:57 2023 +0100 Merge branch 'hardlink/options-failure' of https://github.com/t-8ch/util-linux * 'hardlink/options-failure' of https://github.com/t-8ch/util-linux: hardlink: (tests) do not assert amount of compared files commit 63ed725fcc35cb3ec155b0a85a9ff0eac5b6da24 Author: Karel Zak Date: Wed Mar 1 12:55:18 2023 +0100 lsfd: align --help output Signed-off-by: Karel Zak misc-utils/lsfd.c | 2 +- tests/expected/build-sys/config-all | 4 ++++ tests/expected/build-sys/config-all-non-nls | 4 ++++ tests/expected/build-sys/config-audit | 4 ++++ tests/expected/build-sys/config-chfnsh-libuser | 6 +++++- tests/expected/build-sys/config-chfnsh-no-password | 6 +++++- tests/expected/build-sys/config-chfnsh-pam | 6 +++++- tests/expected/build-sys/config-core | 4 ++++ tests/expected/build-sys/config-devel | 6 +++++- tests/expected/build-sys/config-devel-non-asan | 6 +++++- tests/expected/build-sys/config-devel-non-docs | 6 +++++- tests/expected/build-sys/config-non-libblkid | 4 ++++ tests/expected/build-sys/config-non-libmount | 4 ++++ tests/expected/build-sys/config-non-libs | 4 ++++ tests/expected/build-sys/config-non-libsmartcols | 4 ++++ tests/expected/build-sys/config-non-libuuid | 4 ++++ tests/expected/build-sys/config-non-nls | 4 ++++ tests/expected/build-sys/config-selinux | 6 +++++- tests/expected/build-sys/config-slang | 4 ++++ tests/expected/build-sys/config-static | 4 ++++ 20 files changed, 84 insertions(+), 8 deletions(-) commit 8b94d01bc8e4f27f99c371e48d086580fe7fc189 Merge: d8493779e 2e8ec722e Author: Karel Zak Date: Wed Mar 1 12:53:02 2023 +0100 Merge branch 'lsfd--inet-option' of https://github.com/masatake/util-linux * 'lsfd--inet-option' of https://github.com/masatake/util-linux: tests: (lsfd) add a case for testing -i/--inet options lsfd: implement -i/--inet option lsfd: adjust whitespaces in the help message commit 512ba8c7341f38166d699ab8e7884de41600829f Author: Thomas Weißschuh Date: Tue Feb 28 18:24:16 2023 +0000 hardlink: (tests) do not assert amount of compared files Depending on external circumstances the exact amount of compared files can vary. So don't test for this statistics as otherwise spurious test failures will occurr. Signed-off-by: Thomas Weißschuh tests/expected/hardlink/options-maximum-size-8191 | 2 +- tests/expected/hardlink/options-maximum-size-8192 | 2 +- tests/ts/hardlink/options | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 2e8ec722ee3537f17b6387280b33c9fb4078cb7f Author: Masatake YAMATO Date: Wed Mar 1 00:14:18 2023 +0900 tests: (lsfd) add a case for testing -i/--inet options Signed-off-by: Masatake YAMATO tests/expected/lsfd/option-inet | 46 ++++++++++++++++++++ tests/ts/lsfd/option-inet | 96 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) commit cd7f9b8670a63ae9ce3f3bd1fffbc613791fb071 Author: Masatake YAMATO Date: Tue Feb 28 22:56:57 2023 +0900 lsfd: implement -i/--inet option Reviewed-by: Thomas Weißschuh Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 3 +++ misc-utils/lsfd.c | 69 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 58 insertions(+), 14 deletions(-) commit 2da4ecda90e501846c3edd546063ab324ea44755 Author: Masatake YAMATO Date: Tue Feb 28 22:55:53 2023 +0900 lsfd: adjust whitespaces in the help message Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8493779e7e92240a3e60a2110524e72793061b3 Author: Karel Zak Date: Tue Feb 28 13:11:05 2023 +0100 kill: fix buffer overflow Signed-off-by: Karel Zak lib/procfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffe45d3bfba9f94e1b3ceb8bf5da4697208286a5 Author: Karel Zak Date: Tue Feb 28 11:56:44 2023 +0100 libmount: treat comma as terminator in mnt_match_options() An alone "no" in the pattern is interpreted as an error; it should be also valid in case the keyword is followed by a comma, e.g. mnt_match_options("bla", "no,,"); Suggested-by: Sören Tempel Signed-off-by: Karel Zak libmount/src/optstr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00ad6f2c7c789fb6fe7874f754a39ef3e6ed4d8f Author: Karel Zak Date: Mon Feb 27 17:52:45 2023 +0100 agetty: support simplified color sequences in \e{name} Signed-off-by: Karel Zak term-utils/agetty.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b48ef54b4380d40a7b1845fe17942c629c3df7cc Author: Karel Zak Date: Mon Feb 27 17:50:39 2023 +0100 libsmartcols: support simplified color sequences Signed-off-by: Karel Zak libsmartcols/src/cell.c | 9 ++++++--- libsmartcols/src/column.c | 9 ++++++--- libsmartcols/src/line.c | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) commit 208480c4bafb7e01b6ff89fa1dd7316ee73cdc53 Author: Karel Zak Date: Mon Feb 27 17:43:11 2023 +0100 lib/colors: move colors canonicalization to lib/color-names.c * let's make simplified sequences (e.g. "35;4") used without lib/colors.c (without color schemes) * add function to detect already usable esc sequence * support this new feature in "test_colors --color " ./test_colors --color "red" ./test_colors --color "35;5" Signed-off-by: Karel Zak include/color-names.h | 3 ++ lib/color-names.c | 107 ++++++++++++++++++++++++++++++++++++++++++++++ lib/colors.c | 116 +++++--------------------------------------------- 3 files changed, 120 insertions(+), 106 deletions(-) commit 35e84552ce30a75991c2063244769bbd79cb0ea8 Merge: 06ee52675 7b0614010 Author: Karel Zak Date: Mon Feb 27 14:51:39 2023 +0100 Merge branch 'lsfd-more-inet-1' of https://github.com/masatake/util-linux * 'lsfd-more-inet-1' of https://github.com/masatake/util-linux: (26 commits) tests: (lsfd) skip if the platform doesn't permit to use ioctl(fd, SIOCGSKNS) tests: (lsfd) skip if the platform doesn't permit to use unshare(2) tests: (lsfd) skip if the platform doesn't attach a buffer to a packet socket tests: (lsfd) skip if the platform doesn't provide pidfd_open(2) tests: (mkfds) introduce constants representing the limitation of the test environment tests: (lsfd) send a signal only if the target PID is know tests: (lsfd) add comments about the reason using ts_skip_qemu_user() tests: (mkfds) fix minor typo in comment tests: (lsfd) add a case for PING and PINGv6 sockets lsfd: use extra information loaded from /proc/net/icmp6 lsfd: use extra information loaded from /proc/net/icmp tests: (mkfds) add ping and ping6 factories tests: (lsfd) add a case for UDPLITEv6 sockets tests: (lsfd) add a case for UDP-Lite sockets lsfd: use extra information loaded from /proc/net/udplite6 lsfd: use extra information loaded from /proc/net/udplite tests: (mkfds) add "lite" parameter to udp and udp6 factories tests: (lsfd) add a case for RAWv6 sockets tests: (mkfds) add raw6 factory lsfd: use extra information loaded from /proc/net/raw6 ... commit 06ee5267516761721ebfbdfa313980cef8e54c66 Author: Karel Zak Date: Mon Feb 27 11:33:54 2023 +0100 libmount: make mnt_match_options() more robust * don't allocate and use a buffer for the pattern if the pattern is empty * make it more obvious how empty pattern and empty optstr is evaluated * add regression test Reported-by: Sören Tempel Signed-off-by: Karel Zak libmount/src/optstr.c | 65 ++++++++++++++++++++++++++++++------ tests/expected/libmount/optstr-match | 13 ++++++++ tests/ts/libmount/optstr | 16 +++++++++ 3 files changed, 84 insertions(+), 10 deletions(-) commit 7b0614010f24cd3dbdedd7ced878c32197a32e63 Author: Masatake YAMATO Date: Sun Feb 26 02:44:49 2023 +0900 tests: (lsfd) skip if the platform doesn't permit to use ioctl(fd, SIOCGSKNS) Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 3 ++- tests/ts/lsfd/mkfds-netns | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 4203b76b51e4f96672370ac3fa819847789e2bb8 Author: Masatake YAMATO Date: Sun Feb 26 02:35:13 2023 +0900 tests: (lsfd) skip if the platform doesn't permit to use unshare(2) Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-in-netns | 18 ------------------ tests/expected/lsfd/mkfds-unix-in-netns-dgram | 6 ++++++ tests/expected/lsfd/mkfds-unix-in-netns-seqpacket | 6 ++++++ tests/expected/lsfd/mkfds-unix-in-netns-stream | 6 ++++++ tests/helpers/test_mkfds.c | 3 ++- tests/ts/lsfd/mkfds-unix-in-netns | 17 +++++++++++++---- 6 files changed, 33 insertions(+), 23 deletions(-) commit da74e6e5c826597f1b7dcee19c01af52b44bcf9b Author: Masatake YAMATO Date: Sun Feb 26 01:33:17 2023 +0900 tests: (lsfd) skip if the platform doesn't attach a buffer to a packet socket Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 3 ++- tests/ts/lsfd/mkfds-mapped-packet-socket | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 3de730adc1866a3ea43b6d5836a4af9ba51e83f3 Author: Masatake YAMATO Date: Sun Feb 26 00:58:47 2023 +0900 tests: (lsfd) skip if the platform doesn't provide pidfd_open(2) Signed-off-by: Masatake YAMATO .../{column-ainodeclass => column-ainodeclass-inotify} | 2 -- tests/expected/lsfd/column-ainodeclass-pidfd | 2 ++ tests/expected/lsfd/column-name | 6 ------ tests/expected/lsfd/column-name-pidfd | 2 ++ tests/expected/lsfd/column-name-ro-regular-file | 2 ++ tests/expected/lsfd/column-name-socketpair | 2 ++ tests/expected/lsfd/column-type | 8 -------- tests/expected/lsfd/column-type-inotify | 2 ++ tests/expected/lsfd/column-type-pidfd | 2 ++ tests/expected/lsfd/column-type-ro-regular-file | 2 ++ tests/expected/lsfd/column-type-socketpair | 2 ++ tests/helpers/test_mkfds.c | 3 ++- tests/ts/lsfd/column-ainodeclass | 16 +++++++++++----- tests/ts/lsfd/column-name | 18 ++++++++++++------ tests/ts/lsfd/column-type | 16 +++++++++++----- tests/ts/lsfd/mkfds-pidfd | 4 ++++ tests/ts/lsfd/mkfds-unix-in-netns | 1 - 17 files changed, 56 insertions(+), 34 deletions(-) commit 2182cd22f255d233a778cd40a60166c12935a2bf Author: Masatake YAMATO Date: Thu Oct 13 15:23:26 2022 +0900 tests: (mkfds) introduce constants representing the limitation of the test environment Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 4 ++++ tests/ts/lsfd/lsfd-functions.bash | 5 +++++ 2 files changed, 9 insertions(+) commit ffc7662ee3a9032227fe07f0035e3ed9ec246077 Author: Masatake YAMATO Date: Thu Oct 27 00:23:58 2022 +0900 tests: (lsfd) send a signal only if the target PID is know Signed-off-by: Masatake YAMATO tests/ts/lsfd/column-ainodeclass | 2 +- tests/ts/lsfd/column-name | 2 +- tests/ts/lsfd/column-type | 2 +- tests/ts/lsfd/mkfds-directory | 2 +- tests/ts/lsfd/mkfds-mapped-packet-socket | 2 +- tests/ts/lsfd/mkfds-pidfd | 2 +- tests/ts/lsfd/mkfds-pipe-no-fork | 2 +- tests/ts/lsfd/mkfds-raw | 2 +- tests/ts/lsfd/mkfds-raw6 | 2 +- tests/ts/lsfd/mkfds-ro-block-device | 2 +- tests/ts/lsfd/mkfds-ro-regular-file | 2 +- tests/ts/lsfd/mkfds-rw-character-device | 2 +- tests/ts/lsfd/mkfds-socketpair | 2 +- tests/ts/lsfd/mkfds-symlink | 2 +- tests/ts/lsfd/mkfds-tcp | 2 +- tests/ts/lsfd/mkfds-tcp6 | 2 +- tests/ts/lsfd/mkfds-udp | 8 ++++---- tests/ts/lsfd/mkfds-udp6 | 10 +++++----- tests/ts/lsfd/mkfds-unix-dgram | 4 ++-- tests/ts/lsfd/mkfds-unix-in-netns | 4 ++-- tests/ts/lsfd/mkfds-unix-stream | 8 ++++---- tests/ts/lsfd/option-pid | 2 +- 22 files changed, 34 insertions(+), 34 deletions(-) commit 103e235fef8f1f258dca0e77597bd9ce03f11d43 Author: Masatake YAMATO Date: Thu Oct 27 02:14:27 2022 +0900 tests: (lsfd) add comments about the reason using ts_skip_qemu_user() Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-ro-block-device | 2 ++ 1 file changed, 2 insertions(+) commit 794c09fa1e171856bbf5d79d42b28a3547dcaaf2 Author: Masatake YAMATO Date: Sat Feb 25 02:22:04 2023 +0900 tests: (mkfds) fix minor typo in comment Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f27139806eb80625dcd270cd26768180c321e8cd Author: Masatake YAMATO Date: Sat Feb 25 02:24:51 2023 +0900 tests: (lsfd) add a case for PING and PINGv6 sockets Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-ping-ping | 4 ++ tests/expected/lsfd/mkfds-ping-ping6 | 4 ++ tests/ts/lsfd/mkfds-ping | 83 ++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) commit 0b1dfd0356aff34cc07343ca8a720d7673fa0552 Author: Masatake YAMATO Date: Fri Feb 24 00:21:48 2023 +0900 lsfd: use extra information loaded from /proc/net/icmp6 Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 49 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit a7cba6f3c522a109e1d4fbbce51d36770f0542b4 Author: Masatake YAMATO Date: Fri Feb 24 00:09:54 2023 +0900 lsfd: use extra information loaded from /proc/net/icmp Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 77 +++++++++++++++++++++++++++++++++++++++++--- misc-utils/lsfd.1.adoc | 3 ++ misc-utils/lsfd.c | 2 ++ misc-utils/lsfd.h | 1 + 4 files changed, 79 insertions(+), 4 deletions(-) commit 00a976118b63df914d80fe04f959345e4ae03151 Author: Masatake YAMATO Date: Thu Feb 23 22:29:36 2023 +0900 tests: (mkfds) add ping and ping6 factories Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 164 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) commit c934add4be8ecacf5131494bf2d2ca46eb3b0235 Author: Masatake YAMATO Date: Thu Feb 23 02:03:23 2023 +0900 tests: (lsfd) add a case for UDPLITEv6 sockets Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-udp6 | 12 +++++++ tests/ts/lsfd/mkfds-udp6 | 71 ++++++++++++++++++++++++++---------------- 2 files changed, 56 insertions(+), 27 deletions(-) commit 54c9055b029b96e947f6a7664d4c5a2f76550f3f Author: Masatake YAMATO Date: Thu Feb 23 01:46:15 2023 +0900 tests: (lsfd) add a case for UDP-Lite sockets Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-udp | 12 ++++++++ tests/ts/lsfd/mkfds-udp | 71 +++++++++++++++++++++++++++---------------- 2 files changed, 56 insertions(+), 27 deletions(-) commit 93bca1517d3de1541e29b81ef6a8a8cd37f7e70f Author: Masatake YAMATO Date: Wed Feb 22 00:05:00 2023 +0900 lsfd: use extra information loaded from /proc/net/udplite6 Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit c779f4120468286a5a3d0ab54c396f9654b33855 Author: Masatake YAMATO Date: Tue Feb 21 23:56:18 2023 +0900 lsfd: use extra information loaded from /proc/net/udplite Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 41 +++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 15 +++++++++++++++ misc-utils/lsfd.c | 8 ++++++++ misc-utils/lsfd.h | 4 ++++ 4 files changed, 68 insertions(+) commit 6c9e370e5b93131eb891f48459eee033236278ec Author: Masatake YAMATO Date: Tue Feb 21 23:58:37 2023 +0900 tests: (mkfds) add "lite" parameter to udp and udp6 factories Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 3c6c617e02f992d916b056699d7dad7e01c69359 Author: Masatake YAMATO Date: Sun Feb 19 05:10:43 2023 +0900 tests: (lsfd) add a case for RAWv6 sockets Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-raw6 | 2 ++ tests/ts/lsfd/mkfds-raw6 | 49 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit 0e07fc2d90859641856a3dafa4d0a493c83018c2 Author: Masatake YAMATO Date: Sun Feb 19 05:01:26 2023 +0900 tests: (mkfds) add raw6 factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 83 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 10 deletions(-) commit 2dd373c3f3aa238ee8d054c75ed65058a89f7aa8 Author: Masatake YAMATO Date: Fri Feb 3 14:23:04 2023 +0900 lsfd: use extra information loaded from /proc/net/raw6 Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 93 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 01a13c6cdf07b55cf9c8d4196e6b9a0fdd5c3b9c Author: Masatake YAMATO Date: Sun Feb 19 00:53:05 2023 +0900 tests: (lsfd) add a case for UDPv6 sockets Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-udp6 | 12 ++++ tests/ts/lsfd/mkfds-udp6 | 121 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) commit e568c794093d301ca0c1ea9863ac516f7ccc9c44 Author: Masatake YAMATO Date: Sun Feb 19 00:52:27 2023 +0900 tests: (mkfds) add udp6 factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 90 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 16 deletions(-) commit 28cf2b21467a99b4c786613a60f577f863537050 Author: Masatake YAMATO Date: Thu Feb 2 10:28:48 2023 +0900 lsfd: use extra information loaded from /proc/net/udp6 Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 52 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) commit e8e14a28bae38f6b2fb349d3bc9b186847aac2b4 Author: Masatake YAMATO Date: Sun Feb 19 00:11:45 2023 +0900 lsfd: revise the comment for UNIX_LINE_LEN The orignal comment was not understandable. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 855e96fa2b82a0dff16b6104d4790d9673e9dd84 Author: Masatake YAMATO Date: Sun Feb 19 00:40:19 2023 +0900 tests: (lsfd) delete an unused variable Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-udp | 1 - 1 file changed, 1 deletion(-) commit 2ac8d1a377bffc6942f86210915c07e85c6d8de1 Author: Masatake YAMATO Date: Tue Feb 21 00:10:53 2023 +0900 lsfd: delete an unnecessary cast operation Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9796957aa6d9b9b02eb6ba1488f6c73050a65bc7 Author: Thomas Weißschuh Date: Thu Feb 23 02:30:36 2023 +0000 dmesg: (tests) prevent loading of custom colorscheme Signed-off-by: Thomas Weißschuh tests/ts/dmesg/colors | 1 + 1 file changed, 1 insertion(+) commit bfd08699982a2f2f49410a0c7db0548b327f8504 Author: Thomas Weißschuh Date: Thu Feb 23 02:28:23 2023 +0000 cal: (tests) prevent loading of custom colorschemes Signed-off-by: Thomas Weißschuh tests/ts/cal/color | 1 + tests/ts/cal/colorw | 1 + tests/ts/cal/weekarg | 1 + 3 files changed, 3 insertions(+) commit ceb5354ca64106d3ee222f78167929e70977ccef Author: Thomas Weißschuh Date: Thu Feb 23 02:37:55 2023 +0000 tests: add function to inhibit loading of custom colorschemes Signed-off-by: Thomas Weißschuh tests/functions.sh | 4 ++++ 1 file changed, 4 insertions(+) commit 4bdf22803f9a41329694e0c3c82189635dccdcd0 Author: Thomas Weißschuh Date: Thu Feb 23 02:20:28 2023 +0000 lib/colors: ensure fallback to system directory The return value from colors_readdir(homedir) is used to determine if the system directory should be searched. Previously the mere existence of `~/.config/terminal-colors.d/` would inhibit all lookups in `/etc/terminal-colors.d`. Signed-off-by: Thomas Weißschuh lib/colors.c | 2 ++ 1 file changed, 2 insertions(+) commit 261888f15873464b164ede5bb68aaecb06706f50 Author: Thomas Haller Date: Wed Feb 22 16:32:03 2023 +0100 lib/randutils: drop unnecessary fcntl() in random_get_fd() We already pass O_CLOEXEC flag to open(), no need to modify the file descriptor with FD_CLOEXEC afterwards. This was a left over from commit b1fa3e2234fa ('lib: use O_CLOEXEC in libcommon'). Signed-off-by: Thomas Haller lib/randutils.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d5c515dc727b40550f2556f7ac70431cb924b4b7 Author: Karel Zak Date: Wed Feb 22 21:26:11 2023 +0100 libmount: move selinux stuff to hook module * convert selinux contexts to raw format during "prep-options" stage * convert rootcontext=@target to raw context when final mountpoint path is available (after mkdir). Signed-off-by: Karel Zak libmount/meson.build | 2 +- libmount/src/Makemodule.am | 2 +- libmount/src/context_mount.c | 85 +--------------- libmount/src/hook_selinux.c | 203 +++++++++++++++++++++++++++++++++++++ libmount/src/hook_selinux_target.c | 92 ----------------- libmount/src/hooks.c | 2 +- libmount/src/mountP.h | 2 +- 7 files changed, 210 insertions(+), 178 deletions(-) commit 211bb3c9df0f6764a2ae62753c0c1ed930ca37f0 Author: Karel Zak Date: Wed Feb 22 21:22:32 2023 +0100 libmount: make it possible to define order of hooks In some cases we have more hooks in the same stage and it's necessary to call some hooks after another. Signed-off-by: Karel Zak libmount/src/hooks.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++----- libmount/src/mountP.h | 8 +++++ 2 files changed, 88 insertions(+), 8 deletions(-) commit 1a75b4f92685147c4aaf915e9028d41cac305d69 Author: Karel Zak Date: Wed Feb 22 13:00:29 2023 +0100 libmount: create a hook to set rootcontext=@target The final target (mountpoint) depends on others libmount functionality (X-mount.mkdir or --target-prefix). It means we cannot assume target when the library calls fix_opts() and translates selinux contexts. The solution is extra hook executed after mkdir. Signed-off-by: Karel Zak libmount/meson.build | 1 + libmount/src/Makemodule.am | 1 + libmount/src/context_mount.c | 15 ++++--- libmount/src/hook_selinux_target.c | 92 ++++++++++++++++++++++++++++++++++++++ libmount/src/hooks.c | 3 ++ libmount/src/mountP.h | 3 ++ 6 files changed, 108 insertions(+), 7 deletions(-) commit e520e378f59dcd467356b3cf38d08f4cbeb89cf0 Merge: fbecf94b2 cbbe29e6c Author: Karel Zak Date: Wed Feb 22 11:42:17 2023 +0100 Merge branch 'auto_rootcontext' of https://github.com/cgzones/util-linux * 'auto_rootcontext' of https://github.com/cgzones/util-linux: mount: add rootcontext=@target libmount: declare array of LSM options const commit fbecf94b228419714cd29c7a899b739787c0ba27 Merge: c1510f4ee 3e244bab7 Author: Karel Zak Date: Wed Feb 22 11:39:52 2023 +0100 Merge branch 'test_mkfds_getopt' of https://github.com/masatake/util-linux * 'test_mkfds_getopt' of https://github.com/masatake/util-linux: test_mkfds: add missing terminator of the option spec list commit c1510f4ee1436de0e76641656b2c24902a44b591 Author: Karel Zak Date: Wed Feb 22 11:36:03 2023 +0100 lslogins: (man) reorder login statuses It's better to keep the order in the man page the same as used in the lslogins output. Reported-by: Radka Skvarilova Signed-off-by: Karel Zak login-utils/lslogins.1.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b7fe2b03e08ff372df56d88c15902fde2951ffa3 Merge: f8cb4c0df b8889c0a2 Author: Karel Zak Date: Wed Feb 22 11:32:05 2023 +0100 Merge branch 'blkid_opal_io' of https://github.com/bluca/util-linux * 'blkid_opal_io' of https://github.com/bluca/util-linux: libblkid: try LUKS2 first when probing libblkid: check if device is OPAL locked on I/O error commit b8889c0a214aeb3dd47bf1ab280fe5534b64d2aa Author: Luca Boccassi Date: Thu Feb 9 01:21:07 2023 +0000 libblkid: try LUKS2 first when probing If a device is locked with OPAL we'll get an I/O error when probing past the LUKS2 header. Try it first to avoid this issue. It is useful regardless, as when we find a LUKS superblock we stop there anyway, no need to check futher. Signed-off-by: Luca Boccassi libblkid/src/superblocks/superblocks.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a0cf9105e0591904dec87aa4e37ed13f5e6ec2fa Author: Luca Boccassi Date: Wed Feb 22 01:33:36 2023 +0000 libblkid: check if device is OPAL locked on I/O error Use the appropriate ioctl, if available, to check if a device is locked when we get an I/O error. Save the information so that we don't have to repeat the ioctl. Before: LIBBLKID_DEBUG=all blkid -p /dev/sdd2 206326: libblkid: INIT: library debug mask: 0xffff 206326: libblkid: INIT: library version: 2.38.1 [04-Aug-2022] Available "LIBBLKID_DEBUG=[,...]|" debug masks: all [0xffff] : info about all subsystems cache [0x0004] : blkid tags cache config [0x0008] : config file utils dev [0x0010] : device utils devname [0x0020] : /proc/partitions evaluation devno [0x0040] : conversions to device name evaluate [0x0080] : tags resolving help [0x0001] : this help lowprobe [0x0100] : superblock/raids/partitions probing buffer [0x2000] : low-probing buffers probe [0x0200] : devices verification read [0x0400] : cache parsing save [0x0800] : cache writing tag [0x1000] : tags utils 206326: libblkid: LOWPROBE: allocate a new probe 206326: libblkid: LOWPROBE: zeroize wiper 206326: libblkid: LOWPROBE: ready for low-probing, offset=0, size=234584276992, zonesize=0 206326: libblkid: LOWPROBE: whole-disk: NO, regfile: NO 206326: libblkid: LOWPROBE: start probe 206326: libblkid: LOWPROBE: zeroize wiper 206326: libblkid: LOWPROBE: chain safeprobe superblocks ENABLED 206326: libblkid: LOWPROBE: --> starting probing loop [SUBLKS idx=-1] 206326: libblkid: LOWPROBE: [0] linux_raid_member: 206326: libblkid: LOWPROBE: call probefunc() 206326: libblkid: LOWPROBE: read: off=234584211456 len=64 206326: libblkid: LOWPROBE: read failed: Input/output error 206326: libblkid: LOWPROBE: <-- leaving probing loop (failed=-5) [SUBLKS idx=0] 206326: libblkid: LOWPROBE: freeing values list 206326: libblkid: LOWPROBE: end probe 206326: libblkid: LOWPROBE: zeroize wiper 206326: libblkid: LOWPROBE: free probe After: LIBBLKID_DEBUG=all blkid -p /dev/sdd2 206221: libblkid: INIT: library debug mask: 0xffff 206221: libblkid: INIT: library version: 2.38.1119 [28-Mar-2022] Available "LIBBLKID_DEBUG=[,...]|" debug masks: all [0x00ffff] : info about all subsystems cache [0x000004] : blkid tags cache config [0x000008] : config file utils dev [0x000010] : device utils devname [0x000020] : /proc/partitions evaluation devno [0x000040] : conversions to device name evaluate [0x000080] : tags resolving help [0x000001] : this help lowprobe [0x000100] : superblock/raids/partitions probing buffer [0x002000] : low-probing buffers probe [0x000200] : devices verification read [0x000400] : cache parsing save [0x000800] : cache writing tag [0x001000] : tags utils 206221: libblkid: LOWPROBE: allocate a new probe 206221: libblkid: LOWPROBE: zeroize wiper 206221: libblkid: LOWPROBE: ready for low-probing, offset=0, size=234584276992, zonesize=0 206221: libblkid: LOWPROBE: whole-disk: NO, regfile: NO 206221: libblkid: LOWPROBE: start probe 206221: libblkid: LOWPROBE: zeroize wiper 206221: libblkid: LOWPROBE: chain safeprobe superblocks ENABLED 206221: libblkid: LOWPROBE: --> starting probing loop [SUBLKS idx=-1] 206221: libblkid: LOWPROBE: [0] linux_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: read: off=234584211456 len=64 206221: libblkid: LOWPROBE: read failed: Input/output error 206221: libblkid: LOWPROBE: read: off=234584268800 len=256 206221: libblkid: LOWPROBE: read failed: Input/output error 206221: libblkid: LOWPROBE: read: off=0 len=256 206221: libblkid: LOWPROBE: read: off=4096 len=256 206221: libblkid: LOWPROBE: [1] ddf_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: read: off=234584276480 len=512 206221: libblkid: LOWPROBE: read failed: Input/output error 206221: libblkid: LOWPROBE: [2] isw_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [3] lsi_mega_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [4] via_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [5] silicon_medley_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [6] nvidia_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [7] promise_fasttrack_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [8] hpt45x_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [9] hpt37x_raid_member: 206221: libblkid: LOWPROBE: read: off=4096 len=1024 206221: libblkid: BUFFER: reuse: off=4096 len=1024 (for off=4096 len=1024) 206221: libblkid: LOWPROBE: [10] adaptec_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [11] jmicron_raid_member: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: [12] bcache: 206221: libblkid: BUFFER: reuse: off=4096 len=1024 (for off=4096 len=1024) 206221: libblkid: LOWPROBE: [13] bcachefs: 206221: libblkid: BUFFER: reuse: off=4096 len=1024 (for off=4096 len=1024) 206221: libblkid: BUFFER: reuse: off=4096 len=1024 (for off=4096 len=1024) 206221: libblkid: LOWPROBE: [14] ceph_bluestore: 206221: libblkid: LOWPROBE: read: off=0 len=1024 206221: libblkid: LOWPROBE: [15] drbd: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: LOWPROBE: read: off=234584272896 len=104 206221: libblkid: LOWPROBE: read failed: Input/output error 206221: libblkid: LOWPROBE: read: off=234584272896 len=1392 206221: libblkid: LOWPROBE: read failed: Input/output error 206221: libblkid: LOWPROBE: [16] drbdmanage_control_volume: 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: [17] drbdproxy_datalog: 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: [18] LVM2_member: 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: read: off=1024 len=1024 206221: libblkid: BUFFER: reuse: off=1024 len=1024 (for off=1024 len=1024) 206221: libblkid: LOWPROBE: [19] LVM1_member: 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: [20] DM_snapshot_cow: 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: [21] DM_verity_hash: 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: [22] DM_integrity: 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: [23] crypto_LUKS: 206221: libblkid: LOWPROBE: call probefunc() 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=512) 206221: libblkid: LOWPROBE: assigning VERSION [superblocks] 206221: libblkid: LOWPROBE: assigning UUID [superblocks] 206221: libblkid: LOWPROBE: assigning LABEL [superblocks] 206221: libblkid: LOWPROBE: free value LABEL 206221: libblkid: LOWPROBE: assigning SUBSYSTEM [superblocks] 206221: libblkid: LOWPROBE: assigning TYPE [superblocks] 206221: libblkid: LOWPROBE: assigning USAGE [superblocks] 206221: libblkid: LOWPROBE: <-- leaving probing loop (type=crypto_LUKS) [SUBLKS idx=23] 206221: libblkid: LOWPROBE: freeing values list 206221: libblkid: LOWPROBE: chain safeprobe topology DISABLED 206221: libblkid: LOWPROBE: chain safeprobe partitions ENABLED 206221: libblkid: LOWPROBE: Resetting partitions values 206221: libblkid: LOWPROBE: --> starting probing loop [PARTS idx=-1] 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: gpt: ---> call probefunc() 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=512) 206221: libblkid: LOWPROBE: gpt: <--- (rc = 1) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: ultrix: ---> call probefunc() 206221: libblkid: LOWPROBE: read: off=15872 len=512 206221: libblkid: LOWPROBE: ultrix: <--- (rc = 1) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: read: off=28672 len=1024 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: atari: ---> call probefunc() 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=512) 206221: libblkid: LOWPROBE: atari: <--- (rc = 1) 206221: libblkid: LOWPROBE: <-- leaving probing loop (failed=1) [PARTS idx=12] 206221: libblkid: LOWPROBE: parts: start probing for partition entry 206221: libblkid: DEVNO: found devno 0x0830 as /dev/sdd 206221: libblkid: LOWPROBE: allocate a wholedisk probe 206221: libblkid: LOWPROBE: allocate a new probe 206221: libblkid: LOWPROBE: zeroize wiper 206221: libblkid: LOWPROBE: ready for low-probing, offset=0, size=256060514304, zonesize=0 206221: libblkid: LOWPROBE: whole-disk: YES, regfile: NO 206221: libblkid: LOWPROBE: partlist reset 206221: libblkid: LOWPROBE: parts: initialized partitions list (size=0) 206221: libblkid: LOWPROBE: --> starting probing loop [PARTS idx=-1] 206221: libblkid: LOWPROBE: read: off=0 len=1024 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=1024) 206221: libblkid: LOWPROBE: magic sboff=510, kboff=0 206221: libblkid: LOWPROBE: dos: ---> call probefunc() 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=512) 206221: libblkid: LOWPROBE: probably GPT -- ignore 206221: libblkid: LOWPROBE: dos: <--- (rc = 1) 206221: libblkid: LOWPROBE: gpt: ---> call probefunc() 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=0 len=512) 206221: libblkid: LOWPROBE: #1 valid PMBR partition 206221: libblkid: LOWPROBE: checking for GPT header at 1 206221: libblkid: BUFFER: reuse: off=0 len=1024 (for off=512 len=512) 206221: libblkid: LOWPROBE: read: off=1024 len=16384 206221: libblkid: LOWPROBE: parts: create a new partition table (type=gpt, offset=512) 206221: libblkid: LOWPROBE: parts: add partition (start=2048, size=41943040) 206221: libblkid: LOWPROBE: parts: add partition (start=41945088, size=458172416) 206221: libblkid: LOWPROBE: gpt: <--- (rc = 0) 206221: libblkid: LOWPROBE: <-- leaving probing loop (type=gpt) [PARTS idx=4] 206221: libblkid: LOWPROBE: partitions probe done [rc=0] 206221: libblkid: LOWPROBE: returning partitions binary data 206221: libblkid: LOWPROBE: trying to convert devno 0x832 to partition 206221: libblkid: LOWPROBE: searching by offset/size 206221: libblkid: LOWPROBE: assigning PART_ENTRY_SCHEME [partitions] 206221: libblkid: LOWPROBE: assigning PART_ENTRY_UUID [partitions] 206221: libblkid: LOWPROBE: assigning PART_ENTRY_TYPE [partitions] 206221: libblkid: LOWPROBE: assigning PART_ENTRY_NUMBER [partitions] 206221: libblkid: LOWPROBE: assigning PART_ENTRY_OFFSET [partitions] 206221: libblkid: LOWPROBE: assigning PART_ENTRY_SIZE [partitions] 206221: libblkid: LOWPROBE: assigning PART_ENTRY_DISK [partitions] 206221: libblkid: LOWPROBE: parts: end probing for partition entry [success] 206221: libblkid: LOWPROBE: partitions probe done [rc=0] 206221: libblkid: LOWPROBE: end probe 206221: libblkid: LOWPROBE: zeroize wiper 206221: libblkid: LOWPROBE: returning VERSION value 206221: libblkid: LOWPROBE: returning UUID value 206221: libblkid: LOWPROBE: returning SUBSYSTEM value 206221: libblkid: LOWPROBE: returning TYPE value 206221: libblkid: LOWPROBE: returning USAGE value 206221: libblkid: LOWPROBE: returning PART_ENTRY_SCHEME value 206221: libblkid: LOWPROBE: returning PART_ENTRY_UUID value 206221: libblkid: LOWPROBE: returning PART_ENTRY_TYPE value 206221: libblkid: LOWPROBE: returning PART_ENTRY_NUMBER value 206221: libblkid: LOWPROBE: returning PART_ENTRY_OFFSET value 206221: libblkid: LOWPROBE: returning PART_ENTRY_SIZE value 206221: libblkid: LOWPROBE: returning PART_ENTRY_DISK value /dev/sdd2: VERSION="2" UUID="a918f1d0-f1de-44f5-9d93-ce9dc15cc2c7" SUBSYSTEM="HW-OPAL" TYPE="crypto_LUKS" USAGE="crypto" PART_ENTRY_SCHEME="gpt" PART_ENTRY_UUID="39ed5135-46e4-ca44-837e-da3c0781367b" PART_ENTRY_TYPE="0fc63daf-8483-4772-8e79-3d69d8477de4" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="41945088" PART_ENTRY_SIZE="458172416" PART_ENTRY_DISK="8:48" 206221: libblkid: BUFFER: Resetting probing buffers 206221: libblkid: BUFFER: remove buffer: [off=0, len=256] 206221: libblkid: BUFFER: remove buffer: [off=4096, len=256] 206221: libblkid: BUFFER: remove buffer: [off=4096, len=1024] 206221: libblkid: BUFFER: remove buffer: [off=0, len=1024] 206221: libblkid: BUFFER: remove buffer: [off=1024, len=1024] 206221: libblkid: BUFFER: remove buffer: [off=15872, len=512] 206221: libblkid: BUFFER: remove buffer: [off=28672, len=1024] 206221: libblkid: LOWPROBE: buffers summary: 5120 bytes by 7 read() calls 206221: libblkid: LOWPROBE: resetting results 206221: libblkid: LOWPROBE: free value VERSION 206221: libblkid: LOWPROBE: free value UUID 206221: libblkid: LOWPROBE: free value SUBSYSTEM 206221: libblkid: LOWPROBE: free value TYPE 206221: libblkid: LOWPROBE: free value USAGE 206221: libblkid: LOWPROBE: free value PART_ENTRY_SCHEME 206221: libblkid: LOWPROBE: free value PART_ENTRY_UUID 206221: libblkid: LOWPROBE: free value PART_ENTRY_TYPE 206221: libblkid: LOWPROBE: free value PART_ENTRY_NUMBER 206221: libblkid: LOWPROBE: free value PART_ENTRY_OFFSET 206221: libblkid: LOWPROBE: free value PART_ENTRY_SIZE 206221: libblkid: LOWPROBE: free value PART_ENTRY_DISK 206221: libblkid: BUFFER: Resetting probing buffers 206221: libblkid: BUFFER: remove buffer: [off=0, len=1024] 206221: libblkid: BUFFER: remove buffer: [off=1024, len=16384] 206221: libblkid: LOWPROBE: buffers summary: 17408 bytes by 2 read() calls 206221: libblkid: LOWPROBE: free probe 206221: libblkid: LOWPROBE: free probe Signed-off-by: Luca Boccassi configure.ac | 5 +++++ libblkid/src/blkidP.h | 4 ++++ libblkid/src/probe.c | 25 ++++++++++++++++++++++++- meson.build | 3 +++ 4 files changed, 36 insertions(+), 1 deletion(-) commit cbbe29e6c14fff3d1da28ae94324a18cd022f9dd Author: Christian Göttsche Date: Tue Feb 21 15:29:59 2023 +0100 mount: add rootcontext=@target Add a special value for rootcontext=, namely `@target`, to set the root context of the new filesystem to the current context of the target mountpoint. Useful for in-memory filesystems, like tmpfs and ramfs. Closes: #1830 libmount/src/context_mount.c | 18 ++++++++++++++---- sys-utils/mount.8.adoc | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) commit 832ee3d79e36b1e49b07ec841aa1497088e1729b Author: Christian Göttsche Date: Tue Feb 21 15:28:45 2023 +0100 libmount: declare array of LSM options const libmount/src/context_mount.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f8cb4c0df925a45a55d3c2305af2b2f743798f8c Merge: d02841bec b4e398417 Author: Karel Zak Date: Tue Feb 21 13:01:47 2023 +0100 Merge branch 'lsfd-tcp6' of https://github.com/masatake/util-linux * 'lsfd-tcp6' of https://github.com/masatake/util-linux: lsfd: use PRIu16 instead of SCNu16 in xasprintf lsfd: specify variables instead of types in sizeof operator lsfd: (test) add a case for TCPv6 sockets tests: (mkfds) add tcp6 factory lsfd: (man) write about TCP6 related columns lsfd: use extra information loaded from /proc/net/tcp6 lsfd: (man) fix typos commit b4e3984174692aa917a7dab527766343af15f435 Author: Masatake YAMATO Date: Tue Feb 21 00:19:19 2023 +0900 lsfd: use PRIu16 instead of SCNu16 in xasprintf Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit d02841bec3249e6c05c09a889f615f4349e6a17b Merge: 9d1f0dbc5 a5e94c111 Author: Karel Zak Date: Mon Feb 20 13:42:23 2023 +0100 Merge branch 'rpmatch' of https://github.com/t-8ch/util-linux * 'rpmatch' of https://github.com/t-8ch/util-linux: fdisk: document expected answers to quit message more: drop unused #include "rpmatch.h" commit 9d1f0dbc5eec10809b4d47a86187d50c8aac3250 Author: Karel Zak Date: Mon Feb 20 13:41:07 2023 +0100 cal: (man) add example for colors Signed-off-by: Karel Zak misc-utils/cal.1.adoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 82d99da19582f2db051a5ae082a34a5d78f74c9d Merge: 9f37a2246 7d1ccdb86 Author: Karel Zak Date: Mon Feb 20 13:31:16 2023 +0100 Merge branch 'cal-colors-man' of https://github.com/t-8ch/util-linux * 'cal-colors-man' of https://github.com/t-8ch/util-linux: cal: (man) document colorscheme commit 9f37a2246a6bfa7f6b9583b7992ed42d8ca0e638 Author: Karel Zak Date: Mon Feb 20 13:30:07 2023 +0100 whereis: (man) mark example section Signed-off-by: Karel Zak misc-utils/whereis.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a5e94c1113ea367ecd58829c9568401e9da5d1e5 Author: Thomas Weißschuh Date: Sun Feb 19 16:09:43 2023 +0000 fdisk: document expected answers to quit message Signed-off-by: Thomas Weißschuh disk-utils/fdisk-menu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e821801ee9be8dbaceed5161ad02853966ba281d Author: Thomas Weißschuh Date: Sun Feb 19 16:09:11 2023 +0000 more: drop unused #include "rpmatch.h" Signed-off-by: Thomas Weißschuh text-utils/more.c | 1 - 1 file changed, 1 deletion(-) commit 7d1ccdb86543fbf0eb4680c656e02b7b48efd3ad Author: Thomas Weißschuh Date: Sat Feb 18 22:59:33 2023 +0000 cal: (man) document colorscheme Signed-off-by: Thomas Weißschuh misc-utils/cal.1.adoc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 49df4a97647abdff5237aaf4f8138015cd8bf838 Author: Jakub Wilk Date: Sat Feb 18 21:35:55 2023 +0100 whereis: (man) fix example formatting Add missing newline between the two commands. misc-utils/whereis.1.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ff22ccb4b11a17180a653f8c54fc4cbdd0adbb9 Author: Masatake YAMATO Date: Tue Feb 14 01:24:33 2023 +0900 lsfd: specify variables instead of types in sizeof operator Suggested-by: Thomas Weißschuh Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5840d8297a0dbfc407790f5ee6e0557ec578c70d Author: Masatake YAMATO Date: Mon Feb 13 23:54:14 2023 +0900 lsfd: (test) add a case for TCPv6 sockets tests/expected/lsfd/mkfds-tcp6 | 4 ++++ tests/ts/lsfd/mkfds-tcp6 | 50 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit ca517a11e89c38af28ccdc9d5942b8fb0b2d1c8e Author: Masatake YAMATO Date: Mon Feb 13 23:37:44 2023 +0900 tests: (mkfds) add tcp6 factory tests/helpers/test_mkfds.c | 91 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 75 insertions(+), 16 deletions(-) commit e023352c25e90ba6e4b226a54f53d9d6611c4927 Author: Masatake YAMATO Date: Mon Feb 13 22:48:28 2023 +0900 lsfd: (man) write about TCP6 related columns Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1656da13b0e869e3bdbf1b4a8a3d5b648727af31 Author: Masatake YAMATO Date: Fri Feb 3 14:03:23 2023 +0900 lsfd: use extra information loaded from /proc/net/tcp6 Example output: # ./lsfd -Q '(TYPE == "TCPv6") and ((COMMAND == "sshd") or (COMMAND == "test_mkfds"))' COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME sshd 1137 root 4 rw- TCPv6 sockfs 9 34689 state=listen laddr=[::]:22 test_mkfds 716926 jet 3 rw- TCPv6 sockfs 9 6042073 state=listen laddr=[::1]:12345 test_mkfds 716926 jet 4 rw- TCPv6 sockfs 9 6042074 state=established laddr=[::1]:23456 raddr=[::1]:12345 test_mkfds 716926 jet 5 rw- TCPv6 sockfs 9 6042075 state=established laddr=[::1]:12345 raddr=[::1]:23456 Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 135 ++++++++++++++++++++++++++++++++++++++++--- misc-utils/lsfd.c | 4 ++ misc-utils/lsfd.h | 2 + 3 files changed, 134 insertions(+), 7 deletions(-) commit 01a7f746f9d285acfcfcf8ea64fbeab187f65ca0 Author: Masatake YAMATO Date: Mon Feb 13 22:38:53 2023 +0900 lsfd: (man) fix typos Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6c81d6103d1e6acda4c6473b258cc785628671b Author: Karel Zak Date: Fri Feb 17 14:33:26 2023 +0100 cal: add workday and weekday colors echo -e 'weekend 35\ntoday 1;41\nheader yellow' > $HOME/.config/terminal-colors.d/cal.scheme cal -m ` Signed-off-by: Karel Zak misc-utils/cal.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 6398485b48ae484eaf69df1b7f3d88637265757b Merge: 2198b2c75 6013e1eb3 Author: Karel Zak Date: Fri Feb 17 14:44:19 2023 +0100 Merge branch 'cal/colors' of https://github.com/t-8ch/util-linux * 'cal/colors' of https://github.com/t-8ch/util-linux: cal: convert existing highlight logic to color lib lib/colors: introduce color_get_disable_sequence() cal: use escape codes from color-names.h cal: add test for vertical week color cal: add test for vertical colors commit 2198b2c75a1ad7d6d500b2e92bff6ca281256e33 Merge: 665c9694c 26c9eb354 Author: Karel Zak Date: Fri Feb 17 11:45:27 2023 +0100 Merge branch 'kernel-doc-links' of https://github.com/nl6720/util-linux * 'kernel-doc-links' of https://github.com/nl6720/util-linux: documentation: link to HTML versions of kernel docs on docs.kernel.org commit 665c9694ce655c2f0b0703a1164c3e7eee9a6a92 Merge: 77bc38ced eeaf7677e Author: Karel Zak Date: Fri Feb 17 11:43:51 2023 +0100 Merge branch 'lsfd-unix-including-spaces-in-path' of https://github.com/masatake/util-linux * 'lsfd-unix-including-spaces-in-path' of https://github.com/masatake/util-linux: lsfd: read the UNIX socket path including white spaces correctly lsfd: prepare enough large buffer when reading /proc/net/unix commit 3e244bab7acd7b2afde4cb3eabe432662655ea15 Author: Masatake YAMATO Date: Fri Feb 17 04:03:49 2023 +0900 test_mkfds: add missing terminator of the option spec list Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 1 + 1 file changed, 1 insertion(+) commit 77bc38ced48a4e098e18546e456029731ea0588e Author: Karel Zak Date: Thu Feb 16 13:44:24 2023 +0100 libmount: add fsconfig() btrfs workaround The new kernel mount API is not properly implemented in all FS drivers. See strace output: fsconfig(3, FSCONFIG_SET_STRING, "source", "/dev/sda", 0) = 0 fsconfig(3, FSCONFIG_SET_STRING, "context", "system_u:object_r:root_t:s0", 0) = 0 fsconfig(3, FSCONFIG_CMD_CREATE, NULL, NULL, 0) = -1 EINVAL (Invalid argument) Reported-by: Shinichiro Kawasaki Signed-off-by: Karel Zak libmount/src/context.c | 2 ++ libmount/src/context_mount.c | 3 +++ libmount/src/hook_mount.c | 22 ++++++++++++++++++++-- libmount/src/mountP.h | 1 + 4 files changed, 26 insertions(+), 2 deletions(-) commit 6013e1eb3b414f44065ee38b60e35e8aec839e92 Author: Thomas Weißschuh Date: Wed Feb 15 16:13:58 2023 +0000 cal: convert existing highlight logic to color lib See #2053 Signed-off-by: Thomas Weißschuh misc-utils/cal.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 12 deletions(-) commit f0175fe280bee86aa43cf4ca7bdfe6e9d0ec4816 Author: Thomas Weißschuh Date: Wed Feb 15 17:29:50 2023 +0000 lib/colors: introduce color_get_disable_sequence() Signed-off-by: Thomas Weißschuh include/colors.h | 2 ++ lib/colors.c | 11 +++++++++++ 2 files changed, 13 insertions(+) commit f31049f99ecaac77097acdc4d019f99b9fcf731c Author: Thomas Weißschuh Date: Wed Feb 15 17:23:16 2023 +0000 cal: use escape codes from color-names.h Signed-off-by: Thomas Weißschuh misc-utils/cal.c | 75 ++-------------------- tests/expected/cal/color-first-day | 2 +- tests/expected/cal/color-last-day | 2 +- .../expected/cal/color-reformation-corner-cases-1 | 2 +- .../expected/cal/color-reformation-corner-cases-4 | 2 +- tests/expected/cal/color-vertical | 2 +- tests/expected/cal/color-vertical-week | 2 +- tests/expected/cal/colorw-first-day-week-numbers | 2 +- tests/expected/cal/colorw-last-day-week-numbers | 2 +- .../colorw-reformation-corner-cases-1-week-numbers | 2 +- .../colorw-reformation-corner-cases-4-week-numbers | 2 +- tests/expected/cal/weekarg-1m-week53-color | 2 +- tests/expected/cal/weekarg-1mj-week53-color | 2 +- tests/expected/cal/weekarg-3m-week40-color | 6 +- tests/expected/cal/weekarg-3m-week52-color | 2 +- tests/expected/cal/weekarg-3m-week53-color | 4 +- tests/expected/cal/weekarg-3mj-week40-color | 6 +- tests/expected/cal/weekarg-3s-week54-color | 2 +- 18 files changed, 29 insertions(+), 90 deletions(-) commit c8332ec371da30050457d32940dc2f61f65c9d17 Author: Thomas Weißschuh Date: Wed Feb 15 19:20:27 2023 +0000 cal: add test for vertical week color Signed-off-by: Thomas Weißschuh tests/expected/cal/color-vertical-week | 9 +++++++++ tests/ts/cal/color | 7 +++++++ 2 files changed, 16 insertions(+) commit 1aa51066f5a316a0fa3d20cc01c89f7c4bdee029 Author: Thomas Weißschuh Date: Wed Feb 15 18:54:10 2023 +0000 cal: add test for vertical colors Signed-off-by: Thomas Weißschuh tests/expected/cal/color-vertical | 8 ++++++++ tests/ts/cal/color | 7 +++++++ 2 files changed, 15 insertions(+) commit e84f01c1a6ec76ccaac35a1cd253ff6f535626e5 Author: Karel Zak Date: Wed Feb 15 14:30:58 2023 +0100 libmount: support "recursive" argument for VFS attributes mount -o bind,ro=recursive,nosuid /foo /bar sets all sub-mount to read-only, but only /bar will be nosuid. Addresses: https://github.com/util-linux/util-linux/issues/1501 Signed-off-by: Karel Zak libmount/src/hook_mount.c | 62 ++++++++++++++++++++----------- libmount/src/mountP.h | 9 ++++- libmount/src/optlist.c | 95 ++++++++++++++++++++++++++++++++--------------- sys-utils/mount.8.adoc | 30 ++++++++++++++- 4 files changed, 142 insertions(+), 54 deletions(-) commit 26c9eb354c0f67a95eb09e47cc8e683da3562607 Author: nl6720 Date: Wed Feb 15 15:28:42 2023 +0200 documentation: link to HTML versions of kernel docs on docs.kernel.org Documentation/howto-contribute.txt | 2 +- libblkid/src/superblocks/erofs.c | 2 +- po-man/util-linux-man.pot | 6 +++--- sys-utils/blkpr.8.adoc | 2 +- sys-utils/mount.8.adoc | 2 +- sys-utils/rfkill.8.adoc | 2 +- sys-utils/zramctl.8.adoc | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit eeaf7677e1471df737aa39779675c48ec55a276c Author: Masatake YAMATO Date: Tue Feb 14 04:03:27 2023 +0900 lsfd: read the UNIX socket path including white spaces correctly The original code uses '%s' scanf specifier to read lines in /proc/net/unix. If white space is included in a path, lsfd could read only the first word of the path. This commit fixes this bug. Specifying the maximum length of path is suggested by Karel Zak . Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 12 +++++++++--- tests/expected/lsfd/mkfds-unix-stream | 8 ++++++++ tests/ts/lsfd/mkfds-unix-stream | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) commit b8acbba6f7ef3ea367fbf92997931c442f29fafe Author: Karel Zak Date: Tue Feb 14 12:04:41 2023 +0100 include: improve statx fallback Addresses: https://github.com/util-linux/util-linux/pull/2065 Signed-off-by: Karel Zak configure.ac | 1 + include/fileutils.h | 4 ++-- meson.build | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit d6d340eba3d66a3c71e481b31d352d0fb616e007 Author: Masatake YAMATO Date: Tue Feb 14 03:59:35 2023 +0900 lsfd: prepare enough large buffer when reading /proc/net/unix Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b646f01600a5efcf16e8e8991010b49b250bdfe Author: Karel Zak Date: Mon Feb 13 16:22:23 2023 +0100 last: use full size of the username utmp uses 32 bytes for username, last(1) truncates it to 31 when calls getpwnam(). Reported-by: Radka Skvarilova Signed-off-by: Karel Zak login-utils/last.1.adoc | 2 ++ login-utils/last.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit f191801c142e9fcf9d735b6b014aa1a18050a08d Author: Karel Zak Date: Mon Feb 13 14:28:08 2023 +0100 include: cleanup close_range fallback * let's use && operator rather than if-if * define HAVE_CLOSE_RANGE only if callback is really avalable Signed-off-by: Karel Zak include/fileutils.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 30c59d677fa54f72b5037df9c1bc2ba377a995cb Author: Karel Zak Date: Mon Feb 13 14:25:26 2023 +0100 include: add fallback for statx Fixes: https://github.com/util-linux/util-linux/pull/2065 Signed-off-by: Karel Zak configure.ac | 1 + include/fileutils.h | 14 ++++++++++++++ libmount/src/hook_mount.c | 1 + meson.build | 1 + 4 files changed, 17 insertions(+) commit 6a3cb10b211a2d58f188fd253301df74dc13b189 Merge: eb0c97e21 1e943dade Author: Karel Zak Date: Mon Feb 13 13:42:05 2023 +0100 Merge branch 'waitpid/cleanup' of https://github.com/t-8ch/util-linux * 'waitpid/cleanup' of https://github.com/t-8ch/util-linux: waitpid: prettify options terminator waitpid: delete trailing whitespace waipid: print error message without pids waitpid: fix help alignment commit eb0c97e2166696602ef9fdb8da0a0a30f0170c7d Merge: baf872304 621cf7e9c Author: Karel Zak Date: Mon Feb 13 13:40:48 2023 +0100 Merge branch 'lsfd-raw' of https://github.com/masatake/util-linux * 'lsfd-raw' of https://github.com/masatake/util-linux: lsfd: remove redundant parentheses surrounding return values lsfd: rename tcp_state to l4_state and use the type instead of unsigned int lsfd: use SCNu16 format specifier instead of cast operations (unsigned short) lsfd: use extra information loaded from /proc/net/raw lsfd: make TCP and UDP related code L3 protocol neutral lsfd: refactor the usage of tcp_decode_state() lsfd: move the field representing connection state from tcp_xinfo to the L4 abstract layer lsfd: add methods to the L4 abstract layer for hidding differences in L3 protocols lsfd: implement code scanning lines in /proc/net/$proto as a method in the L4 abstract layer lsfd: introduce L4 abstract layer stacked on IP and IP6 lsfd: fix wrong identifier namings (L3->L4) lsfd: move kernel32_to_cpu() front in the source file lsfd: remove an unused field from struct sock_xinfo_class lsfd: (man) fix the description of NAME fields for TCP and UDP sockets lsfd: adjust coding style, insert space after "switch" keyword commit 1e943dade8b6de3fdc23a3ac55a077f5b0ccd047 Author: Thomas Weißschuh Date: Sat Feb 11 04:29:01 2023 +0000 waitpid: prettify options terminator Signed-off-by: Thomas Weißschuh misc-utils/waitpid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8e98736446d359da94572282d66a1f363101695 Author: Thomas Weißschuh Date: Sat Feb 11 04:25:20 2023 +0000 waitpid: delete trailing whitespace Signed-off-by: Thomas Weißschuh misc-utils/waitpid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6947a710a16725efde894482425db834098a42ae Author: Thomas Weißschuh Date: Sat Feb 11 04:24:41 2023 +0000 waipid: print error message without pids Signed-off-by: Thomas Weißschuh misc-utils/waitpid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2db1d39fd71e37ee58de33db3c52316b98a4ad73 Author: Thomas Weißschuh Date: Sat Feb 11 04:24:25 2023 +0000 waitpid: fix help alignment Signed-off-by: Thomas Weißschuh misc-utils/waitpid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 621cf7e9c981ce54b286b9e8119a6bc5b3f23bbf Author: Masatake YAMATO Date: Fri Feb 10 13:38:00 2023 +0900 lsfd: remove redundant parentheses surrounding return values Suggested-by: Thomas Weißschuh Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 303b41fe8e0bf4d5da02216611091ed93d17e502 Author: Masatake YAMATO Date: Fri Feb 10 13:34:13 2023 +0900 lsfd: rename tcp_state to l4_state and use the type instead of unsigned int Suggested-by: Thomas Weißschuh Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 98 ++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 48 deletions(-) commit 73df46fc1fe407f87d26c864b6461e612ae1e02b Author: Masatake YAMATO Date: Fri Feb 10 10:11:17 2023 +0900 lsfd: use SCNu16 format specifier instead of cast operations (unsigned short) Suggested-by: Thomas Weißschuh Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 0188afb3266426df59fe61fb77fdca833b90a792 Author: Masatake YAMATO Date: Wed Feb 1 21:53:57 2023 +0900 lsfd: use extra information loaded from /proc/net/raw RAW.PROTOCOL field is added. Thomas Weißschuh suggested making the test script executable. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 121 ++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 6 +++ misc-utils/lsfd.c | 2 + misc-utils/lsfd.h | 1 + tests/expected/lsfd/mkfds-raw | 2 + tests/helpers/test_mkfds.c | 71 +++++++++++++++++++++++++ tests/ts/lsfd/mkfds-raw | 49 +++++++++++++++++ 7 files changed, 252 insertions(+) commit 838fa2706cffdc2ed0922f9e23d8fdb0d7bdbff3 Author: Masatake YAMATO Date: Fri Feb 3 03:05:23 2023 +0900 lsfd: make TCP and UDP related code L3 protocol neutral So we can reuse the current L4 code when supporting IPv6. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 150 ++++++++++++++++++++++++------------------- 1 file changed, 83 insertions(+), 67 deletions(-) commit 3b182ee750b94257b44ad42ee688f1f20d54a863 Author: Masatake YAMATO Date: Fri Feb 3 09:32:01 2023 +0900 lsfd: refactor the usage of tcp_decode_state() Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8db07ebc54619f582163b83997fac1fe9785209d Author: Masatake YAMATO Date: Fri Feb 3 02:23:08 2023 +0900 lsfd: move the field representing connection state from tcp_xinfo to the L4 abstract layer So we can reuse the code related to the field in udp, raw, tcp6, udp6, and raw6. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 2a4f2b1bc82f1faf63e944e970dc86ab9c2bc584 Author: Masatake YAMATO Date: Fri Feb 3 01:55:29 2023 +0900 lsfd: add methods to the L4 abstract layer for hidding differences in L3 protocols Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 19e4022336d4279b7ae08dee0abb17fbad2351e2 Author: Masatake YAMATO Date: Fri Feb 3 01:26:42 2023 +0900 lsfd: implement code scanning lines in /proc/net/$proto as a method in the L4 abstract layer Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 78 ++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 31 deletions(-) commit 4a2b51c19f29e834fc14a6e812c77963ed36926a Author: Masatake YAMATO Date: Fri Feb 3 01:06:28 2023 +0900 lsfd: introduce L4 abstract layer stacked on IP and IP6 Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 49 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 17 deletions(-) commit cda2b2a0d37dbb14c8196122bdc0e31e5e121cfb Author: Masatake YAMATO Date: Fri Feb 10 12:49:37 2023 +0900 lsfd: fix wrong identifier namings (L3->L4) Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit baf872304ef94d4ed5c0d7d3a9c849ca15c1b18c Author: Thomas Weißschuh Date: Fri Feb 10 03:37:48 2023 +0000 libblkid: bcachefs: fix new magic detection The new bcache-specific magic value was wrong and the new testcase didn't actually use this magic. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 2 +- tests/expected/blkid/low-probe-bcachefs-2 | 6 +++--- tests/ts/blkid/images-fs/bcachefs-2.img.xz | Bin 988 -> 988 bytes 3 files changed, 4 insertions(+), 4 deletions(-) commit 0888529ceba19b7150715a52856ae875a6dcca9b Author: Karel Zak Date: Thu Feb 9 14:11:00 2023 +0100 umount: don't ignore --quiet for non-root users The command line option --quiet suppresses 'not mounted' error messages. This does not work for non-root users because libmount does not call umount(2) syscall, and in this case, the library returns -EPERM. Fixes: https://github.com/util-linux/util-linux/issues/2060 Signed-off-by: Karel Zak sys-utils/umount.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit ce2d993bc667f634a8a98503a99249fcc21a9af2 Author: Karel Zak Date: Wed Feb 8 16:21:32 2023 +0100 libfdisk: (gpt) remove unnecessary code The function gpt_sizeof_entries() already checks for limits. Fixes: https://github.com/util-linux/util-linux/issues/2057 Signed-off-by: Karel Zak libfdisk/src/gpt.c | 5 ----- 1 file changed, 5 deletions(-) commit de6fd830ab28f488e408a1989dd1438f1b497bb7 Author: Karel Zak Date: Wed Feb 8 16:01:12 2023 +0100 cal: (man) fix -c Signed-off-by: Karel Zak misc-utils/cal.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f22513039cd28cf378948d942872596ce91e8dc9 Merge: 8c8715c75 0e68b637f Author: Karel Zak Date: Wed Feb 8 15:57:12 2023 +0100 Merge branch 'cal-columns' of https://github.com/t-8ch/util-linux * 'cal-columns' of https://github.com/t-8ch/util-linux: cal: allow to specifiy columns cal: support arbitrary amount of months per row commit 8c8715c75388e602c2566a8155af8a54b70644a3 Merge: 7f7b36bed d77cf6f31 Author: Karel Zak Date: Wed Feb 8 15:49:20 2023 +0100 Merge branch 'fix_comment_in_scriptlive' of https://github.com/8vasu/util-linux * 'fix_comment_in_scriptlive' of https://github.com/8vasu/util-linux: Fix minor typo in comment. commit 9020c2e0f45db80c17cf3373a7adba5847d4424e Author: Masatake YAMATO Date: Fri Feb 3 01:25:17 2023 +0900 lsfd: move kernel32_to_cpu() front in the source file Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3166b0c5989f0d36138d5cc36da89906e159efdb Author: Masatake YAMATO Date: Fri Feb 3 01:03:13 2023 +0900 lsfd: remove an unused field from struct sock_xinfo_class Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 3 --- misc-utils/lsfd-sock.h | 1 - 2 files changed, 4 deletions(-) commit e1cfeedb7239dcf6d0dccf7d3fe8e10cca7c1c35 Author: Masatake YAMATO Date: Fri Feb 3 23:59:07 2023 +0900 lsfd: (man) fix the description of NAME fields for TCP and UDP sockets Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 854ddd0d369bee6a53eeca89c51ce282beadf851 Author: Masatake YAMATO Date: Mon Feb 6 06:59:38 2023 +0900 lsfd: adjust coding style, insert space after "switch" keyword misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d77cf6f3111f4c2f3dd39bd04d80876202b6ac76 Author: Soumendra Ganguly Date: Sun Feb 5 15:07:37 2023 -0600 Fix minor typo in comment. Signed-off-by: Soumendra Ganguly term-utils/scriptlive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f7b36bed75ca5f6bac5468176308162028a5a2f Author: Thomas Weißschuh Date: Fri Feb 3 18:12:31 2023 +0000 lsfd: don't require nsfs to be mounted nsfs only gets mounted in fairly specific circumstances[0]. [0] https://unix.stackexchange.com/a/559723 Suggested-by: Masatake YAMATO Signed-off-by: Thomas Weißschuh misc-utils/lsfd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 44f9aec7477c2be90d3119292e6978cd70528e71 Author: Thomas Weißschuh Date: Sat Feb 4 03:50:06 2023 +0000 lsfd: make self_netns_sb static Signed-off-by: Thomas Weißschuh misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07c7f3740ef965637e74d30724fce09700a25c1e Author: Thomas Weißschuh Date: Fri Feb 3 18:14:38 2023 +0000 lsfd: run netfs test Signed-off-by: Thomas Weißschuh tests/ts/lsfd/mkfds-netns | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 3a25bd653475dd2da0c802e73d4d84e82cd086a7 Author: Thomas Weißschuh Date: Sat Feb 4 02:09:28 2023 +0000 lsfd: skip test mkfds-netns in qemu-user qemu-user does not implement ioctl(SIOCGSKNS) Signed-off-by: Thomas Weißschuh tests/ts/lsfd/mkfds-netns | 1 + 1 file changed, 1 insertion(+) commit 0bb87795ff7596a8d2229dd4b0dbbb080c932510 Author: Yegor Yefremov Date: Mon Jan 30 11:34:53 2023 +0100 git: ignore m4/libtool.m4.orig Signed-off-by: Yegor Yefremov .gitignore | 1 + 1 file changed, 1 insertion(+) commit 0c0fb46dcef6c63c74094486e499e376fdb33a04 Author: Karel Zak Date: Thu Feb 2 16:46:46 2023 +0100 agetty: don't ignore --noclear when re-print issue file The system network interface changes generate events that may force agetty to re-print the issue file. The options --noclear should be ignored in this case. Fixes: https://github.com/util-linux/util-linux/issues/2051 Signed-off-by: Karel Zak term-utils/agetty.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 584f2b72fccbaaa30c699a245e15431cebc1681b Merge: 13a98369c 4658bfb1e Author: Karel Zak Date: Thu Feb 2 16:33:53 2023 +0100 Merge branch 'lsfd-minor-updates' of https://github.com/masatake/util-linux * 'lsfd-minor-updates' of https://github.com/masatake/util-linux: lsfd: use skip_space() lsfd: use "struct in_addr" to represent IPv4 addresses lsfd: don't put a spcae between a function and its arguments lsfd: delete a redundant cast operation tests: (mkfds) fix typos in error messages tests: (mkfds) fix typos in factory descriptions tests: (mkfds) check the privilege required in the factory to run commit 13a98369ccc572b51ac2a388c91e2387c15cfad5 Author: Karel Zak Date: Thu Feb 2 16:20:43 2023 +0100 include/cctype: fix License header This file has been originally imported from gnulib with GPL header, but it's now available with LGPLv2+ now (since gnulib commit https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/c-ctype.h?id=5ffa144085078c72e7d60759ab2d6100b04cd2c2). Fixes: https://github.com/util-linux/util-linux/issues/2050 Signed-off-by: Karel Zak include/cctype.h | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) commit 0e68b637fcf8b5d1f8b034de7f9611bb42bb2b3b Author: Thomas Weißschuh Date: Sat Jan 21 01:28:12 2023 +0000 cal: allow to specifiy columns Replaces #117 Signed-off-by: Thomas Weißschuh misc-utils/cal.1.adoc | 3 +++ misc-utils/cal.c | 30 ++++++++++++++++++++++---- tests/expected/cal/column-5 | 27 +++++++++++++++++++++++ tests/expected/cal/column-6 | 19 ++++++++++++++++ tests/expected/cal/column-auto | 35 ++++++++++++++++++++++++++++++ tests/ts/cal/column | 49 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 159 insertions(+), 4 deletions(-) commit 6ed057adc711052829106e401d88e2551cbd580c Author: Thomas Weißschuh Date: Sat Jan 21 02:04:38 2023 +0000 cal: support arbitrary amount of months per row Signed-off-by: Thomas Weißschuh misc-utils/cal.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 4658bfb1e3ea0d36741b2b23a8d74441f0377356 Author: Masatake YAMATO Date: Sat Jan 28 12:09:02 2023 +0900 lsfd: use skip_space() Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 643f30c7993403214fb2104ed76309e16288c2a4 Author: Masatake YAMATO Date: Wed Jan 25 07:30:31 2023 +0900 lsfd: use "struct in_addr" to represent IPv4 addresses So we can use macros defined in netinet/in.h. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit cb097fb7eeeff84456a41cd5f48edd5dc88700f4 Author: Masatake YAMATO Date: Thu Feb 2 02:34:20 2023 +0900 lsfd: don't put a spcae between a function and its arguments Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f84d22d4fd884e7b41c89e79a9c644bb8669505e Author: Masatake YAMATO Date: Wed Jan 25 07:30:31 2023 +0900 lsfd: delete a redundant cast operation Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8c6094f4e7c3c84d09afb009007f1fc86fe35a4 Author: Masatake YAMATO Date: Tue Jan 31 21:07:22 2023 +0900 tests: (mkfds) fix typos in error messages Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8971afefd596b2ba6ea6c9f09e5d448bf8ed27e8 Author: Masatake YAMATO Date: Sun Jan 29 08:31:27 2023 +0900 tests: (mkfds) fix typos in factory descriptions Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 811ad38e6f3d4f95fe9237dde95ced33c9164f52 Author: Masatake YAMATO Date: Wed Feb 1 21:44:46 2023 +0900 tests: (mkfds) check the privilege required in the factory to run Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 3 +++ 1 file changed, 3 insertions(+) commit a3b47fbfac16b32e63c03665f072733a453fc42f Merge: fa41dcf07 820e61d0b Author: Karel Zak Date: Wed Feb 1 12:25:12 2023 +0100 Merge branch 'patch-1' of https://github.com/ThomasKaiser/util-linux commit fa41dcf07144c25b970ac84ec65dcfe0fae017ea Author: Karel Zak Date: Wed Feb 1 12:22:59 2023 +0100 chrt: (man) fix indention and properly mark examples Signed-off-by: Karel Zak schedutils/chrt.1.adoc | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit a0e92f68a7d3043057b93dc55dba5041e946ba51 Merge: 8001bffb0 84b6b6acc Author: Karel Zak Date: Wed Feb 1 12:16:04 2023 +0100 Merge branch 'chrt-examples' of https://github.com/anarcat/util-linux * 'chrt-examples' of https://github.com/anarcat/util-linux: add more concrete examples of how to use chrt(1) commit 8001bffb03eda8d23d6a04a5dc1469cce932ae36 Author: Karel Zak Date: Tue Jan 31 16:16:21 2023 +0100 lslogins: (man) add note about new accounts Signed-off-by: Karel Zak login-utils/lslogins.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95ea3dd4128b625ab12691229020ebc50d578e71 Author: Karel Zak Date: Tue Jan 31 16:08:00 2023 +0100 lslogins: explain password statuses Signed-off-by: Karel Zak login-utils/lslogins.1.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 820e61d0bb2c114a9bb8a568a34bb6a6113ffd31 Author: ThomasKaiser Date: Tue Jan 31 11:58:24 2023 +0100 Adding older Apple cores based on XNU kernel source Naming based on https://opensource.apple.com/source/xnu/xnu-7195.81.3/osfmk/arm/cpuid.h.auto.html and https://en.wikipedia.org/wiki/List_of_Apple_codenames#Apple-designed_processors No idea about IDs of the new and more interesting Sawtooth and Everest cores in the A16 SoC. I'll leave this for the Asahi people to discover... sys-utils/lscpu-arm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 84b6b6accd6f2c3d570f950debe47e7199f953cb Author: Antoine Beaupré Date: Thu Jan 26 11:21:16 2023 -0500 add more concrete examples of how to use chrt(1) I've come looking at this manpage with the simple "how do I make this process use realtime scheduling?" question and couldn't find a definite answer. Of course, RT is more complicated than "just make this real time": there's various queues and scheduling classes, but I think it's worth giving a good, simple example that should basically work. In particular, my use case was "my audio is stuttering, is this a scheduling problem?" By picking the RR scheduler, we set a realtime scheduling priority that's lower than kernel threads (e.g. migration is FF/99, irq is FF/50) so that we go above existing processes, but without kicking out more critical systems. This, of course, is a matter of taste, and the settings here are a little arbitrary. I send this patch in the hope that either those are accepted as canon (which would surprise me) or that someone comes up with a more canonical example. The "reset" example also seems like a more critical addition to the manual. Finally, I change the name of the section from USAGE to the more standard EXAMPLES, as per man-pages(7). schedutils/chrt.1.adoc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 97e577e5067b744b271a42f6dbdb83bef6892004 Merge: b7e30e588 97e673a0f Author: Karel Zak Date: Thu Jan 26 17:01:10 2023 +0100 Merge branch 'test_blkid_fuzz' of https://github.com/t-8ch/util-linux * 'test_blkid_fuzz' of https://github.com/t-8ch/util-linux: libblkid: add test_blkid_fuzz_sample commit b7e30e588f596da63f4db2a1b3d5724e450d976e Merge: 18f96355d aab25aef1 Author: Karel Zak Date: Thu Jan 26 17:00:28 2023 +0100 Merge branch 'chmod' of https://github.com/ferivoz/util-linux * 'chmod' of https://github.com/ferivoz/util-linux: fsck.cramfs: fix error message commit 18f96355de8e4c2995d51eccad3c445facfbc58c Author: Samanta Navarro Date: Thu Jan 26 11:56:42 2023 +0000 fsck.cramfs: check directory entry names Do not accept slashes in names or the special entries "." and ".." in directories while extracting files. [kzak@redhat.com: - add errx_path() to report the path] Signed-off-by: Samanta Navarro Signed-off-by: Karel Zak disk-utils/fsck.cramfs.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit aab25aef114c7258015b5bc3a542ea7e63b79d47 Author: Samanta Navarro Date: Thu Jan 26 11:55:33 2023 +0000 fsck.cramfs: fix error message The error message for a failing chmod call contains chown as reason. Fix this by stating that chmod failed. Signed-off-by: Samanta Navarro disk-utils/fsck.cramfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97e673a0fa5409aafaa99022269f064a35d216ae Author: Thomas Weißschuh Date: Wed Jan 25 17:21:18 2023 +0000 libblkid: add test_blkid_fuzz_sample This can be used to easily reproduce crashes produced by the fuzzers. Signed-off-by: Thomas Weißschuh libblkid/src/Makemodule.am | 10 +++++++++- libblkid/src/fuzz.c | 41 +++++++++++++++++++++++++++++++---------- meson.build | 9 +++++++++ 3 files changed, 49 insertions(+), 11 deletions(-) commit 46ce48b6a5bf13f95318d579e2af4fde189d049a Author: Thomas Weißschuh Date: Wed Jan 25 05:47:16 2023 +0000 libblkid: bcachefs: avoid overflow in address comparisions Adding the offset to the address may overflow and break the comparision, use substraction instead. Addresses: #2030 Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit e601773d39e173e5ebf1df0d5f78d35d92eb7181 Author: Thomas Weißschuh Date: Wed Jan 25 05:40:15 2023 +0000 libblkid: bcachefs: simplify member field size validation We can avoid messing with pointers by just directly checking the size. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 9c2caec61bc1a2c4a601df71f023363116348d94 Author: Thomas Weißschuh Date: Wed Jan 25 05:34:50 2023 +0000 libblkid: bcachefs: remove superfluous validations These checks are redundant as we already validated * `dev_idx < bcs->nr_devices` in `probe_bcachefs()` * `field + BYTES(field) < sb_end` in `probe_bcachefs_sb_fields()` * `member_field_end(members, bcs->nr_devices - 1) == field + BYTES(field)` right above. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 6 ------ 1 file changed, 6 deletions(-) commit df6e200fd6a3725e7bd00e6a6af6a7656fffae6a Author: Thomas Weißschuh Date: Wed Jan 25 04:27:20 2023 +0000 libblkid: bcachefs: use uint64_t for structure length The value of "u64s" can overflow when multiplied by 8. Use a larger type to avoid this. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9b022bd2627bee6162361cba39bba64837324a9 Author: Karel Zak Date: Wed Jan 25 14:13:05 2023 +0100 whereis: add glob(7) support (new option -g) $ whereis -b -g 'find???' find???: /usr/bin/findmnt /usr/bin/findscu Fixes: https://github.com/util-linux/util-linux/issues/2021 Signed-off-by: Karel Zak bash-completion/whereis | 2 +- configure.ac | 1 + meson.build | 1 + misc-utils/whereis.1.adoc | 8 +++++++- misc-utils/whereis.c | 19 +++++++++++++++++-- 5 files changed, 27 insertions(+), 4 deletions(-) commit 5854e9b571289fa3a1b8a72b8f6bb470ea697f4f Author: Karel Zak Date: Wed Jan 25 13:37:05 2023 +0100 libblkid: align nilfs superblock [OSS-Fuzz 55382] Addresses: https://github.com/util-linux/util-linux/issues/2043 Signed-off-by: Karel Zak libblkid/src/superblocks/nilfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85e56ba6213e9cae44063cd412fcf8644009c1b9 Author: Karel Zak Date: Wed Jan 25 13:36:47 2023 +0100 tools/config-gen: improve fuzzers Signed-off-by: Karel Zak tools/config-gen | 7 +++++++ tools/config-gen.d/fuzz.conf | 1 + 2 files changed, 8 insertions(+) commit ee4b51a59fb816e0732d54c75cc1ddb1ee2cf55d Author: Karel Zak Date: Wed Jan 25 12:57:50 2023 +0100 dmesg: (man) add note about subsecond support Signed-off-by: Karel Zak sys-utils/dmesg.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b1a50cd36c9157425534c77cb685371aa5d9334 Merge: b233ae61d 8949ec930 Author: Karel Zak Date: Wed Jan 25 12:40:30 2023 +0100 Merge branch 'dmesg-subsecond' of https://github.com/t-8ch/util-linux * 'dmesg-subsecond' of https://github.com/t-8ch/util-linux: dmesg: use subsecond granularity in iso format dmesg: add subsecond granularity for --since and --until lib/monotonic: get_suspended_time: use usec_t timeutils: add utilities for usec_t conversions dmesg: add test for --since and --until commit b233ae61db0abc7e83f402b81ce7c25189165bf8 Author: Karel Zak Date: Tue Jan 24 19:03:15 2023 +0100 fstrim: add --types to filter out by filesystem types Fixes: https://github.com/util-linux/util-linux/issues/2040 Signed-off-by: Karel Zak bash-completion/fstrim | 1 + sys-utils/fstrim.8.adoc | 8 ++++++++ sys-utils/fstrim.c | 14 +++++++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) commit 6729c112f73d04232db8a976b335e5eab2bd519e Author: Karel Zak Date: Tue Jan 24 18:35:21 2023 +0100 libmount: don't require return argument in get-like functions Fixes: https://github.com/util-linux/util-linux/issues/2039 Signed-off-by: Karel Zak libmount/src/monitor.c | 8 ++-- libmount/src/mountP.h | 6 ++- libmount/src/optlist.c | 9 ++-- libmount/src/tab.c | 106 +++++++++++++++++++++++++++--------------------- libmount/src/tab_diff.c | 3 +- 5 files changed, 76 insertions(+), 56 deletions(-) commit 60c3686b816505b6b891fda7b140d5ec52f4d18d Author: Karel Zak Date: Tue Jan 24 17:38:49 2023 +0100 lsblk: use sysfs_blkdev_is_removable() Signed-off-by: Karel Zak misc-utils/lsblk.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 156c45b7c0c084a44e061fb4efe3f1d7a0b922be Author: Thomas Weißschuh Date: Wed Jan 11 19:10:57 2023 +0000 lib/sysfs: fix semantics of blkdev_is_hotpluggable This is now decoubled from the kernels notion of a removable *block* device and instead uses removable kobjects. This is the correct semantic for hotpluggable devices. lib/sysfs.c | 82 ++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 31 deletions(-) commit a2486a0b0c175279a200d9242ba338a9105f965a Author: Thomas Weißschuh Date: Wed Jan 11 18:14:03 2023 +0000 eject: also use sysfs_blkdev_is_removable It correctly represents devices that can be ejected. sys-utils/eject.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3d59c7660cf47a14734b5f007712810c5d37056c Author: Thomas Weißschuh Date: Wed Jan 11 18:17:35 2023 +0000 lib/sysfs: add TODO about removable usb devices The usage of the "removable" attribute by the USB subsystem is incorrect. lib/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 216d8b054f7b4ccc80afbba4b7e4f96ccda11379 Author: Thomas Weißschuh Date: Wed Jan 11 18:13:50 2023 +0000 lib/sysfs: add function blkdev_is_removable This exactly represents the kernels notion of a "removable" blockdevice. That is, the device itself is persistent but can contain some sort of medium that can be changed at runtime. Specifically it is *not* hotpluggable. include/sysfs.h | 1 + lib/sysfs.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit 32457b5efa5d4541a7d01bed9686a4f51952cd5b Author: Karel Zak Date: Tue Jan 24 17:05:25 2023 +0100 include/c: add functions to print from signal handlers Addresses: https://github.com/util-linux/util-linux/pull/2019 Signed-off-by: Karel Zak include/c.h | 23 +++++++++++++++++++++++ lib/pager.c | 4 +--- login-utils/last.c | 6 ++---- 3 files changed, 26 insertions(+), 7 deletions(-) commit 8949ec930a78abcd71a2c3433c7253fc9633853d Author: Thomas Weißschuh Date: Sat Jan 21 00:44:14 2023 +0000 dmesg: use subsecond granularity in iso format Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 8 ++++---- tests/expected/dmesg/indentation | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit d1e5764c55d329217503225f333497092a9ef329 Author: Thomas Weißschuh Date: Fri Jan 20 06:18:36 2023 +0000 dmesg: add subsecond granularity for --since and --until Fixes #1708 Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 20 +++++++++----------- tests/expected/dmesg/limit | 1 + tests/ts/dmesg/limit | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) commit 02f3ecd680b71019b1242ec7ee0256ad36720094 Author: Thomas Weißschuh Date: Sat Jan 21 00:21:10 2023 +0000 lib/monotonic: get_suspended_time: use usec_t Signed-off-by: Thomas Weißschuh include/monotonic.h | 4 +++- lib/monotonic.c | 4 ++-- sys-utils/dmesg.c | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) commit a8ec2e15a568e237773f49dcec4b63564abb0d34 Author: Thomas Weißschuh Date: Sat Jan 21 00:28:30 2023 +0000 timeutils: add utilities for usec_t conversions Signed-off-by: Thomas Weißschuh include/timeutils.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 3214aa149e6db7d454ee05331dc63f0b964a704c Author: Thomas Weißschuh Date: Fri Jan 20 06:10:48 2023 +0000 dmesg: add test for --since and --until Signed-off-by: Thomas Weißschuh tests/expected/dmesg/limit | 3 +++ tests/ts/dmesg/limit | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 46768d677fafb7535567f937b5e63b4868925f9e Merge: 73fb8efee 3665ff8af Author: Karel Zak Date: Tue Jan 24 16:45:42 2023 +0100 Merge branch 'signal_safety' of https://github.com/crrodriguez/util-linux * 'signal_safety' of https://github.com/crrodriguez/util-linux: sulogin: only assign to variables written by signal handlers hardlink: calling putchar is off-limits on a signal handler hardlink: last_signal should be a volatile sig_atomic_t pg: calling exit on signal handler is not allowed lib:pager: fix signal safety issues write: signal_received should be volatile qualified flock: timeout_expired must be volatile qualified last: should not use errx/warnx on signal handlers su-common: bool is a distinct type in c2x fsck: only assign to cancel_requested fsck: use sig_atomic_t type fot signal handler global vars commit 73fb8efeefc3ebdc8f5f04cecd3a4e7ef71fde20 Author: Karel Zak Date: Tue Jan 24 16:42:42 2023 +0100 lib/timeutils: set TZ=GMT for unit test It seems better to explicitly set timezone rather than assume some default libc behavior and system setting. Addresses: https://github.com/util-linux/util-linux/pull/2025 Signed-off-by: Karel Zak lib/timeutils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bdd6e9f536426923645b98efa6cc2bc62d119dd7 Merge: 0a73ffbee c061d1a77 Author: Karel Zak Date: Tue Jan 24 16:20:25 2023 +0100 Merge branch 'parsetimestamp-usec' of https://github.com/t-8ch/util-linux * 'parsetimestamp-usec' of https://github.com/t-8ch/util-linux: lib/timeutils: parse_timestamp: parse usecs lib/timeutils: parse_timestamp: fix second parsing lib/timeutils: parse_timestamp: add unittests lib/timeutils: parse_timestamp: allow fixed reference time ci: update shellcheck ci: disable shellcheck warning for unused variables commit 0a73ffbee589b2ed8970a1a9860394461314bfda Merge: 2ea397239 01e2697a7 Author: Karel Zak Date: Tue Jan 24 16:19:39 2023 +0100 Merge branch 'patch-1' of https://github.com/ThomasKaiser/util-linux * 'patch-1' of https://github.com/ThomasKaiser/util-linux: Change ThunderX3T110 core name to ThunderX3-T110 Add missing Exynos M5 core Add missing Cavium cores Add missing Ampere cores Add missing ARM-cores Add HiSilicon's 0x48/0xd40 Cortex-A76 variant. Add exynos-m4 Add 53/002:Samsung Exynos-m3 commit c061d1a7744a03a263176fb8e66330971a206404 Author: Thomas Weißschuh Date: Fri Jan 20 02:18:30 2023 +0000 lib/timeutils: parse_timestamp: parse usecs Signed-off-by: Thomas Weißschuh lib/timeutils.c | 95 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 70 insertions(+), 25 deletions(-) commit 2abb8394fa89303b21003bd8252e52751c07f08c Author: Thomas Weißschuh Date: Fri Jan 20 02:43:34 2023 +0000 lib/timeutils: parse_timestamp: fix second parsing Signed-off-by: Thomas Weißschuh lib/timeutils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9cc65cb7e538beb9ab1cfdabae7127209e3b46d Author: Thomas Weißschuh Date: Fri Jan 20 02:13:36 2023 +0000 lib/timeutils: parse_timestamp: add unittests Signed-off-by: Thomas Weißschuh lib/timeutils.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++- tests/commands.sh | 1 + tests/ts/lib/timeutils | 24 ++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) commit 15a1f536a8d31c8fac9eb0be420502773d703319 Author: Thomas Weißschuh Date: Fri Jan 20 02:06:04 2023 +0000 lib/timeutils: parse_timestamp: allow fixed reference time Signed-off-by: Thomas Weißschuh lib/timeutils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b01d7b163d9c7dc1fc16b2a6af2b62ab9cae163c Author: Thomas Weißschuh Date: Fri Jan 20 06:43:59 2023 +0000 ci: update shellcheck .github/workflows/differential-shellcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eec3076297b6926d1440251b26c9f98eafb41cae Author: Thomas Weißschuh Date: Fri Jan 20 06:42:31 2023 +0000 ci: disable shellcheck warning for unused variables .shellcheckrc | 1 + 1 file changed, 1 insertion(+) commit 2ea397239683270a0fc8cd3b72ed5457f52dbda8 Merge: eef48b8c4 0ec43c07e Author: Karel Zak Date: Mon Jan 23 14:11:56 2023 +0100 Merge branch 'fix-befs' of https://github.com/mbroz/util-linux * 'fix-befs' of https://github.com/mbroz/util-linux: libblkid: befs - avoid undefined shift commit eef48b8c43c0f0d332b87956beb17a47ee1c3a6d Merge: 7330013f7 f18fc9dd6 Author: Karel Zak Date: Mon Jan 23 14:11:12 2023 +0100 Merge branch 'lsfd-const' of https://github.com/t-8ch/util-linux * 'lsfd-const' of https://github.com/t-8ch/util-linux: lsfd: make a few structs const commit 7330013f78a140da46c7448bb9d46ec882662385 Merge: 85aebd2be f44154dd7 Author: Karel Zak Date: Mon Jan 23 14:10:42 2023 +0100 Merge branch 'blkpr' of https://github.com/t-8ch/util-linux * 'blkpr' of https://github.com/t-8ch/util-linux: blkpr: mark data const meson: add blkpr commit 85aebd2be396f080d9bbb93f744d6ec790ea7659 Merge: e231be3ef 18c8d4244 Author: Karel Zak Date: Mon Jan 23 14:09:27 2023 +0100 Merge branch 'bcachefs-fuzz' of https://github.com/t-8ch/util-linux * 'bcachefs-fuzz' of https://github.com/t-8ch/util-linux: libblkid: bcachefs: limit maximum size of read superblock libblkid: iso9660: don't warn on isonum mismatch libblkid: bcachefs: fix member_field_end libblkid: bcachefs: validate size of member field libblkid: bcachefs: fix field type libblkid: bcachefs: add reproducer for oss-fuzz 55282 libblkid: bcachefs: fix endless loop commit e231be3ef7461515162a1622be1d26c82b2a30bd Merge: c8ed82964 bba1e68ba Author: Karel Zak Date: Mon Jan 23 14:08:33 2023 +0100 Merge branch 'sizeof-member' of https://github.com/t-8ch/util-linux * 'sizeof-member' of https://github.com/t-8ch/util-linux: uuidd: use sizeof_member last: use sizeof_member libblkid: iso9660: use sizeof_member commit c8ed829640489bdbd0d7e482376d66c904481ce9 Merge: 654aa3b25 652e9b2a2 Author: Karel Zak Date: Mon Jan 23 14:07:13 2023 +0100 Merge branch 'more_mempcpy' of https://github.com/crrodriguez/util-linux * 'more_mempcpy' of https://github.com/crrodriguez/util-linux: remove no longer needed braces replace open-coded instances of mempcpy commit 654aa3b2527e6a795f3a1c320ea470d0fedf9313 Merge: 54a064382 f8325a3f5 Author: Karel Zak Date: Mon Jan 23 14:05:59 2023 +0100 Merge branch 'cramfs32' of https://github.com/ferivoz/util-linux * 'cramfs32' of https://github.com/ferivoz/util-linux: fsck.cramfs: print correct error on 32-bit systems commit 54a0643829e3ace3a2e4a81cd80ae479dada76f2 Author: Thomas Weißschuh Date: Sun Jan 22 17:55:48 2023 +0000 lsfd: make a few structs const misc-utils/lsfd-fifo.c | 4 ++-- misc-utils/lsfd-sock-xinfo.c | 8 ++++---- misc-utils/lsfd-unkn.c | 10 +++++----- misc-utils/lsfd.c | 12 ++++++------ misc-utils/lsfd.h | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) commit db0a522ef0da0833a0859df6b3716a6db1d728ab Author: Thomas Weißschuh Date: Sun Jan 22 14:27:24 2023 +0000 blkpr: mark data const sys-utils/blkpr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 61c2946dcbae3622ca7c6d1628eea15166e5bae1 Author: Thomas Weißschuh Date: Sun Jan 22 14:27:12 2023 +0000 meson: add blkpr meson.build | 10 ++++++++++ sys-utils/meson.build | 4 ++++ 2 files changed, 14 insertions(+) commit eef4dbe0cbd9fe5cbce16e04760d2e6113403cc1 Author: Thomas Weißschuh Date: Sun Jan 22 17:40:15 2023 +0000 libblkid: bcachefs: limit maximum size of read superblock libblkid/src/superblocks/bcache.c | 5 +++++ 1 file changed, 5 insertions(+) commit e2283b68991406e2158fd3321b0df8434793c32a Author: Thomas Weißschuh Date: Sat Jan 21 05:43:40 2023 +0000 libblkid: iso9660: don't warn on isonum mismatch we are not doing anything about it anyways libblkid/src/superblocks/iso9660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de437be6f92c7ee553a3760c0655749b7176243d Author: Thomas Weißschuh Date: Sun Jan 22 03:36:06 2023 +0000 libblkid: bcachefs: fix member_field_end The end of this member is the start of the next one, not the start of the current one. libblkid/src/superblocks/bcache.c | 4 ++-- tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55318 | Bin 0 -> 134034 bytes 2 files changed, 2 insertions(+), 2 deletions(-) commit d9c72ffc4c3726790789e1b88688a525b02a3905 Author: Thomas Weißschuh Date: Sun Jan 22 01:52:29 2023 +0000 libblkid: bcachefs: validate size of member field libblkid/src/superblocks/bcache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit dcf4b1b2b2c957442cf0f0638a707f3126fd0a41 Author: Thomas Weißschuh Date: Sat Jan 21 05:32:22 2023 +0000 libblkid: bcachefs: fix field type libblkid/src/superblocks/bcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a597fb3a04a8be906453e40cf2b42c524fddb7b6 Author: Thomas Weißschuh Date: Sat Jan 21 05:25:34 2023 +0000 libblkid: bcachefs: add reproducer for oss-fuzz 55282 tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55282 | Bin 0 -> 131072 bytes 1 file changed, 0 insertions(+), 0 deletions(-) commit 64bfbdb47072d992a98e9f37db0cc38b32ed4401 Author: Thomas Weißschuh Date: Sat Jan 21 05:01:55 2023 +0000 libblkid: bcachefs: fix endless loop When a field has size 0 it will loop forever. See #2031 libblkid/src/superblocks/bcache.c | 11 ++++++++++- tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55291 | Bin 0 -> 131305 bytes 2 files changed, 10 insertions(+), 1 deletion(-) commit c4a66fa9c67d637ed9956faf8db886d08f56e872 Author: Thomas Weißschuh Date: Sat Jan 21 00:52:49 2023 +0000 uuidd: use sizeof_member misc-utils/uuidd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 020061e533ec922cc22ae183ae1589ee68251631 Author: Thomas Weißschuh Date: Sat Jan 21 00:52:39 2023 +0000 last: use sizeof_member login-utils/last.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 25489f1bc485d1dfc6fe1a3ba2a371f4beb268a6 Author: Thomas Weißschuh Date: Sat Jan 21 00:52:23 2023 +0000 libblkid: iso9660: use sizeof_member libblkid/src/superblocks/iso9660.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7165c9bb1e5a68c9ead99f5d1cd186bf785ee4d5 Author: Cristian Rodríguez Date: Sat Jan 21 18:19:28 2023 +0000 remove no longer needed braces libblkid/src/devno.c | 9 +++------ misc-utils/blkid.c | 7 +++---- term-utils/agetty.c | 7 +++---- 3 files changed, 9 insertions(+), 14 deletions(-) commit cba3345215b62d9cf0d7a03816fb8f006dd47d21 Author: Cristian Rodríguez Date: Thu Jan 19 18:25:08 2023 +0000 replace open-coded instances of mempcpy lib/buffer.c | 4 ++-- lib/canonicalize.c | 4 ++-- lib/mbsalign.c | 3 +-- libblkid/src/devno.c | 10 ++++------ misc-utils/blkid.c | 6 ++---- term-utils/agetty.c | 9 +++------ 6 files changed, 14 insertions(+), 22 deletions(-) commit e0771b1b75c5358a0b529e063d5d80918a738640 Author: Samanta Navarro Date: Fri Jan 20 11:57:15 2023 +0000 fsck.cramfs: print correct error on 32-bit systems On 32-bit systems the file length check does not handle files correctly which are larger than 4 GB. Use an unsigned long long which is already in place for blkdev_get_size. Proof of Concept: - Prepare a file containing a CramFS ``` mkdir owo mkfs.cramfs owo owo.iso dd if=/dev/zero of=owo.iso bs=1 seek=4294967296 count=1 conv=notrunc fsck.cramfs owo.iso ``` - Check the file ``` fsck.cramfs owo.iso ``` You will see: `fsck.cramfs: file length too short` Better message is: `fsck.cramfs: file extends past end of filesystem` Signed-off-by: Samanta Navarro disk-utils/fsck.cramfs.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 0ec43c07e0d70cb83e734d31e15f58fefe2347a2 Author: Milan Broz Date: Mon Jan 23 13:46:31 2023 +0100 libblkid: befs - avoid undefined shift BEFS does not check maximal value for ag_shift leading to undefined behavior. Avoid this by limiting shift size. Reproducer found with OSS-Fuzz (issue 55285) running over cryptsetup project (blkid is used in header init). Signed-off-by: Milan Broz libblkid/src/superblocks/befs.c | 3 +++ 1 file changed, 3 insertions(+) commit 01e2697a74abaf88a0914e8dc49553ab5b686f5c Author: ThomasKaiser Date: Mon Jan 23 13:15:16 2023 +0100 Change ThunderX3T110 core name to ThunderX3-T110 (for consistency reasons) sys-utils/lscpu-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f18fc9dd6d1c646ccb101a62a512194ceb4b0d49 Author: Thomas Weißschuh Date: Sun Jan 22 17:55:48 2023 +0000 lsfd: make a few structs const misc-utils/lsfd-fifo.c | 4 ++-- misc-utils/lsfd-sock-xinfo.c | 8 ++++---- misc-utils/lsfd-unkn.c | 10 +++++----- misc-utils/lsfd.c | 12 ++++++------ misc-utils/lsfd.h | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) commit 18c8d42440e9a167a7a513bb3ecbc231479539db Author: Thomas Weißschuh Date: Sun Jan 22 17:40:15 2023 +0000 libblkid: bcachefs: limit maximum size of read superblock libblkid/src/superblocks/bcache.c | 5 +++++ 1 file changed, 5 insertions(+) commit b93a604a98c0078fab3ec13e69e40f1f6040fdd2 Author: ThomasKaiser Date: Sun Jan 22 18:18:44 2023 +0100 Add missing Exynos M5 core https://github.com/Dr-Noob/cpufetch/blob/master/src/arm/uarch.c#L310 sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit f44154dd7ce158656dc3fa6a48086d93a7dffd33 Author: Thomas Weißschuh Date: Sun Jan 22 14:27:24 2023 +0000 blkpr: mark data const sys-utils/blkpr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1f254ac5c0e7cc44aec42cf8cf0e26b51211f2c0 Author: Thomas Weißschuh Date: Sun Jan 22 14:27:12 2023 +0000 meson: add blkpr meson.build | 10 ++++++++++ sys-utils/meson.build | 4 ++++ 2 files changed, 14 insertions(+) commit c7e659f831cc10bb7855ce432e905f0c12e2b8b5 Author: ThomasKaiser Date: Sun Jan 22 12:45:08 2023 +0100 Add missing Cavium cores https://github.com/ThomasKaiser/sbc-bench/commit/37332238c0a8b7c1555dca9d18a7c98362564416#diff-fdfd2a032c64d6e9ba92a3197cad6b26573c7094433d74efa4ae80f44f65aa99 sys-utils/lscpu-arm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit db81b3fc4b7fa86b58a5893064bc0192a48fac5d Author: ThomasKaiser Date: Sun Jan 22 12:41:36 2023 +0100 Add missing Ampere cores https://github.com/ThomasKaiser/sbc-bench/commit/37332238c0a8b7c1555dca9d18a7c98362564416#diff-fdfd2a032c64d6e9ba92a3197cad6b26573c7094433d74efa4ae80f44f65aa99 sys-utils/lscpu-arm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6857cccbb4157d5da34ca98f77a0ac9d68e1e740 Author: ThomasKaiser Date: Sun Jan 22 12:37:33 2023 +0100 Add missing ARM-cores https://github.com/ThomasKaiser/sbc-bench/commit/37332238c0a8b7c1555dca9d18a7c98362564416#diff-fdfd2a032c64d6e9ba92a3197cad6b26573c7094433d74efa4ae80f44f65aa99 sys-utils/lscpu-arm.c | 2 ++ 1 file changed, 2 insertions(+) commit 50bcc6730b8d915c8845561ff8081b342ee937e9 Author: ThomasKaiser Date: Sun Jan 22 10:36:01 2023 +0100 Add HiSilicon's 0x48/0xd40 Cortex-A76 variant. Both Kirin 980 and Kirin 810 feature big cores with 0x48/0xd40 ID though they are marketed/documented as Cortex-A76 by HiSilicon themselves. Kirin 980 shows a r1p0 stepping while newer 810 has r3p0. * https://github.com/deater/test_proc/blob/master/arm64/arm64.v8.0x41.0xd05.0x48.0xd40.huawei_mate_20#L37-L71 * https://github.com/termux/proot/issues/190#issuecomment-927013509 sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit 36e9b33d96c0a74ecfa398fe7d7acb8eeb22913d Author: Thomas Weißschuh Date: Sat Jan 21 05:43:40 2023 +0000 libblkid: iso9660: don't warn on isonum mismatch we are not doing anything about it anyways libblkid/src/superblocks/iso9660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efaa44b152d1252866150a1a57e9b890857829b5 Author: Thomas Weißschuh Date: Sun Jan 22 03:36:06 2023 +0000 libblkid: bcachefs: fix member_field_end The end of this member is the start of the next one, not the start of the current one. libblkid/src/superblocks/bcache.c | 4 ++-- tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55318 | Bin 0 -> 134034 bytes 2 files changed, 2 insertions(+), 2 deletions(-) commit e43105fd2f60111e07a7b97e2be1f2be7a6a8c42 Author: Thomas Weißschuh Date: Sun Jan 22 01:52:29 2023 +0000 libblkid: bcachefs: validate size of member field libblkid/src/superblocks/bcache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit df1fc195948bd5f945ee0ee0d7e8ca07ee162e43 Author: ThomasKaiser Date: Sat Jan 21 19:54:27 2023 +0100 Add exynos-m4 https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-9820.cpuinfo sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit 652e9b2a252f50a9fb62817663946373ecc9d733 Author: Cristian Rodríguez Date: Sat Jan 21 18:19:28 2023 +0000 remove no longer needed braces libblkid/src/devno.c | 9 +++------ misc-utils/blkid.c | 7 +++---- term-utils/agetty.c | 7 +++---- 3 files changed, 9 insertions(+), 14 deletions(-) commit cf922cbe1ab4076ce069db7d065e3653f55db1d1 Author: ThomasKaiser Date: Sat Jan 21 18:03:11 2023 +0100 Add 53/002:Samsung Exynos-m3 ID 002 for the Exynos-m3 core seems weird since Exynos-m1 had 001 but Samsung's Mongoose line differs only by stepping between M1 and M2 * Mongoose 1, for example [Exynos 8890](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-8890-highperformance.cpuinfo): Exynos-m1 / r1p1 * Mongoose 2, for example [Exynos 8895](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-8895.cpuinfo): Exynos-m1 / r4p0 * Mongoose 3, for example [Exynos 9810](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-9810.cpuinfo): Exynos-m3 / r1p0 sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit e2a9ae3262835ec3fef9378fdd2ccd64177c1c1e Author: Thomas Weißschuh Date: Sat Jan 21 05:32:22 2023 +0000 libblkid: bcachefs: fix field type libblkid/src/superblocks/bcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1c65050f0983d5ce24bb6d3342eff1a86d57778 Author: Thomas Weißschuh Date: Sat Jan 21 05:25:34 2023 +0000 libblkid: bcachefs: add reproducer for oss-fuzz 55282 tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55282 | Bin 0 -> 131072 bytes 1 file changed, 0 insertions(+), 0 deletions(-) commit 6eb7c99b2932a6058a033d0a805e5883d0bb1e9f Author: Thomas Weißschuh Date: Sat Jan 21 05:01:55 2023 +0000 libblkid: bcachefs: fix endless loop When a field has size 0 it will loop forever. See #2031 libblkid/src/superblocks/bcache.c | 11 ++++++++++- tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55291 | Bin 0 -> 131305 bytes 2 files changed, 10 insertions(+), 1 deletion(-) commit bba1e68ba75a24cbd95c25616bfddbb41a57c4ca Author: Thomas Weißschuh Date: Sat Jan 21 00:52:49 2023 +0000 uuidd: use sizeof_member misc-utils/uuidd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe6498b5a39e1f720fbe684697dd7a7908e3d76e Author: Thomas Weißschuh Date: Sat Jan 21 00:52:39 2023 +0000 last: use sizeof_member login-utils/last.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e92162346fac52fba485606551906634442edaf0 Author: Thomas Weißschuh Date: Sat Jan 21 00:52:23 2023 +0000 libblkid: iso9660: use sizeof_member libblkid/src/superblocks/iso9660.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91a484febae74588517226c6e0870562ca430651 Author: Karel Zak Date: Fri Jan 20 15:20:55 2023 +0100 lsfd: remove strcpy(), keep things based on sizeof() * use safe xstrncpy() rather than strcpy() * use sizeof() for static buffers rather than macro with real size (this solution is more robust for future code changes) * use xcalloc() to zeroize allocated memory Signed-off-by: Karel Zak misc-utils/lsfd-filter.c | 66 +++++++++++++++++++++----------------------- misc-utils/lsfd-sock-xinfo.c | 10 +++---- 2 files changed, 37 insertions(+), 39 deletions(-) commit 643670d9ab7522059de9a19367858470ef92a710 Author: Karel Zak Date: Fri Jan 20 15:19:52 2023 +0100 include/c: add sizeof_member() This macro returns size of struct member. Signed-off-by: Karel Zak include/c.h | 4 ++++ 1 file changed, 4 insertions(+) commit bd4fae7c48ce83ed4d5f6f1149688e6e5db3a89f Merge: 1715a3784 77da12e7b Author: Cristian Rodríguez Date: Fri Jan 20 12:26:22 2023 +0000 Merge branch 'master' of https://github.com/karelzak/util-linux into more_mempcpy commit f8325a3f5c4cd614ec1d5bd6b3275adc33df188d Author: Samanta Navarro Date: Fri Jan 20 11:57:15 2023 +0000 fsck.cramfs: print correct error on 32-bit systems On 32-bit systems the file length check does not handle files correctly which are larger than 4 GB. Use an unsigned long long which is already in place for blkdev_get_size. Proof of Concept: - Prepare a file containing a CramFS ``` mkdir owo mkfs.cramfs owo owo.iso dd if=/dev/zero of=owo.iso bs=1 seek=4294967296 count=1 conv=notrunc fsck.cramfs owo.iso ``` - Check the file ``` fsck.cramfs owo.iso ``` You will see: `fsck.cramfs: file length too short` Better message is: `fsck.cramfs: file extends past end of filesystem` Signed-off-by: Samanta Navarro disk-utils/fsck.cramfs.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 77da12e7b4e0e33fe02e735a7907784cc346164e Author: Karel Zak Date: Fri Jan 20 12:45:10 2023 +0100 libblkid: (bcachefs) verify checksum before set probing result * merge probe_bcachefs_full_sb() in to probe_bcachefs() * define variables at the beginning of the code block * cosmetic code cleanup Signed-off-by: Karel Zak libblkid/src/superblocks/bcache.c | 52 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit f5c84384b50fddc7d363241e93e455179138c696 Author: Thomas Weißschuh Date: Fri Nov 18 18:42:01 2022 +0100 libblkid: bcachefs: add xxhash checksum support libblkid/src/superblocks/bcache.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4a57b0b40109c8cd56189f04fb4c4392508bb3e6 Author: Thomas Weißschuh Date: Tue Sep 13 09:50:51 2022 +0200 libblkid: bcachefs: add crc64 checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e9e51878e7fa59060f4ecb1c8ed04646e2f4759a Author: Thomas Weißschuh Date: Tue Apr 20 00:02:07 2021 +0200 libblkid: bcachefs: add crc32 checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 68 +++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 14 deletions(-) commit ba5c3e7387719dffed0179424c39b62c4a5c7246 Author: Thomas Weißschuh Date: Sun Nov 27 20:47:04 2022 +0100 libblkid: bcachefs: validate device fields Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 42 +++++++++++++++++++++++++------ tests/expected/blkid/low-probe-bcachefs | 2 ++ tests/expected/blkid/low-probe-bcachefs-2 | 2 ++ 3 files changed, 39 insertions(+), 7 deletions(-) commit 4ad02a2566db6ec5bae68ef2434b3481914fb81c Author: Thomas Weißschuh Date: Mon Apr 12 14:05:00 2021 +0200 libblkid: bcachefs: probe UUID_SUB Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 74 +++++++++++++++++++++++++++++++ tests/expected/blkid/low-probe-bcachefs | 2 + tests/expected/blkid/low-probe-bcachefs-2 | 2 + 3 files changed, 78 insertions(+) commit 640941686948b81b516d730ef5a0bbf02260182a Author: Thomas Weißschuh Date: Mon Apr 12 14:01:14 2021 +0200 libblkid: add bcachefs support https://bcachefs.org/ Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 61 +++++++++++++++++++++++++++++ libblkid/src/superblocks/superblocks.c | 1 + libblkid/src/superblocks/superblocks.h | 1 + tests/expected/blkid/low-probe-bcachefs | 8 ++++ tests/expected/blkid/low-probe-bcachefs-2 | 8 ++++ tests/ts/blkid/images-fs/bcachefs-2.img.xz | Bin 0 -> 988 bytes tests/ts/blkid/images-fs/bcachefs.img.xz | Bin 0 -> 1808 bytes 7 files changed, 79 insertions(+) commit 1715a378408b94add871c587fa482d79fdb36d12 Author: Cristian Rodríguez Date: Thu Jan 19 18:25:08 2023 +0000 replace open-coded instances of mempcpy lib/buffer.c | 4 ++-- lib/canonicalize.c | 4 ++-- lib/mbsalign.c | 3 +-- libblkid/src/devno.c | 10 ++++------ misc-utils/blkid.c | 6 ++---- term-utils/agetty.c | 9 +++------ 6 files changed, 14 insertions(+), 22 deletions(-) commit 1ef0be3a1acfbe5bb8aac80a24e0a1d9a17876d1 Author: Karel Zak Date: Tue Jan 17 16:36:13 2023 +0100 c.h: fix compiler warning [-Werror=shift-count-overflow] It's probably typo in the original path (too many brackets:-)). Let's be explicit about the types used in the calculation. '1 << n' means the left shift is on 'int', but we need '(t)1 << n'. Addresses: e53463ea40c58a6f84a597966ac69be9be72cd7d Signed-off-by: Karel Zak include/c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc6f3a8ae626e3996ccaf51939e7e3cf59c01d86 Merge: a5a9b5442 ce621f166 Author: Karel Zak Date: Tue Jan 17 16:15:11 2023 +0100 Merge branch 'blkdev' of https://github.com/ferivoz/util-linux * 'blkdev' of https://github.com/ferivoz/util-linux: lib/blkdev: use off_t for max values lib/blkdev: set errno in more cases lib/blkdev: handle interrupted read call commit a5a9b54429e1959e89801d7bdedd7651d3da1214 Author: Karel Zak Date: Mon Jan 16 13:47:36 2023 +0100 swapon: add --fstab command line option Let's add --fstab mount option for compatibility with mount(8). Addresses: https://github.com/util-linux/util-linux/issues/2017 Signed-off-by: Karel Zak bash-completion/swapon | 1 + sys-utils/swapoff.c | 2 +- sys-utils/swapon-common.c | 4 ++-- sys-utils/swapon-common.h | 2 +- sys-utils/swapon.8.adoc | 3 +++ sys-utils/swapon.c | 15 ++++++++++----- 6 files changed, 18 insertions(+), 9 deletions(-) commit ce621f16687ce0706fc01a543d6db1c95ba0d66e Author: Samanta Navarro Date: Fri Jan 13 11:52:36 2023 +0000 lib/blkdev: use off_t for max values The off_t datatype is signed. Use it for high and low boundaries as well to support also very large block devices close to its limits. Signed-off-by: Samanta Navarro lib/blkdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2f7450f6cb401f754f298fc8d7c5cdd5b31ade11 Author: Samanta Navarro Date: Fri Jan 13 11:51:52 2023 +0000 lib/blkdev: set errno in more cases Applications evaluate errno in case of a -1 return value. Examples within util-linux are fsck.cramfs and mkfs.minix. Set errno more often to offer reasonable error codes to the application and user. Signed-off-by: Samanta Navarro lib/blkdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5d5cd07bebbbbec93c4c0bd6e247c1189ec3e3aa Author: Samanta Navarro Date: Fri Jan 13 11:50:40 2023 +0000 lib/blkdev: handle interrupted read call The read call may fail if it is interrupted by a signal. Do not assume that we have reached the end of the underlying block device because of this. Use read_all which retries in these cases. Signed-off-by: Samanta Navarro lib/blkdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3665ff8afa3680d1beac66eac823720ceb5077c1 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:14 2023 +0000 sulogin: only assign to variables written by signal handlers Using post increment is not warranted to be atomic. login-utils/sulogin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab35a4fb0e2d53a36918b515e95ed8c9a79f1da1 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:14 2023 +0000 hardlink: calling putchar is off-limits on a signal handler Using putchar or any stdio function in signal handlers will lead to funny results as they cannot be async signal safe. One can write to stdout instead. misc-utils/hardlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 86d9efee19ea2cf0c0e04dacb7498cd3beb14842 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:14 2023 +0000 hardlink: last_signal should be a volatile sig_atomic_t misc-utils/hardlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e33d5860147b42661f723f27ecf7affbfc782fe6 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:14 2023 +0000 pg: calling exit on signal handler is not allowed On the other hand, calling _exit is just fine. text-utils/pg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 518a0ad4d9c586ca69d3cf924a4328361f6b2a80 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:14 2023 +0000 lib:pager: fix signal safety issues - Cannot use stdio in signal handlers, so you cannot safely call fflush. - cannot call exit() but only _exit() lib/pager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1fb77758114fe841c553b815005a6694ee043fee Author: Cristian Rodríguez Date: Sun Jan 15 01:33:14 2023 +0000 write: signal_received should be volatile qualified Because the standard says so. term-utils/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfbdb30ac31ed3e194bfddd6dc295d911fb57347 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:14 2023 +0000 flock: timeout_expired must be volatile qualified because the standard says so.. sys-utils/flock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05bd23aade3a975826a933ee3b9fc2ad92d0a9c3 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:13 2023 +0000 last: should not use errx/warnx on signal handlers err/warn/et all are not async signal safe because they call printf-like library functions that are never as-safe. ctime_r is also not as-safe. you cannot use static storage in the wrapper either, since access to it is not atomic. login-utils/last.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 3649a3db01f086c9f2f57060b98c398048a80f03 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:13 2023 +0000 su-common: bool is a distinct type in c2x bool is not int, this is enforced in recent C2x standard, neither is a suitable value for sig_atomic_t. login-utils/su-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4302c9f624cd0dce6bcea0ac29a8a5bbe4f8804f Author: Cristian Rodríguez Date: Sun Jan 15 01:33:13 2023 +0000 fsck: only assign to cancel_requested It may be mind bending mad but incrementing may require atomics, only assign is warranted to work... disk-utils/fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3399995f60ce4e7193588ad3d0edf6e09620fbe6 Author: Cristian Rodríguez Date: Sun Jan 15 01:33:13 2023 +0000 fsck: use sig_atomic_t type fot signal handler global vars because the standard says so. disk-utils/fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e53463ea40c58a6f84a597966ac69be9be72cd7d Author: Thomas Weißschuh Date: Sat Jan 14 22:16:28 2023 +0000 c.h: really avoid undefined behavior in SINT_MAX The previous fix in #2013 still invoked undefined behavior by shifting into the sign-bit. Now we have a correct, albeit unwieldy solution that avoids undefined behavior. Instead of bit fiddling it uses plain addition and substraction. We are looking for (in LaTeX notation): 2^(n - 1) - 1 = 2 * 2^(n - 2) - 1 = 2^(n - 2) + 2^(n - 2) - 1 = 2^(n - 2) - 1 + 2^(n - 2) include/c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbf77f7a19e50686324e4fd5bb922411c2ada24e Merge: a8e071fa2 6c88722c1 Author: Karel Zak Date: Fri Jan 13 13:35:02 2023 +0100 Merge branch 'mkswap' of https://github.com/ferivoz/util-linux * 'mkswap' of https://github.com/ferivoz/util-linux: mkswap: do not use uninitialized stack value commit 6c88722c175adca5b1a72bcc770f94674405b7f4 Author: Samanta Navarro Date: Fri Jan 13 11:53:41 2023 +0000 mkswap: do not use uninitialized stack value If blkdev_get_size fails, then size is not set. Exit with an error code and indicate what went wrong instead of continuing with random stack content. Proof of Concept: ``` $ mkswap /dev/null mkswap: warning: truncating swap area to 17179869180 KiB mkswap: /dev/null: insecure permissions 0666, fix with: chmod 0600 /dev/null mkswap: unable to assign device to libblkid probe ``` The first output line depends on stack content and sometimes does not show up at all. Abort operation if argument is neither regular file nor block device. Signed-off-by: Samanta Navarro disk-utils/mkswap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a8e071fa20435c8b18fe3cc6fcc181e7b549e1f4 Author: Karel Zak Date: Fri Jan 13 12:18:27 2023 +0100 logger: (man) fix examples Signed-off-by: Karel Zak misc-utils/logger.1.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit faeb1b64b36ededd1a0b62555cad65f002d47ac6 Author: Karel Zak Date: Thu Jan 12 15:33:09 2023 +0100 include: add missing license lines The header files are usually based on code from lib/. This commit copies relevant license headers from lib/ to include/ to keep things consistent. The very generic things (e.g. MBR definitions) are always public domain. Fixes: https://github.com/util-linux/util-linux/issues/2010 Signed-off-by: Karel Zak README.licensing | 2 ++ include/buffer.h | 4 ++++ include/c_strtod.h | 6 ++++++ include/closestream.h | 4 ++++ include/crc32.h | 4 ++++ include/crc32c.h | 4 ++++ include/debug.h | 2 ++ include/debugobj.h | 9 +++++++++ include/encode.h | 6 ++++++ include/fileeq.h | 5 +++++ include/fileutils.h | 4 ++++ include/fuzz.h | 4 ++++ include/idcache.h | 4 ++++ include/ismounted.h | 6 ++++++ include/iso9660.h | 4 ++++ include/jsonwrt.h | 4 ++++ include/linux_version.h | 4 ++++ include/logindefs.h | 21 +++++++++++++++++++++ include/loopdev.h | 4 ++++ include/mangle.h | 4 ++++ include/mbsedit.h | 6 ++++++ include/md5.h | 4 ++++ include/minix.h | 4 ++++ include/mount-api-utils.h | 4 ++++ include/nls.h | 4 ++++ include/optutils.h | 4 ++++ include/pager.h | 5 +++++ include/partx.h | 4 ++++ include/path.h | 4 ++++ include/pidfd-utils.h | 4 ++++ include/procfs.h | 3 +++ include/pt-bsd.h | 4 ++++ include/pt-gpt-partnames.h | 1 - include/pt-mbr-partnames.h | 4 ++++ include/pt-mbr.h | 4 ++++ include/pt-sgi.h | 4 ++++ include/pt-sun.h | 4 ++++ include/pwdutils.h | 4 ++++ include/randutils.h | 3 +++ include/rpmatch.h | 4 ++++ include/selinux-utils.h | 4 ++++ include/sha1.h | 4 ++++ include/sha256.h | 4 ++++ include/shells.h | 3 +++ include/signames.h | 4 ++++ include/statfs_magic.h | 4 ++++ include/strutils.h | 4 ++++ include/strv.h | 3 +++ include/swapheader.h | 4 ++++ include/sysfs.h | 3 +++ include/timer.h | 4 ++++ include/timeutils.h | 3 +++ include/widechar.h | 5 +++++ include/xalloc.h | 3 +++ include/xxhash.h | 2 ++ lib/pager.c | 5 +++++ lib/shells.c | 4 +++- lib/strv.c | 4 +++- 58 files changed, 247 insertions(+), 3 deletions(-) commit 8d9215504c7159acdb40be7da11f421d5b8ece8b Merge: 4bbda92cd a9b893277 Author: Karel Zak Date: Thu Jan 12 14:35:50 2023 +0100 Merge branch 'sint-max' of https://github.com/t-8ch/util-linux * 'sint-max' of https://github.com/t-8ch/util-linux: c.h: avoid undefined behavior in SINT_MAX macro commit a9b89327746b7c5fbe0cedd8aee992de6580ca8a Author: Thomas Weißschuh Date: Thu Jan 12 00:49:35 2023 +0000 c.h: avoid undefined behavior in SINT_MAX macro The previous implementation relied on signed-integer overflow. This is undefined behavior. Instead use an implementation that only requires twos-complement representation. This is what everybody uses anyways and it will be required by C23. include/c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bbda92cdd0ceacc982f759d97d35b1617a8beba Author: Samanta Navarro Date: Wed Jan 11 11:57:21 2023 +0000 login: never send signals to init If the signal handler is triggered after a failed fork attempt, then child_pid will be -1. This in turn leads to a positive test and a subsequent call of kill(1, signal). If signal was SIGTERM, then there will be also another kill(1, SIGHUP) call. Test explicitly for a positive child_pid value to prevent these cases. Signed-off-by: Samanta Navarro login-utils/login.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3870b182b7b0d98f487e023cd0030c8acd2adc1e Author: Chris Webb Date: Tue Jan 10 13:58:58 2023 +0000 unshare: support --map-users=inner:outer:count as well as outer,inner,count The argument ordering in /proc/self/[gu]id_map and mount -o X-mount.idmap is consistently inner:outer:count but unshare --map-users and --map-groups were originally defined to expect outer,inner,count instead. To reduce confusion caused by this mismatch, support a colon-separated inner:outer:count ordering as well as the original comma-separated outer,inner,count argument format. Although we accept both formats, only document the new one in the usage text and deprecate the old format in the man page. Fixes: https://github.com/util-linux/util-linux/issues/1988 Signed-off-by: Chris Webb sys-utils/unshare.1.adoc | 8 ++++++-- sys-utils/unshare.c | 50 ++++++++++++++++-------------------------------- 2 files changed, 22 insertions(+), 36 deletions(-) commit bef5f9386b6b533bb73e78453031bba5d89f0f6b Merge: 92ba5cb2e 4195cb01f Author: Karel Zak Date: Tue Jan 10 15:10:15 2023 +0100 Merge branch 'typo' of https://github.com/ferivoz/util-linux * 'typo' of https://github.com/ferivoz/util-linux: Fix typo commit 92ba5cb2ee3100456b293e034e227c4187e6b6e3 Author: Karel Zak Date: Tue Jan 10 14:48:06 2023 +0100 include: add MOVE_MOUNT_SET_GROUP fallback Addresses: https://github.com/torvalds/linux/commit/9ffb14ef61bab83fa818736bf3e7e6b6e182e8e2 Signed-off-by: Karel Zak include/mount-api-utils.h | 4 ++++ 1 file changed, 4 insertions(+) commit 4195cb01fb70b9cda20d9775a5a7f8a72adffd22 Author: Samanta Navarro Date: Tue Jan 10 12:00:56 2023 +0000 Fix typo Signed-off-by: Samanta Navarro libblkid/libblkid.3.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 987d844cdbc0f91ca81de3c1e5d0628a60eb458f Author: Karel Zak Date: Tue Jan 10 12:40:47 2023 +0100 libmount: use MNT_ERR_APPLYFLAGS for failed mount_setattr() The classic mount(2) based version uses MNT_ERR_APPLYFLAGS when not able to set flags and errno is EINVAL. This is expected by mnt_context_get_mount_excode() where libmount generates error messages for mount(8). Expected is: # mount --make-private /mnt/test mount: /mnt/test: not mount point or bad option. rather than generic error: mount: /mnt/test: wrong fs type, bad option, bad superblock on none ... Signed-off-by: Karel Zak libmount/src/hook_mount.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9e34eed3ca5338b354d872ce71bafb54955660b4 Merge: e435d7875 9d4028ff8 Author: Karel Zak Date: Tue Jan 10 11:30:55 2023 +0100 Merge branch 'waitpid' of https://github.com/t-8ch/util-linux * 'waitpid' of https://github.com/t-8ch/util-linux: waitpid: adapt bash-completion for current functionality po-man: add waitpid.1 manpage waitpid: add support for already exited PIDs commit e435d78753df3fdee3cb2a20215a80d88fc3a0c5 Author: Karel Zak Date: Tue Jan 10 11:27:40 2023 +0100 libmount: fix typo in debug message Signed-off-by: Karel Zak libmount/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1592425a0a1472db3168cd9247f001d7c5dd84b6 Author: Karel Zak Date: Mon Jan 9 14:22:06 2023 +0100 libmount: implement X-mount.auto-fstypes Fixes: https://github.com/util-linux/util-linux/issues/1969 Signed-off-by: Karel Zak libmount/src/context.c | 23 +++++++++++++++++++++++ libmount/src/context_mount.c | 2 +- sys-utils/mount.8.adoc | 24 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) commit 9d4028ff86caeb90302c8457649c33ca597e88ee Author: Thomas Weißschuh Date: Sat Jan 7 04:30:18 2023 +0000 waitpid: adapt bash-completion for current functionality bash-completion/waitpid | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 84f29f2752a165b08c91a81c69df679e67a9dd57 Author: Thomas Weißschuh Date: Sat Jan 7 02:18:22 2023 +0000 po-man: add waitpid.1 manpage po-man/po4a.cfg | 1 + 1 file changed, 1 insertion(+) commit 0d3bc6fdbd6e0442b8339f35dc75c50889f211c2 Author: Thomas Weißschuh Date: Sat Jan 7 02:16:06 2023 +0000 waitpid: add support for already exited PIDs misc-utils/waitpid.1.adoc | 3 +++ misc-utils/waitpid.c | 41 ++++++++++++++++++++++++---------- tests/expected/misc/waitpid-exited.err | 2 ++ tests/ts/misc/waitpid | 5 +++++ 4 files changed, 39 insertions(+), 12 deletions(-) commit 10dd0712fa6d0e016fb5caff0719cbf72a98dfa0 Author: Karel Zak Date: Mon Jan 9 13:58:45 2023 +0100 libmount: (optlist) keep parsed options without quotes Some mount options uses quotes due to commas in the value, for example (SELinux) mount -o 'context="foo,bar"'. Let's keep this parsed values without quotes in options list. It will make things more simple. Signed-off-by: Karel Zak libmount/src/mountP.h | 2 +- libmount/src/optlist.c | 36 +++++++++++++----------------------- libmount/src/optstr.c | 23 +++++++++++++++-------- 3 files changed, 29 insertions(+), 32 deletions(-) commit 1a938fce5961446897bbb7bdfe025220880bf951 Merge: ab5a1e47b c34d0e9b9 Author: Karel Zak Date: Mon Jan 9 12:47:31 2023 +0100 Merge branch 'po-man/fixes' of https://github.com/t-8ch/util-linux * 'po-man/fixes' of https://github.com/t-8ch/util-linux: sr.po: fix mkfs.cramfs translation build: propagate failures from asciidoctor po-man: remove unicode dash from manpage NAME section sr.po: add missing dash to manpage header po-man: always convert common manpage fragments po-man: enable out of tree builds autotools: add asciidoctor-includetracker to distributed files commit ab5a1e47b8f8a3f4658347a750cf3fc772a5dc49 Author: Karel Zak Date: Mon Jan 9 12:45:24 2023 +0100 git: update .gitignore Signed-off-by: Karel Zak .gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 3b6919ce9db96dbfa43da0d778d60e32507bc9f8 Merge: e4f1edef9 81a73d92c Author: Karel Zak Date: Mon Jan 9 12:38:13 2023 +0100 Merge branch 'mount.idmap.fix' of https://github.com/brauner/util-linux * 'mount.idmap.fix' of https://github.com/brauner/util-linux: libmount: ensure child hangs around until we persisted namespace commit e4f1edef9e6cab8c578d07299b89e1fbd3830ac6 Merge: 6b23e2677 6667d2b30 Author: Karel Zak Date: Mon Jan 9 12:35:03 2023 +0100 Merge branch 'schedutils' of https://github.com/chaiken/util-linux * 'schedutils' of https://github.com/chaiken/util-linux: schedutils: better illustrate the usage of cpu-lists with taskset schedutils: clarify meaning of taskset return code schedutils: clarify confusing mask example in taskset man page commit 6b23e2677de2f4e235728083bddea8c4820a1881 Author: Thomas Weißschuh Date: Sat Jan 7 13:58:17 2023 +0000 ci: packit: enable -Werror .packit.yaml | 2 ++ 1 file changed, 2 insertions(+) commit f36f3251c564991070c6b2c2347a999a56564e63 Author: Thomas Weißschuh Date: Sun Jan 8 03:29:51 2023 +0000 wdctl: mark flags field as unsigned long This is required by string_to_bitmask(). The previous cast failed on s390x with the following warning: In function 'string_to_bitmask', inlined from 'string_to_bitmask' at lib/strutils.c:802:5, inlined from 'main' at sys-utils/wdctl.c:770:8: lib/strutils.c:829:23: error: write of 64-bit data outside the bound of destination object, data truncated into 32-bit [-Werror=extra] 829 | *mask |= flag; | sys-utils/wdctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65e5339021905e00832d5d503153ed0f1e0e97da Author: Thomas Weißschuh Date: Sun Jan 8 03:22:35 2023 +0000 libblkid: topology/sysfs: fix uint64_t handling on 32bit systems libblkid/src/topology/sysfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 305cb55ba4eb5116154b10de1837d6fe0620111d Author: Thomas Weißschuh Date: Sun Jan 8 03:09:37 2023 +0000 libblkid: topology/ioctl: fix uint64_t handling on 32bit systems libblkid/src/topology/ioctl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5d71d711d07a07977ed1a9c4e62f1ea54bb7ecbf Author: Thomas Weißschuh Date: Sun Jan 8 03:08:09 2023 +0000 libblkid: topolicy/ioctl: use union for multiple data types libblkid/src/topology/ioctl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 970ed62e716d1cb347e983c9a96647be5455e713 Author: Thomas Weißschuh Date: Sat Jan 7 14:36:11 2023 +0000 ipc_msg_get_limits: always initialize memory sys-utils/ipcutils.c | 2 ++ 1 file changed, 2 insertions(+) commit 4bbc219b07a1933962b3915fd7151bb2ca0d9f67 Author: Thomas Weißschuh Date: Sat Jan 7 14:23:56 2023 +0000 mkswap: make context_string const Sometimes context_str() return `const char *`. disk-utils/mkswap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 81a73d92cccbd0344287fe6c2e0177a81f09b69e Author: Christian Brauner Date: Sun Jan 8 13:05:20 2023 +0100 libmount: ensure child hangs around until we persisted namespace When we create a new namespace in a child process to persist it we need to ensure that the child hangs around. During exit the child will drop all references to its namespaces and so by the time we call open we might already fail to open the namespace. Fix this. Signed-off-by: Christian Brauner (Microsoft) libmount/src/hook_idmap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6667d2b30fb15834526f9ce1b101ab6339dbb4e1 Author: Alison Chaiken Date: Sun Dec 25 09:37:02 2022 -0800 schedutils: better illustrate the usage of cpu-lists with taskset Provide a few examples of how to use the cpu-list variant of the taskset command. schedutils/taskset.1.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3d548c295b44a0a0d97c53995a7f3dab6c3ff2a6 Author: Alison Chaiken Date: Sat Dec 24 18:25:26 2022 -0800 schedutils: clarify meaning of taskset return code Make clear that an EXIT_SUCCESS value returned by taskset does not mean that a thread has actually migrated to a core matching the affinity request. schedutils/taskset.1.adoc | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 1c31644e44348b9d1997bb5b49bc24b8ee4c8f14 Author: Alison Chaiken Date: Sat Dec 24 18:12:04 2022 -0800 schedutils: clarify confusing mask example in taskset man page Omit "0x" from a mask example which is clearly hexadecimal rather than omitting it from "32", which could be a decimal representation. schedutils/taskset.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c34d0e9b9549e3522ad7fefa32f9188563b24073 Author: Thomas Weißschuh Date: Sat Jan 7 03:58:43 2023 +0000 sr.po: fix mkfs.cramfs translation po-man/sr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e9f316c08b2ebe16c2db6c6341e320e8890fc0d Author: Thomas Weißschuh Date: Fri Jan 6 23:33:03 2023 +0000 build: propagate failures from asciidoctor Makefile.am | 1 + po-man/Makefile.am | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit b4684b50d1cf670e0bc1b4063b1412bed33ed5b6 Author: Thomas Weißschuh Date: Sat Jan 7 02:10:27 2023 +0000 po-man: remove unicode dash from manpage NAME section Translators seem to like using unicode dashes. When used in the NAME section of a manpage, asciidoctor will break. Instead of trying to force all translators to keep this in mind, add an extension to asciidoctor that takes care of this. po-man/Makefile.am | 4 +++- tools/Makemodule.am | 3 ++- tools/asciidoctor-unicodeconverter.rb | 39 +++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) commit 5ab5a89c433c4a6e8b2166806f583f0d26dcadd5 Author: Thomas Weißschuh Date: Sat Jan 7 02:54:01 2023 +0000 autotools: add asciidoctor-includetracker to distributed files tools/Makemodule.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8545f40b9e128ef07b8eca7afc564eca5d267e8d Author: Thomas Weißschuh Date: Sat Jan 7 02:43:57 2023 +0000 sr.po: add missing dash to manpage header asciidoctor fails without it. po-man/sr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e45a099f605d5ed77b9af58d0755219e9e27418 Author: Thomas Weißschuh Date: Fri Jan 6 23:48:11 2023 +0000 po-man: always convert common manpage fragments Otherwise the manpage including it can never be built. po-man/po4a.cfg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9c56fa950e82eb70a8216caa4df54d186d0bab78 Author: Thomas Weißschuh Date: Fri Jan 6 14:54:14 2023 +0000 po-man: enable out of tree builds po-man/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68f6f24a6e01c406f34f06fcfd537201015bbfe2 Author: Thomas Weißschuh Date: Sat Jan 7 02:54:01 2023 +0000 autotools: add asciidoctor-includetracker to distributed files tools/Makemodule.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e06c2005c96b0c2f398e175697dab6c6e06d88a0 Author: Thomas Weißschuh Date: Sat Jan 7 02:27:45 2023 +0000 autotools: fix build for test_loopdev lib/Makemodule.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb8493fd3d328202d04051223320fc73c1667a34 Author: Thomas Weißschuh Date: Sat Jan 7 02:24:49 2023 +0000 meson: fix test_sysfs build meson.build | 1 + 1 file changed, 1 insertion(+) commit f9596dd4807f4d8da5bda14cd65efc0e5c375cac Merge: 5f969750c 8528bd29a Author: Karel Zak Date: Fri Jan 6 17:05:04 2023 +0100 Merge branch 'waitpid' of https://github.com/t-8ch/util-linux * 'waitpid' of https://github.com/t-8ch/util-linux: waitpid: add timeout support strutils: add function strtotimespec_or_err commit 5f969750c4ddbd643b7205cb19c75c48849623f1 Author: Karel Zak Date: Fri Jan 6 16:51:39 2023 +0100 Revert "CI: update gcc to 12" This reverts commit 85c376a4cd102d5c3619ad937fedf80b6527ce36. .github/workflows/cibuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a58600d0bd67c5f567a48d5b5331dc014ab8e5e0 Author: Karel Zak Date: Fri Jan 6 16:07:34 2023 +0100 mount: split and cleanup usage() * split usage() strings to message-per-line (like we use in others tools), it's better for maintenance * use fputs() rather than unnecessary printf() Signed-off-by: Karel Zak sys-utils/mount.c | 126 ++++++++++++++++++++++++------------------------------ 1 file changed, 55 insertions(+), 71 deletions(-) commit 35d26ae8f2a09bb18c275d7c847f2d5377d8f608 Author: Karel Zak Date: Fri Jan 6 15:58:16 2023 +0100 lib/sysfs: use temporary buffer It seems more readable (for humans and static analyzers) and safe to use temporary buffer than use memmove to create absolute path. Signed-off-by: Karel Zak lib/Makemodule.am | 2 +- lib/sysfs.c | 33 +++++++++++++++++++-------------- meson.build | 1 + 3 files changed, 21 insertions(+), 15 deletions(-) commit 8528bd29aa63799edbf5f9e9c815151d731d2e80 Author: Thomas Weißschuh Date: Tue Jan 3 23:57:53 2023 +0000 waitpid: add timeout support misc-utils/waitpid.1.adoc | 7 ++- misc-utils/waitpid.c | 74 ++++++++++++++++++++----- tests/expected/misc/{waitpid => waitpid-normal} | 0 tests/expected/misc/waitpid-timeout | 2 + tests/ts/misc/waitpid | 9 +++ 5 files changed, 78 insertions(+), 14 deletions(-) commit 937cd872a987a9a69f6a075c7ea9d594d9858d99 Author: Thomas Weißschuh Date: Fri Jan 6 14:36:37 2023 +0000 strutils: add function strtotimespec_or_err include/strutils.h | 2 ++ lib/strutils.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit 3145da8887258de0f5683142f9a3e64d2b3216cc Merge: 4b4b611c4 03a254f01 Author: Karel Zak Date: Fri Jan 6 13:07:11 2023 +0100 Merge branch 'setarch/current' of https://github.com/t-8ch/util-linux * 'setarch/current' of https://github.com/t-8ch/util-linux: setarch: show current personality commit 4b4b611c474b513a3aef008b90d56e6d52c6af06 Merge: ed195f512 adcab8356 Author: Karel Zak Date: Fri Jan 6 12:57:49 2023 +0100 Merge branch 'asciidoctor-tracker' of https://github.com/t-8ch/util-linux * 'asciidoctor-tracker' of https://github.com/t-8ch/util-linux: build: track dependencies of manpage generation commit ed195f51293573a745ef5992db35bebb05d3b87f Merge: 6f7ad786a 9c8bf5802 Author: Karel Zak Date: Fri Jan 6 12:50:17 2023 +0100 Merge branch 'master' of https://github.com/jengelh/util-linux * 'master' of https://github.com/jengelh/util-linux: doc: update renice.1 for spelling and style commit 6f7ad786a93d716c7bbf6e86371b0d8f78a0e10b Merge: 85c376a4c 09aae7333 Author: Karel Zak Date: Fri Jan 6 12:34:39 2023 +0100 Merge branch 'fix-stringutils-2' of https://github.com/t-8ch/util-linux * 'fix-stringutils-2' of https://github.com/t-8ch/util-linux: lib/strutils: fix compiler error commit 09aae73335b5a7d780ca89daafeaa4b90c353a52 Author: Thomas Weißschuh Date: Fri Jan 6 03:14:27 2023 +0000 lib/strutils: fix compiler error In file included from /usr/include/stdio.h:894, from lib/strutils.c:8: In function ‘printf’, inlined from ‘test_strutils_cstrcasecmp’ at lib/strutils.c:1324:2, inlined from ‘main’ at lib/strutils.c:1348:10: /usr/include/x86_64-linux-gnu/bits/stdio2.h:112:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 112 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors lib/strutils.c | 3 +++ 1 file changed, 3 insertions(+) commit 85c376a4cd102d5c3619ad937fedf80b6527ce36 Author: Thomas Weißschuh Date: Fri Jan 6 03:00:29 2023 +0000 CI: update gcc to 12 gcc 10 has false positives around null strings: In file included from /usr/include/stdio.h:894, from lib/strutils.c:8: In function ‘printf’, inlined from ‘test_strutils_cstrcasecmp’ at lib/strutils.c:1324:2, inlined from ‘main’ at lib/strutils.c:1348:10: /usr/include/x86_64-linux-gnu/bits/stdio2.h:112:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 112 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors .github/workflows/cibuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit adcab8356e20151968309e6d2b043957dc14f745 Author: Thomas Weißschuh Date: Fri Jan 6 02:34:09 2023 +0000 build: track dependencies of manpage generation This will rerun the manpage generation if any of the involved files have been updated. Makefile.am | 10 ++++++++- meson.build | 3 +++ tools/asciidoctor-includetracker.rb | 43 +++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) commit 9c8bf58021e363ebbd1ef450afc8a04a4044c7a7 Author: Jan Engelhardt Date: Fri Jan 6 01:40:53 2023 +0100 doc: update renice.1 for spelling and style Relates to issue #1892. Signed-off-by: Jan Engelhardt sys-utils/renice.1.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 03a254f010b08da1175f50a8ae7882e59228f1b4 Author: Thomas Weißschuh Date: Wed Dec 21 15:50:46 2022 +0000 setarch: show current personality sys-utils/setarch.8.adoc | 5 ++ sys-utils/setarch.c | 164 ++++++++++++++++++++++++++++++++++----- tests/expected/misc/setarch-show | 7 ++ tests/ts/misc/setarch | 17 ++++ 4 files changed, 173 insertions(+), 20 deletions(-) commit a85d6a04cee9707f6ec0ba2b561f217fa4077f34 Author: Karel Zak Date: Thu Jan 5 16:01:11 2023 +0100 lib/strutils: include strings.h Signed-off-by: Karel Zak lib/strutils.c | 1 + 1 file changed, 1 insertion(+) commit 0e39aa22bab31076d3cfcc42d399938fc73800c3 Merge: 12b6aca6a fa7abf332 Author: Karel Zak Date: Thu Jan 5 13:03:46 2023 +0100 Merge branch 'misc-utils-rename-symlink-paths' of https://github.com/ChickenProp/util-linux * 'misc-utils-rename-symlink-paths' of https://github.com/ChickenProp/util-linux: `rename -s` treats paths the same as without `-s`. commit 12b6aca6afe81f805f7910f8278499842d9ea5fe Merge: 449fa74ba 922399bc8 Author: Karel Zak Date: Thu Jan 5 12:25:02 2023 +0100 Merge branch 'packit' of https://github.com/t-8ch/util-linux * 'packit' of https://github.com/t-8ch/util-linux: ci: run packit builds for commits on master and releases commit 449fa74ba6d6cb0abfe5cff38d836f1a2d5692b2 Merge: c6e4a6e5d 430be6941 Author: Karel Zak Date: Thu Jan 5 12:09:37 2023 +0100 Merge branch 'libblkid/cache' of https://github.com/t-8ch/util-linux * 'libblkid/cache' of https://github.com/t-8ch/util-linux: blkid: cache: add test commit c6e4a6e5d9aef3f0fd7345ca9154b4ca69ac0c38 Merge: 4f535ae3b 550d32c49 Author: Karel Zak Date: Wed Jan 4 18:45:10 2023 +0100 Merge branch 'waitpid' of https://github.com/t-8ch/util-linux * 'waitpid' of https://github.com/t-8ch/util-linux: waitpid: add new command tests: add ts_skip_exitcode_not_supported exitcodes: add EXIT_NOTSUPP pidfd-utils: include wait.h for siginfo_t commit 4f535ae3be5183aa05be647086e060b2b029904e Author: Karel Zak Date: Wed Jan 4 18:37:26 2023 +0100 lib/signames: ignore locales when searching for signal names Fix: https://github.com/util-linux/util-linux/issues/1991 Signed-off-by: Karel Zak lib/signames.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d2246a5bcf654fdefbd33a5cb2c6437f888e87e0 Author: Karel Zak Date: Wed Jan 4 18:34:03 2023 +0100 include/cctype: add c_strcasecmp() and c_strncasecmp() Sometimes, we need to compare ASCII-only strings independently on the current locales. Let's follow our cctype.h to implement such functions. Addresses: https://github.com/util-linux/util-linux/issues/1991 Signed-off-by: Karel Zak include/cctype.h | 34 ++++++++++++++++++++++++++++++++++ lib/strutils.c | 26 +++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) commit 1958eb2530620f51685f6cf34b7df06d0d2c7ab3 Author: Karel Zak Date: Wed Jan 4 14:08:46 2023 +0100 tests: (column) add range and negative numbers column addresses Addresses: https://github.com/util-linux/util-linux/issues/1700 Signed-off-by: Karel Zak tests/expected/column/table-neg-1 | 1 + tests/expected/column/table-neg-1-2 | 1 + tests/expected/column/table-neg-2 | 1 + tests/expected/column/table-range | 1 + tests/ts/column/table | 20 ++++++++++++++++++++ 5 files changed, 24 insertions(+) commit 09b9b466d4bed41df549ce776c6684548e5e76af Author: Karel Zak Date: Wed Jan 4 13:59:08 2023 +0100 column: support negative numbers in range Fixes: https://github.com/util-linux/util-linux/issues/1700 Signed-off-by: Karel Zak text-utils/column.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit b3aaf9daf6cf3a63b26a35fb54642be6be90964f Author: Karel Zak Date: Wed Jan 4 13:21:17 2023 +0100 libmount: (mount) consolidate sysapi FDs close [coverity scan] Signed-off-by: Karel Zak libmount/src/hook_mount.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit c0c849238c8264d4c8128395cc1c3493d516cd05 Author: Karel Zak Date: Wed Jan 4 13:13:21 2023 +0100 libmount: fix unused variable [coverity scan] Signed-off-by: Karel Zak libmount/src/context_mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ad3330ff29ec20a3b94b48c2f992728a3edbf166 Author: Karel Zak Date: Wed Jan 4 13:10:59 2023 +0100 libmount: (idmap) fix leak and doble free [coverity scan] Signed-off-by: Karel Zak libmount/src/hook_idmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit be6161f17efdedc99e69763a68a1231d45603203 Author: Karel Zak Date: Wed Jan 4 13:04:14 2023 +0100 libmount: (subdir) fix memory leak [coverity scan] Signed-off-by: Karel Zak libmount/src/hook_subdir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ab74f107f5f1d518d6114566ca46877ac6f746ca Author: Karel Zak Date: Wed Jan 4 12:57:03 2023 +0100 libmount: fix possible double free Signed-off-by: Karel Zak libmount/src/optstr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4d70c6989982020288b1432fcf17dd165770383 Author: Karel Zak Date: Wed Jan 4 12:35:27 2023 +0100 libmount: fix memory leak [coverity scan] Signed-off-by: Karel Zak libmount/src/context_mount.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 731c32338912c0b08e44a80207780d130657a702 Author: Karel Zak Date: Wed Jan 4 12:31:17 2023 +0100 libmount: fix unused value [coverity scan] Signed-off-by: Karel Zak libmount/src/hook_mount_legacy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e0e1c7a885e0c906478887655ae556ef082dd73 Author: Karel Zak Date: Wed Jan 4 12:28:44 2023 +0100 libmount: fix memory leak [coverity scan] Signed-off-by: Karel Zak libmount/src/context_umount.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2903c98ef31189d0cc973d8bae126bfc07c61924 Author: Karel Zak Date: Wed Jan 4 12:25:11 2023 +0100 libmount: make NULL deference checks more consistent [coverity scan] Signed-off-by: Karel Zak libmount/src/fs.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 550d32c49e13c219f4e7f895241e0bdcd6fa55ec Author: Thomas Weißschuh Date: Sat Dec 24 04:27:04 2022 +0000 waitpid: add new command This command implements waiting for the exit of multiple processes. Especially it allows to wait for process that are not children of the current process. In contrast to wait(1P) it does not allow to retrieve the processes exit codes. bash-completion/waitpid | 1 + configure.ac | 4 ++ include/c.h | 2 + include/strutils.h | 1 + meson.build | 13 ++++ misc-utils/Makemodule.am | 9 +++ misc-utils/meson.build | 4 ++ misc-utils/waitpid.1.adoc | 56 +++++++++++++++ misc-utils/waitpid.c | 168 ++++++++++++++++++++++++++++++++++++++++++++ tests/commands.sh | 1 + tests/expected/misc/waitpid | 4 ++ tests/ts/misc/waitpid | 37 ++++++++++ 12 files changed, 300 insertions(+) commit fe73ef9789132f7e3bdcae5cecd3a8dd40876f92 Author: Thomas Weißschuh Date: Wed Jan 4 01:11:04 2023 +0000 tests: add ts_skip_exitcode_not_supported tests/functions.sh | 6 ++++++ 1 file changed, 6 insertions(+) commit 922399bc8cf23ef376df273e8ad3c0f1e50cf9a1 Author: Thomas Weißschuh Date: Mon Jan 2 14:13:31 2023 +0000 ci: run packit builds for commits on master and releases .packit.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 430be694123684841d6916a8eac95b11839dac38 Author: Thomas Weißschuh Date: Tue Dec 27 05:04:23 2022 +0000 blkid: cache: add test tests/expected/blkid/cache | 2 ++ tests/ts/blkid/cache | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit c3e29c68f06facfc67206634338f2395e80c821d Author: Thomas Weißschuh Date: Mon Jan 2 13:58:03 2023 +0000 exitcodes: add EXIT_NOTSUPP include/exitcodes.h | 2 ++ sys-utils/blkdiscard.c | 6 ++---- tests/functions.sh | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) commit 97af76c4674182ae608af142a28d3eadfae6d460 Author: Thomas Weißschuh Date: Sun Dec 25 05:19:32 2022 +0000 pidfd-utils: include wait.h for siginfo_t include/pidfd-utils.h | 1 + 1 file changed, 1 insertion(+) commit fa7abf332fed6e89535c00b97ca165eb135db588 Author: Philip Hazelden Date: Tue Jan 3 19:43:28 2023 +0000 `rename -s` treats paths the same as without `-s`. That is, it only updates the final path component, unless either the expression or the replacement contains a '/'. As discussed in #1962. misc-utils/rename.1.adoc | 2 +- misc-utils/rename.c | 40 ++++++++++++++++++++++++++-------------- tests/expected/rename/subdir | 28 ++++++++++++++++------------ tests/ts/rename/subdir | 7 +++++++ 4 files changed, 50 insertions(+), 27 deletions(-) commit e05ab331d48963c233ad5ba870dbc8d2c970145b Author: Chris Webb Date: Sun Dec 25 16:34:37 2022 +0000 unshare: fix a --map-auto error message When --map-auto is used by a user not listed in /etc/subuid, the error unshare: no line matching user "foo" in /etc/subuid: No error information is emitted. Fix the stray ': No error information', correcting err() to the intended errx(). Signed-off-by: Chris Webb sys-utils/unshare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df7bffb4e831d98c4a7d47d0c7347d56bbb7756b Merge: ebdc55fce 801b0a625 Author: Karel Zak Date: Tue Jan 3 15:07:06 2023 +0100 Merge branch 'libblkid-debug' of https://github.com/t-8ch/util-linux * 'libblkid-debug' of https://github.com/t-8ch/util-linux: libblkid: remove strewn around calls to blkid_init_debug() libblkid: always initialize debugging commit ebdc55fceeb9a215bf7df4466fef1a4f49582d7a Merge: 28204c127 37c6b24c8 Author: Karel Zak Date: Tue Jan 3 14:52:58 2023 +0100 Merge branch 'make-nice-posix-compliant' of https://github.com/kraptor/util-linux * 'make-nice-posix-compliant' of https://github.com/kraptor/util-linux: Changes for review renice: support posix-compliant -n (via POSIXLY_CORRECT) and add --relative flag commit 28204c127dabdd59203d822b393c327fa6f340a1 Author: Karel Zak Date: Tue Jan 3 14:39:10 2023 +0100 tools: update po/LINGUAS when downloading new translations Fix: https://github.com/util-linux/util-linux/issues/1985 Signed-off-by: Karel Zak po/LINGUAS | 5 ++++- tools/git-tp-sync | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) commit e5cac94c8ebba7698fa9afab99fa4ddeeb681711 Author: Seong-ho Cho Date: Tue Jan 3 14:38:15 2023 +0100 po: update ko.po (from translationproject.org) po/ko.po | 873 ++++++++++++++++++++++----------------------------------------- 1 file changed, 302 insertions(+), 571 deletions(-) commit 8cf6c5075780598fe3b30e7a7753d8323d093e22 Author: Karel Zak Date: Tue Nov 29 10:13:39 2022 +0100 libmount: use mount ID to merge utab and mountinfo files Signed-off-by: Karel Zak libmount/src/hook_mount.c | 8 +++++++- libmount/src/tab_parse.c | 20 ++++++++++++++++---- libmount/src/tab_update.c | 13 +++++++++---- 3 files changed, 32 insertions(+), 9 deletions(-) commit f25e8d2a3bd3bfb4eabe8074027715342bc43b91 Author: Karel Zak Date: Mon Nov 28 13:44:37 2022 +0100 libmount: remove unnecessary commented code libmount/src/optlist.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 1a5b859fe4e9e1708da46d7a334949504cec0b73 Author: Karel Zak Date: Wed Nov 23 09:10:39 2022 +0100 tests: check for loopdevs Signed-off-by: Karel Zak tests/ts/mount/complex | 1 + tests/ts/mount/subdir | 1 + 2 files changed, 2 insertions(+) commit 70a21482e3d421de33d509c739e880dc9ca2dfa4 Author: Karel Zak Date: Tue Nov 22 15:15:10 2022 +0100 libmount: fix potentially uninitialized local variable [CodeQL] Signed-off-by: Karel Zak libmount/src/context_umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e23c3262b9025ac2374156188a8aaf6c951672e5 Author: Karel Zak Date: Tue Nov 22 12:11:07 2022 +0100 meson: update to build new libmount Signed-off-by: Karel Zak libmount/meson.build | 19 +++++++++++-------- meson.build | 9 ++++++--- 2 files changed, 17 insertions(+), 11 deletions(-) commit 91868488601523fdd107eb90fb273284bd51df60 Author: Karel Zak Date: Tue Nov 22 12:10:44 2022 +0100 libmount: fix include Signed-off-by: Karel Zak libmount/src/hook_idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 144125b9dabfedcf3c0d35d6963996e83216bf65 Author: Karel Zak Date: Tue Nov 22 11:46:20 2022 +0100 build-sys: remove --enable-libmount-support-mtab It's already removed from code, let's remove it from configure too. Signed-off-by: Karel Zak configure.ac | 5 ----- 1 file changed, 5 deletions(-) commit 9040c0900fd7e0b3f2a0773ac7c3904cd28263bd Author: Karel Zak Date: Tue Nov 22 11:41:58 2022 +0100 build-sys: add --disable-libmount-mountfd-support We need to disable support for new kernel API in libmount to test the old code on new kernels (or maybe also for conservative users). The new configure option disable only mount(2)-like operations, the another stuff (like IDs mapping) is not affected. Signed-off-by: Karel Zak configure.ac | 27 +++++++++++++++++++++++++++ include/mount-api-utils.h | 21 +++------------------ libmount/src/hook_idmap.c | 4 ++-- libmount/src/hook_mount.c | 4 ++-- libmount/src/hook_mount_legacy.c | 2 +- libmount/src/hook_subdir.c | 2 +- libmount/src/hooks.c | 4 ++-- libmount/src/mountP.h | 2 +- libmount/src/optlist.c | 6 +++--- libmount/src/version.c | 4 +++- 10 files changed, 45 insertions(+), 31 deletions(-) commit 471a8a8eb58ffd00eb2ab404a138df5cbc962f2f Author: Karel Zak Date: Thu Oct 20 10:56:59 2022 +0200 tests: add complex mount test This test check complex tasks when one mount(8) call modifies VFS flags, propagation flags and do some operation (bind, move, ...). Signed-off-by: Karel Zak tests/ts/mount/complex | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit 339a728072ebd1f6dcf50c4ec23a9111a07c45bb Author: Karel Zak Date: Thu Oct 20 09:32:37 2022 +0200 tests: fix test file name Signed-off-by: Karel Zak tests/ts/mount/{subtree => subdir} | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit aa2b325aa24e63808f1e09ab75b6eef6ba07f5f8 Author: Karel Zak Date: Tue Oct 18 12:37:09 2022 +0200 tests: add X-mount.subdir test Signed-off-by: Karel Zak tests/ts/mount/subtree | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit f3bb0ca17a17701ad61aa6ffde8dd46b8391952c Author: Karel Zak Date: Tue Oct 18 12:33:39 2022 +0200 libmount: (subdir) use new FD based API Signed-off-by: Karel Zak libmount/src/hook_mount.c | 12 -------- libmount/src/hook_subdir.c | 74 +++++++++++++++++++++++++++++++++++++--------- libmount/src/mountP.h | 11 +++++++ 3 files changed, 71 insertions(+), 26 deletions(-) commit 1d53aed42c27a1fa1897b20a0f635d6622dd34ac Author: Karel Zak Date: Tue Oct 18 11:38:45 2022 +0200 libmount: add inline function to access API file descritors Signed-off-by: Karel Zak libmount/src/hook_mount.c | 17 +++++++---------- libmount/src/mountP.h | 5 +++++ 2 files changed, 12 insertions(+), 10 deletions(-) commit 0fe408964d0b431a69aed9ff8846d9106212bce6 Author: Karel Zak Date: Wed Oct 12 13:00:12 2022 +0200 libmount: (owner) call hooks when all mount stuff is done Signed-off-by: Karel Zak libmount/src/context_mount.c | 3 +++ libmount/src/hook_owner.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 6656929f026d9bf790d8efbe6db1a85c3e0dd267 Author: Karel Zak Date: Wed Oct 12 12:23:48 2022 +0200 libmount: fix new API code when use external helper We don't want to call fsopen() or so if external /sbin/mount. helper is expected. This patch also add fallback to propagation hook to open mount tree if necessary. Signed-off-by: Karel Zak libmount/src/hook_mount.c | 109 +++++++++++++++++++++++++++------------ libmount/src/hook_mount_legacy.c | 4 +- tests/ts/mount/special | 1 - 3 files changed, 78 insertions(+), 36 deletions(-) commit 181397430ae1fd8c8c5d4ad46db731864dfbffbf Author: Karel Zak Date: Wed Oct 12 12:23:37 2022 +0200 libmount: improve context deinitialization Signed-off-by: Karel Zak libmount/src/context.c | 16 ++++++++++------ libmount/src/hooks.c | 3 --- 2 files changed, 10 insertions(+), 9 deletions(-) commit 664d1d4984fd550dca19424167fd1dc6e03df867 Author: Karel Zak Date: Wed Oct 12 11:15:25 2022 +0200 libmount: check for propagation-only in proper way Signed-off-by: Karel Zak libmount/src/hook_mount.c | 2 +- libmount/src/optlist.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit f07412a04ca84607ceef55d9664b203fdbc40de3 Author: Karel Zak Date: Mon Oct 10 16:08:29 2022 +0200 libmount: (mount) fix mount by FS list/pattern for new API Signed-off-by: Karel Zak libmount/src/hook_mount.c | 64 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 16 deletions(-) commit 549a77cfb31c4813a39c83c2214ef36f34281661 Author: Karel Zak Date: Fri Oct 7 12:18:03 2022 +0200 libmount: use AT_RECURSIVE only when clone tree It seems AT_RECURSIVE is usable for open_tree() only when OPEN_TREE_CLONE specified too. Signed-off-by: Karel Zak libmount/src/hook_mount.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 12679d8ec2a66f78f22a95f4252f3c1ab438f7e0 Author: Karel Zak Date: Fri Oct 7 11:26:07 2022 +0200 libmount: (mount) use MOUNT_ATTR__ATIME The atime related attributes for mount_setattr() requires MOUNT_ATTR__ATIME in clear mask. Signed-off-by: Karel Zak libmount/src/context_mount.c | 10 ++++++---- libmount/src/hook_mount.c | 10 ++++++++-- libmount/src/optlist.c | 7 +++++-- 3 files changed, 19 insertions(+), 8 deletions(-) commit 01790c7d6d418b440961a769f191338e37f0df62 Author: Karel Zak Date: Thu Oct 6 12:02:41 2022 +0200 libmount: fix mount -a to work with optlist The original code uses libmnt_fs instance to store mount options. The new uses libmnt_fs only for library API backward compatibility, but internally it uses libmnt_optlist. Let's use optlist also to save context template. Signed-off-by: Karel Zak libmount/src/context.c | 60 ++++++++++++++++++++++---------------------------- libmount/src/mountP.h | 5 ++++- libmount/src/optlist.c | 42 +++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 35 deletions(-) commit 22c4b54801d44b2d887dce7e494399e3ce9e4cac Author: Karel Zak Date: Thu Oct 6 12:00:57 2022 +0200 libmount: don't refer optlist when copy libmnt_fs Signed-off-by: Karel Zak libmount/src/fs.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit c7f1aecf298cacdf235c3f2e4e9268ed2630c82f Author: Karel Zak Date: Tue Oct 4 13:34:42 2022 +0200 libmount: fix external helps call * always use rw/ro flags on helper command line * don't return MNT_ERR_APPLYFLAGS, the flags are applied in post-mount stage Signed-off-by: Karel Zak libmount/src/context_mount.c | 15 +++++---------- libmount/src/optlist.c | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 12 deletions(-) commit a69d4278bb6556e109f168b5ba4cc41aead9b96c Author: Karel Zak Date: Tue Oct 4 13:05:27 2022 +0200 libmount: (legacy) init regualer mount before propagation We have two ways how mount(2) is used, for propagation-only calls and regular FS mount. The propagation-only code removes MS_PROPAGATION flags from main mount options (=optlist), so any later decision about propagation is impossible. We need to call propagation-only code as the last thing. (Yes, new FD based mount(8) handles it better.) Signed-off-by: Karel Zak libmount/src/hook_mount_legacy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d25e375a81dd5410377055e76f8818a201b117c3 Author: Karel Zak Date: Tue Oct 4 11:59:52 2022 +0200 libmount: fix compilation without new API Signed-off-by: Karel Zak libmount/src/hook_mount.c | 4 +++- libmount/src/hooks.c | 2 ++ libmount/src/optlist.c | 10 ++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) commit 1411d65a88d883547406aa345f3e6a46ce498a05 Author: Karel Zak Date: Mon Oct 3 15:44:04 2022 +0200 tests: (libmount) update debug test The debug mask is printed as 0x%06x number now. References: 72e2f1ea8b7b90014118f4c9e55babb67528b986 Signed-off-by: Karel Zak tests/expected/libmount/debug-set-from-code | 2 +- tests/expected/libmount/debug-set-from-env-int | 2 +- tests/expected/libmount/debug-set-from-env-str | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0dfa892f0290186d06715f60ab3e9f75aca07d60 Author: Karel Zak Date: Mon Oct 3 15:30:44 2022 +0200 tests: (libmount) remove unsupported test Signed-off-by: Karel Zak tests/expected/libmount/optstr-fix | 2 -- tests/ts/libmount/optstr | 4 ---- 2 files changed, 6 deletions(-) commit dabfab0e717422ac38daf929b27ff33c11a2365e Author: Karel Zak Date: Mon Oct 3 15:20:46 2022 +0200 libmount: initialize tb in is_mounted_same_loopfile() Signed-off-by: Karel Zak libmount/src/hook_loopdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 602c1c5645afd2cc14701e5f22c9448678d62e6e Author: Karel Zak Date: Tue Sep 27 12:56:57 2022 +0200 libmount: (mount) implement remount by new Linux API Signed-off-by: Karel Zak libmount/src/hook_mount.c | 66 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 20 deletions(-) commit c15b21c162090dd0fdfedab1d85695e9e2b30bc4 Author: Karel Zak Date: Mon Sep 26 15:22:57 2022 +0200 libmount: (mount) create new FS instance by new Linux API Signed-off-by: Karel Zak libmount/src/hook_mount.c | 100 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 91 insertions(+), 9 deletions(-) commit 6753e6f6912658e836966a6316df956e1af5fcae Author: Karel Zak Date: Mon Sep 26 09:45:04 2022 +0200 libmount: (mount) support propagation by new kernel API Signed-off-by: Karel Zak libmount/src/context.c | 7 +++--- libmount/src/hook_mount.c | 60 +++++++++++++++++++++++++++++++++++++++++++---- libmount/src/mountP.h | 2 +- libmount/src/optlist.c | 59 ++++++++++++++++++++++++++-------------------- 4 files changed, 94 insertions(+), 34 deletions(-) commit ddebca17498f485c70bcba2f3f5dcec4a27aa99d Author: Karel Zak Date: Thu Sep 22 11:05:53 2022 +0200 libmount: support VFS flags attributes clear Signed-off-by: Karel Zak libmount/src/hook_mount.c | 16 ++++++----- libmount/src/mountP.h | 2 +- libmount/src/optlist.c | 72 ++++++++++++++++++++++++++++++++--------------- 3 files changed, 59 insertions(+), 31 deletions(-) commit 11e396a01fd68d7e2774ec03be89b9626f363d8d Author: Karel Zak Date: Wed Sep 21 18:01:05 2022 +0200 libmount: (mount) fix recursion Signed-off-by: Karel Zak libmount/src/hook_mount.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6e9423048932e2f879c04576b0c8300487fff22e Author: Karel Zak Date: Wed Sep 21 17:28:36 2022 +0200 libmount: (mount) use independent hooks It seems better to reuse functions (hooks) to implement various ways the mount is done. For example, attach to the tree is used for move, bind, and new mount; set VFS flags is usable for all operations, etc. Complete mount(8) is a set (chain) of hooks that is possible to mix to get the wanted result. The new API allow for example things like mount --move /A /B -oro,noexec because it's - open_tree() - mount_setattr() - move_tree() Note that the hooks allow extend it to new functionality without core code modification (for example, X-mount.idmap= append a new hook to call another mount_setattr()). Signed-off-by: Karel Zak libmount/src/hook_mount.c | 314 ++++++++++++++++++++++++---------------------- 1 file changed, 163 insertions(+), 151 deletions(-) commit 277e78d7151a5c480a2bb4b4a66288e5d26a79b3 Author: Karel Zak Date: Wed Sep 21 17:28:28 2022 +0200 libmount: remove upper-case from debug message Signed-off-by: Karel Zak libmount/src/hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9cb77c87afa3aa4c0f8ca68b8f637fb4043d1b44 Author: Karel Zak Date: Wed Sep 21 17:27:15 2022 +0200 libmount: add MOUNT_ATTR_NOSYMFOLLOW Signed-off-by: Karel Zak include/mount-api-utils.h | 12 ++++++++---- libmount/src/optlist.c | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 11afc49b49d51c534317cafd96ace66ca6845cf6 Author: Karel Zak Date: Wed Sep 21 11:39:13 2022 +0200 libmount: (mount) improve syscalls status handling The new kernel API is composed from more syscalls, but libmount originally assumes one syscall and one place where we need to remember return value of the syscall. It seems the best will be to set the status after each mount related syscall call (fsopen(), move_mount(), ...) until we reach error or end of mount process. For better error messages the last failed mount related syscall name will be recorded in cxt->syscall_name. Signed-off-by: Karel Zak libmount/src/context_mount.c | 4 +--- libmount/src/hook_mount.c | 41 ++++++++++++++++++++++++---------------- libmount/src/hook_mount_legacy.c | 5 ++++- libmount/src/hooks.c | 3 ++- libmount/src/mountP.h | 1 + 5 files changed, 33 insertions(+), 21 deletions(-) commit 2b4c0ebdf4d55801b0d61030b5927bb5723064e4 Author: Karel Zak Date: Wed Sep 21 11:07:25 2022 +0200 libmount: (mount) support --move by new kernel API * support --move in new mount implementation * remember errno from mount related failed syscalls Signed-off-by: Karel Zak libmount/src/hook_mount.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit f61195c02d4c4af3a04d97542e0d83d722615675 Author: Karel Zak Date: Wed Sep 21 11:03:54 2022 +0200 libmount: add MS_MOVE to options map libmount originally had in the options map only options that are possible to use in fstab. Now we use the map to verify and classify all mount options, so MS_MOVE is necessary there too. The patch also add a new MNT_NOFSTAB option flag, not used for now. Signed-off-by: Karel Zak libmount/src/libmount.h.in | 1 + libmount/src/optmap.c | 3 +++ 2 files changed, 4 insertions(+) commit 5f578574138bddad5c95a5be2341dcdead71969d Author: Karel Zak Date: Wed Sep 21 10:14:21 2022 +0200 libmount: (mount) improve code Signed-off-by: Karel Zak libmount/src/hook_mount.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit a3863c806b9a5ffb0a97bf9b55b6f42692213ec5 Author: Karel Zak Date: Tue Sep 20 13:53:40 2022 +0200 libmount: initial support for new FD based mount kernel API For now it supports -obind and -obind, operations. Signed-off-by: Karel Zak libmount/src/Makemodule.am | 1 + libmount/src/hook_mount.c | 322 +++++++++++++++++++++++++++++++++++++++ libmount/src/hook_mount_legacy.c | 2 +- libmount/src/hooks.c | 20 +-- 4 files changed, 335 insertions(+), 10 deletions(-) commit 9165565fb57cc7ac3078a93af57dd1fd6da1f988 Author: Karel Zak Date: Tue Sep 20 13:52:35 2022 +0200 libmount: support MOUNT_ATTR_ and rbind in optlist, Signed-off-by: Karel Zak libmount/src/optlist.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) commit 12be2ff56a657440db251bc30d22daabfca7c169 Author: Karel Zak Date: Tue Sep 20 13:51:30 2022 +0200 libmount: remove unnecessary include Signed-off-by: Karel Zak libmount/src/hook_idmap.c | 1 - 1 file changed, 1 deletion(-) commit 2b1db0951b9d515d4c7bbb5c85308664d0adfc47 Author: Karel Zak Date: Tue Sep 20 13:50:40 2022 +0200 libmount: new stuff to header file Signed-off-by: Karel Zak libmount/src/mountP.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f3a8eebd471c95b3c625e634d89cbcfcbe327203 Author: Karel Zak Date: Tue Sep 20 13:44:02 2022 +0200 libmount: add info about support for new mount syscalls Signed-off-by: Karel Zak libmount/src/version.c | 1 + 1 file changed, 1 insertion(+) commit 43d3c908090537e1d549de4b4d70f18a45a405f1 Author: Karel Zak Date: Tue Sep 20 13:40:56 2022 +0200 include/mount-api-utils: use standard uint64_t Signed-off-by: Karel Zak include/mount-api-utils.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b5a7129625c012672727cc5a7efa5f92cfd42d1b Author: Karel Zak Date: Tue Sep 20 10:26:20 2022 +0200 libmount: fix mflags Signed-off-by: Karel Zak libmount/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f014edac3acdbc0d408f77a3fd431345814d970 Author: Karel Zak Date: Thu Sep 8 13:08:15 2022 +0200 libmount: cleanup comments for hooks Signed-off-by: Karel Zak libmount/src/hook_idmap.c | 2 ++ libmount/src/hook_loopdev.c | 7 ++----- libmount/src/hook_mkdir.c | 4 +++- libmount/src/hook_mount_legacy.c | 5 +++++ libmount/src/hook_owner.c | 3 ++- libmount/src/hook_subdir.c | 3 ++- libmount/src/hook_veritydev.c | 4 +++- libmount/src/hooks.c | 20 ++++++++++++++------ 8 files changed, 33 insertions(+), 15 deletions(-) commit 7f5f350b62b814d2d052b60a5332b17bda31fb21 Author: Karel Zak Date: Thu Sep 8 12:37:52 2022 +0200 libmount: (verity) rewrite to use hookset API * initialize only when relevant verity.* options detected * setup verity device by prepare-source hook * add post-mount hook to setup deferred deactivation * deactivate the device on error (when de-initialize the hookset) * call dlopen/dlclose only once, share symbols between all hooks * remove verity specific code from rest of libmount Signed-off-by: Karel Zak libmount/src/Makemodule.am | 2 +- libmount/src/context.c | 15 - libmount/src/context_mount.c | 4 - .../src/{context_veritydev.c => hook_veritydev.c} | 528 ++++++++++++--------- libmount/src/hooks.c | 3 + libmount/src/mountP.h | 8 +- 6 files changed, 304 insertions(+), 256 deletions(-) commit 71e5489396bd647d877f402cb55e3cf77bffcaae Author: Karel Zak Date: Wed Sep 7 10:41:47 2022 +0200 libmount: (verity) rewrite dlopen use * use verity_call() macro to hide the way how libcryptsetup is used * don't play with function pointers for standard linked libcryptsetup * move all dlopen related code to the one function Signed-off-by: Karel Zak libmount/src/context_veritydev.c | 270 ++++++++++++++++++++------------------- 1 file changed, 142 insertions(+), 128 deletions(-) commit fb6f8ca547a122a5178f6b91fab4480c4b68abce Author: Karel Zak Date: Tue Sep 6 12:09:19 2022 +0200 libmount: (optlist) NULL optstr is not error Signed-off-by: Karel Zak libmount/src/optlist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 54652e48ac278650c53613844e58d6d37e041797 Author: Karel Zak Date: Fri Aug 26 11:29:02 2022 +0200 libmount: (optlist) fix ro/rw use Signed-off-by: Karel Zak libmount/src/optlist.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 8ee6db40523087b27abf8f7cb48868e1541898ee Author: Karel Zak Date: Fri Aug 26 11:10:11 2022 +0200 libmount: (optlist) use cache also for flags Signed-off-by: Karel Zak libmount/src/optlist.c | 150 +++++++++++++++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 55 deletions(-) commit 66defb745cb163149198a02ad9092f06fd49c443 Author: Karel Zak Date: Fri Aug 26 10:25:04 2022 +0200 libmount: remove unused context variables All replaced by optlist container. Signed-off-by: Karel Zak libmount/src/context.c | 9 --------- libmount/src/mountP.h | 5 ----- 2 files changed, 14 deletions(-) commit 5ebbb38750bf1a770685f40553e8ab6b1418646b Author: Karel Zak Date: Fri Aug 26 10:19:14 2022 +0200 libmount: (umount) use optlist Signed-off-by: Karel Zak libmount/src/context_umount.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 4255ebeb232b2312f5d13cccb6b706176d777c8a Author: Karel Zak Date: Fri Aug 26 10:18:14 2022 +0200 libmount: use optlist to get infor about MS_REC Signed-off-by: Karel Zak libmount/src/hook_idmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b2b6e25614d30f9217d3ce16ab38fe44abfee278 Author: Karel Zak Date: Fri Aug 26 10:17:30 2022 +0200 libmount: (optlist) add is_recursive shortcut Signed-off-by: Karel Zak libmount/src/mountP.h | 1 + libmount/src/optlist.c | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) commit c92a19002c85ce2edbb2259d0968d732c9920606 Author: Karel Zak Date: Fri Aug 26 09:24:50 2022 +0200 libmount: (docs) mark mnt_optstr_apply_flags() as deprecated Signed-off-by: Karel Zak libmount/src/optstr.c | 2 ++ 1 file changed, 2 insertions(+) commit e635daafd8dda1550d90d65882e6d117cf914271 Author: Karel Zak Date: Thu Aug 25 14:33:32 2022 +0200 libmount: (umount) use optlist when evaluate permissions Signed-off-by: Karel Zak libmount/src/context_umount.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b804008889cb91b15a31be77603763c9bff7d35d Author: Karel Zak Date: Thu Aug 25 14:17:45 2022 +0200 libmount: (umount) use optlist for umount helper setup Signed-off-by: Karel Zak libmount/src/context_umount.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit a8c8293b0f1fcc36d083704838d945dec0dcc908 Author: Karel Zak Date: Wed Aug 24 20:22:14 2022 +0200 libmount: (optstr) remove unused function Signed-off-by: Karel Zak libmount/src/mountP.h | 1 - libmount/src/optstr.c | 31 ------------------------------- 2 files changed, 32 deletions(-) commit 24d5759fc10f52ae868a29ead4d4dd04c47ccf96 Author: Karel Zak Date: Wed Aug 24 20:21:45 2022 +0200 libmount: (umount) use optlist to keep options Signed-off-by: Karel Zak libmount/src/context_umount.c | 70 +++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 29 deletions(-) commit faa3d718d73500bd017c90a4be0d408597928e68 Author: Karel Zak Date: Wed Aug 24 16:54:10 2022 +0200 libmount: keep context fs and optlist synchronized The new code uses cxt->optlist to maintain mount options, but for backward compatibility and for some stuff in the library we need to keep context->fs up to date with the optlist. It seems the best is to to keep it on-demand and automatic. Signed-off-by: Karel Zak libmount/src/context_mount.c | 31 +------------- libmount/src/fs.c | 100 ++++++++++++++++++++++++++++++++++++++++++- libmount/src/mountP.h | 8 +++- libmount/src/optlist.c | 10 +++++ 4 files changed, 117 insertions(+), 32 deletions(-) commit 2454f70194d6399791c931fe4d4b42b1cc7c71bd Author: Karel Zak Date: Wed Aug 24 17:10:37 2022 +0200 libmount: (context) ask for utab path only once Signed-off-by: Karel Zak libmount/src/context.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 124dcdfe0db8fcbeee892564d5cd4d39ab89088b Author: Karel Zak Date: Tue Aug 23 14:24:47 2022 +0200 libmount: (owner) use optlist for X-mount options Signed-off-by: Karel Zak libmount/src/hook_owner.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit ccf461467be8ce354eebd7420ea5461bde07e86c Author: Karel Zak Date: Tue Aug 23 14:13:10 2022 +0200 libmount: (idmap) use optlist Signed-off-by: Karel Zak libmount/src/hook_idmap.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 5c7985e8c0bc5442c8bda69fcb688ed4b2218bb0 Author: Karel Zak Date: Tue Aug 23 14:00:57 2022 +0200 libmount: (optlist) make sure flags are initialized Signed-off-by: Karel Zak libmount/src/context_veritydev.c | 2 +- libmount/src/optlist.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 724d2fdbcc9102478bdfef8b1da7b10f94db0c01 Author: Karel Zak Date: Tue Aug 23 13:42:27 2022 +0200 libmount: (legacy mount) use optlist * rename hookdata "mountflags" to "flags" * don't use directly cxt->mountflags, always use optlist Signed-off-by: Karel Zak libmount/src/hook_mount_legacy.c | 98 ++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 48 deletions(-) commit e1d05613e9bcdf07e5a2b4723a13aa8d4bbe2ef9 Author: Karel Zak Date: Tue Aug 23 13:42:16 2022 +0200 libmount: (optlist) add function to access option's map Signed-off-by: Karel Zak libmount/src/mountP.h | 2 ++ libmount/src/optlist.c | 10 ++++++++++ 2 files changed, 12 insertions(+) commit 624061f7015a8439c019c4777a137d593d76da8a Author: Karel Zak Date: Tue Aug 23 13:18:54 2022 +0200 libmount: (optlist) add is_silent shortcut Signed-off-by: Karel Zak libmount/src/mountP.h | 1 + libmount/src/optlist.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit cfa991a4c200a6db50b12b10ef2fe37baf2f1c7d Author: Karel Zak Date: Tue Aug 23 13:08:52 2022 +0200 libmount: (mount) remove last mountflags use Signed-off-by: Karel Zak libmount/src/context_mount.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 94d57d48c4d7cf2da16f4938586e75f216f0b004 Author: Karel Zak Date: Tue Aug 23 13:00:42 2022 +0200 libmount: (context) don't use mount flags directly * use optlist API rather than directly mountflags. * don't care about MS_RDONLY for mnt_update_* interface. It's unnecessary, the interface uses mount options (strings). Signed-off-by: Karel Zak libmount/src/context.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit a61e21a3a2bf4059993d5aeac1193d4663773bb3 Author: Karel Zak Date: Tue Aug 23 12:39:47 2022 +0200 libmount: (verity) use optlist Signed-off-by: Karel Zak libmount/src/context_veritydev.c | 116 +++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 59 deletions(-) commit 3029a3bdac4d1651894f1f15d20a36d6b9299e60 Author: Karel Zak Date: Tue Aug 23 11:58:37 2022 +0200 build-sys: rename libmount loopdev code file Signed-off-by: Karel Zak libmount/src/Makemodule.am | 2 +- libmount/src/{context_loopdev.c => hook_loopdev.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 3611b10c6b616e848dac191efab8e5b593d87c0b Author: Karel Zak Date: Tue Aug 23 11:55:51 2022 +0200 libmount: reimplement loop= by hooks Signed-off-by: Karel Zak libmount/src/context.c | 10 +- libmount/src/context_loopdev.c | 240 ++++++++++++++++++++++++++--------------- libmount/src/hooks.c | 1 + libmount/src/mountP.h | 8 +- 4 files changed, 156 insertions(+), 103 deletions(-) commit a5da4bbca53db25fb060876cee4ea633eea4e54f Author: Karel Zak Date: Tue Aug 23 11:13:56 2022 +0200 libmount: (owner) remove if-before-free Signed-off-by: Karel Zak libmount/src/hook_owner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 93c68844f1f08fd558624c397b2ebe41a306269f Author: Karel Zak Date: Mon Aug 22 15:10:23 2022 +0200 libmount: (loopdev) use optlist Signed-off-by: Karel Zak libmount/src/context_loopdev.c | 101 ++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 47 deletions(-) commit 904370603deef6931fa7babf9690127de4c62211 Author: Karel Zak Date: Mon Aug 22 15:08:33 2022 +0200 libmount: (optlist) add new shortcuts, fix add_flags() Signed-off-by: Karel Zak libmount/src/mountP.h | 4 ++++ libmount/src/optlist.c | 44 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 42 insertions(+), 6 deletions(-) commit 4e342001504ee59a034c3e6f4b5f1066398b82dd Author: Karel Zak Date: Fri Aug 19 18:44:00 2022 +0200 libmount: (mkdir) simplify X-mount.mkdir check It's enough to check for the option, it's unnecessary to check also flags. Signed-off-by: Karel Zak libmount/src/hook_mkdir.c | 6 ------ 1 file changed, 6 deletions(-) commit 07cac903ebc9901ba7dd47a05dbee9ed9daeed8f Author: Karel Zak Date: Fri Aug 19 18:43:26 2022 +0200 libmount: (subdir) use optlist Signed-off-by: Karel Zak libmount/src/hook_subdir.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit db7f4bd610b56b2e946cfe719f51ae1f1eee8287 Author: Karel Zak Date: Fri Aug 19 11:32:55 2022 +0200 libmount: (mkdir) use optlist Signed-off-by: Karel Zak libmount/src/hook_mkdir.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 011e4caed9826cf5ccec892329ab43ae8314acb0 Author: Karel Zak Date: Fri Aug 19 11:32:35 2022 +0200 libmount: (optlist) keep mnt_optlist_get_optstr() less verbose Signed-off-by: Karel Zak libmount/src/optlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93c0f69db967d9d5fb57e88ac44d43539d47379d Author: Karel Zak Date: Fri Aug 19 10:58:51 2022 +0200 libmount: optimize built-in options map use Let's keep the maps in libmnt_context to reduce mnt_get_builtin_optmap() calls and to simplify code. Signed-off-by: Karel Zak libmount/src/context.c | 27 ++++++++++++++------------ libmount/src/context_mount.c | 46 +++++++++++++++----------------------------- libmount/src/mountP.h | 3 +++ 3 files changed, 34 insertions(+), 42 deletions(-) commit 1e24df9c118287b229c89c8077e0d4de57c15e99 Author: Karel Zak Date: Fri Aug 19 10:28:24 2022 +0200 libmount: remove unused variable Signed-off-by: Karel Zak libmount/src/context.c | 1 - libmount/src/mountP.h | 1 - 2 files changed, 2 deletions(-) commit e5149d3b22f7ac913850d4e69b8523c3771e0716 Author: Karel Zak Date: Thu Aug 18 13:46:38 2022 +0200 libmount: (mount) use optlist for mount(2) options and flags Signed-off-by: Karel Zak libmount/src/context_mount.c | 3 --- libmount/src/hook_mount_legacy.c | 30 ++++++++++++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) commit 96a427b1248418312deabf522b736d5814df8279 Author: Karel Zak Date: Thu Aug 18 13:46:28 2022 +0200 libmount: (optlist) consolidate filter use Signed-off-by: Karel Zak libmount/src/optlist.c | 57 ++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 25 deletions(-) commit fd0bb1c78077866f36e6da71a42514a8fe547d24 Author: Karel Zak Date: Thu Aug 18 12:58:41 2022 +0200 libmount: (optstr) remove unnecessary code Replaced by optlist. Signed-off-by: Karel Zak libmount/src/mountP.h | 4 - libmount/src/optstr.c | 277 -------------------------------------------------- 2 files changed, 281 deletions(-) commit 2a665908ab9d8a0254363d7e163444184a8c6a39 Author: Karel Zak Date: Thu Aug 18 12:53:08 2022 +0200 libmount: use optlist to generate options for mount. helpers Signed-off-by: Karel Zak libmount/src/context_mount.c | 90 +++++--------------------------------------- 1 file changed, 9 insertions(+), 81 deletions(-) commit 0dea3c01b6bc388a096c139e2526f1cb21c39cfd Author: Karel Zak Date: Thu Aug 18 12:38:44 2022 +0200 libmount: (optlist) filter by optmap masks Signed-off-by: Karel Zak libmount/src/mountP.h | 6 +++++- libmount/src/optlist.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) commit d6e8427d1ca20a4283d592e7f518d36c4a3fab12 Author: Karel Zak Date: Thu Aug 18 12:27:09 2022 +0200 libmount: (optlist) add mnt_optlist_strdup_optstr() Signed-off-by: Karel Zak libmount/src/mountP.h | 2 + libmount/src/optlist.c | 99 +++++++++++++++++++++++++++++++------------------- 2 files changed, 64 insertions(+), 37 deletions(-) commit 7ed18d0370834121ac4798815e248eeb606e8555 Author: Karel Zak Date: Thu Aug 18 12:04:43 2022 +0200 libmount: (mount) de-duplicate when apply MS_SECURE The options string "users,exec" is "users,nodev,nosuid,noexec,exec", the option "noexec" is unnecessary here. The last option is the winner ("exec" in this case). Signed-off-by: Karel Zak libmount/src/context_mount.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5fd43ad39108b4e9d9de93b75c2c23d0eb645e9c Author: Karel Zak Date: Thu Aug 18 11:59:08 2022 +0200 libmount: (optlist) de-duplicate also according to invert mask The last option is the winner, it means "noexec,exec" is "exec". Signed-off-by: Karel Zak libmount/src/optlist.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 94c5c1daae9fb64260289200eee66086d1be4137 Author: Karel Zak Date: Thu Aug 18 10:58:33 2022 +0200 libmount: (optlist) improve cache and filtering Signed-off-by: Karel Zak libmount/src/context_mount.c | 4 +- libmount/src/mountP.h | 12 +++- libmount/src/optlist.c | 128 ++++++++++++++++++++++++++----------------- 3 files changed, 89 insertions(+), 55 deletions(-) commit afee6db1863d36ac1df998c0bc475b81fcdd664b Author: Karel Zak Date: Thu Aug 18 09:51:57 2022 +0200 libmount: (mount) use optlist from options processing Signed-off-by: Karel Zak libmount/src/context.c | 6 +- libmount/src/context_mount.c | 342 +++++++++++++++++++++++++------------------ 2 files changed, 205 insertions(+), 143 deletions(-) commit b3b890f41a8f2a5c1319f81e58ed3a64535de37b Author: Karel Zak Date: Thu Aug 18 09:39:19 2022 +0200 libmount: (optlist) extend functionality * remember MS_REMOUNT and add mnt_optlist_is_remount() * fix opt->external use * add possibility to filter options for mnt_optlist_get_*() * allow to set/get values Signed-off-by: Karel Zak libmount/src/mountP.h | 21 +++++- libmount/src/optlist.c | 176 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 156 insertions(+), 41 deletions(-) commit 89b41cc71cdf93402148251814b94fbc5ceb6641 Author: Karel Zak Date: Mon Aug 15 17:33:40 2022 +0200 libmount: use optlist in permission evaluation Signed-off-by: Karel Zak libmount/src/Makemodule.am | 7 +- libmount/src/context_mount.c | 149 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 130 insertions(+), 26 deletions(-) commit 93c4f825fdf773ba621b8a6b86b051c50449a622 Author: Karel Zak Date: Mon Aug 15 17:32:40 2022 +0200 libmount: (context) use default options maps Signed-off-by: Karel Zak libmount/src/context.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 695ea5b7837fa2ea56c34f8e5164ed200ca1e38a Author: Karel Zak Date: Mon Aug 15 17:30:59 2022 +0200 libmount: (optlist) improve mnt_optlist_insert_flags() Signed-off-by: Karel Zak libmount/src/optlist.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit d74ae8266fc052033cef8252dc607e97994dd74e Author: Karel Zak Date: Thu Jul 14 11:00:45 2022 +0200 libmount: add mnt_optlist_remove_flags() and mnt_opt_set_external() - add mnt_optlist_remove_flags() to make it easy to work with flags - add mnt_opt_set_external() to hidde unnecessary options - clean up private library header file Signed-off-by: Karel Zak libmount/src/mountP.h | 4 +++- libmount/src/optlist.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit 856518b029ff39981f38f1dc6c017ed0bed02303 Author: Karel Zak Date: Thu Jul 14 10:59:32 2022 +0200 libblkid: use optlist to detect propagation changes Signed-off-by: Karel Zak libmount/src/context.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 1017f628c0d6d49897e6d6cabf78e19a591e1528 Author: Karel Zak Date: Wed Jul 13 16:04:58 2022 +0200 libmount: apply fstab options to context optlist Signed-off-by: Karel Zak libmount/src/context.c | 23 +++++++++++++++-------- libmount/src/mountP.h | 4 +++- libmount/src/optlist.c | 10 +++++++++- 3 files changed, 27 insertions(+), 10 deletions(-) commit 9a72da2c23d0bfdf8781abdf6d1da9e8dd914829 Author: Karel Zak Date: Tue Jun 28 13:55:47 2022 +0200 libmount: use optlist to set/get options in mount context Signed-off-by: Karel Zak libmount/src/context.c | 173 +++++++++++++++++++------------------------------ 1 file changed, 65 insertions(+), 108 deletions(-) commit 5b783fe3fac2847db650ca1e894584ccb5ae729d Author: Karel Zak Date: Tue Jun 28 13:52:34 2022 +0200 libmount: improve optlist * cache already generated mount strings * add mnt_optlist_merge_opts() to de-duplicate mount options Signed-off-by: Karel Zak libmount/src/mountP.h | 13 +++-- libmount/src/optlist.c | 149 +++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 145 insertions(+), 17 deletions(-) commit dec1455d66071f47fe43446e87bf97d65b042e34 Author: Karel Zak Date: Tue Jun 28 10:43:30 2022 +0200 libmount: (optlist) support merged optlist For backward compatibility in mnt_context_* interface we need a way how to work independently with mount flags and mount options. The library merges all the options and flags later during mnt_context_prepare_*. Signed-off-by: Karel Zak libmount/src/mountP.h | 1 + libmount/src/optlist.c | 90 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 77 insertions(+), 14 deletions(-) commit 45c1fe0c1bf81bb8b2648ebaacc4284f09f35267 Author: Karel Zak Date: Mon Jun 27 19:40:38 2022 +0200 libmount: add optlist tests Signed-off-by: Karel Zak include/debug.h | 2 +- libmount/src/Makemodule.am | 6 ++ libmount/src/init.c | 3 +- libmount/src/mountP.h | 2 +- libmount/src/optlist.c | 168 +++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 173 insertions(+), 8 deletions(-) commit add9d4582179eaad69d92ee224cbb4c1c3d96228 Author: Karel Zak Date: Fri Jun 24 18:15:25 2022 +0200 libmount: add libmnt_optlist Now libmount internally keeps mount options as strings or flags. This commit adds a new container to keep parsed mount options in memory. We need: * the same mount options could be mapped to the different mount options maps (for example "nosuid" to classic MS_NOSUID or new MOUNT_ATTR_NOSUID) * easy to sync flags and strings (e.g. conversion from MS_NOSUID to "nosuid" and vice-versa). * double linked list is easy to use in while() when browse all options * easy to filter options by specific map (MS_*, userspace, etc.) * don't hardcode options maps in options parser, support 3th-party maps (for example for extensions like dm-verity, etc.) Signed-off-by: Karel Zak libmount/src/Makemodule.am | 1 + libmount/src/mountP.h | 39 ++++ libmount/src/optlist.c | 478 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 518 insertions(+) commit 1eed6d3ba5cfd405b4ec77c7bfd1aca6e1edc21f Author: Karel Zak Date: Fri Jun 24 17:09:41 2022 +0200 libmount: fix possible leaks on error Signed-off-by: Karel Zak libmount/src/optstr.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 0a8980b74e5b7dce7cf163f35b6a1f459457bca0 Author: Karel Zak Date: Fri Jun 24 16:52:46 2022 +0200 libmount: make __buffer_append_option() usable in entire lib Signed-off-by: Karel Zak libmount/src/mountP.h | 5 +++++ libmount/src/optstr.c | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) commit 377d89470f0f10f38ffb5b9c97fe604ef50bf6c1 Author: Karel Zak Date: Fri Jun 10 10:24:10 2022 +0200 libmount: fix mount hooks use The function do_mount() is possible to call in loop, for example when libmount try FS types ("mount -t foo,bar,ext4 /dev/sdc1 /mnt"). In this case it's bad idea to call in the loop also hooks that do non-mount operations. Signed-off-by: Karel Zak libmount/src/context_mount.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 5e69b21b21d1493a4483332f93a1aaf5bbe46344 Author: Karel Zak Date: Fri Jun 10 10:01:24 2022 +0200 libmount: add MNT_STAGE_PREP It's better to introduce a new stage to call hooks when all is prepared rather than use MNT_STAGE_PREP_OPTIONS for all cases. Signed-off-by: Karel Zak libmount/src/context_mount.c | 4 ++++ libmount/src/hook_mount_legacy.c | 4 ++-- libmount/src/hooks.c | 3 +++ libmount/src/mountP.h | 15 ++++++++------- 4 files changed, 17 insertions(+), 9 deletions(-) commit 0120be6f938800f6cafed27c64069c730f563cb9 Author: Karel Zak Date: Thu Jun 9 13:01:52 2022 +0200 include/mount-api-utils: add new syscalls Signed-off-by: Karel Zak configure.ac | 14 +++++++-- include/mount-api-utils.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++- meson.build | 7 +++++ 3 files changed, 90 insertions(+), 3 deletions(-) commit e087a188e8b3045a471a35a9ab84801b93e4d9ca Author: Karel Zak Date: Thu Jun 9 12:28:09 2022 +0200 include/mount-api-utils: cleanup * use SYS_* macros * check for the syscalls in configure.ac * use SYS_* macros for #ifdefs * add "idmapping" to the list if libmount features Signed-off-by: Karel Zak configure.ac | 4 ++++ include/mount-api-utils.h | 32 ++++++++++++++++---------------- libmount/src/version.c | 4 ++++ 3 files changed, 24 insertions(+), 16 deletions(-) commit 1e5381cbde19f1f2b40987c3297fcde5358ab104 Author: Karel Zak Date: Thu Jun 9 12:15:41 2022 +0200 include/mount-api-utils: fix indention Signed-off-by: Karel Zak include/mount-api-utils.h | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) commit 0bbc62dda53f9de3e9ee9b4d823d906979e337e9 Author: Christian Brauner Date: Wed Jun 1 15:52:07 2022 +0200 libmount: accept X-mount.idmap= This adds a new mount option X-mount.idmap. This mount option can be used to create an idmapped mount. An idmapped mount allows to change ownership of all files located under a mount according to the ID-mapping associated with a user namespace. The ownership change is tied to the lifetime and localized to the relevant mount. The relevant ID-mapping can be specified in two ways: * A user can specify the ID-mapping directly. The ID-mapping must be specified using the syntax id-type:id-mount:id-host:id-range Specifying "u" as the id-type prefix creates a UID-mapping, "g" creates a GID-mapping and omitting id-type or specifying "b" creates both a UID- and GID-mapping. The id-mount parameter indicates the starting ID in the new mount. The id-host parameter indicates the starting ID in the filesystem. The id-range parameter indicates how many IDs are to be mapped. It is possible to specify multiple ID-mappings. The individual ID-mappings must be separated by spaces. For example, the ID-mapping X-mount.idmap=u:1000:0:1 g:1001:1:2 5000:1000:2 creates an idmapped mount where UID 0 is mapped to UID 1000, GID 1 is mapped to GUID 1001, GID 2 is mapped to GID 1002, UID and GID 1000 are mapped to 5000, and UID and GID 1001 are mapped to 5001 in the mount. When an ID-mapping is specified directly a new user namespace will be allocated with the requested ID-mapping. The newly created user namespace will be attached to the mount. * A user can specify a user namespace file. The user namespace will then be attached to the mount and the ID-mapping of the user namespace will become the ID-mapping of the mount. For example, *X-mount.idmap=/proc/PID/ns/user* will attach the user namespace of the process PID to the mount. Even more details about idmapped mounts can be found in the mount_setattr(2) manpage of the linux-manpage project. [kzak@redhat.com: - port Christian's patch to the new libmount hooks API] Signed-off-by: Christian Brauner (Microsoft) Signed-off-by: Karel Zak libmount/meson.build | 1 + libmount/src/Makemodule.am | 1 + libmount/src/context_mount.c | 6 + libmount/src/hook_idmap.c | 482 +++++++++++++++++++++++++++++++++++++++++++ libmount/src/hooks.c | 4 + libmount/src/libmount.h.in | 6 + libmount/src/mountP.h | 1 + sys-utils/mount.8.adoc | 27 +++ 8 files changed, 528 insertions(+) commit 192bb3409f71bb5e8739d9e4beadcf281c8fd698 Author: Karel Zak Date: Wed Jun 1 15:21:55 2022 +0200 libmount: improve debug messages Signed-off-by: Karel Zak libmount/src/context_mount.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 01c0aa5c30d3edd2097c9d9e177377fa4a770cc7 Author: Karel Zak Date: Tue May 31 17:53:53 2022 +0200 libmount: remove unnecessary declarations Signed-off-by: Karel Zak libmount/src/hook_mkdir.c | 2 -- libmount/src/hook_mount_legacy.c | 2 -- libmount/src/hook_owner.c | 2 -- libmount/src/hook_subdir.c | 1 - 4 files changed, 7 deletions(-) commit 10efb9ea92128c2461d00c67397a42d90abf8909 Author: Karel Zak Date: Tue May 31 17:27:04 2022 +0200 build-sys: check for mount_attr in linux/mount.h Signed-off-by: Karel Zak configure.ac | 2 +- include/mount-api-utils.h | 1 + meson.build | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 013e0db4d0763ebfb210be95901f8994057af035 Author: Christian Brauner Date: Mon Aug 16 16:45:17 2021 +0200 include: add mount-api-utils.h Signed-off-by: Christian Brauner configure.ac | 5 ++ include/Makemodule.am | 1 + include/mount-api-utils.h | 132 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+) commit ee99f438b899c81f44aaf9f4cd90910cde9d712d Author: Karel Zak Date: Mon May 30 11:47:32 2022 +0200 libmount: reimplement X-mount.{owner,group,mode}= by hooks * "prepare-options hook" parses {owner,group,mode}= options * "mount-post hook" calls chmod/own Signed-off-by: Karel Zak libmount/meson.build | 1 + libmount/src/Makemodule.am | 1 + libmount/src/context.c | 8 -- libmount/src/context_mount.c | 76 +------------------ libmount/src/hook_owner.c | 175 +++++++++++++++++++++++++++++++++++++++++++ libmount/src/hooks.c | 3 +- libmount/src/mountP.h | 5 +- 7 files changed, 182 insertions(+), 87 deletions(-) commit c54947e9936fa1832931775fbd2532976f0adf8f Author: Karel Zak Date: Mon May 30 11:43:08 2022 +0200 meson: add missing files Signed-off-by: Karel Zak libmount/meson.build | 2 ++ 1 file changed, 2 insertions(+) commit bd599524c879489041b25f32e53da913ceb60b41 Author: Karel Zak Date: Mon May 30 09:47:04 2022 +0200 libmount: remove hooks initialization The hookset initialization is unnecessary. It's enough to do the initialization in the first hook (usually in the "prepare" stage). This change safes memory and time. Signed-off-by: Karel Zak libmount/src/context_mount.c | 2 -- libmount/src/hook_mkdir.c | 15 ++++----------- libmount/src/hook_mount_legacy.c | 26 +++++++++----------------- libmount/src/hook_subdir.c | 15 ++++----------- libmount/src/hooks.c | 38 ++++++++++++++++++-------------------- libmount/src/mountP.h | 7 ++++--- 6 files changed, 39 insertions(+), 64 deletions(-) commit b0a165dc76c024614a930325877a25555d4ff819 Author: Karel Zak Date: Wed May 25 14:01:52 2022 +0200 libmount: reimplement X-mount.subdir= by hooks * "prepare-target hook" checks for X-mount.subdir= and define pre-mount hook * "mount-pre hook" unshares temporary directory, redirect the next mount(2) to this temporary directory * "mount-post hook" binds subdirectory to the final target, umounts temporary directory Signed-off-by: Karel Zak libmount/src/Makemodule.am | 1 + libmount/src/context.c | 4 - libmount/src/context_mount.c | 106 +-------------- libmount/src/hook_subdir.c | 316 +++++++++++++++++++++++++++++++++++++++++++ libmount/src/hooks.c | 18 ++- libmount/src/mountP.h | 3 +- libmount/src/utils.c | 73 ---------- 7 files changed, 333 insertions(+), 188 deletions(-) commit 17de67aa1d7dee8cb8ea3040867a989af44a8243 Author: Karel Zak Date: Mon May 23 12:58:08 2022 +0200 libmount: (mkdir) cannonicalize after mkdir Signed-off-by: Karel Zak libmount/src/hook_mkdir.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 093f224587312011183a4259abc4f74ff46792c0 Author: Karel Zak Date: Mon May 23 12:15:29 2022 +0200 libmount: move X-mount.mkdir to separate file Signed-off-by: Karel Zak libmount/src/Makemodule.am | 1 + libmount/src/context_mount.c | 64 +--------------------- libmount/src/hook_mkdir.c | 128 +++++++++++++++++++++++++++++++++++++++++++ libmount/src/hooks.c | 4 +- libmount/src/mountP.h | 1 + 5 files changed, 134 insertions(+), 64 deletions(-) commit a603f2a4562ae0e47f3aa52011a3c2b2206f2568 Author: Karel Zak Date: Mon May 23 11:45:57 2022 +0200 libmount: move mount-only functions to context_mount.c Signed-off-by: Karel Zak libmount/src/context.c | 169 ------------------------------------------ libmount/src/context_mount.c | 172 ++++++++++++++++++++++++++++++++++++++++++- libmount/src/mountP.h | 1 - 3 files changed, 171 insertions(+), 171 deletions(-) commit 8241fb005f41a9450739f00c7396ca1e8cde69af Author: Karel Zak Date: Thu May 19 13:55:43 2022 +0200 libmount: implement hooks for a legacy mount(2) * replaces context "addmounts" functionality with more generic hooks * "hooksets" handles complex functionality by a set of hooks. During initialization (or later), the hookset can define arbitrary hook function(s). The library will call the functions from a specified place ("stage"). Now supported stages are prepare-options, pre-mount, mount, and post-mount. This solution looks complex at first glance, but it will help keep all extensions separated from core library code (IDs mapping, X-mount.chown/chmod, X-mount.subdir, etc.). It will also be possible to support multiple implementations for the same functionality (classic mount(2) vs. new fsmount(2)) without #ifdefs storms etc. Maybe later we can also use hooksets for external library modules (like verity support). * __legacy-mount hookset implements support for the classic mount(2) syscall. Supported hooks: prepare-options - analyzes the current setting (libmnt_context) and setup other hooks when necessary mount - calls mount(2) for standard "/dev to /mnt" use-cases post-mount (two possible hooks): - calls mount(2) to modify propagation flags - calls mount(2) to implement bind-remount (mount --bind -oro) Signed-off-by: Karel Zak libmount/meson.build | 2 + libmount/src/Makemodule.am | 2 + libmount/src/context.c | 73 +++++---- libmount/src/context_mount.c | 331 ++++++++------------------------------- libmount/src/fs.c | 7 + libmount/src/hook_mount_legacy.c | 308 ++++++++++++++++++++++++++++++++++++ libmount/src/hooks.c | 291 ++++++++++++++++++++++++++++++++++ libmount/src/init.c | 1 + libmount/src/mountP.h | 76 +++++++-- 9 files changed, 780 insertions(+), 311 deletions(-) commit 37c6b24c8bc39d5a21e4162aa4c094f6597c5e3b Author: David Anes Date: Mon Jan 2 18:18:43 2023 +0100 Changes for review sys-utils/renice.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d4a20b18e99726f13092bc60845ad35925ca9762 Merge: 56ce8f610 00e58b18b Author: kraptor Date: Mon Jan 2 18:09:53 2023 +0100 Merge branch 'util-linux:master' into make-nice-posix-compliant commit 00e58b18b389b078698f99784a07fe9ca429317f Merge: e71bd605c c0ff722e4 Author: Karel Zak Date: Mon Jan 2 13:34:01 2023 +0100 Merge branch '1' of https://github.com/neheb/util-linux * '1' of https://github.com/neheb/util-linux: meson: fix option value commit e71bd605c506614939a89a64f66b4d772ced3cd5 Merge: e6c3efa3f 0cb7e0783 Author: Karel Zak Date: Mon Jan 2 13:32:58 2023 +0100 Merge branch 'libblkid/topology-diskseq' of https://github.com/t-8ch/util-linux * 'libblkid/topology-diskseq' of https://github.com/t-8ch/util-linux: libblkid: topology: probe diskseq libblkid: topology: allow setting of 64bit values lib/sysfs: allow parent redirect even for non-queue files blockdev: add support for ioctl BLKGETDISKSEQ libblkid: topology: add test tests: functions: allow partitions on loopdevs commit e6c3efa3fd7f93995b408af101719c64286bf6ef Merge: e4d374a0a bb78a177c Author: Karel Zak Date: Mon Jan 2 13:24:23 2023 +0100 Merge branch 'cleanups' of https://github.com/t-8ch/util-linux * 'cleanups' of https://github.com/t-8ch/util-linux: fadvise: fix parsing of option -V libblkid: zfs: remove unnecessary newline from debug messages libblkid: topology: constify some structures lib: sysfs: fix typo commit e4d374a0ac013538455c63edb6fc05b0383b06bb Merge: 3a0a18f6f d883f868a Author: Karel Zak Date: Mon Jan 2 13:08:29 2023 +0100 Merge branch 'umount-completion' of https://github.com/t-8ch/util-linux * 'umount-completion' of https://github.com/t-8ch/util-linux: umount: properly handle special characters in completion commit 3a0a18f6f1624e6e5ab7309b2445b8efa7db2a45 Merge: 55c04dd23 c10adc203 Author: Karel Zak Date: Mon Jan 2 13:07:45 2023 +0100 Merge branch 'blockdev' of https://github.com/t-8ch/util-linux * 'blockdev' of https://github.com/t-8ch/util-linux: blockdev: add support for ioctl BLKGETDISKSEQ commit 55c04dd23b89d724ed8f0c65c43f8b38d66fe25c Merge: 5b62498c5 c8cc50647 Author: Karel Zak Date: Mon Jan 2 13:06:41 2023 +0100 Merge branch 'part-csum' of https://github.com/t-8ch/util-linux * 'part-csum' of https://github.com/t-8ch/util-linux: libblkid: bsd: add checksum support libblkid: sun: use generic checksum handling libblkid: sgi: use generic checksum handling libblkid: gpt: use generic checksum handling commit 5b62498c5564e585f90b365331db44c8519ea9c2 Merge: 71a565418 ecddb0a4e Author: Karel Zak Date: Mon Jan 2 13:05:13 2023 +0100 Merge branch 'lsns-ioctl-check' of https://github.com/t-8ch/util-linux * 'lsns-ioctl-check' of https://github.com/t-8ch/util-linux: Revert "tests: use KNOWN_FAIL for lsns/ioctl_ns" commit 71a56541832b5e574d690819545cae67479e04c0 Merge: dd501125f 67b8731fa Author: Karel Zak Date: Mon Jan 2 13:04:38 2023 +0100 Merge branch 'lsblk-nvme' of https://github.com/mbroz/util-linux * 'lsblk-nvme' of https://github.com/mbroz/util-linux: Update email. lsblk: add revision output to --nvme list lsblk: read firmware revision from udev commit dd501125f31adb3747ca9f55eca2581b00d7329b Merge: 9141e620c 4848c9c0e Author: Karel Zak Date: Mon Jan 2 13:02:51 2023 +0100 Merge branch 'stat-parsing' of https://github.com/t-8ch/util-linux * 'stat-parsing' of https://github.com/t-8ch/util-linux: procfs: get_stat_nth: handle braces in process name lib: procfs: add parsing cmd containing newline lib: procfs: add unittests lib: procfs: prefix support for tests lib: procfs: fix error message during test lib: procfs: fix typo in argument specification lib: procfs: clarify name of procfs_process_get_data_for() commit 9141e620cb513ba9c4dc53c1e3ae02887ecbaef3 Merge: 1ad0efff6 62491dc12 Author: Karel Zak Date: Mon Jan 2 12:44:57 2023 +0100 Merge branch 'mmc' of https://github.com/t-8ch/util-linux * 'mmc' of https://github.com/t-8ch/util-linux: lsblk: add mmc transport commit 1ad0efff6f1009e4362a4c8af5a3d07df9ef6f8b Merge: c37aec37c 035fc2d9c Author: Karel Zak Date: Mon Jan 2 12:44:23 2023 +0100 Merge branch 'address_bits' of https://github.com/t-8ch/util-linux * 'address_bits' of https://github.com/t-8ch/util-linux: setarch: use kernel address size if possible sysfs: add helper for /sys/kernel/address_bits commit c37aec37cafaece0d8535a2144e93faf4d2346fb Merge: 6a81d75b8 6d8fc1cf3 Author: Karel Zak Date: Mon Jan 2 12:24:18 2023 +0100 Merge branch 'bst/hwclock-ret-param-get' of https://github.com/Bastian-Krause/util-linux * 'bst/hwclock-ret-param-get' of https://github.com/Bastian-Krause/util-linux: hwclock: fix return value on successful --param-get commit 6a81d75b83f69759d8df4ede3882bf1448d78833 Merge: 45e0307a4 5e67b421a Author: Karel Zak Date: Mon Jan 2 12:23:11 2023 +0100 Merge branch 'meson-debian' of https://github.com/zeha/util-linux * 'meson-debian' of https://github.com/zeha/util-linux: meson: install uuidd.rc with -Dsysvinit=enabled meson: fix pkg-config name of libaudit meson: fix build with -Dselinux=enabled commit 45e0307a4a1f017b8b06a545fe28b7cbe086e6f6 Merge: 8620d41ad eb09fc2eb Author: Karel Zak Date: Mon Jan 2 12:22:11 2023 +0100 Merge branch 'misc-utils-rename-documentation' of https://github.com/ChickenProp/util-linux * 'misc-utils-rename-documentation' of https://github.com/ChickenProp/util-linux: rename.1: document edge cases. commit c0ff722e403fefea773ae99e9f29c5f69bdaaec3 Author: Rosen Penev Date: Sun Jan 1 12:25:47 2023 -0800 meson: fix option value This is a boolean, not a string. Found with muon analyze. Signed-off-by: Rosen Penev meson_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cb7e07830c412103a0e939683c2c74b7bcf5be9 Author: Thomas Weißschuh Date: Wed Dec 28 01:47:08 2022 +0000 libblkid: topology: probe diskseq libblkid/docs/libblkid-sections.txt | 1 + libblkid/samples/topology.c | 3 +++ libblkid/src/blkid.h.in | 2 ++ libblkid/src/libblkid.sym | 4 ++++ libblkid/src/topology/ioctl.c | 3 ++- libblkid/src/topology/sysfs.c | 1 + libblkid/src/topology/topology.c | 22 ++++++++++++++++++++++ libblkid/src/topology/topology.h | 1 + tests/expected/blkid/topology-disk | 1 + tests/expected/blkid/topology-partition | 1 + tests/ts/blkid/topology | 2 ++ 11 files changed, 40 insertions(+), 1 deletion(-) commit 3ab9e699a8d90f55e0447516b7e05a8686180467 Author: Thomas Weißschuh Date: Wed Dec 28 01:45:46 2022 +0000 libblkid: topology: allow setting of 64bit values libblkid/src/topology/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e374978e6beb03b475f3ced757ab3a144d416373 Author: Thomas Weißschuh Date: Wed Dec 28 01:41:42 2022 +0000 lib/sysfs: allow parent redirect even for non-queue files We will also need this redirect for other sysfs files. lib/sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 28f7bf3d4652aa4c8e5d21982ed71c6587690da9 Author: Thomas Weißschuh Date: Tue Dec 27 00:28:53 2022 +0000 blockdev: add support for ioctl BLKGETDISKSEQ disk-utils/blockdev.8.adoc | 3 +++ disk-utils/blockdev.c | 6 ++++++ include/blkdev.h | 5 +++++ 3 files changed, 14 insertions(+) commit c10adc203e4aa577362319ee218b5cd3fa49f74f Author: Thomas Weißschuh Date: Tue Dec 27 00:28:53 2022 +0000 blockdev: add support for ioctl BLKGETDISKSEQ disk-utils/blockdev.8.adoc | 3 +++ disk-utils/blockdev.c | 6 ++++++ include/blkdev.h | 5 +++++ 3 files changed, 14 insertions(+) commit bb78a177cd4ef8992df6bab889db82bf070d07ac Author: Thomas Weißschuh Date: Sun Dec 25 13:23:34 2022 +0000 fadvise: fix parsing of option -V misc-utils/fadvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be64edde48945badc59f7704bc0ee64deb6dca37 Author: Thomas Weißschuh Date: Wed Dec 28 02:09:13 2022 +0000 libblkid: topology: add test tests/expected/blkid/topology-disk | 3 ++ tests/expected/blkid/topology-partition | 3 ++ tests/ts/blkid/topology | 52 +++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) commit 4fa3633e87a377cc8541c246c8f2b8ac8222212d Author: Thomas Weißschuh Date: Wed Dec 28 03:47:46 2022 +0000 tests: functions: allow partitions on loopdevs This allow us the add partition to the test devices. tests/expected/fdisk/gpt-resize | 3 +-- tests/expected/fdisk/gpt-resize.err | 1 - tests/functions.sh | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) commit 12af79b94c3d1e76b89ba53ccc92f65ddab47f17 Author: Thomas Weißschuh Date: Wed Dec 28 04:06:06 2022 +0000 libblkid: zfs: remove unnecessary newline from debug messages libblkid/src/superblocks/zfs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c74a0d9ca3b144e8dd140d466f3dc5f6bf7d56ae Author: Thomas Weißschuh Date: Wed Dec 28 01:42:40 2022 +0000 libblkid: topology: constify some structures libblkid/src/topology/dm.c | 2 +- libblkid/src/topology/ioctl.c | 4 ++-- libblkid/src/topology/lvm.c | 2 +- libblkid/src/topology/sysfs.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 4e691a38675de0a0169577c9720d2b205ef54d33 Author: Thomas Weißschuh Date: Wed Dec 28 01:41:55 2022 +0000 lib: sysfs: fix typo lib/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d883f868a839f9d437688ad9c3ad05d78affb6ef Author: Thomas Weißschuh Date: Tue Dec 27 02:59:26 2022 +0000 umount: properly handle special characters in completion Fixes #1834 bash-completion/umount | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit c8cc50647261cd7f8181c9390850c25e7a001d0d Author: Thomas Weißschuh Date: Mon Dec 26 23:57:34 2022 +0000 libblkid: bsd: add checksum support libblkid/src/partitions/bsd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b81043959446e4f848e5a9acea19d257acc3f23d Author: Thomas Weißschuh Date: Mon Dec 26 23:07:58 2022 +0000 libblkid: sun: use generic checksum handling libblkid/src/partitions/sun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3957a745e7051cd2cf5259fdf4e7b19e81b9ddb4 Author: Thomas Weißschuh Date: Mon Dec 26 23:07:54 2022 +0000 libblkid: sgi: use generic checksum handling libblkid/src/partitions/sgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8c35b4aea9b5e383bfa98f975ccf7d1ad15db22 Author: Thomas Weißschuh Date: Mon Dec 26 23:04:40 2022 +0000 libblkid: gpt: use generic checksum handling libblkid/src/partitions/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecddb0a4e9d00b2d22725f1e91bb712db9da3836 Author: Thomas Weißschuh Date: Sun Dec 25 05:28:59 2022 +0000 Revert "tests: use KNOWN_FAIL for lsns/ioctl_ns" The check introduced in 249ba69c introduced a proper feature check. This reverts commit 857038d4512a5f2e9a1fd4a3d89c2c27eae456fd. tests/ts/lsns/ioctl_ns | 9 --------- 1 file changed, 9 deletions(-) commit 4848c9c0ea92950eaf83b2a8ef82cc66626695d1 Author: Thomas Weißschuh Date: Thu Dec 22 23:54:41 2022 +0000 procfs: get_stat_nth: handle braces in process name In procfs_process_get_stat_nth() we skip to the end of the process name by looking for the ')' after it. However if the process name itself contains a ')' then find that instead of the correct one. By searching the ')' from the end of the file we can make sure to always find the correct one. Link: https://www.openwall.com/lists/oss-security/2022/12/21/6 lib/procfs.c | 2 +- tests/expected/lib/procfs-one-process | 4 ++++ tests/expected/lib/procfs-stat-nth | 2 ++ tests/ts/lib/procfs | 4 ++++ tests/ts/lib/procfs-data/proc/3/cmdline | Bin 0 -> 11 bytes tests/ts/lib/procfs-data/proc/3/comm | 1 + tests/ts/lib/procfs-data/proc/3/stat | 1 + 7 files changed, 13 insertions(+), 1 deletion(-) commit e83ced9250082be03f848e7ee4ea270e878380c6 Author: Thomas Weißschuh Date: Sat Dec 24 16:53:32 2022 +0000 lib: procfs: add parsing cmd containing newline tests/expected/lib/procfs-one-process | 6 ++++++ tests/expected/lib/procfs-stat-nth | 2 ++ tests/ts/lib/procfs | 4 ++++ tests/ts/lib/procfs-data/proc/2/cmdline | Bin 0 -> 10 bytes tests/ts/lib/procfs-data/proc/2/comm | 2 ++ tests/ts/lib/procfs-data/proc/2/stat | 2 ++ 6 files changed, 16 insertions(+) commit d34b0603e8c0c2f7ec548a15c2d23bcb2c4dea1b Author: Thomas Weißschuh Date: Sat Dec 24 16:43:29 2022 +0000 lib: procfs: add unittests tests/commands.sh | 1 + tests/expected/lib/procfs-one-process | 4 +++ tests/expected/lib/procfs-stat-nth | 2 ++ tests/expected/lib/procfs-stat-nth.err | 2 ++ tests/ts/lib/procfs | 49 ++++++++++++++++++++++++++++++++ tests/ts/lib/procfs-data/proc/1/cmdline | Bin 0 -> 7 bytes tests/ts/lib/procfs-data/proc/1/comm | 1 + tests/ts/lib/procfs-data/proc/1/stat | 1 + 8 files changed, 60 insertions(+) commit a446842f5d0a222ad5a884ce6875df698055d360 Author: Thomas Weißschuh Date: Sat Dec 24 16:09:24 2022 +0000 lib: procfs: prefix support for tests This will be used in the unitttests. lib/procfs.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 758730c0b53f97282b324f88fc3d328efdf14468 Author: Thomas Weißschuh Date: Sat Dec 24 16:32:50 2022 +0000 lib: procfs: fix error message during test procfs_process_get_stat_nth() returns the error and does not set errno. lib/procfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6f5cb4cbc3c37ba4e21091d23c8295c1886333d3 Author: Thomas Weißschuh Date: Sat Dec 24 16:06:41 2022 +0000 lib: procfs: fix typo in argument specification lib/procfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93c0d60794839c00afe9418939e0a15a3bece0b3 Author: Thomas Weißschuh Date: Fri Dec 23 21:05:02 2022 +0000 lib: procfs: clarify name of procfs_process_get_data_for() The previous name "procfs_process_get_line_for()" indicates that only a single line would be read from the file. In fact the function always returns the full file contents. This behavior is necessary are various procfs files can contain legitimate newlines. Rename the function to match its behavior. lib/procfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 67b8731fa6073f063e75b230e8f532b8eec455e3 Author: Milan Broz Date: Thu Dec 22 23:26:33 2022 +0100 Update email. This email no longer works. Signed-off-by: Milan Broz AUTHORS | 4 ++-- libblkid/src/superblocks/lvm.c | 2 +- misc-utils/lsblk.8.adoc | 2 +- misc-utils/lsblk.c | 2 +- misc-utils/lsblk.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 39a9b2c9a98bef3fb0afd15bd9bcb8eede5e91b5 Author: Milan Broz Date: Thu Dec 22 23:19:36 2022 +0100 lsblk: add revision output to --nvme list This is similar to --scsi output now. Signed-off-by: Milan Broz misc-utils/lsblk.c | 1 + 1 file changed, 1 insertion(+) commit 8e89dd8bacbd110cd6fea9baab176993fe5270b9 Author: Milan Broz Date: Thu Dec 22 23:18:38 2022 +0100 lsblk: read firmware revision from udev This supports more device types like NVMEs. Signed-off-by: Milan Broz misc-utils/lsblk-properties.c | 5 +++++ misc-utils/lsblk.c | 9 +++++++-- misc-utils/lsblk.h | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) commit 801b0a62519948fb42f271ad00fca64deef68c64 Author: Thomas Weißschuh Date: Wed Dec 21 19:07:54 2022 +0000 libblkid: remove strewn around calls to blkid_init_debug() Now that we always initialize libblkid debugging when loading we don't need them anymore. libblkid/src/cache.c | 2 -- libblkid/src/evaluate.c | 5 ----- libblkid/src/probe.c | 1 - 3 files changed, 8 deletions(-) commit aca796c52431edf09e8852c961f1c6a90c5367ef Author: Thomas Weißschuh Date: Wed Dec 21 19:06:01 2022 +0000 libblkid: always initialize debugging Previously the debugging logic relied on random parts of libblkid having called blkid_init_debug(). If this didn't happen, as for example for lsblk(8), debugging wouldn't work. Make sure that debugging is always enabled. libblkid/src/init.c | 5 +++++ 1 file changed, 5 insertions(+) commit 62491dc126b8e9fa770cbd4d5907b0a8d6ab8a11 Author: Thomas Weißschuh Date: Wed Dec 21 18:46:46 2022 +0000 lsblk: add mmc transport misc-utils/lsblk.c | 2 ++ 1 file changed, 2 insertions(+) commit 035fc2d9c2fa6f5ff71c94e10045f62b0716b12d Author: Thomas Weißschuh Date: Wed Dec 21 13:42:05 2022 +0000 setarch: use kernel address size if possible If setarch is running as 32bit userspace on a 64bit kernel we should use the kernel personality. meson.build | 1 + sys-utils/Makemodule.am | 1 + sys-utils/setarch.c | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) commit 74c9e0d8c51af3b45eb58631d05682c986a0aca9 Author: Thomas Weißschuh Date: Wed Dec 21 13:39:35 2022 +0000 sysfs: add helper for /sys/kernel/address_bits include/pathnames.h | 1 + include/sysfs.h | 1 + lib/sysfs.c | 13 +++++++++++++ 3 files changed, 15 insertions(+) commit 8620d41ad56fb2b624b0ef6a6d5fef377fdd6d68 Author: Frantisek Sumsal Date: Thu Nov 24 10:34:54 2022 +0100 ci: build & test util-linux on Fedora Rawhide via Packit Let's run at least the unit-tests on Fedora Rawhide via Packit, as it supports a couple of alternative architectures (aarch64, ppc64le, s390x) as well as i*86, which were source of issues in the past. .packit.yaml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 6d8fc1cf327cf92f8730bc918d7badc323888fe4 Author: Bastian Krause Date: Wed Dec 21 11:44:23 2022 +0100 hwclock: fix return value on successful --param-get hwclock should return 0 on sucessful --param-get. Fixes: 6097b12df ("hwclock: add --param-get option") Signed-off-by: Bastian Krause sys-utils/hwclock.c | 1 + 1 file changed, 1 insertion(+) commit 0dfba752af78c59252f6de49cd9a97f8e05cf1cf Merge: 6c01cce46 249ba69cb Author: Karel Zak Date: Wed Dec 21 10:20:44 2022 +0100 Merge branch 'lsns-ioctl-enotty' of https://github.com/t-8ch/util-linux * 'lsns-ioctl-enotty' of https://github.com/t-8ch/util-linux: lsns: report unsupported ioctl commit 6c01cce46d4cc217ebc25ea5652903ea3e812876 Merge: 6ccea1646 2a80192f0 Author: Karel Zak Date: Wed Dec 21 10:19:17 2022 +0100 Merge branch 'mkswap/endianness' of https://github.com/t-8ch/util-linux * 'mkswap/endianness' of https://github.com/t-8ch/util-linux: mkswap: create files with specific endianness mkswap: add tests commit 6ccea1646019009156d98011b01ccee3c94da2a5 Merge: adcfe57a7 b70815514 Author: Karel Zak Date: Wed Dec 21 10:16:34 2022 +0100 Merge branch 'fssize-swap' of https://github.com/t-8ch/util-linux * 'fssize-swap' of https://github.com/t-8ch/util-linux: blkid: swap: test big endian swapfile libblkid: swap: report fssize libblkid: swap: report fsblocksize libblkid: swap: report endianess commit adcfe57a7edff740ebdd67737fab2894d5b0fdc6 Merge: 97be86cf2 b59226663 Author: Karel Zak Date: Wed Dec 21 10:15:07 2022 +0100 Merge branch 'fssize' of https://github.com/t-8ch/util-linux * 'fssize' of https://github.com/t-8ch/util-linux: libblkid: iso9660: read block size from superblock iso9660.h: avoid undefined signed integer shift iso9660.h: use more correct function types libblkid: ntfs: report fssize libblkid: ubifs: report fssize libblkid: f2fs: report fssize libblkid: erofs: report fssize libblkid: vfat: report fssize commit 97be86cf2d61c040442e63aae49efec8c15c3b1f Merge: 57df0c0fb c47031ed4 Author: Karel Zak Date: Wed Dec 21 10:06:46 2022 +0100 Merge branch 'proc/byteorder' of https://github.com/t-8ch/util-linux * 'proc/byteorder' of https://github.com/t-8ch/util-linux: lscpu: add testcase for Linux 6.2 x86_64 tests: make mk-input.sh scripts executable tests: add ts_check_native_byteorder lscpu: test endianess sysfs: sysfs_get_byteorder: add context parameter lsfd: use runtime byteorder lscpu: use runtime byteorder sysfs: read runtime byteorder commit 249ba69cb1a407de80909b112ca5bf697d32e84c Author: Thomas Weißschuh Date: Thu Dec 15 16:26:51 2022 +0000 lsns: report unsupported ioctl sys-utils/lsns.8.adoc | 11 +++++++++++ sys-utils/lsns.c | 28 ++++++++++++++++++++-------- tests/ts/lsns/ioctl_ns | 5 +++++ 3 files changed, 36 insertions(+), 8 deletions(-) commit dfe3a759d9a13ed5046a7cc2a84054c6bab28173 Author: Thomas Weißschuh Date: Mon Dec 19 20:24:54 2022 +0000 wdctl: read options from sysfs sys-utils/wdctl.c | 1 + 1 file changed, 1 insertion(+) commit 1bf708e8b675e9c40d5e689c90a58e2bb9603088 Author: Thomas Weißschuh Date: Fri Nov 25 22:57:09 2022 +0100 wdctl: read firmware version from sysfs sys-utils/wdctl.c | 1 + 1 file changed, 1 insertion(+) commit 5e67b421a64003346d5d6f227ebdcbc935e2a144 Author: Chris Hofstaedtler Date: Sun Dec 18 18:42:04 2022 +0000 meson: install uuidd.rc with -Dsysvinit=enabled Signed-off-by: Chris Hofstaedtler meson.build | 5 +++++ meson_options.txt | 2 ++ misc-utils/meson.build | 10 ++++++++++ 3 files changed, 17 insertions(+) commit b2ae39f68206fe3b5dd150eb8e2ae7c1c1efec12 Author: Chris Hofstaedtler Date: Sun Dec 18 18:39:56 2022 +0000 meson: fix pkg-config name of libaudit Fedora and Debian seem to use "audit", not "libaudit". Signed-off-by: Chris Hofstaedtler meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c07f7b4e4f40996ee72031651bd99a603bb276ab Author: Chris Hofstaedtler Date: Sun Dec 18 18:55:01 2022 +0000 meson: fix build with -Dselinux=enabled Signed-off-by: Chris Hofstaedtler disk-utils/meson.build | 3 +++ lib/meson.build | 1 + libmount/meson.build | 11 +++++++---- login-utils/meson.build | 5 +---- meson.build | 1 + 5 files changed, 13 insertions(+), 8 deletions(-) commit eb09fc2eb1398e0ad3d76cf31c59390e2ba8af70 Author: Philip Hazelden Date: Sun Dec 18 16:40:34 2022 +0000 rename.1: document edge cases. Document the behaviour of an empty `expression` argument, and of `/` in the `expression` and `replacement` arguments. I also tried to make it slightly clearer that `-s` changes where a symlink points, but doesn't change the thing that it points at. misc-utils/rename.1.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 2a80192f027eed952c8ecee68ecc9676971f31db Author: Thomas Weißschuh Date: Thu Dec 15 13:32:31 2022 +0000 mkswap: create files with specific endianness disk-utils/mkswap.8.adoc | 3 +++ disk-utils/mkswap.c | 45 ++++++++++++++++++++++++++++++++++++++++----- tests/ts/mkswap/mkswap | 36 ++++++++++++++++++++++++------------ 3 files changed, 67 insertions(+), 17 deletions(-) commit beeb49b16f2cb8262e5a79fa4ace117ccd9ae5ee Author: Thomas Weißschuh Date: Thu Dec 15 13:08:18 2022 +0000 mkswap: add tests tests/ts/mkswap/BE-4096.img.xz | Bin 0 -> 180 bytes tests/ts/mkswap/BE-8192.img.xz | Bin 0 -> 192 bytes tests/ts/mkswap/LE-4096.img.xz | Bin 0 -> 180 bytes tests/ts/mkswap/LE-8192.img.xz | Bin 0 -> 192 bytes tests/ts/mkswap/mkswap | 53 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+) commit b7081551486d94707351f4f32001e6823e8a9245 Author: Thomas Weißschuh Date: Wed Dec 14 01:04:45 2022 +0000 blkid: swap: test big endian swapfile tests/expected/blkid/low-probe-swap1-big | 10 ++++++++++ tests/ts/blkid/images-fs/swap1-big.img.xz | Bin 0 -> 328 bytes 2 files changed, 10 insertions(+) commit b592266638e544aff7b123cb822c3e9a979ff730 Author: Thomas Weißschuh Date: Wed Nov 30 04:17:19 2022 +0100 libblkid: iso9660: read block size from superblock libblkid/src/superblocks/iso9660.c | 15 +++++++++++---- tests/expected/blkid/low-probe-iso | 1 + .../blkid/low-probe-iso-different-iso-joliet-label | 1 + tests/expected/blkid/low-probe-iso-joliet | 1 + tests/expected/blkid/low-probe-iso-multi-genisoimage-0 | 1 + tests/expected/blkid/low-probe-iso-multi-genisoimage-174 | 1 + tests/expected/blkid/low-probe-iso-multi-genisoimage-348 | 1 + tests/expected/blkid/low-probe-iso-rr-joliet | 1 + tests/expected/blkid/low-probe-iso-unicode-long-label | 1 + 9 files changed, 19 insertions(+), 4 deletions(-) commit 893fe60d0b8f14d9a3022f6f95637e43b17f1b8b Author: Thomas Weißschuh Date: Tue Dec 13 02:40:02 2022 +0000 iso9660.h: avoid undefined signed integer shift When the high bit in p[3] is set we would overflow our signed 4-byte integer result value. Force an unsigned type instead. include/iso9660.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9fc18efe956956be078fbbcea2144f0bb1b33b30 Author: Thomas Weißschuh Date: Tue Dec 13 02:38:27 2022 +0000 iso9660.h: use more correct function types include/iso9660.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 56ce8f610367c6fb5847060b39a06ecfcbf0f0ca Author: David Anes Date: Tue Dec 13 11:02:36 2022 +0100 renice: support posix-compliant -n (via POSIXLY_CORRECT) and add --relative flag As noted in bug #1892, renice is not 100% posix compliant as the '-n' option should update the priority 'relative' to the current priority. As such change would break compatibility, the current approach was taken: - donice() has now a new param to denote if priority is absolute or relative. - main() interprets '-n' as absolute if environment variable POSIXLY_CORRECT is **not set**. Otherwise, it uses a relative value, as POSIX mandates. - The option '--priority' is left as it is: uses an absolute value. - A new option '--relative' is added, should a user want a posix compatible variant without setting up an environment variable. - manpage is updated to display all these changes. After this patch: - Calling renice with '-n 2' on a process with current priority '2' and POSIXLY_CORRECT, will try to update it to priority '4', instead of '2'. - Calling renice with '--priority 2' on a process with current priority '2', leaves the process at priority '2'. - Calling renice with '--relative 2' on a process with current priority '2' will try to update the it to priority '4', regardless of environment flags. sys-utils/renice.1.adoc | 16 +++++++++++++--- sys-utils/renice.c | 51 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 54 insertions(+), 13 deletions(-) commit b5f1612515be3729318a6d962e62edcf7542a43f Author: Thomas Weißschuh Date: Tue Nov 29 04:26:02 2022 +0100 libblkid: swap: report fssize libblkid/src/superblocks/swap.c | 4 ++++ tests/expected/blkid/low-probe-swap1 | 1 + 2 files changed, 5 insertions(+) commit 7bffba2b90ac620caae08bbeea23fb3d5673e516 Author: Thomas Weißschuh Date: Wed Dec 14 00:30:25 2022 +0000 libblkid: swap: report fsblocksize libblkid/src/superblocks/swap.c | 21 +++++++++++++-------- tests/expected/blkid/low-probe-swap1 | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) commit 1b883507b4d25537e079b840bda8ef7b0f76d549 Author: Thomas Weißschuh Date: Wed Dec 14 00:13:19 2022 +0000 libblkid: swap: report endianess libblkid/src/superblocks/swap.c | 9 +++++++++ tests/expected/blkid/low-probe-swap1 | 1 + 2 files changed, 10 insertions(+) commit 171700a2c937179a06eea05baa93404ec7011a96 Author: Thomas Weißschuh Date: Wed Nov 30 04:49:04 2022 +0100 libblkid: ntfs: report fssize libblkid/src/superblocks/ntfs.c | 1 + tests/expected/blkid/low-probe-ntfs | 1 + 2 files changed, 2 insertions(+) commit bcfef878cc55b64b309ac51c17eab61eb159c601 Author: Thomas Weißschuh Date: Wed Nov 30 04:11:39 2022 +0100 libblkid: ubifs: report fssize libblkid/src/superblocks/ubifs.c | 3 +++ tests/expected/blkid/low-probe-ubifs | 1 + 2 files changed, 4 insertions(+) commit d3b7b882aef42f9399aa7990eda0a6c7b0e3540f Author: Thomas Weißschuh Date: Wed Nov 30 03:38:16 2022 +0100 libblkid: f2fs: report fssize libblkid/src/superblocks/f2fs.c | 6 ++++-- tests/expected/blkid/low-probe-f2fs | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit b0dd082a8afeab6e0d047a0adc69d6186c18f6c9 Author: Thomas Weißschuh Date: Wed Nov 30 04:33:00 2022 +0100 libblkid: erofs: report fssize libblkid/src/superblocks/erofs.c | 1 + tests/expected/blkid/low-probe-erofs | 1 + 2 files changed, 2 insertions(+) commit 67dc634fe2f241fa7b54a18a4416037eeee5e99c Author: Thomas Weißschuh Date: Tue Nov 29 04:14:33 2022 +0100 libblkid: vfat: report fssize libblkid/src/superblocks/vfat.c | 23 +++++++++++++--------- tests/expected/blkid/low-probe-fat | 1 + tests/expected/blkid/low-probe-fat16_noheads | 1 + tests/expected/blkid/low-probe-fat32_cp850_O_tilde | 1 + tests/expected/blkid/low-probe-fat32_label_64MB | 1 + .../expected/blkid/low-probe-fat32_mkdosfs_label1 | 1 + ...w-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME | 1 + ...low-probe-fat32_mkdosfs_label1_dosfslabel_empty | 1 + ...ow-probe-fat32_mkdosfs_label1_dosfslabel_label2 | 1 + .../low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME | 1 + .../low-probe-fat32_mkdosfs_label1_mlabel_erase | 1 + .../blkid/low-probe-fat32_mkdosfs_label1_xp_erase | 1 + .../blkid/low-probe-fat32_mkdosfs_label1_xp_label2 | 1 + tests/expected/blkid/low-probe-fat32_mkdosfs_none | 1 + ...low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME | 1 + .../low-probe-fat32_mkdosfs_none_dosfslabel_label1 | 1 + ...-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 | 1 + .../blkid/low-probe-fat32_mkdosfs_none_xp_label1 | 1 + ...-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 | 1 + tests/expected/blkid/low-probe-fat32_xp_label1 | 1 + tests/expected/blkid/low-probe-fat32_xp_none | 1 + .../low-probe-fat32_xp_none_dosfslabel_label1 | 1 + .../blkid/low-probe-fat32_xp_none_mlabel_label1 | 1 + tests/expected/blkid/low-probe-small-fat32 | 1 + 24 files changed, 37 insertions(+), 9 deletions(-) commit 57df0c0fb073bd1c9a1484d8ed09bb3fd8ba4577 Author: Karel Zak Date: Tue Dec 13 17:59:35 2022 +0100 build0sys: fix make dist Signed-off-by: Karel Zak include/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 13e58aa78d28d63fdef96cc988a05b8be3427bab Author: Karel Zak Date: Tue Dec 13 16:46:42 2022 +0100 chsh: add -V, update usage() * don't use deprecated -u in usage() (deprecated since 631a195412, v2.30) * use -V for --version; deprecate -v * add info about deprecated options to the man page Addresses: https://github.com/util-linux/util-linux/pull/1954 Signed-off-by: Karel Zak login-utils/chsh.1.adoc | 10 +++++++++- login-utils/chsh.c | 12 +++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) commit 0222a2ca0589fdf1a32fe114d0cd9c54617dbf18 Author: Karel Zak Date: Tue Dec 13 16:41:34 2022 +0100 chfn: use -V for version Let's use more compatible -V for --version and mark -v as deprecated. Addresses: https://github.com/util-linux/util-linux/pull/1954 Signed-off-by: Karel Zak login-utils/chfn.1.adoc | 9 ++++++++- login-utils/chfn.c | 9 +++++---- 2 files changed, 13 insertions(+), 5 deletions(-) commit b9f38957c5f778a03be5e795fbc91cb03ba86ae4 Merge: 090c98521 d379b4479 Author: Karel Zak Date: Tue Dec 13 16:15:00 2022 +0100 Merge branch 'master' of https://github.com/kraptor/util-linux * 'master' of https://github.com/kraptor/util-linux: tests: fix typo in comment commit 090c98521a86c3e366d79a25dc3ffe419752af50 Merge: 9018fedc2 fc435930d Author: Karel Zak Date: Tue Dec 13 16:14:03 2022 +0100 Merge branch 'ci/llvm' of https://github.com/t-8ch/util-linux * 'ci/llvm' of https://github.com/t-8ch/util-linux: ci: update llvm to version 15 libfdisk: remove unused variable ct clang: ignore -Wunused-but-set-variable build: warn about old-style definitions lsblk: align function prototype commit 9018fedc2c5a73d585337f503caea80e9de3b430 Merge: 069264ac4 4b7244699 Author: Karel Zak Date: Tue Dec 13 16:10:08 2022 +0100 Merge branch 'shells.c' of https://github.com/t-8ch/util-linux * 'shells.c' of https://github.com/t-8ch/util-linux: meson: link shells.c into users of is_known_shell meson: remove leftover explicit mentions of logindefs.c commit 069264ac4b6e0d37805dd155ab67b2cbfb843a1d Merge: ca25874fa 773a1fe3f Author: Karel Zak Date: Tue Dec 13 16:09:03 2022 +0100 Merge branch 'blkid-fvault2' of https://github.com/mbroz/util-linux * 'blkid-fvault2' of https://github.com/mbroz/util-linux: libblkid: Add detection of FileVault2 partitions commit d379b447999d7532966f91c92eb967b1ad1ecee1 Author: David Anes Date: Tue Dec 13 09:55:03 2022 +0100 tests: fix typo in comment tests/functions.sh | 2 +- tests/ts/minix/fsck | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fc435930d29f6ca5c3e62daf71b76e5490b69b90 Author: Thomas Weißschuh Date: Mon Dec 12 19:34:23 2022 +0000 ci: update llvm to version 15 Version 10 is not available from their apt repo anymore. Update to the latest available version. .github/workflows/cibuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b047d79f162fb5eb9ba9d66ebf558d88c0267f55 Author: Thomas Weißschuh Date: Mon Dec 12 21:07:31 2022 +0000 libfdisk: remove unused variable ct libfdisk/src/script.c | 2 -- 1 file changed, 2 deletions(-) commit 0a5c826613bc57a4fd0741f6b7e0467451444db4 Author: Thomas Weißschuh Date: Mon Dec 12 20:33:39 2022 +0000 clang: ignore -Wunused-but-set-variable sys-utils/hwclock-parse-date.y | 7 +++++++ 1 file changed, 7 insertions(+) commit 9df5ac34495b347da5b99a00e6db9a58fa6212ed Author: Thomas Weißschuh Date: Mon Dec 12 20:11:56 2022 +0000 build: warn about old-style definitions configure.ac | 1 + meson.build | 1 + 2 files changed, 2 insertions(+) commit ef5d0cfe92fdc38e847130c99ef97535c8eef187 Author: Thomas Weißschuh Date: Mon Dec 12 19:54:59 2022 +0000 lsblk: align function prototype misc-utils/lsblk-devtree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b72446996b269b9fdbd5ffeadf98ced893a7df4 Author: Thomas Weißschuh Date: Mon Dec 12 19:07:03 2022 +0000 meson: link shells.c into users of is_known_shell meson.build | 3 +++ 1 file changed, 3 insertions(+) commit d3bc669d8a4989252eb8e751f419a66aee1817a6 Author: Thomas Weißschuh Date: Mon Dec 12 19:04:21 2022 +0000 meson: remove leftover explicit mentions of logindefs.c This is now handled as part of the logindefs_c library. meson.build | 3 --- 1 file changed, 3 deletions(-) commit 773a1fe3f14e55309bc066dfea183cb750bd1684 Author: Milan Broz Date: Mon Dec 12 16:45:15 2022 +0100 libblkid: Add detection of FileVault2 partitions FileVault is full disk encryption format based on Apple Core Storage, used in older macOS versions. This patch allows automatic detection of Core Storage partition to be later used with existing cryptsetup support for FileVault2. Note that we intentionally ignore generic Core Storage; only specific configuration is detected as cs_fvault2 type here. Signed-off-by: Milan Broz libblkid/meson.build | 1 + libblkid/src/Makemodule.am | 1 + libblkid/src/superblocks/cs_fvault2.c | 104 +++++++++++++++++++++++++++++ libblkid/src/superblocks/superblocks.c | 1 + libblkid/src/superblocks/superblocks.h | 1 + tests/expected/blkid/low-probe-cs_fvault2 | 5 ++ tests/ts/blkid/images-fs/cs_fvault2.img.xz | Bin 0 -> 200 bytes 7 files changed, 113 insertions(+) commit ca25874fad41d5f8c27e3646970ed28d397958b3 Author: Seth Bromberger Date: Mon Dec 12 09:23:40 2022 -0500 Update fstrim.8.adoc The `-v` option is for "verbose", and the mountpoint is generally required if none of the "all" options are specified. sys-utils/fstrim.8.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5099e004b486e7c4f7153abc9843f49c1593fe66 Author: Karel Zak Date: Mon Dec 12 10:05:04 2022 +0100 lib/shells: make sure line does not start with '#' It's probably unnecessary, but better safe than sorry. The original is_restricted_shell() from su(1) uses this check. Signed-off-by: Karel Zak lib/shells.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 938755b9e8eb6845710b2c324c68f9c9278ae76f Merge: 0ac5200cc 825feef84 Author: Karel Zak Date: Mon Dec 12 10:03:50 2022 +0100 Merge branch 'usr_etc_shells' of https://github.com/schubi2/util-linux * 'usr_etc_shells' of https://github.com/schubi2/util-linux: Supporting vendor given "shells" configuration file commit 0ac5200cc702281539669d5348647b1927569dfb Author: David Anes Date: Mon Dec 12 07:06:05 2022 +0100 tests: fix typo in comment tests/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 057579455a40d0cc7612938aa3d11a02b279e89c Author: David Anes Date: Fri Dec 9 18:09:31 2022 +0100 tests: allow paths in tests to contain '@' char Tests fail when the build directory contains '@' in its path, as its sent to 'sed' unescaped. This patch allows to build in such environments, which typically happen on automated systems (for example, when building concurrently with Jenkins). tests/functions.sh | 4 +++- tests/ts/minix/fsck | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 857038d4512a5f2e9a1fd4a3d89c2c27eae456fd Author: Karel Zak Date: Fri Dec 9 11:28:25 2022 +0100 tests: use KNOWN_FAIL for lsns/ioctl_ns It seems 32bit userspace on 64bit kernel return ENOTTY for NS_GET_USERNS ioctl (for example when execute tests in mock environment). Addresses: https://github.com/util-linux/util-linux/pull/1924 Signed-off-by: Karel Zak tests/ts/lsns/ioctl_ns | 9 +++++++++ 1 file changed, 9 insertions(+) commit 85a956a709bc2447dbc905177bd51b261d662722 Author: Karel Zak Date: Thu Dec 8 11:12:47 2022 +0100 hardlink: cleanup options * add missing stuff to bash-completion * reorder --help output * reorder man page Signed-off-by: Karel Zak bash-completion/hardlink | 41 ++++++++++++++++- misc-utils/hardlink.1.adoc | 109 +++++++++++++++++++++++---------------------- misc-utils/hardlink.c | 41 +++++++++-------- 3 files changed, 114 insertions(+), 77 deletions(-) commit a9b1dfd945aba1edf2d0af240918eb651f5f0098 Author: Karel Zak Date: Thu Dec 8 10:49:45 2022 +0100 hardlink: add --respect-dir Fixes: https://github.com/util-linux/util-linux/issues/1942 Signed-off-by: Karel Zak misc-utils/hardlink.1.adoc | 3 ++ misc-utils/hardlink.c | 75 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 66 insertions(+), 12 deletions(-) commit 4cf6f545ee28fe468efcb1000704055207cfabcd Author: Karel Zak Date: Wed Dec 7 11:43:20 2022 +0100 blkdiscard: add extra exit code when device does not support discard Fixes: https://github.com/util-linux/util-linux/issues/1941 Signed-off-by: Karel Zak sys-utils/blkdiscard.8.adoc | 16 +++++++++++++++- sys-utils/blkdiscard.c | 20 +++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) commit 21a73da6c6edee42e335f6b93a83e1d9fb348dde Author: Karel Zak Date: Wed Dec 7 11:13:48 2022 +0100 bash-completion: add blkdiscard --quiet Signed-off-by: Karel Zak bash-completion/blkdiscard | 1 + 1 file changed, 1 insertion(+) commit dde842e24d1507330405c05d4160f120ce17d48e Author: Karel Zak Date: Wed Dec 7 11:12:13 2022 +0100 blkdiscard: sort options Signed-off-by: Karel Zak sys-utils/blkdiscard.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8edaa1e1237c4bd65561e96b90435a6c4b9c4784 Author: Karel Zak Date: Wed Dec 7 11:11:08 2022 +0100 blkdiscard: add --quiet Addresses: https://github.com/util-linux/util-linux/issues/1941 Signed-off-by: Karel Zak sys-utils/blkdiscard.8.adoc | 3 +++ sys-utils/blkdiscard.c | 29 +++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) commit 870235d012d90000ab9596d05a32a958aee7e117 Author: Karel Zak Date: Wed Dec 7 10:17:07 2022 +0100 build-sys: add hint to have_pty check Fixes: https://github.com/util-linux/util-linux/issues/1943 Signed-off-by: Karel Zak configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08431acdf5b3accd0887ab550bfa4efabed751d6 Author: Karel Zak Date: Mon Dec 5 12:51:03 2022 +0100 tests: add SPDX-License-Identifier to helper The default util-linux license is GPL-2.0-or-later. The header is missing in some files or quotation from the license is incomplete. It seem the best is to use the License-Identifier header to make things more obvious and readable for code analyzers, etc. Fixes: https://github.com/util-linux/util-linux/issues/1932 Signed-off-by: Karel Zak tests/helpers/test_byteswap.c | 5 ++--- tests/helpers/test_mbsencode.c | 13 ++----------- tests/helpers/test_md5.c | 6 +++++- tests/helpers/test_sha1.c | 6 +++++- tests/helpers/test_sigreceive.c | 15 ++------------- tests/helpers/test_strerror.c | 5 ++--- tests/helpers/test_sysinfo.c | 2 ++ tests/helpers/test_tiocsti.c | 15 ++------------- tests/helpers/test_uuid_namespace.c | 5 +++++ 9 files changed, 27 insertions(+), 45 deletions(-) commit 5bd28f494ece506daa58861bf46e726c3958021e Author: Karel Zak Date: Mon Dec 5 12:36:42 2022 +0100 ldattach: fix --intro-command and --pause The long version of the command line options should not ignore arguments. Fixes: https://github.com/util-linux/util-linux/issues/1940 Signed-off-by: Karel Zak sys-utils/ldattach.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa98613e4ef710887c654f32d8b08f77672b0021 Author: Karel Zak Date: Mon Dec 5 12:03:19 2022 +0100 libblkid: add BLKID_SUBLKS_FSINFO to docs Signed-off-by: Karel Zak libblkid/docs/libblkid-sections.txt | 1 + 1 file changed, 1 insertion(+) commit 69b73820d43fb7005fca33d135531cbcdc60e8cf Author: Karel Zak Date: Mon Dec 5 11:57:13 2022 +0100 libblkid: cleanup definitions and add docs for return values * make it possible to use #ifdef for the return values * add docs for the return values Addresses: https://github.com/util-linux/util-linux/issues/1939 Signed-off-by: Karel Zak libblkid/docs/libblkid-sections.txt | 4 ++++ libblkid/src/blkid.h.in | 31 +++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) commit 2bd739c926172fd4331bcf60da9029548ef8af9a Author: Karel Zak Date: Fri Dec 2 09:20:18 2022 +0100 libblkid: define probing return values Don't use magic numbers in library and applications code. Fixes: https://github.com/util-linux/util-linux/issues/1939 Signed-off-by: Karel Zak libblkid/src/blkid.h.in | 7 +++++ libblkid/src/blkidP.h | 3 -- libblkid/src/probe.c | 53 +++++++++++++++++++--------------- libblkid/src/superblocks/superblocks.c | 2 +- 4 files changed, 37 insertions(+), 28 deletions(-) commit 25b98aedc3076b9f17f8ff0086c98c297a0f21b6 Author: Karel Zak Date: Thu Dec 1 16:40:57 2022 +0100 tests: be explicit with ext2 block size Signed-off-by: Karel Zak tests/expected/blkid/offset | 6 +++--- tests/ts/blkid/offset | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4073f239d0254884910d52eaf91b9695a6764900 Merge: 92c12e372 d79ec90b8 Author: Karel Zak Date: Thu Dec 1 15:56:45 2022 +0100 Merge branch 'autotools/show-diff' of https://github.com/t-8ch/util-linux * 'autotools/show-diff' of https://github.com/t-8ch/util-linux: autotools: show test failure diff commit 92c12e372af2d74a81fd14860ec59a72085ffac9 Merge: 101a09813 115c02fe8 Author: Karel Zak Date: Thu Dec 1 15:55:24 2022 +0100 Merge branch 'lsfd--fix-format-to-scan-maps' of https://github.com/masatake/util-linux * 'lsfd--fix-format-to-scan-maps' of https://github.com/masatake/util-linux: lsfd: consider 64bit addresses when scanning /proc/pid/map_files dir commit 101a0981325e9bbf5ed5e4b65a40b886b3cd302c Merge: db0f70fd4 0333c40b2 Author: Karel Zak Date: Thu Dec 1 15:54:53 2022 +0100 Merge branch 'meson/econf' of https://github.com/t-8ch/util-linux * 'meson/econf' of https://github.com/t-8ch/util-linux: meson: logindefs.c: handle libeconf dependency commit db0f70fd47e5f0b3b08e7af6f784df11d69d4f68 Author: Karel Zak Date: Thu Dec 1 15:08:19 2022 +0100 tests: add blkid --offset test Signed-off-by: Karel Zak tests/expected/blkid/offset | 41 ++++++++++++++++++++++++++++++++ tests/ts/blkid/offset | 58 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) commit d79ec90b89f9a33179a39f5ddad380492242ed4e Author: Thomas Weißschuh Date: Wed Nov 30 05:57:12 2022 +0100 autotools: show test failure diff This helps investigating issues, especially spurious errors only happening during CI like the failure of "hardlink/options-maximum-size-8192" tests/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 115c02fe88941ad296e1fced13a70de5ee5f0f87 Author: Masatake YAMATO Date: Wed Nov 30 14:55:32 2022 +0900 lsfd: consider 64bit addresses when scanning /proc/pid/map_files dir Close #1930. The original code assumed 48bit addresses. This assumption came from linux running on x86_64. As reported in #1930, Linux on sparc64 uses 64bit addresses. Tested-by: Anatoly Pugachev Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0333c40b299ee57be5875c2e2cf830e9689bf67f Author: Thomas Weißschuh Date: Wed Nov 30 05:30:31 2022 +0100 meson: logindefs.c: handle libeconf dependency lib/meson.build | 6 +++++- login-utils/meson.build | 6 ++---- meson.build | 15 ++++++++------- term-utils/meson.build | 3 +-- 4 files changed, 16 insertions(+), 14 deletions(-) commit 825feef84656128361a8738398e1643e9edca31a Author: Stefan Schubert Date: Tue Nov 29 16:55:04 2022 +0100 Supporting vendor given "shells" configuration file include/shells.h | 6 ++++ lib/shells.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++ login-utils/Makemodule.am | 11 ++++++-- login-utils/chsh.c | 23 +-------------- login-utils/su-common.c | 17 +++++------ 5 files changed, 94 insertions(+), 35 deletions(-) commit 22147e08c98731a9c5fe284ab3063b46347ec579 Author: Ian Kent Date: Thu Nov 24 16:54:19 2022 +0800 libmount: use autofs mount hint to ignore autofs mount entries Historically autofs mounts were not included in mount table listings. This is the case in other SysV autofs implementations and was also the case with Linux autofs. But now that /etc/mtab is a symlink to the proc filesystem mount table the autofs mount entries appear in the mount table on Linux. Prior to the symlinking of /etc/mtab mount table it was sufficient to call mount(2) and simply not update /etc/mtab to exclude autofs mounts from mount listings. Also, with this symlinking of /etc/mtab we have seen a shift in usage toward using the proc mount tables directly. But the autofs mount entries need to be retained when coming from the proc file system for applications that need them (such as systemd) so filtering out these entries within the kernel itself can't be done, it needs be done in user space. There are three reasons to omit the autofs mount entries. One is that certain types of auto-mounts have an autofs mount for every entry in their autofs mount map (autofs direct mounts) and these maps can be quite large. This leads to mount table listings containing a lot of unnecessary entries. Also, this difference in behaviour between autofs implementations can cause problems for applications that need to use the mount table and expect autofs entries aren't present. Lastly, there's very little that user space can do with autofs mount entries since this must be left to the autofs mount owner, typically the automount daemon. And it can also lead to attempts to access automount managed paths resulting in mounts being triggered when they aren't needed or mounts staying mounted for much longer thay they need to be. So the Linux autofs file system has been modified to accept a pseudo mount option of "ignore" (as is used in other OS implementations) so that user space utilities can use this as a hint to skip these autofs entries on reading the mount table. The Linux autofs automount daemon used getmntent(3) itself and has been modified to use the proc file system directly so that it isn't affected by the presence of the "ignore" mount option. The use of the "ignore" mount option is opt-in by autofs users and a configuration option has been added which defaults to not use the option so if there are applications that need these entries, other than autofs itself, they can be retained. Also, since this filtering is based on an added mount option earlier versions of Linux autofs and other autofs file system users will not use the option and so won't be affected by the change. Changes in v2: - make naming consistent with util-linux conventions. - make ignoring autofs mount entries the default since it will only have an effect if it has been enabled in the autofs configuration. - drop patch to set ingore autofs mounts for mount(8) since it's now default. Signed-off-by: Ian Kent libmount/src/context.c | 24 ++++++++++++++++++++++++ libmount/src/libmount.h.in | 2 ++ libmount/src/libmount.sym | 3 +++ libmount/src/mountP.h | 7 ++++++- libmount/src/tab_parse.c | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) commit d739298044c5f83b12965676edbb94d78af7312e Author: Thomas Weißschuh Date: Tue Nov 29 03:46:18 2022 +0100 libblkid: squashfs: report filesystem size libblkid/src/superblocks/squashfs.c | 1 + tests/expected/blkid/low-probe-squashfs4 | 1 + 2 files changed, 2 insertions(+) commit a74662730905fbea9684190e2f1eb611729697fc Author: Thomas Weißschuh Date: Tue Nov 29 03:44:11 2022 +0100 libblkid: squashfs: report block sizes libblkid/src/superblocks/squashfs.c | 2 ++ tests/expected/blkid/low-probe-squashfs4 | 2 ++ 2 files changed, 4 insertions(+) commit b9f19aceb58d6805b779d05d50a254099518f5bd Author: Thomas Weißschuh Date: Tue Nov 29 03:41:37 2022 +0100 libblkid: squashfs: add more superblock fields Also rename the existing fields to match the documentation. We use the Version 4 fields because we will use those in a future commit. Field names taken from https://dr-emann.github.io/squashfs/squashfs.html#_the_superblock libblkid/src/superblocks/squashfs.c | 40 +++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 15 deletions(-) commit 1325de1756ba22af7fcbd1c14631748b0ad17de4 Author: Karel Zak Date: Mon Nov 28 09:47:18 2022 +0100 rename: (bash-completion) fix typo Fixes: https://github.com/util-linux/util-linux/issues/1928 Signed-off-by: Karel Zak bash-completion/rename | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd86efc9c31d7509f57d2347a0862f8ae6bc99e4 Merge: 73a96af6e b02fc9683 Author: Karel Zak Date: Mon Nov 28 09:29:26 2022 +0100 Merge branch 'bcache/pack' of https://github.com/t-8ch/util-linux * 'bcache/pack' of https://github.com/t-8ch/util-linux: libblkid: bcache: pack superblock struct commit c47031ed4743868667afba63c01828d9cd92f2eb Author: Thomas Weißschuh Date: Thu Nov 24 17:53:15 2022 +0100 lscpu: add testcase for Linux 6.2 x86_64 It contains the new file /sys/kernel/cpu_byteorder that lscpu will use to read the actual byteorder. tests/expected/lscpu/lscpu-x86_64-64cpu-linux6.2 | 62 ++++++++++++++++++++++ tests/ts/lscpu/dumps/x86_64-64cpu-linux6.2.tar.gz | Bin 0 -> 39020 bytes 2 files changed, 62 insertions(+) commit 6279c3f1082ea753dcb11a73d46007ed3b116635 Author: Thomas Weißschuh Date: Thu Nov 24 17:42:00 2022 +0100 tests: make mk-input.sh scripts executable tests/ts/lsblk/mk-input.sh | 0 tests/ts/lscpu/mk-input.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) commit 104b265f5f45f1faa9f1275767536d3187115e47 Author: Thomas Weißschuh Date: Fri Nov 18 17:40:15 2022 +0100 tests: add ts_check_native_byteorder This can be used to skip tests that require that the machine executing the tests has the same byteorder as the test executable. Useful for tests emulated with qemu-user. tests/functions.sh | 6 ++++++ tests/ts/lsfd/mkfds-tcp | 2 +- tests/ts/lsfd/mkfds-udp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit f145492fa871a5a08f466aae27886c2ddccec402 Author: Thomas Weißschuh Date: Thu Nov 24 17:38:58 2022 +0100 lscpu: test endianess sys-utils/lscpu.c | 12 +++++++++++- sys-utils/lscpu.h | 1 + tests/ts/lscpu/lscpu | 6 ++++-- tests/ts/lscpu/mk-input.sh | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) commit 7578e03f12b8907706d28cb49f1b8c62f0597a9a Author: Thomas Weißschuh Date: Thu Nov 17 02:50:40 2022 +0100 sysfs: sysfs_get_byteorder: add context parameter This can be used to read the file /sys/kernel/cpu_byteorder from an alternative root-directory. include/sysfs.h | 2 +- lib/sysfs.c | 4 ++-- misc-utils/lsfd-sock-xinfo.c | 2 +- sys-utils/lscpu.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit db79a10027b06d064a7ecd6cddf6641da6bb2ae4 Author: Thomas Weißschuh Date: Sun Oct 30 18:57:30 2022 +0100 lsfd: use runtime byteorder misc-utils/lsfd-sock-xinfo.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 0e3858fc47231e688d65247a1a226c71745796bf Author: Thomas Weißschuh Date: Sun Oct 30 16:06:37 2022 +0100 lscpu: use runtime byteorder sys-utils/lscpu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 3672d2beeedd4d55cb310c47c1adb91adc759cf3 Author: Thomas Weißschuh Date: Sun Oct 30 19:12:21 2022 +0100 sysfs: read runtime byteorder include/pathnames.h | 1 + include/sysfs.h | 6 ++++++ lib/sysfs.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit b02fc968335870fd8a91ab04e633a54c2c8d38c4 Author: Thomas Weißschuh Date: Fri Nov 25 14:51:14 2022 +0100 libblkid: bcache: pack superblock struct libblkid/src/superblocks/bcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73a96af6ec4256066cb68b0a28f635b441413d3f Author: Thomas Weißschuh Date: Mon Nov 21 03:19:16 2022 +0100 dmesg: allow specification of level range include/strutils.h | 3 +- lib/strutils.c | 24 +++++- sys-utils/dmesg.1.adoc | 8 ++ sys-utils/dmesg.c | 5 +- tests/expected/dmesg/console-levels | 144 ++++++++++++++++++++++++++++++++++++ tests/ts/dmesg/console-levels | 6 ++ 6 files changed, 185 insertions(+), 5 deletions(-) commit 0cd9d2993d66bedb57ec07e55eeb2938ce231df6 Merge: 6b65147da 2a71e291d Author: Karel Zak Date: Thu Nov 24 20:52:30 2022 +0100 Merge branch 'fix-exfat2' of https://github.com/mbroz/util-linux * 'fix-exfat2' of https://github.com/mbroz/util-linux: libblkid: fix misaligned-address in probe_exfat commit 6b65147daad485d6e9f7c4fe99e4bad8aebf1370 Merge: 7155e836d c5eb81b39 Author: Karel Zak Date: Thu Nov 24 20:51:32 2022 +0100 Merge branch 'lsfd-nsfs' of https://github.com/masatake/util-linux * 'lsfd-nsfs' of https://github.com/masatake/util-linux: lsfd: show extra information returned from ioctl(..., NS_GET_NSTYPE) lsfd: collect namespace files after collecting information about "nodev" fs lsfd: introduce is_mapped_file macro lsfd: introduce is_opened_file macro commit 2a71e291d0fe247d7ca62775e47865dda4b2acfd Author: Milan Broz Date: Thu Nov 24 10:54:01 2022 +0100 libblkid: fix misaligned-address in probe_exfat Value checked in le32_to_cpu() needs to be properly aligned. Just copy the value temporarily for conversion. Fix OSS-Fuzz issue 53696 libblkid/src/superblocks/exfat.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c5eb81b39d1d298c8e07a31ce8fccf69dcf3e5fa Author: Masatake YAMATO Date: Fri Nov 11 06:09:57 2022 +0900 lsfd: show extra information returned from ioctl(..., NS_GET_NSTYPE) lsfd uses the information to fill the newly added NS.TYPE and NS.NAME columns: # ./lsfd -oCOMMAND,PID,USER,ASSOC,SOURCE,MNTID,NS.TYPE,NS.NAME,NAME -Q '(FD >= 0) and (SOURCE == "nsfs")' COMMAND PID USER ASSOC SOURCE MNTID NS.TYPE NS.NAME NAME NetworkManager 1114 root 8 nsfs 3 net net:[4026531840] net:[4026531840] NetworkManager 1114 root 9 nsfs 3 mnt mnt:[4026532758] mnt:[4026532758] lsfd 14379 root 3 nsfs 3 net net:[4026531840] net:[4026531840] podman 1532759 root 7 nsfs 1546 net net:[4026533029] /run/netns/netns-4f5ecc46-d6a0-175c-46a8-2e4ba180b94a Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 147 ++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 8 +++ misc-utils/lsfd.c | 18 ++++- misc-utils/lsfd.h | 5 +- tests/expected/lsfd/mkfds-netns | 4 ++ tests/helpers/test_mkfds.c | 46 ++++++++++++- tests/ts/lsfd/mkfds-netns | 58 ++++++++++++++++ 7 files changed, 283 insertions(+), 3 deletions(-) commit fba9898fd5b1d20a2ed350b7b542d9f8a3597a0c Author: Masatake YAMATO Date: Wed Nov 23 15:41:57 2022 +0900 lsfd: collect namespace files after collecting information about "nodev" fs In my plan, lsfd will need the information of the backing device for "nsfs" file system before collecing the information about th namespaces associated with fds. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb3130759cdd8d94c76a539d28fce60bba58de6f Author: Masatake YAMATO Date: Fri Nov 11 06:02:00 2022 +0900 lsfd: introduce is_mapped_file macro Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 6 ++---- misc-utils/lsfd.h | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) commit c0f84bd12dc6925dab7d37da76360e35812baa30 Author: Masatake YAMATO Date: Fri Nov 11 05:54:28 2022 +0900 lsfd: introduce is_opened_file macro Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 8 ++++---- misc-utils/lsfd-sock.c | 2 +- misc-utils/lsfd.h | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) commit 7155e836defb336536d39dd9aed57770c55b1aa9 Author: Masatake YAMATO Date: Wed Nov 23 16:03:37 2022 +0900 tests: wrap $TS_{TOPDIR,SELF} in "." cmdline with double quote chars The command lines used for this change: $ cd tests/ts $ sed -i -e 's|. $TS_SELF/|. "$TS_SELF"/|' $(grep --exclude='*~' -lr -e '^\. \$TS_SELF/') $ sed -i -e 's|. $TS_TOPDIR/functions.sh|. "$TS_TOPDIR"/functions.sh|' $(grep --exclude='*~' -lr -e '^\. \$TS_TOPDIR/functions.sh') Signed-off-by: Masatake YAMATO tests/ts/bitops/swapbytes | 2 +- tests/ts/blkdiscard/offsets | 2 +- tests/ts/blkid/dm-err | 2 +- tests/ts/blkid/low-probe | 2 +- tests/ts/blkid/lowprobe-pt | 2 +- tests/ts/blkid/md-raid0-whole | 2 +- tests/ts/blkid/md-raid1-part | 2 +- tests/ts/blkid/md-raid1-whole | 2 +- tests/ts/build-sys/config | 2 +- tests/ts/cal/bigyear | 2 +- tests/ts/cal/color | 2 +- tests/ts/cal/colorw | 2 +- tests/ts/cal/jan1753 | 2 +- tests/ts/cal/month | 2 +- tests/ts/cal/sep1752 | 2 +- tests/ts/cal/vertical | 2 +- tests/ts/cal/weekarg | 2 +- tests/ts/cal/weeknum | 2 +- tests/ts/cal/year | 2 +- tests/ts/chfn/gecos | 2 +- tests/ts/col/io | 2 +- tests/ts/col/multibyte | 2 +- tests/ts/col/newlines | 2 +- tests/ts/col/options | 2 +- tests/ts/colcrt/functional | 2 +- tests/ts/colcrt/regressions | 2 +- tests/ts/colrm/rm2-2 | 2 +- tests/ts/column/columnate | 2 +- tests/ts/column/invalid-multibyte | 2 +- tests/ts/column/multi-file | 2 +- tests/ts/column/table | 2 +- tests/ts/cramfs/doubles | 2 +- tests/ts/cramfs/fsck-bad-header | 2 +- tests/ts/cramfs/fsck-endianness | 2 +- tests/ts/cramfs/mkfs | 2 +- tests/ts/cramfs/mkfs-endianness | 2 +- tests/ts/dmesg/colors | 2 +- tests/ts/dmesg/console-levels | 2 +- tests/ts/dmesg/decode | 2 +- tests/ts/dmesg/delta | 2 +- tests/ts/dmesg/facilities | 2 +- tests/ts/dmesg/indentation | 2 +- tests/ts/eject/umount | 2 +- tests/ts/fdisk/align-512-4K | 2 +- tests/ts/fdisk/align-512-4K-63 | 2 +- tests/ts/fdisk/align-512-4K-md | 2 +- tests/ts/fdisk/align-512-512 | 2 +- tests/ts/fdisk/align-512-512-topology | 2 +- tests/ts/fdisk/bsd | 2 +- tests/ts/fdisk/gpt | 2 +- tests/ts/fdisk/gpt-resize | 2 +- tests/ts/fdisk/id | 2 +- tests/ts/fdisk/mbr-dos-mode | 2 +- tests/ts/fdisk/mbr-nondos-mode | 2 +- tests/ts/fdisk/mbr-sort | 2 +- tests/ts/fdisk/oddinput | 2 +- tests/ts/fdisk/sunlabel | 2 +- tests/ts/fincore/count | 2 +- tests/ts/findmnt/filter | 2 +- tests/ts/findmnt/outputs | 2 +- tests/ts/findmnt/target | 2 +- tests/ts/fsck/ismounted | 2 +- tests/ts/fuzzers/test_blkid_fuzz | 2 +- tests/ts/fuzzers/test_fdisk_script_fuzz | 2 +- tests/ts/fuzzers/test_last_fuzz | 2 +- tests/ts/fuzzers/test_mount_fuzz | 2 +- tests/ts/getopt/basic | 2 +- tests/ts/getopt/options | 2 +- tests/ts/hardlink/options | 2 +- tests/ts/hexdump/format-strings | 2 +- tests/ts/hexdump/highlighting | 2 +- tests/ts/hwclock/systohc | 2 +- tests/ts/ipcs/headers | 2 +- tests/ts/ipcs/limits | 4 ++-- tests/ts/ipcs/limits2 | 4 ++-- tests/ts/ipcs/mk-rm-msg | 4 ++-- tests/ts/ipcs/mk-rm-sem | 4 ++-- tests/ts/ipcs/mk-rm-shm | 4 ++-- tests/ts/isosize/print-size | 2 +- tests/ts/libfdisk/gpt | 2 +- tests/ts/libfdisk/mkpart | 2 +- tests/ts/libfdisk/mkpart-full | 2 +- tests/ts/libmount/context | 2 +- tests/ts/libmount/context-py | 2 +- tests/ts/libmount/context-utab | 2 +- tests/ts/libmount/context-utab-py | 2 +- tests/ts/libmount/debug | 2 +- tests/ts/libmount/lock | 2 +- tests/ts/libmount/loop | 2 +- tests/ts/libmount/loop-overlay | 2 +- tests/ts/libmount/optstr | 2 +- tests/ts/libmount/tabdiff | 2 +- tests/ts/libmount/tabfiles | 2 +- tests/ts/libmount/tabfiles-py | 2 +- tests/ts/libmount/tabfiles-tags | 2 +- tests/ts/libmount/tabfiles-tags-py | 2 +- tests/ts/libmount/update | 2 +- tests/ts/libmount/update-py | 2 +- tests/ts/libmount/utils | 2 +- tests/ts/libsmartcols/fromfile | 2 +- tests/ts/libsmartcols/title | 2 +- tests/ts/logger/errors | 2 +- tests/ts/logger/formats | 2 +- tests/ts/logger/journald | 2 +- tests/ts/logger/options | 2 +- tests/ts/login/islocal | 2 +- tests/ts/login/logindefs | 2 +- tests/ts/look/separator | 2 +- tests/ts/losetup/losetup | 2 +- tests/ts/losetup/losetup-blkdev | 2 +- tests/ts/losetup/losetup-loop | 2 +- tests/ts/lsblk/lsblk | 2 +- tests/ts/lscpu/lscpu | 2 +- tests/ts/lsfd/column-kthread | 2 +- tests/ts/lsfd/mkfds-directory | 2 +- tests/ts/lsfd/mkfds-mapped-packet-socket | 4 ++-- tests/ts/lsfd/mkfds-pidfd | 2 +- tests/ts/lsfd/mkfds-pipe-no-fork | 2 +- tests/ts/lsfd/mkfds-ro-block-device | 4 ++-- tests/ts/lsfd/mkfds-ro-regular-file | 4 ++-- tests/ts/lsfd/mkfds-rw-character-device | 4 ++-- tests/ts/lsfd/mkfds-socketpair | 2 +- tests/ts/lsfd/mkfds-symlink | 2 +- tests/ts/lsfd/option-filter-broken-exp | 2 +- tests/ts/lsfd/option-pid | 2 +- tests/ts/lsfd/option-summary | 4 ++-- tests/ts/lsmem/lsmem | 2 +- tests/ts/lsns/ioctl_ns | 2 +- tests/ts/lsns/netnsid | 2 +- tests/ts/lsns/nsfs | 2 +- tests/ts/md5/md5 | 2 +- tests/ts/minix/fsck | 2 +- tests/ts/minix/fsck-images | 2 +- tests/ts/minix/mkfs | 2 +- tests/ts/misc/fallocate | 2 +- tests/ts/misc/flock | 2 +- tests/ts/misc/ionice | 2 +- tests/ts/misc/line | 2 +- tests/ts/misc/mbsencode | 2 +- tests/ts/misc/mcookie | 2 +- tests/ts/misc/mountpoint | 2 +- tests/ts/misc/pipesz | 2 +- tests/ts/misc/rev | 2 +- tests/ts/misc/setarch | 2 +- tests/ts/misc/setsid | 2 +- tests/ts/misc/strtosize | 2 +- tests/ts/misc/swaplabel | 2 +- tests/ts/misc/whereis | 2 +- tests/ts/more/regexp | 2 +- tests/ts/more/squeeze | 2 +- tests/ts/mount/devname | 2 +- tests/ts/mount/dm-verity | 2 +- tests/ts/mount/fslists | 2 +- tests/ts/mount/fstab-all | 2 +- tests/ts/mount/fstab-broken | 2 +- tests/ts/mount/fstab-btrfs | 2 +- tests/ts/mount/fstab-devname | 2 +- tests/ts/mount/fstab-devname2label | 2 +- tests/ts/mount/fstab-devname2uuid | 2 +- tests/ts/mount/fstab-label | 2 +- tests/ts/mount/fstab-label2devname | 2 +- tests/ts/mount/fstab-label2uuid | 2 +- tests/ts/mount/fstab-loop | 2 +- tests/ts/mount/fstab-none | 2 +- tests/ts/mount/fstab-symlink | 2 +- tests/ts/mount/fstab-uuid | 2 +- tests/ts/mount/fstab-uuid2devname | 2 +- tests/ts/mount/fstab-uuid2label | 2 +- tests/ts/mount/label | 2 +- tests/ts/mount/move | 2 +- tests/ts/mount/regfile | 2 +- tests/ts/mount/remount | 2 +- tests/ts/mount/set_ugid_mode | 2 +- tests/ts/mount/shared-subtree | 2 +- tests/ts/mount/special | 2 +- tests/ts/mount/umount-alltargets | 2 +- tests/ts/mount/umount-recursive | 2 +- tests/ts/mount/uuid | 2 +- tests/ts/namei/logic | 2 +- tests/ts/partx/partx | 2 +- tests/ts/partx/partx-image | 2 +- tests/ts/paths/built-in | 2 +- tests/ts/rename/basic | 2 +- tests/ts/rename/exit_codes | 2 +- tests/ts/rename/overwrite | 2 +- tests/ts/rename/subdir | 2 +- tests/ts/rename/symlink | 2 +- tests/ts/schedutils/chrt | 2 +- tests/ts/schedutils/chrt-non-root | 2 +- tests/ts/schedutils/cpuset | 2 +- tests/ts/script/buffering-race | 2 +- tests/ts/script/options | 2 +- tests/ts/script/race | 2 +- tests/ts/sfdisk/dos | 2 +- tests/ts/sfdisk/dump | 2 +- tests/ts/sfdisk/gpt | 2 +- tests/ts/sfdisk/movedata | 2 +- tests/ts/sfdisk/resize | 2 +- tests/ts/sfdisk/script | 2 +- tests/ts/sfdisk/wipe | 2 +- tests/ts/sha1/sha1 | 2 +- tests/ts/swapon/devname | 2 +- tests/ts/swapon/fixpgsz | 2 +- tests/ts/swapon/fixsig | 2 +- tests/ts/swapon/label | 2 +- tests/ts/swapon/uuid | 2 +- tests/ts/ul/basic | 2 +- tests/ts/ul/ul | 2 +- tests/ts/utmp/last | 2 +- tests/ts/utmp/last-ipv6 | 2 +- tests/ts/utmp/utmpdump-circle | 2 +- tests/ts/utmp/utmpdump-subsecond | 2 +- tests/ts/utmp/utmpdump-tobin | 2 +- tests/ts/utmp/utmpdump-tobin-ipv6 | 2 +- tests/ts/utmp/utmpdump-totxt | 2 +- tests/ts/utmp/utmpdump-totxt-ipv6 | 2 +- tests/ts/uuid/namespace | 2 +- tests/ts/uuid/oids | 2 +- tests/ts/uuid/uuid_parser | 2 +- tests/ts/uuid/uuidd | 2 +- tests/ts/uuid/uuidgen | 2 +- tests/ts/uuid/uuidparse | 2 +- tests/ts/wipefs/wipefs | 2 +- 223 files changed, 233 insertions(+), 233 deletions(-) commit 061282b2a48008373c88c86a2bed6ce0602b29d6 Author: Thomas Weißschuh Date: Mon Nov 21 04:17:44 2022 +0100 cfdisk: prevent unused variables disk-utils/cfdisk.c | 2 ++ 1 file changed, 2 insertions(+) commit 006612cdf4170e2f9e639dcc13936a4346b7d248 Author: Thomas Weißschuh Date: Mon Nov 21 03:50:06 2022 +0100 fileeq/lsfd: use correct format specifier lib/fileeq.c | 2 +- misc-utils/lsfd-sock-xinfo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d1b75dda05fc1b4773950f0897faf95bc0b8c1ea Merge: d39c0d89d fe26258e3 Author: Karel Zak Date: Tue Nov 22 14:30:11 2022 +0100 Merge branch 'btrfs/checksums' of https://github.com/t-8ch/util-linux * 'btrfs/checksums' of https://github.com/t-8ch/util-linux: libblkid: btrfs: add support for xxhash checksums lib: xxhash: customize for util-linux lib: add xxhash implementation libblkid: btrfs: add support for sha256 checksums libblkid: add function blkid_probe_verify_csum_buf libblkid: btrfs: prepare for more checksum algorithms commit d39c0d89d832278e778f7cff0f355a12fff19cd3 Author: Milan Broz Date: Tue Nov 22 12:37:11 2022 +0100 libblkid: fix misaligned-address in probe_erofs Erofs on-disk superblock struct should be marked as packed to avoid default struct members alignment. Fix OSS-Fuzz issue 53615 libblkid/src/superblocks/erofs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe26258e3ae00f2c638ebeef5d2160c2c7774552 Author: Thomas Weißschuh Date: Fri Nov 18 20:07:37 2022 +0100 libblkid: btrfs: add support for xxhash checksums libblkid/src/superblocks/btrfs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4fdacbf66e94b645503c5f891eb8197bdfabdb6a Author: Thomas Weißschuh Date: Sun Nov 20 22:34:02 2022 +0100 lib: xxhash: customize for util-linux include/xxhash.h | 4 ++++ 1 file changed, 4 insertions(+) commit 0ff57406522ba78ba829df7a64903b3066afb75f Author: Thomas Weißschuh Date: Fri Nov 18 18:41:50 2022 +0100 lib: add xxhash implementation Release v0.8.1 from https://github.com/Cyan4973/xxHash include/Makemodule.am | 3 +- include/xxhash.h | 5580 +++++++++++++++++++++++++++++++++++++++++++++++++ lib/Makemodule.am | 3 +- lib/meson.build | 1 + lib/xxhash.c | 43 + 5 files changed, 5628 insertions(+), 2 deletions(-) commit 767b5aff01fa1b7b5811db9849ece588ba046864 Author: Thomas Weißschuh Date: Fri Nov 18 20:02:54 2022 +0100 libblkid: btrfs: add support for sha256 checksums libblkid/src/superblocks/btrfs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8c4084703dffd911e10b3b1ee2c2e60998bfc697 Author: Thomas Weißschuh Date: Sat Nov 19 01:55:40 2022 +0100 libblkid: add function blkid_probe_verify_csum_buf This function is more convenient for checksums with longer digests. libblkid/src/blkidP.h | 2 ++ libblkid/src/probe.c | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) commit 186559d7486cfbd7fa8b18aab069563e683df270 Author: Thomas Weißschuh Date: Fri Nov 18 19:54:33 2022 +0100 libblkid: btrfs: prepare for more checksum algorithms libblkid/src/superblocks/btrfs.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit ec96a89ed9551ffacfc58b3056c8070444e3a2f3 Author: Chris Hofstaedtler Date: Fri Nov 18 13:23:37 2022 +0000 script: abort if unused arguments are given scripts uses either a free-standing "file" argument, or the value passed as --log-out "file". Additional filenames are ignored. They are also ignored if --log-in "file" is given, as it turns off output logging by default (can still be overriden by adding --log-out). Avoid surprises when passing multiple filenames by writing usage message instead. [kzak@redhat.com: - use errtryhelp() rather than usage()] Signed-off-by: Chris Hofstaedtler Reported-by: наб Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016193 Signed-off-by: Karel Zak term-utils/script.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 1e13ebbbda9e524de247095dcec6ad75a065b8b0 Merge: 71adc2802 e0806c409 Author: Karel Zak Date: Mon Nov 21 09:56:10 2022 +0100 Merge branch 'meson/colors' of https://github.com/t-8ch/util-linux * 'meson/colors' of https://github.com/t-8ch/util-linux: meson: implement colors-default commit 71adc28027b343677a6fae3593a15a3186da472e Merge: 67bafae93 2101d110b Author: Karel Zak Date: Mon Nov 21 09:55:31 2022 +0100 Merge branch 'master' of https://github.com/rsaxvc/util-linux * 'master' of https://github.com/rsaxvc/util-linux: irqtop: improve delta-sort stability commit 67bafae9362ddf8c86202a1b59142411e346b47e Merge: 3279b4a4e 8a0f04e61 Author: Karel Zak Date: Mon Nov 21 09:54:36 2022 +0100 Merge branch 'exfat/fields' of https://github.com/t-8ch/util-linux * 'exfat/fields' of https://github.com/t-8ch/util-linux: libblkid: dos: ignore exfat superblocks libblkid: exfat: report filesystem size libblkid: exfat: validate more fields libblkid: exfat: rename superblocks fields to match specification commit 3279b4a4e88f45498ba214734d2e949f2d68286c Author: Karel Zak Date: Mon Nov 21 09:50:07 2022 +0100 include: don't use UL_NG_ prefix Signed-off-by: Karel Zak include/crc32.h | 4 ++-- include/crc32c.h | 6 +++--- include/crc64.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit 893041de2b1ca7cea7544e7fbff3f69ca1224d30 Merge: f8ae3e0d1 bd15ce764 Author: Karel Zak Date: Mon Nov 21 09:34:13 2022 +0100 Merge branch 'cifuzz-32-bit' of https://github.com/evverx/util-linux * 'cifuzz-32-bit' of https://github.com/evverx/util-linux: ci: run fuzz targets on i386 as well commit f8ae3e0d16c4d1072f8acddcd4e0e68042ecd074 Merge: 24b8804bd 665c938b7 Author: Karel Zak Date: Mon Nov 21 09:33:46 2022 +0100 Merge branch 'alignment-check' of https://github.com/evverx/util-linux * 'alignment-check' of https://github.com/evverx/util-linux: oss-fuzz: turn on the alignment check explicitly commit 2101d110b527ce5e850447d4e552472fb64bd0f2 Author: Richard Allen Date: Sun Nov 20 14:49:43 2022 -0600 irqtop: improve delta-sort stability When sorting irqs by delta, sort first by delta, then by name. This helps interrupts occuring at the same rate reach a more stable display ordering. Signed-off-by: Richard Allen sys-utils/irq-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e0806c4091da5b416c7bada414fe75ce6aa6f362 Author: Thomas Weißschuh Date: Mon Nov 21 02:49:40 2022 +0100 meson: implement colors-default meson.build | 1 + meson_options.txt | 2 ++ 2 files changed, 3 insertions(+) commit 8a0f04e614276ef97f66f52b32f10dd56df09e40 Author: Thomas Weißschuh Date: Sun Nov 20 05:50:16 2022 +0100 libblkid: dos: ignore exfat superblocks libblkid/src/partitions/dos.c | 4 ++- libblkid/src/superblocks/exfat.c | 62 +++++++++++++++++++++++++++++++++------- 2 files changed, 54 insertions(+), 12 deletions(-) commit 60a5e8d8c2978d237100af3342637a7ebbaee2c0 Author: Thomas Weißschuh Date: Sat Nov 19 20:53:11 2022 +0100 libblkid: exfat: report filesystem size libblkid/src/superblocks/exfat.c | 1 + tests/expected/blkid/low-probe-exfat | 1 + 2 files changed, 2 insertions(+) commit 1a73b23e30cb62554d85d3bc85261b30d5bd7b27 Author: Thomas Weißschuh Date: Sat Nov 19 20:37:50 2022 +0100 libblkid: exfat: validate more fields libblkid/src/superblocks/exfat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6c2484cd28abc63b6ef529d9dcbe384d29ebe7e2 Author: Thomas Weißschuh Date: Sat Nov 19 20:32:30 2022 +0100 libblkid: exfat: rename superblocks fields to match specification Now that we have access to the official exFAT specification [0], let's use its nomenclature. [0] https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification libblkid/src/superblocks/exfat.c | 61 +++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 29 deletions(-) commit bd15ce7644d04d7eb6feb44c9f93774b34121b35 Author: Evgeny Vereshchagin Date: Fri Nov 18 07:37:29 2022 +0000 ci: run fuzz targets on i386 as well .github/workflows/cifuzz.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 665c938b7dbe5b4ea686e413fe65780adb9434cd Author: Evgeny Vereshchagin Date: Fri Nov 18 07:09:30 2022 +0000 oss-fuzz: turn on the alignment check explicitly to somewhat cover architectures where unaligned access can lead to crashes and make it possible for OSS-Fuzz to catch issues like https://github.com/util-linux/util-linux/pull/1906. With this patch applied the libblkid fuzz target built with the OSS-Fuzz toolchain triggers "runtime error: load of misaligned address" in `probe_exfat` so it seems to be working. tools/oss-fuzz.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit 24b8804bd186ced99962eee3462f5762d6f1a0a1 Author: Thomas Weißschuh Date: Wed Nov 2 04:38:07 2022 +0100 meson: enable warnings meson.build | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 6ed644fbf4869a7e042826900eff531cf6660cfb Author: Karel Zak Date: Wed Nov 16 09:19:18 2022 +0100 script: fix use of utempter libutempter uses SIGCHLD, but script(1) pty implementation completely control all signals by signalfd and utempter does not work. The solution is to setup signalfd later (after libutempter use). Fixes: https://github.com/util-linux/util-linux/issues/1904 Signed-off-by: Karel Zak term-utils/script.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4681d88ba1034d488814bbbb6e7d06d17e33322d Author: Karel Zak Date: Wed Nov 16 09:17:52 2022 +0100 llib/pty-session: split PTY and signalfd setup In some cases applications need to use PTY before signalfd is enabled. Signed-off-by: Karel Zak include/pty-session.h | 1 + lib/pty-session.c | 29 +++++++++++++++++++++++++---- login-utils/su-common.c | 2 ++ term-utils/scriptlive.c | 2 ++ 4 files changed, 30 insertions(+), 4 deletions(-) commit 1e6393de06b5089329702d7850a450386b454aa9 Author: Karel Zak Date: Wed Nov 16 08:48:43 2022 +0100 bash-completion: add --zero to rev module Addresses: https://github.com/util-linux/util-linux/pull/1900 Signed-off-by: Karel Zak bash-completion/rev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 076b26447ad01e8bde2fad07f135b6b3c131f594 Merge: 2d904219c f74d384e2 Author: Karel Zak Date: Wed Nov 16 08:46:29 2022 +0100 Merge branch 'rev0' of https://github.com/t-8ch/util-linux * 'rev0' of https://github.com/t-8ch/util-linux: rev: allow zero-byte as separator rev: make separator configurable rev: use pointer-size-pairs instead of C-string commit 2d904219c9597bb002106cdecc7089f3b9178e83 Merge: 5ce432207 32bd447fd Author: Karel Zak Date: Wed Nov 16 08:36:19 2022 +0100 Merge branch 'oss-fuzz' of https://github.com/t-8ch/util-linux * 'oss-fuzz' of https://github.com/t-8ch/util-linux: libblkid: iso9660: allocate enough space for UTF16 decoding libblkid: ntfs: avoid UB in signed shift commit 32bd447fd7d0933c5aecac75cc1823b3ee897f11 Author: Thomas Weißschuh Date: Thu Nov 10 19:48:20 2022 +0100 libblkid: iso9660: allocate enough space for UTF16 decoding When merge_utf16be_ascii() encounters high-codepoint surrogate pairs it emits four bytes of output for one byte of ascii input. In addition with the remaining ascii characters from the second loop we need up to 5 * sizeof(input) / 2 bytes as output buffer. As we decode up to 128 ascii characters with merge_utf16be_ascii() we need 320 bytes of buffer available. Furthermore adapt merge_utf16be_ascii() to not write paste the output buffer end. Fix OSS-Fuzz issue 53149 ( #1887 ) libblkid/src/superblocks/iso9660.c | 23 ++++++++++++--------- .../fuzzers/test_blkid_fuzz_files/oss-fuzz-53149 | Bin 0 -> 35663 bytes 2 files changed, 13 insertions(+), 10 deletions(-) commit 5ce4322074dfea465f7a45bd8baa610cf81db47b Merge: a3a96254f c32d33065 Author: Karel Zak Date: Tue Nov 15 14:42:47 2022 +0100 Merge branch 'widestring-check' of https://github.com/t-8ch/util-linux * 'widestring-check' of https://github.com/t-8ch/util-linux: tests: properly check for widestring functionality commit a3a96254f7d48b5f1bedc4105ef7a5dc9486f057 Merge: 2abcb010e 135762c64 Author: Karel Zak Date: Tue Nov 15 14:39:03 2022 +0100 Merge branch 'blkid_fuzz' of https://github.com/t-8ch/util-linux * 'blkid_fuzz' of https://github.com/t-8ch/util-linux: test_blkid_fuzz: fix test execution commit 2abcb010e0d47a7ec6933617d71e58d81c8a4d9f Merge: 2ce30002e e6a540416 Author: Karel Zak Date: Tue Nov 15 14:32:36 2022 +0100 Merge branch 'unaligned-access' of https://github.com/t-8ch/util-linux * 'unaligned-access' of https://github.com/t-8ch/util-linux: libblkid: f2fs: fix unaligned access libblkid: bitlocker: fix unaligned access commit 2ce30002efa0fb81c699afe270ec9906b1600d83 Merge: 897e54500 86e64cbff Author: Karel Zak Date: Mon Nov 14 13:13:55 2022 +0100 Merge branch 'lsns--timens' of https://github.com/masatake/util-linux * 'lsns--timens' of https://github.com/masatake/util-linux: lsns: add TIMENS to the map from CLONE_* to LSNS_ID_* commit 897e545002e25e1f281f9f50cba637018ab895b9 Author: Karel Zak Date: Mon Nov 14 13:12:53 2022 +0100 sfdisk: (man) fix man page move example Fixes: #1902 Signed-off-by: Karel Zak disk-utils/sfdisk.8.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e6a540416cc9bc696f5d764c481506feda4f62b4 Author: Thomas Weißschuh Date: Mon Nov 14 04:19:34 2022 +0100 libblkid: f2fs: fix unaligned access libblkid/src/superblocks/f2fs.c | 2 ++ 1 file changed, 2 insertions(+) commit cd1a0bfb39447655755e6f15c1ec811e5012e208 Author: Thomas Weißschuh Date: Mon Nov 14 04:18:57 2022 +0100 libblkid: bitlocker: fix unaligned access Value of 64 has been chose arbitrarily libblkid/src/superblocks/bitlocker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f74d384e241e9285cbdee67d9e238de1a3dc41ee Author: Thomas Weißschuh Date: Sat Nov 12 05:32:33 2022 +0100 rev: allow zero-byte as separator Fixes #1868 tests/expected/misc/rev | 3 ++- tests/ts/misc/rev | 3 +++ text-utils/rev.1.adoc | 3 +++ text-utils/rev.c | 6 +++++- 4 files changed, 13 insertions(+), 2 deletions(-) commit c32d33065a2dfd64b6c115ed9256d3aafa3c1ebc Author: Thomas Weißschuh Date: Sun Nov 13 02:38:40 2022 +0100 tests: properly check for widestring functionality Instead of blindly disabling those test under qemu-user use proper feature-tests. tests/functions.sh | 9 +++++++++ tests/helpers/test_sysinfo.c | 8 ++++++++ tests/ts/colcrt/functional | 2 +- tests/ts/colcrt/regressions | 2 +- tests/ts/column/table | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-) commit d2082bf70e5dbd812c223ffaa95c2d0c1c5d77d5 Author: Thomas Weißschuh Date: Sat Nov 12 20:30:59 2022 +0100 rev: make separator configurable text-utils/rev.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c9cc84621ca98ef85499e83ca56f05f12055f193 Author: Thomas Weißschuh Date: Sat Nov 12 05:09:38 2022 +0100 rev: use pointer-size-pairs instead of C-string This allows us to properly handle zero-bytes text-utils/rev.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 135762c64443c33a2cdcf733fca0c7461f4362f5 Author: Thomas Weißschuh Date: Sat Nov 12 15:16:32 2022 +0100 test_blkid_fuzz: fix test execution tests/ts/fuzzers/test_blkid_fuzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c82a8ca123a4e4028d51f4e38c7c3cfbdc74711 Author: Thomas Weißschuh Date: Thu Nov 10 18:35:00 2022 +0100 libblkid: ntfs: avoid UB in signed shift Fix OSS-Fuzz issue 53142 ( #1886 ) Fix OSS-Fuzz issue 53160 ( #1888 ) libblkid/src/superblocks/ntfs.c | 10 +++++++--- tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53142 | Bin 0 -> 1025 bytes tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53160 | Bin 0 -> 1024 bytes 3 files changed, 7 insertions(+), 3 deletions(-) commit 86e64cbff29a0f498980f3deea364befc8a06fc4 Author: Masatake YAMATO Date: Fri Nov 11 06:25:03 2022 +0900 lsns: add TIMENS to the map from CLONE_* to LSNS_ID_* Signed-off-by: Masatake YAMATO sys-utils/lsns.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1e4e0af7db815e6c855d3cb66b930fd3f24580d5 Merge: ed07532a9 074aaf26d Author: Karel Zak Date: Thu Nov 10 09:49:20 2022 +0100 Merge branch 'meson/fixes' of https://github.com/t-8ch/util-linux * 'meson/fixes' of https://github.com/t-8ch/util-linux: meson: libmount: compile test helpers pylibmount: properly mark initialization function meson: define USE_LIBMOUNT_SUPPORT_NAMESPACES dmesg: move fallthrough comment to correct place meson: use -Wno-cast-function-type for libmount python bindings meson: fix test for HAVE_LANGINFO_H commit ed07532a97fbfe01ef2b2d855280ca205f850b3c Author: Karel Zak Date: Thu Nov 10 09:39:47 2022 +0100 more: update basic command description Fixes: https://github.com/util-linux/util-linux/discussions/1891 Signed-off-by: Karel Zak text-utils/more.1.adoc | 2 +- text-utils/more.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3e8228b22822dd119dee7e680f17ffe9a0b5ec47 Author: Karel Zak Date: Thu Nov 10 09:24:23 2022 +0100 fdisk: make it more obvious that DOS means MBR Fixes: https://github.com/util-linux/util-linux/issues/1890 Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 4 ++-- libfdisk/src/dos.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 074aaf26d38190575ccc3204428f861b171ffdec Author: Thomas Weißschuh Date: Thu Nov 3 16:47:36 2022 +0100 meson: libmount: compile test helpers libmount/meson.build | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 9798f7ffb1818648ead93a98d4d041825d693562 Author: Thomas Weißschuh Date: Thu Nov 10 04:05:30 2022 +0100 pylibmount: properly mark initialization function The module initialization function is supposed to only public function in a module. Newer versions of meson use -fvisibility=hidden and expected this function to be marked with PyMODINIT_FUNC [0]. As this does not hurt on autotools either, let's use it everywhere. [0] https://mesonbuild.com/Release-notes-for-0-63-0.html#python-extension-modules-now-build-with-hidden-visibility libmount/python/pylibmount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 375ccf08e53feff1f111a9124ae6ab2593c76b90 Author: Thomas Weißschuh Date: Wed Nov 2 05:19:19 2022 +0100 meson: define USE_LIBMOUNT_SUPPORT_NAMESPACES This works around warnings about unused parameters. To be correct we should be checking for the setns syscall, but so far we don't have logic for this in meson. meson.build | 1 + 1 file changed, 1 insertion(+) commit 610538bf258b7b2b1f268ce16989b6273f71a220 Author: Thomas Weißschuh Date: Wed Nov 2 05:19:11 2022 +0100 dmesg: move fallthrough comment to correct place For some reason the existing location is accepted by the autotools build but not by meson. sys-utils/dmesg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 932ac04e64390f3257fa252a5e857a58712ee003 Author: Thomas Weißschuh Date: Wed Nov 2 05:19:03 2022 +0100 meson: use -Wno-cast-function-type for libmount python bindings The same way it is done by autotools. libmount/python/meson.build | 1 + 1 file changed, 1 insertion(+) commit 7255b8dc6a455288efe9e6117ccca46e40258940 Author: Thomas Weißschuh Date: Wed Nov 2 04:38:12 2022 +0100 meson: fix test for HAVE_LANGINFO_H lib/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3ca3f39c27dd7864c6d1369cb728068674ab4a3 Merge: 8b9f571d2 338335626 Author: Karel Zak Date: Wed Nov 9 12:24:44 2022 +0100 Merge branch 'fix/rfkill-bash-completion-toggle' of https://github.com/dpeukert/util-linux * 'fix/rfkill-bash-completion-toggle' of https://github.com/dpeukert/util-linux: rfkill: add toggle to bash completion commit 8b9f571d252f921dab6cfd871bd0be20c58162a2 Author: Anatoly Pugachev Date: Wed Nov 9 12:00:12 2022 +0300 skip btrfs tests if kernel support for btrfs is missing tests/ts/mount/fstab-btrfs | 2 ++ 1 file changed, 2 insertions(+) commit 3383356263e19fcd2ee3b21cc57cc9c15b385c6e Author: Daniel Peukert Date: Tue Nov 8 19:48:08 2022 +0100 rfkill: add toggle to bash completion Signed-off-by: Daniel Peukert bash-completion/rfkill | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d9edc382f56791e301c2d2b193c1067c717ae8e8 Merge: 86938d063 1ba4085e8 Author: Karel Zak Date: Tue Nov 8 10:56:18 2022 +0100 Merge branch 'blkid_fuzzing' of https://github.com/xflord/util-linux * 'blkid_fuzzing' of https://github.com/xflord/util-linux: libblkid: new fuzz target commit 86938d0633f32a91b470aff20c8b4c175b2fe73c Author: Karel Zak Date: Tue Nov 8 10:11:57 2022 +0100 bash-completion: update lsns Signed-off-by: Karel Zak bash-completion/lsns | 1 + 1 file changed, 1 insertion(+) commit eabbd8b7d5814ca3a064e79a32674e267aebc6e9 Author: Karel Zak Date: Tue Nov 8 10:09:28 2022 +0100 lsns: show persistent namespace, add --persistent * show persistent namespaces (without processes) by default * add option --persistent only these namespaces Fixes: https://github.com/util-linux/util-linux/issues/1881 Signed-off-by: Karel Zak sys-utils/lsns.8.adoc | 4 ++++ sys-utils/lsns.c | 59 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 7 deletions(-) commit 1ba4085e81f7060015479e1d1330cc9b909bf9ba Author: David Flor <493294@mail.muni.cz> Date: Fri Oct 28 17:31:03 2022 +0200 libblkid: new fuzz target * Added new fuzz target calling blkid_do_safeprobe(), mainly based off of how libblkid is used in the cryptsetup project (same flags used etc.) * Added the fuzz target to the Makemodule and all relevant scripts. * Made as part of my upcoming bachelor thesis. Signed-off-by: David Flor <493294@muni.cz> libblkid/src/Makemodule.am | 13 +++++++++++++ libblkid/src/fuzz.c | 31 +++++++++++++++++++++++++++++++ tests/commands.sh | 1 + tests/ts/fuzzers/test_blkid_fuzz | 29 +++++++++++++++++++++++++++++ tools/oss-fuzz.sh | 4 ++++ 5 files changed, 78 insertions(+) commit f6e2e0709ffeffbbc0f9c4290fe18bb2f76d0abd Merge: 0e10d4ee9 033b5a521 Author: Karel Zak Date: Mon Nov 7 12:24:43 2022 +0100 Merge branch 'fix-use-https' of https://github.com/mbroz/util-linux * 'fix-use-https' of https://github.com/mbroz/util-linux: Use https for project-related documentation. commit 0e10d4ee9aad034dd05458d3def6985709b15a12 Merge: f991ef78a a008e2860 Author: Karel Zak Date: Mon Nov 7 12:23:38 2022 +0100 Merge branch 'fix-fs-block-size' of https://github.com/mbroz/util-linux * 'fix-fs-block-size' of https://github.com/mbroz/util-linux: libblkid: fix regression in setting BLOCK_SIZE value commit 033b5a521a0eebb924019495baf4c3485b7bc3df Author: Milan Broz Date: Sat Nov 5 10:43:49 2022 +0100 Use https for project-related documentation. Some browsers already force https use, fix links for sites that can be easily redirected. Signed-off-by: Milan Broz Documentation/deprecated.txt | 2 +- Documentation/howto-contribute.txt | 6 +++--- README | 4 ++-- configure.ac | 2 +- man-common/translation.adoc | 2 +- util-linux.doap | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) commit a008e2860ed6688ffd93d344d1a91e3ff81b46ea Author: Milan Broz Date: Sat Nov 5 10:17:48 2022 +0100 libblkid: fix regression in setting BLOCK_SIZE value In the stable version, the BLOCK_SIZE attribute is unconditionally set when probing the device. Commit c9b2297eb1f357d9bc9989aacc874f218081fcb8 added a new FSINFO flag and conditionally set the BLOCK_SIZE attribute only when it is used. This breaks the ABI interface. Cryptsetup reencrypt code depends on checking the minimal accessible FS block to prevent the destruction of the filesystem if a user requests reencryption to a larger sector than the filesystem can handle. This patch removes the condition to make ABI compatible again (as we cannot add FSINFO bit retrospectively). Signed-off-by: Milan Broz libblkid/src/superblocks/superblocks.c | 5 ----- 1 file changed, 5 deletions(-) commit f991ef78af15a001c4acfcb42abca9ce3dce8fbe Author: Thomas Weißschuh Date: Sat Nov 5 02:21:27 2022 +0100 libblkid: ext: add checksum support libblkid/src/superblocks/ext.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d2d36acee7363fa61256f32e32f02217821f71b3 Author: Thomas Weißschuh Date: Sat Nov 5 01:37:09 2022 +0100 libblkid: ext4: add test tests/expected/blkid/low-probe-ext4 | 11 +++++++++++ tests/ts/blkid/images-fs/ext4.img.xz | Bin 0 -> 3140 bytes 2 files changed, 11 insertions(+) commit 21e52455116be0ae48592014aa0290f1120b3c1f Author: dana Date: Wed Nov 2 14:15:00 2022 -0500 agetty: always pass user name to login with -- term-utils/agetty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 96ccdc00e1fcf1684f9734a189baf90e00ff0c9a Author: Karel Zak Date: Tue Nov 1 10:30:06 2022 +0100 logger: always update header when read from stdin The current code updates the header only when the priority has been changed. It's incorrect because wanted is a valid header or each entry (don't forget that logger for stdin use-case is used in pipe to log long-time running processes). This patch also fixes the initial timestamp; it was originally generated on logger startup, it now generates the header on the first message. $ (sleep 2; date; sleep 2; date; sleep 2; date) | logger --stderr --no-act old: <13>Nov 1 10:42:14 kzak: Tue Nov 1 10:42:16 AM CET 2022 <13>Nov 1 10:42:14 kzak: Tue Nov 1 10:42:18 AM CET 2022 <13>Nov 1 10:42:14 kzak: Tue Nov 1 10:42:20 AM CET 2022 new: <13>Nov 1 10:19:02 kzak: Tue Nov 1 10:19:02 AM CET 2022 <13>Nov 1 10:19:04 kzak: Tue Nov 1 10:19:04 AM CET 2022 <13>Nov 1 10:19:06 kzak: Tue Nov 1 10:19:06 AM CET 2022 Fixes: https://github.com/util-linux/util-linux/issues/1866 Signed-off-by: Karel Zak misc-utils/logger.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 85dd05de05c49809b2aca4420c842c52cad5abb9 Merge: 29a812550 f46c685bf Author: Karel Zak Date: Tue Nov 1 09:09:32 2022 +0100 Merge branch 'lscpu/architecture' of https://github.com/t-8ch/util-linux * 'lscpu/architecture' of https://github.com/t-8ch/util-linux: lscpu: always create Architecture section commit 29a812550c8f95a022b2ff5b10759efa7776876a Author: Karel Zak Date: Tue Nov 1 09:05:48 2022 +0100 libblkid: cleanup romfs prober * make sure blkid_probe_get_sb_buffer() returns data * define variables at the beginning of function Signed-off-by: Karel Zak libblkid/src/superblocks/romfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit e3e5ee98cd90f1d649bcb8cd60dced711998e9f6 Merge: 0f0b854e8 db80b704f Author: Karel Zak Date: Tue Nov 1 08:52:29 2022 +0100 Merge branch 'romfs/checksum' of https://github.com/t-8ch/util-linux * 'romfs/checksum' of https://github.com/t-8ch/util-linux: libblkid: romfs: report fssize libblkid: romfs: add checksum support commit f46c685bf34a6c762a454d0ec44b3122af040bb8 Author: Thomas Weißschuh Date: Sun Oct 30 16:10:31 2022 +0100 lscpu: always create Architecture section cxt->arch can never be NULL. sys-utils/lscpu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0f0b854e82c7921e697541a002ceb3e90642cf8d Merge: 22e16fbf8 30463e36a Author: Karel Zak Date: Mon Oct 31 14:03:41 2022 +0100 Merge branch 'cdown/2022-10-26/check_handler' of https://github.com/cdown/util-linux * 'cdown/2022-10-26/check_handler' of https://github.com/cdown/util-linux: kill: Support mandating the presence of a userspace signal handler commit 22e16fbf8d798950f99e262389b4ceba4b697cc0 Merge: c64e6afbe 58d2f31eb Author: Karel Zak Date: Mon Oct 31 13:54:45 2022 +0100 Merge branch 'lsfd-s390-proc-net-L3' of https://github.com/masatake/util-linux * 'lsfd-s390-proc-net-L3' of https://github.com/masatake/util-linux: lsfd: unify the code for reading /proc/net/tcp and udp lsfd: make the logic for verifying the initial line of /proc/net/{tcp,udp} more flexible commit c64e6afbebc1b09488dfc28ea43c4bfc0e050cd0 Merge: e76e34f60 7da59534f Author: Karel Zak Date: Mon Oct 31 13:19:34 2022 +0100 Merge branch '1' of https://github.com/neheb/util-linux * '1' of https://github.com/neheb/util-linux: meson: remove some unused variables meson: fix array issue commit e76e34f600a9765875c4578064828f8838d4cc99 Merge: 7ad0c4695 64bc8ab57 Author: Karel Zak Date: Mon Oct 31 13:09:20 2022 +0100 Merge branch 'fadvise-meson-build' of https://github.com/masatake/util-linux * 'fadvise-meson-build' of https://github.com/masatake/util-linux: meson: build fadvise commit 7ad0c4695c3d5eab4f693bd2b80073e21c210ba0 Merge: 92385aaf5 04a0717b0 Author: Karel Zak Date: Mon Oct 31 13:01:36 2022 +0100 Merge branch 'fix-jfs' of https://github.com/mbroz/util-linux * 'fix-jfs' of https://github.com/mbroz/util-linux: libblkid: jfs - avoid undefined shift commit 92385aaf573cf318b284152d96098dec903b2139 Author: Karel Zak Date: Mon Oct 31 12:55:14 2022 +0100 libblkid: use blkid_probe_set_value() in more consistent way * use it if snprintf unnecessary * use "const char" to be consistent Signed-off-by: Karel Zak libblkid/src/partitions/partitions.c | 2 +- libblkid/src/partitions/partitions.h | 2 +- libblkid/src/superblocks/superblocks.c | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) commit b86e7b6020d4f4b392cb8464bcf89958e67aa963 Merge: ffacfb296 dc7677b5d Author: Karel Zak Date: Mon Oct 31 12:40:34 2022 +0100 Merge branch 'fs-endianess' of https://github.com/t-8ch/util-linux * 'fs-endianess' of https://github.com/t-8ch/util-linux: libblkid: squashfs3: report endianness libblkid: zfs: report endianness libblkid: ufs: report endianness libblkid: minix: report endianness libblkid: cramfs: report endianness libblkid: befs: report endianness libblkid: add blkid_probe_set_fsendianness() libblkid: squashfs: add testcase libblkid: squashfs3: add testcase commit ffacfb2963404c6a5866073404e585fac0c19429 Author: Karel Zak Date: Mon Oct 31 09:33:24 2022 +0100 libsmartcols: fix divide by zero [coverity] Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 64bc8ab57692ce95e8fb37dcb89b4fd4edf36cdc Author: Masatake YAMATO Date: Sun Oct 30 10:33:57 2022 +0900 meson: build fadvise Reported-by: Rosen Penev Signed-off-by: Masatake YAMATO meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7da59534f846681c9f13af36378383395ebe7639 Author: Rosen Penev Date: Fri Oct 28 16:58:25 2022 -0700 meson: remove some unused variables Found with muon's analyze. Signed-off-by: Rosen Penev libblkid/meson.build | 2 +- libfdisk/meson.build | 2 +- libmount/meson.build | 2 +- libsmartcols/meson.build | 2 +- meson.build | 9 +-------- 5 files changed, 5 insertions(+), 12 deletions(-) commit c41e47c120de626bc8ccb19937c911f7430c6842 Author: Rosen Penev Date: Fri Oct 28 16:47:57 2022 -0700 meson: fix array issue += cannot be used with a dep. Found with muon's analyze: meson.build:643:5: error expected type dict|disabler|int|list|str, got dep Signed-off-by: Rosen Penev meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04a0717b0b0faa1a8078dc6fad05183b8bada395 Author: Milan Broz Date: Thu Oct 27 16:05:35 2022 +0200 libblkid: jfs - avoid undefined shift JFS probe can use undefined shift if stored log2 of block size is a bogus value. Avoid this by limiting shift size. Reproducer found with OSS-Fuzz (issue 52643) running over cryptsetup project (blkid is used in header init). Signed-off-by: Milan Broz libblkid/src/superblocks/jfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 30463e36ae953eb677de77c830cc5852e7ed98bf Author: Chris Down Date: Wed Oct 26 15:47:36 2022 +0100 kill: Support mandating the presence of a userspace signal handler In production we've had several incidents over the years where a process has a signal handler registered for SIGHUP or one of the SIGUSR signals which can be used to signal a request to reload configs, rotate log files, and the like. While this may seem harmless enough, what we've seen happen repeatedly is something like the following: 1. A process is using SIGHUP/SIGUSR[12] to request some application-handled state change -- reloading configs, rotating a log file, etc; 2. This kind of request is deprecated and removed, so the signal handler is removed. However, a site where the signal might be sent from is missed (often logrotate or a service manager); 3. Because the default disposition of these signals is terminal, sooner or later these applications are going to be sent SIGHUP or similar and end up unexpectedly killed. I know for a fact that we're not the only organistion experiencing this: in general, signal use is pretty tricky to reason about and safely remove because of the fairly aggressive SIG_DFL behaviour for some common signals, especially for SIGHUP which has a particularly ambiguous meaning. Especially in a large, highly interconnected codebase, reasoning about signal interactions between system configuration and applications can be highly complex, and it's inevitable that on occasion a callsite will be missed. In some cases the right call to avoid this will be to migrate services towards other forms of IPC for this purpose, but inevitably there will be some services which must continue using signals, so we need a safe way to support them. This patch adds support for the -r/--require-handler flag, which checks if a userspace handler is present for the signal being sent. If it is not, the process will be skipped. With this flag we can enforce that all SIGHUP reload cases and SIGUSR equivalents use --require-handler. This effectively mitigates the case we've seen time and time again where SIGHUP is used to rotate log files or reload configs, but the sending site is mistakenly left present after the removal of signal handler, resulting in unintended termination of the process. Signed-off-by: Chris Down misc-utils/kill.1.adoc | 2 ++ misc-utils/kill.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit dc7677b5d904f5933a1059c46bac92e338a98017 Author: Thomas Weißschuh Date: Wed Oct 26 16:32:08 2022 +0200 libblkid: squashfs3: report endianness libblkid/src/superblocks/squashfs.c | 4 ++++ tests/expected/blkid/low-probe-squashfs3 | 1 + 2 files changed, 5 insertions(+) commit 1efbaff22dfce1413c724e57a5af1f558b2fce60 Author: Thomas Weißschuh Date: Wed Oct 26 16:19:04 2022 +0200 libblkid: zfs: report endianness libblkid/src/superblocks/zfs.c | 3 +++ tests/expected/blkid/low-probe-zfs | 1 + 2 files changed, 4 insertions(+) commit 52af93abaf38fe0a191df6c6e75160afeea915db Author: Thomas Weißschuh Date: Wed Oct 26 16:17:48 2022 +0200 libblkid: ufs: report endianness libblkid/src/superblocks/ufs.c | 2 ++ tests/expected/blkid/low-probe-ufs | 1 + 2 files changed, 3 insertions(+) commit 56a48b6b623f06d1f58b97a31b06c4385dcefba3 Author: Thomas Weißschuh Date: Wed Oct 26 16:16:05 2022 +0200 libblkid: minix: report endianness libblkid/src/superblocks/minix.c | 2 ++ tests/expected/blkid/low-probe-minix-BE | 1 + tests/expected/blkid/low-probe-minix-LE | 1 + 3 files changed, 4 insertions(+) commit 4129676ca65da89d73fd62c900dc13f35f4512a2 Author: Thomas Weißschuh Date: Wed Oct 26 16:07:44 2022 +0200 libblkid: cramfs: report endianness libblkid/src/superblocks/cramfs.c | 2 ++ tests/expected/blkid/low-probe-cramfs | 1 + tests/expected/blkid/low-probe-cramfs-big | 1 + 3 files changed, 4 insertions(+) commit 7ad8f7e80b328206fa2534ff11d98b6dd4235cfc Author: Thomas Weißschuh Date: Wed Oct 26 16:07:35 2022 +0200 libblkid: befs: report endianness libblkid/src/superblocks/befs.c | 2 ++ tests/expected/blkid/low-probe-befs | 1 + 2 files changed, 3 insertions(+) commit 8ace285b329314d678427b8487e05b317ae64109 Author: Thomas Weißschuh Date: Wed Oct 26 16:04:27 2022 +0200 libblkid: add blkid_probe_set_fsendianness() libblkid/src/superblocks/superblocks.c | 23 +++++++++++++++++++++++ libblkid/src/superblocks/superblocks.h | 13 +++++++++++++ 2 files changed, 36 insertions(+) commit ca0ddc1fd51f80f4081931598aec4cb1ad25e5be Author: Thomas Weißschuh Date: Wed Oct 26 16:31:29 2022 +0200 libblkid: squashfs: add testcase tests/expected/blkid/low-probe-squashfs4 | 3 +++ tests/ts/blkid/images-fs/squashfs4.img.xz | Bin 0 -> 380 bytes 2 files changed, 3 insertions(+) commit d233460edd0ae1eb4adc15b6837d9f7e645c6e5b Author: Thomas Weißschuh Date: Wed Oct 26 16:31:17 2022 +0200 libblkid: squashfs3: add testcase tests/expected/blkid/low-probe-squashfs3 | 5 +++++ tests/ts/blkid/images-fs/squashfs3.img.xz | Bin 0 -> 368 bytes 2 files changed, 5 insertions(+) commit 4e8a8d3598022aec301760f99f15e2a628a532b0 Author: Viktor Rosendahl (BMW) Date: Mon Oct 24 11:36:03 2022 +0200 libmount: Reuse the guessed root device Inside a container, the file /proc/self/mountinfo may contain many lines with /dev/root. It is also quite likely that /dev/root is not visible inside the container. This may cause mnt_guess_system_root() to try to use libblkid before giving up, through mnt_resolve_spec() and mnt_resolve_tag(), which calls blkid_evaluate_tag(). The call to blkid_evaluate_tag() may trigger a scan of all block devices, which is expensive. For this reason, it doesn't make any sense for kernel_fs_postparse() to call mnt_guess_system_root() more than once for every call to mnt_table_parse_stream. Instead, save the result from the first call and reuse it for all subsequent calls to kernel_fs_postparse(), so that there is at most one call to mnt_guess_system_root() for every call to mnt_table_parse_stream(). [kzak@redhat.com: - use sysroot_ prefix for the cached variables - simplify code logic in kernel_fs_postparse() - add free() to parser_cleanup()] Signed-off-by: Viktor Rosendahl (BMW) Signed-off-by: Karel Zak libmount/src/tab_parse.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 36e824e61edbb80aa2eb839516ce6a6398e37168 Merge: 846ae2dcf 936c5d995 Author: Karel Zak Date: Wed Oct 26 09:41:29 2022 +0200 Merge branch 'cramfs/endianess-mismatch' of https://github.com/t-8ch/util-linux * 'cramfs/endianess-mismatch' of https://github.com/t-8ch/util-linux: libblkid: cramfs: report version libblkid: cramfs: report filesystem size libblkid: test big endian cramfs image libblkid: cramfs: handle cross-endianess for checksums commit 58d2f31eb08dc36c5b1ab6b630da3bff346c59c4 Author: Masatake YAMATO Date: Wed Oct 26 12:01:37 2022 +0900 lsfd: unify the code for reading /proc/net/tcp and udp Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit b49529f06f282b5c5e1e6da5c776f103d0db1d13 Author: Masatake YAMATO Date: Wed Oct 26 11:56:00 2022 +0900 lsfd: make the logic for verifying the initial line of /proc/net/{tcp,udp} more flexible The format of /proc/net/udp was changed in 6c25449e1a32 ("net: udp: fix alignment problem in udp4_seq_show()"). This kind of change can be applied to /proc/net/tcp, too. Co-Authored-by: Thomas Weißschuh Co-Authored-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 936c5d9951353e7aaf848ce2ec5dbb0e1b5ca35e Author: Thomas Weißschuh Date: Mon Oct 24 23:34:04 2022 +0200 libblkid: cramfs: report version libblkid/src/superblocks/cramfs.c | 7 +++---- tests/expected/blkid/low-probe-cramfs | 1 + tests/expected/blkid/low-probe-cramfs-big | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) commit 846ae2dcf49ace4e8224c5a157476a5b93ba8bbc Author: Karel Zak Date: Tue Oct 25 12:35:38 2022 +0200 libsmartcols: make columns reduction more backward compatible The original version truncates only columns with extreme and truncate flags. Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 90 +++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 47 deletions(-) commit 94feb5a20d23904cc15cd857c4e00f35f495116c Author: Karel Zak Date: Fri Oct 14 11:18:40 2022 +0200 libsmartcols: improve columns reduction Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 300 ++++++++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 130 deletions(-) commit 3949a48dd1351cea7c523fe97666190359247630 Author: Karel Zak Date: Thu Oct 13 11:56:20 2022 +0200 libsmartcols: truncate by one char Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ee4cab98def0f263a3929bb9b8a2282c00ddacaf Author: Karel Zak Date: Thu Oct 13 10:25:25 2022 +0200 libsmartcols: use local sqrt() implemenation We do not need any powerful and precise sqrt implementation, so let's use local code rather than depend on an external library. Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 2 +- libsmartcols/src/calculate.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit 5470acc6a36aec1469bf77c75a8fb08a48c0b20a Author: Karel Zak Date: Wed Oct 12 09:46:56 2022 +0200 libsmartcols: use standard deviation to optimize columns width The standard deviation together with mean (average) of the data width can be used to detect "problematic" columns and to calculate optimal width. The idea is to sort column by avg+deviation and start columns width reduction from the column with the most wide and variable width. The width reduction is also optimized by 68–95–99 rule (aka empirical rule, avg+n*deviation; where n={1,2,3}) to cover 95% or 68% data in the column. The disadvantage is we need to link libsmartcols with -lm (math) due to sqrt() function. Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 2 +- libsmartcols/src/calculate.c | 326 +++++++++++++++++++++++++++-------------- libsmartcols/src/column.c | 8 +- libsmartcols/src/smartcolsP.h | 24 +-- 4 files changed, 237 insertions(+), 123 deletions(-) commit 9e85d5915c0d39b03349634c1d476f46093294f9 Author: Karel Zak Date: Wed Oct 12 09:43:17 2022 +0200 losetup: improve backing-file column formatting Let's mark the column by no-extreme libsmartcols flag. It makes output more compact if there is too long mount path. Signed-off-by: Karel Zak sys-utils/losetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3471bc1d082643234eee676b15ef79f06e50389d Author: Karel Zak Date: Wed Oct 12 09:43:17 2022 +0200 lsblk: improve mountpoint columns formatting Let's mark the columns by no-extreme libsmartcols flag. It makes output more compact if there are too long mount paths. Signed-off-by: Karel Zak misc-utils/lsblk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9522ff77961451bca032c348ad601e702166335d Author: Karel Zak Date: Wed Oct 12 09:40:43 2022 +0200 libsmartcols: improve debug messages * disable debug for tree-wall; it generates to many messages * fix way how library prints column flags, 0x is more redable Signed-off-by: Karel Zak libsmartcols/src/table.c | 2 +- libsmartcols/src/walk.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 4b9e3937966f7ddf90e6013c87f73c260963b0ea Author: Karel Zak Date: Tue Oct 25 11:04:20 2022 +0200 tests: don't print mount hins on terminal Signed-off-by: Karel Zak tests/ts/mount/fstab-btrfs | 2 +- tests/ts/mount/move | 2 +- tests/ts/mount/remount | 9 +++++---- tests/ts/mount/shared-subtree | 2 +- tests/ts/mount/umount-alltargets | 6 +++--- tests/ts/mount/umount-recursive | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-) commit db80b704f7b687512c43bd6691faec7f13e55613 Author: Thomas Weißschuh Date: Mon Oct 24 23:25:23 2022 +0200 libblkid: romfs: report fssize libblkid/src/superblocks/romfs.c | 1 + tests/expected/blkid/low-probe-romfs | 1 + 2 files changed, 2 insertions(+) commit 606a47afaa7ea7bbc0b193ce41a2bfbf21947447 Author: Thomas Weißschuh Date: Mon Oct 24 23:19:34 2022 +0200 libblkid: cramfs: report filesystem size libblkid/src/superblocks/cramfs.c | 9 ++++++--- tests/expected/blkid/low-probe-cramfs | 1 + tests/expected/blkid/low-probe-cramfs-big | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) commit 679e2a524e7b56a295059888e3ddec97829e9633 Author: Thomas Weißschuh Date: Mon Oct 24 18:25:51 2022 +0200 libblkid: test big endian cramfs image tests/expected/blkid/low-probe-cramfs-big | 4 ++++ tests/ts/blkid/images-fs/cramfs-big.img.xz | Bin 0 -> 480 bytes 2 files changed, 4 insertions(+) commit 3d074d422131f3758b3a4b3923097ba602ba665f Author: Thomas Weißschuh Date: Mon Oct 24 16:48:18 2022 +0200 libblkid: cramfs: handle cross-endianess for checksums libblkid/src/superblocks/cramfs.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit ccbb2b6ae096ad75d6f6ea97b7b54fbf653d6831 Author: Thomas Weißschuh Date: Sat Oct 22 03:58:10 2022 +0200 libblkid: romfs: add checksum support libblkid/src/superblocks/romfs.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit fb34edff70665f6c2fde319fd7a71d7953ce74e3 Author: Karel Zak Date: Mon Oct 24 13:02:26 2022 +0200 tetss: use stat(1) in mount/set_ugid_mode The permissions output from ls(1) is not portable. The output contains '.' when SELinux context is enabled for the directory. stat(1) also provides full control over formatting, so we do not need to parse ls(1) output. Signed-off-by: Karel Zak tests/ts/mount/set_ugid_mode | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b0498dd6c8e471d3e4fe7f043e5acf96ef553994 Merge: 48229f8e7 46f06b194 Author: Karel Zak Date: Mon Oct 24 11:04:40 2022 +0200 Merge branch 'tests' of https://github.com/t-8ch/util-linux * 'tests' of https://github.com/t-8ch/util-linux: ci: install dependencies from setup-ubuntu.sh ci: s390x: install more test dependencies lsfd: skip test mkfds-udp on s390x commit 48229f8e7f19c1b61a089fc9ede18d417a895454 Author: Karel Zak Date: Mon Oct 24 10:54:24 2022 +0200 libblkid: (exfat) fix divide by zero [coverity scan] Signed-off-by: Karel Zak libblkid/src/superblocks/exfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55ef593842d94d657c8209042491c7590ea3bdf0 Author: Karel Zak Date: Mon Oct 24 09:57:07 2022 +0200 fdisk: fix --output option parsing Fixes: https://github.com/util-linux/util-linux/issues/1859 Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022249 Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46f06b194d500565a2629bd001487b054333fece Author: Thomas Weißschuh Date: Fri Oct 21 21:40:37 2022 +0200 ci: install dependencies from setup-ubuntu.sh .github/workflows/cibuild-setup-ubuntu.sh | 8 ++++++++ .github/workflows/cibuild.yml | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) commit 30ad098b7d581250f8cda76372e6c76b3839f7a1 Author: Thomas Weißschuh Date: Fri Oct 21 21:32:53 2022 +0200 ci: s390x: install more test dependencies .github/workflows/cibuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1d95b971bdacf379d12fd010d7144032e38ace2 Author: Thomas Weißschuh Date: Fri Oct 21 21:28:33 2022 +0200 lsfd: skip test mkfds-udp on s390x It is broken for now. tests/ts/lsfd/mkfds-udp | 1 + 1 file changed, 1 insertion(+) commit cb92f0d82ae634e46989d3dae673ae3f542f7dd9 Author: Karel Zak Date: Fri Oct 21 18:11:59 2022 +0200 libblkid: fix jmicron checksum and LE to CPU - don't cast packed struct to uint16_t pointer, use temporary value - calculate real count for the loop - convert all to LE for checksum calculation (jm_to_cpu() ignores fillers) Signed-off-by: Karel Zak libblkid/src/superblocks/jmicron_raid.c | 44 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 19 deletions(-) commit 15ce5b753b6111838b12f80009b77b9ff29f11ba Author: Karel Zak Date: Fri Oct 21 14:23:50 2022 +0200 lsfd: fix compiler warning [-Werror,-Wextra-semi] isc-utils/lsfd-sock-xinfo.c:588:34: error: extra ';' outside of a function [-Werror,-Wextra-semi] define_fill_column_func(tcp, TCP); ^ misc-utils/lsfd-sock-xinfo.c:703:34: error: extra ';' outside of a function [-Werror,-Wextra-semi] define_fill_column_func(udp, UDP); ^ Addresses: 92a0dbce7c779923bd2a6fd7c53470ff6982ea50 Signed-off-by: Karel Zak misc-utils/lsfd-sock-xinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a2f1a82fa0816aac76f82cbbf246f80051e859a Merge: 35d7049fb abefebd7d Author: Karel Zak Date: Fri Oct 21 13:02:56 2022 +0200 Merge branch 'lsfd-udp' of https://github.com/masatake/util-linux * 'lsfd-udp' of https://github.com/masatake/util-linux: tests: (lsfd) add a case testing UDP sockets lsfd: use extra information loaded from /proc/net/udp lsfd: (man) write more about TCP scokets commit 35d7049fbe46d8a5156a50534270a852bb744fbd Merge: 3bfcd13f6 585815c1f Author: Karel Zak Date: Fri Oct 21 12:55:19 2022 +0200 Merge branch 'fix-exfat' of https://github.com/mbroz/util-linux * 'fix-exfat' of https://github.com/mbroz/util-linux: libblkid: exfat - avoid undefined shift commit 3bfcd13f622db00febbcfbd4501ffc551793defe Merge: c7471d8b3 08aa96752 Author: Karel Zak Date: Fri Oct 21 12:39:11 2022 +0200 Merge branch 'ci/big-endian' of https://github.com/t-8ch/util-linux * 'ci/big-endian' of https://github.com/t-8ch/util-linux: Run Ci on big-endian s390x tests: disable nonfunctional tests under qemu user emulation ci: don't run make with infinite parallel jobs commit 585815c1f8f7bc453f1963f5c897df20a188049e Author: Milan Broz Date: Thu Oct 20 14:34:27 2022 +0200 libblkid: exfat - avoid undefined shift Exfat filesystem probe can use undefined shift if block_bits or bpc_bits is a bogus value. Avoid this by limiting shift size. Reproducer found with OSS-Fuzz (issue 52571) running over cryptsetup project (blkid is used in header init). Signed-off-by: Milan Broz libblkid/src/superblocks/exfat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abefebd7db9857e764a601feb212bdac9effa099 Author: Masatake YAMATO Date: Thu Oct 20 05:17:38 2022 +0900 tests: (lsfd) add a case testing UDP sockets This tests UDP.LADDR, UDP.LPORT, UDP.RADDR, and UDP.RPORT. Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-udp | 12 +++ tests/helpers/test_mkfds.c | 172 ++++++++++++++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-udp | 121 +++++++++++++++++++++++++++++ 3 files changed, 305 insertions(+) commit 92a0dbce7c779923bd2a6fd7c53470ff6982ea50 Author: Masatake YAMATO Date: Tue Oct 18 03:11:44 2022 +0900 lsfd: use extra information loaded from /proc/net/udp Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 185 ++++++++++++++++++++++++++++++------------- misc-utils/lsfd.1.adoc | 17 ++++ misc-utils/lsfd.c | 8 ++ misc-utils/lsfd.h | 4 + 4 files changed, 161 insertions(+), 53 deletions(-) commit b569eb96eb08a1382488c7401688a9dd5b2a83cd Author: Masatake YAMATO Date: Tue Oct 18 03:09:43 2022 +0900 lsfd: (man) write more about TCP scokets Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 3 +++ 1 file changed, 3 insertions(+) commit c7471d8b3d4e796eee8ae041e5cbb55c5619318e Author: Karel Zak Date: Wed Oct 19 11:24:30 2022 +0200 libblkid: cleanup indentation Signed-off-by: Karel Zak libblkid/src/superblocks/jmicron_raid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cf68e2c897a29f8a3a1c8402574bbb49adf5a52a Author: Karel Zak Date: Wed Oct 19 11:16:17 2022 +0200 libblkid: use checksum for jmicron Addresses: https://github.com/util-linux/util-linux/pull/1843 Signed-off-by: Karel Zak libblkid/src/superblocks/jmicron_raid.c | 83 +++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 9 deletions(-) commit 0c73bc0f9bd64d61e9d4e98b9c08b47b45a5b7fe Merge: bd0c8c85e 36697f4dd Author: Karel Zak Date: Wed Oct 19 10:09:16 2022 +0200 Merge branch 'fadvice-delete-unused-type' of https://github.com/masatake/util-linux * 'fadvice-delete-unused-type' of https://github.com/masatake/util-linux: fadvice: delete a unused struct definition commit bd0c8c85e6d35161cfa03a3d40863f5eb28f1cb4 Author: Karel Zak Date: Tue Oct 18 12:47:39 2022 +0200 mkfs.bfs, mkfs.cramfs: cleanup optional argument use * fix --help * fix getopt() call Signed-off-by: Karel Zak disk-utils/mkfs.bfs.c | 2 +- disk-utils/mkfs.cramfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 08aa967520de97d8ad577f3ca87bf951cabd6fe6 Author: Thomas Weißschuh Date: Sat Oct 8 00:47:01 2022 +0200 Run Ci on big-endian s390x Fixes #1808 .github/workflows/cibuild-setup-ubuntu.sh | 4 +++- .github/workflows/cibuild.sh | 2 +- .github/workflows/cibuild.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) commit 7b29718dc4c2878d06920079ae332dfeb813d198 Author: Thomas Weißschuh Date: Mon Oct 10 14:34:58 2022 +0200 tests: disable nonfunctional tests under qemu user emulation tests/functions.sh | 6 ++++++ tests/ts/colcrt/functional | 1 + tests/ts/colcrt/regressions | 1 + tests/ts/column/table | 1 + tests/ts/kill/name_to_number | 3 +++ tests/ts/lsfd/column-ainodeclass | 1 + tests/ts/lsfd/column-name | 1 + tests/ts/lsfd/column-type | 1 + tests/ts/lsfd/mkfds-mapped-packet-socket | 1 + tests/ts/lsfd/mkfds-ro-block-device | 1 + tests/ts/lsfd/mkfds-tcp | 1 + tests/ts/lsfd/mkfds-unix-in-netns | 1 + tests/ts/mount/fstab-broken | 1 + tests/ts/mount/fstab-none | 1 + tests/ts/mount/move | 1 + 15 files changed, 22 insertions(+) commit 8c4feb933b1ee261bb7468c77aa01470c2a201e8 Author: Thomas Weißschuh Date: Sat Oct 8 04:12:43 2022 +0200 ci: don't run make with infinite parallel jobs .github/workflows/cibuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36697f4dd8327dcf00b061fae82c67c265469ba0 Author: Masatake YAMATO Date: Tue Oct 18 05:12:23 2022 +0900 fadvice: delete a unused struct definition Signed-off-by: Masatake YAMATO misc-utils/fadvise.c | 8 -------- 1 file changed, 8 deletions(-) commit b80a9be3327eeb60c514b311dbff5dc50cec935a Merge: 6364207e5 83b418c19 Author: Karel Zak Date: Mon Oct 17 10:15:28 2022 +0200 Merge branch 'autotools/endianess' of https://github.com/t-8ch/util-linux * 'autotools/endianess' of https://github.com/t-8ch/util-linux: autotools: stop using AC_C_BIGENDIAN / WORDS_BIGENDIAN commit 6364207e5ed2cd8eca10784d70ba44e581bdadcb Merge: 785789e7b fdffbcd3e Author: Karel Zak Date: Mon Oct 17 09:56:47 2022 +0200 Merge branch 'new-guids' of https://github.com/thesamesam/util-linux * 'new-guids' of https://github.com/thesamesam/util-linux: include: Add additional GPT partition types (HPPA/PARISC) commit 785789e7b84a84ccedf3f0298d2a00eb5b6982a0 Author: Karel Zak Date: Mon Oct 17 09:55:59 2022 +0200 libblkid: cleanup cramfs_verify_csum() Signed-off-by: Karel Zak libblkid/src/superblocks/cramfs.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 3dd3aa070d4238fb860d74bfaf7f58c83b5b0a8c Merge: 8874d7e84 3703ce084 Author: Karel Zak Date: Mon Oct 17 09:43:02 2022 +0200 Merge branch 'cramfs/csum' of https://github.com/t-8ch/util-linux * 'cramfs/csum' of https://github.com/t-8ch/util-linux: libblkid: cramfs: add checksum support commit 8874d7e848984c5e330a7bf985447efae75fd776 Merge: 57fdc17c9 132e097f6 Author: Karel Zak Date: Mon Oct 17 09:41:04 2022 +0200 Merge branch 'master' of https://github.com/Mango0x45/util-linux * 'master' of https://github.com/Mango0x45/util-linux: build-sys: sort the gitignore and add fadvise commit 57fdc17c92295d37ccf12f3cf32a1760499dcd3d Author: root Date: Sun Oct 16 23:53:02 2022 +0800 mkfs.cramfs: Support BSD lock Addresses: #1842 #921 Signed-off-by: Karel Zak disk-utils/mkfs.cramfs.8.adoc | 9 +++++++++ disk-utils/mkfs.cramfs.c | 16 +++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) commit cc4fefc635613252ffd16baf469e8a32129706bf Author: plus Date: Thu Oct 13 16:37:20 2022 +0800 mkfs.bfs: Support BSD lock Addresses: #1842 #921 Signed-off-by: Karel Zak disk-utils/mkfs.bfs.8.adoc | 3 +++ disk-utils/mkfs.bfs.c | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) commit 90eacdebd0d7d9ce0ff15317f2e10900b0aad4b3 Author: Milan Broz Date: Thu Oct 13 14:59:15 2022 +0200 libblkid: ext - avoid undefined shift Ext filesystems probe can use undefined shift if s_log_block_size is a bogus value. Avoid this by limiting shift size. Reproducer found with OSS-Fuzz (issue 52370) running over cryptsetup project (blkid is used in header init). Signed-off-by: Karel Zak libblkid/src/superblocks/ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e55759f50305eac0b1a398dd2c31dad188d173a Author: Milan Broz Date: Wed Oct 12 23:02:27 2022 +0200 libblkid: erofs - avoid undefined shift Erofs probe can use undefined shift if blkszbits is a bogus value. Avoid this by limiting shift size. Reproducer found with OSS-Fuzz (issue 52298) running over cryptsetup project (blkid is used in header init). Signed-off-by: Karel Zak libblkid/src/superblocks/erofs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 240f2ea95724a2045afebef703f9a7e62326b603 Author: zhanchengbin Date: Mon Oct 10 17:23:24 2022 +0800 fsck: Processes may kill other processes. A error in disk-utils/fsck.c, if run the fsck -N command, processes don't execute, just show what would be done. However, the pid whose value is -1 is added to the instance_list list in the execute function,if the kill_all function is called later, kill(-1, signum) is executed, Signals are sent to all processes except the number one process and itself. Other processes will be killed if they use the default signal processing function. Signed-off-by: zhanchengbin Reviewed-by: Lukas Czerner disk-utils/fsck.c | 2 ++ 1 file changed, 2 insertions(+) commit fdffbcd3e44a657e723ff246132345b82448f7e7 Author: Sam James Date: Fri Oct 14 22:41:51 2022 +0100 include: Add additional GPT partition types (HPPA/PARISC) See https://github.com/systemd/systemd/commit/5a9276f65981528f05025f8cc0fa03b6006b297f. Signed-off-by: Sam James include/pt-gpt-partnames.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 83b418c19c3959b2f23bba6c7cf1316ee6e404ed Author: Thomas Weißschuh Date: Fri Oct 14 21:54:47 2022 +0200 autotools: stop using AC_C_BIGENDIAN / WORDS_BIGENDIAN This define is specific to autotools. Not defining the macro will lead to silently miscompiled code as has happened with the meson build. Instead use macros provided by the compiler itself. It does not need any support from the buildsystem and is supported by both gcc and clang. If a compiler does not support this feature we will get a loud error instead of silent miscompilation. Furthermore it probably better supports universal binaries on macOS which compiles multiple architectures in a single build. configure.ac | 1 - disk-utils/cramfs.h | 6 +----- include/bitops.h | 2 +- lib/md5.c | 4 ++-- lib/sha1.c | 2 +- libblkid/src/superblocks/minix.c | 2 +- sys-utils/lscpu.c | 2 +- tests/helpers/test_sysinfo.c | 2 +- 8 files changed, 8 insertions(+), 13 deletions(-) commit 3703ce084235a92b8b1c143bef3089c8b3e022b9 Author: Thomas Weißschuh Date: Fri Oct 14 00:33:54 2022 +0200 libblkid: cramfs: add checksum support libblkid/src/superblocks/cramfs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 132e097f6a88b00d90c83ec9cb66f85122ad95fe Author: Thomas Voss Date: Thu Oct 13 19:58:59 2022 +0200 build-sys: sort the gitignore and add fadvise The fadvise binary was missing from the .gitignore, so it's been added. At the same time I also sorted the binaries for those nice eye candy points :) .gitignore | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4d447c11cfb45a31937d5e57862c403fc68b665a Merge: 0ff51d477 8fcd9405a Author: Karel Zak Date: Thu Oct 13 09:31:27 2022 +0200 Merge branch 'apfs/test' of https://github.com/t-8ch/util-linux * 'apfs/test' of https://github.com/t-8ch/util-linux: libblkid: apfs: add test commit 0ff51d47709e53b44b7b2b7da9026a38d239daa3 Merge: d244d77bb 5bd1462d3 Author: Karel Zak Date: Thu Oct 13 09:30:30 2022 +0200 Merge branch 'meson/xattr' of https://github.com/t-8ch/util-linux * 'meson/xattr' of https://github.com/t-8ch/util-linux: meson: use uniform indentation meson: check for xattr functions commit 8fcd9405a48f478d75337d9d04c3e2d0d86a9f87 Author: Thomas Weißschuh Date: Mon Oct 10 23:07:25 2022 +0200 libblkid: apfs: add test Fixes #1807 Information known to macOS: ``` $ hdiutil attach apfs.img /dev/disk1 /dev/disk2 EF57347C-0000-11AA-AA11-0030654 /dev/disk2s1 41504653-0000-11AA-AA11-0030654 /Volumes/testapfs $ diskutil info disk2 Device Identifier: disk2 Device Node: /dev/disk2 Whole: Yes Part of Whole: disk2 Device / Media Name: Disk Image Volume Name: Not applicable (no file system) Mounted: Not applicable (no file system) File System: None Content (IOContent): EF57347C-0000-11AA-AA11-00306543ECAC OS Can Be Installed: No Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Disk / Partition UUID: 25E5F1D3-11C0-4D36-98A5-3F66953519B9 Disk Size: 10.5 MB (10485760 Bytes) (exactly 20480 512-Byte-Units) Device Block Size: 4096 Bytes Read-Only Media: No Read-Only Volume: Not applicable (no file system) Device Location: External Removable Media: Removable Media Removal: Software-Activated Virtual: Yes $ diskutil info disk2s1 Device Identifier: disk2s1 Device Node: /dev/disk2s1 Whole: No Part of Whole: disk2 Volume Name: testapfs Mounted: Yes Mount Point: /Volumes/testapfs Partition Type: 41504653-0000-11AA-AA11-00306543ECAC File System Personality: APFS Type (Bundle): apfs Name (User Visible): APFS Owners: Disabled OS Can Be Installed: Yes Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Volume UUID: 3EA5C1EF-64CB-447C-AE37-8046CDC35010 Disk / Partition UUID: 3EA5C1EF-64CB-447C-AE37-8046CDC35010 Disk Size: 10.5 MB (10485760 Bytes) (exactly 20480 512-Byte-Units) Device Block Size: 4096 Bytes Volume Total Space: 10.5 MB (10485760 Bytes) (exactly 20480 512-Byte-Units) Volume Used Space: 376.8 KB (376832 Bytes) (exactly 736 512-Byte-Units) (3.6%) Volume Free Space: 10.1 MB (10108928 Bytes) (exactly 19744 512-Byte-Units) (96.4%) Allocation Block Size: 4096 Bytes Read-Only Media: No Read-Only Volume: No Device Location: External Removable Media: Removable Media Removal: Software-Activated ``` tests/expected/blkid/low-probe-apfs | 6 ++++++ tests/ts/blkid/images-fs/apfs.img.xz | Bin 0 -> 2728 bytes 2 files changed, 6 insertions(+) commit 5bd1462d3ab30fa41c378e524cf619052fd3ea0f Author: Thomas Weißschuh Date: Mon Oct 10 18:30:01 2022 +0200 meson: use uniform indentation meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6124a6a34a36ed58c41619beb77d7a3fc4fb2cbf Author: Thomas Weißschuh Date: Mon Oct 10 18:28:16 2022 +0200 meson: check for xattr functions meson.build | 2 ++ 1 file changed, 2 insertions(+) commit d244d77bbfc4059fe68144a9a071ecf8f6c89b2d Author: Thomas Weißschuh Date: Mon Oct 10 18:00:07 2022 +0200 test_mkfds: avoid multiplication overflow tests/helpers/test_mkfds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7b41ef88b70fbb7b5622030ddc72e8f9a943916 Author: Thomas Weißschuh Date: Mon Oct 10 16:08:10 2022 +0200 meson: build test_mkfds meson.build | 7 +++++++ 1 file changed, 7 insertions(+) commit a40629211df83088fb2da3300921dbe3da59be48 Author: Milan Broz Date: Mon Oct 10 08:29:22 2022 +0200 libblkid: btrfs - avoid calling clz with zero argument If btrfs superblock contains unknown checksum type, the values are parsed anyway. Bogus sector size then can lead to clz() with zero argument (this is undefined). Reproducer found with OSS-Fuzz (issue 52286) running over cryptsetup project (blkid is used in header init). libblkid/src/superblocks/btrfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit d7fa8ed63891b0058c5df8aa809e34de61008f51 Author: Milan Broz Date: Sun Oct 9 20:20:45 2022 +0200 libblkid: avoid buffer overflow in ocfs superblock parsing Label and mount values are checked only according to on-disk values and not checked against the real structure size. This can lead to reading of memory outside of superblock struct and subsequent crash. Reproducer found with OSS-Fuzz (issue 52270) running over cryptsetup project (blkid is used in header init). Signed-off-by: Milan Broz libblkid/src/superblocks/ocfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b408a291d39e9b637f6104eb4e1f8e60816421e2 Author: Karel Zak Date: Mon Oct 10 09:37:51 2022 +0200 uuidd: fix random UUIDs Commit f27876f introduces copy & past bug and replaces __uuid_generate_random() with __uuid_generate_time(). Fixes: https://github.com/util-linux/util-linux/issues/1837 Signed-off-by: Karel Zak misc-utils/uuidd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d90b36c98e04e13dd075da59a172bf17304c0b52 Merge: 7d0b20e3a e193602af Author: Karel Zak Date: Mon Oct 10 09:29:34 2022 +0200 Merge branch 'lsfd-sock-column-namespace' of https://github.com/masatake/util-linux * 'lsfd-sock-column-namespace' of https://github.com/masatake/util-linux: lsfd: move PROTONAME column to SOCK. column namespace lsfd: introduce SOCK. column namespace commit 7d0b20e3a7495db40b015a15af45bd4523e5dcc3 Merge: 84b63b62f 93b6f021e Author: Karel Zak Date: Mon Oct 10 09:11:46 2022 +0200 Merge branch 'patch-1' of https://github.com/jamacku/util-linux * 'patch-1' of https://github.com/jamacku/util-linux: ci: Update Differential ShellCheck GitHub Action commit 93b6f021e1d7f3481f5f5b86a0425aa4ce6b6bcc Author: Jan Macku Date: Fri Oct 7 14:41:15 2022 +0200 ci: Update Differential ShellCheck GitHub Action The new version of Differential ShellCheck GitHub Action brings many improvements: - External sourcing by default (`shellcheck -x`) - Improved shell script autodetection - and more .github/workflows/differential-shellcheck.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 84b63b62f02dd25bc09d6067bd998e13d8768edc Author: Masatake YAMATO Date: Wed Oct 5 01:52:45 2022 +0900 fadvise: add bash-completion script Signed-off-by: Masatake YAMATO bash-completion/fadvise | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit e193602afdbe2d8c39863aaa08d39495d12cbaef Author: Masatake YAMATO Date: Sun Oct 2 06:16:29 2022 +0900 lsfd: move PROTONAME column to SOCK. column namespace Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock.c | 2 +- misc-utils/lsfd.1.adoc | 8 ++++---- misc-utils/lsfd.c | 4 ++-- misc-utils/lsfd.h | 2 +- tests/expected/lsfd/mkfds-mapped-packet-socket | 4 ++-- tests/expected/lsfd/mkfds-socketpair | 6 +++--- tests/ts/lsfd/mkfds-mapped-packet-socket | 4 ++-- tests/ts/lsfd/mkfds-socketpair | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) commit 86a7e471bd0a2b84effba3f5bd00fab6061a2fde Author: Masatake YAMATO Date: Sun Oct 2 06:00:50 2022 +0900 lsfd: introduce SOCK. column namespace lsfd has many columns already. We will add more in the future. e.g. --help output is too long. Groping columns is one of the ways to improve the usability of lsfd. As the first step, this change introduces the "SOCK." column namespace. Conceptually SOCKNETNS, SOCKSTATE, and SOCKTYPE migrate to the namespace. At the implementation level, they are renamed to SOCK.NETNS, SOCK.STATE, and SOCK.TYPE. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock.c | 8 +++--- misc-utils/lsfd.1.adoc | 12 ++++----- misc-utils/lsfd.c | 8 +++--- misc-utils/lsfd.h | 8 +++--- tests/expected/lsfd/mkfds-tcp | 8 +++--- tests/expected/lsfd/mkfds-unix-dgram | 12 ++++----- tests/expected/lsfd/mkfds-unix-in-netns | 24 ++++++++--------- tests/expected/lsfd/mkfds-unix-stream | 48 ++++++++++++++++----------------- tests/ts/lsfd/mkfds-tcp | 4 +-- tests/ts/lsfd/mkfds-unix-dgram | 8 +++--- tests/ts/lsfd/mkfds-unix-in-netns | 10 +++---- tests/ts/lsfd/mkfds-unix-stream | 12 ++++----- 12 files changed, 81 insertions(+), 81 deletions(-) commit be14f251f16b0c8cdc7e69f02d5a6f98c5820d8d Author: Karel Zak Date: Mon Oct 3 11:05:39 2022 +0200 libblkid: (xfs) fix typo in operators [coverity scan] Addresses: https://github.com/util-linux/util-linux/pull/1804 Signed-off-by: Karel Zak libblkid/src/superblocks/xfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4aad4ce244239dc59e250c0d2683a38f01db7615 Author: Karel Zak Date: Mon Oct 3 10:30:23 2022 +0200 libblkid: (xfs) cleanup checksum code * move variables definition to the begin of the block * check blkid_probe_get_sb_buffer() result [detected by coverity scan] Signed-off-by: Karel Zak libblkid/src/superblocks/xfs.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5cc52337c13efbbb945a15249d899e938d339779 Merge: 642e1c699 00417c4f8 Author: Karel Zak Date: Mon Oct 3 09:49:07 2022 +0200 Merge branch 'lsfd-inet-xinfo' of https://github.com/masatake/util-linux * 'lsfd-inet-xinfo' of https://github.com/masatake/util-linux: lsfd: (man) write about TCP scokets tests: (lsfd) add a case testing TCP sockets lsfd: use extra information loaded from /proc/net/tcp lsfd: cosmetic change, delete whitespaces lsfd: add SOCKLISTENING column commit 00417c4f826bd2b339dba63496cb8b8050b49d5e Author: Masatake YAMATO Date: Sun Oct 2 05:35:58 2022 +0900 lsfd: (man) write about TCP scokets Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 20d97930afe7f46429fabe67b36747dd42bf7bdf Author: Masatake YAMATO Date: Sun Oct 2 04:36:40 2022 +0900 tests: (lsfd) add a case testing TCP sockets This tests INET.LADDR, INET.RADDR, TCP.LADDR, TCP.LPORT, TCP.RADDR, and TCP.RPORT columns. Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-tcp | 4 + tests/helpers/test_mkfds.c | 172 ++++++++++++++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-tcp | 49 ++++++++++++ 3 files changed, 225 insertions(+) commit 7b2a9be00eda2bb015182b48a9eb258ae825580b Author: Masatake YAMATO Date: Sat Oct 1 13:24:27 2022 +0900 lsfd: use extra information loaded from /proc/net/tcp Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 259 +++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.c | 12 ++ misc-utils/lsfd.h | 6 + 3 files changed, 277 insertions(+) commit b36499456b2aa73313be9c65ece902abed7fa9b7 Author: Masatake YAMATO Date: Sat Oct 1 12:04:42 2022 +0900 lsfd: cosmetic change, delete whitespaces misc-utils/lsfd-sock-xinfo.c | 10 +++++----- misc-utils/lsfd-sock.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 45d61bffb2f8eb5c7c4192da0f5b202e717747a0 Author: Masatake YAMATO Date: Sun Oct 2 05:16:54 2022 +0900 lsfd: add SOCKLISTENING column Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 9 +++++++ misc-utils/lsfd-sock.c | 8 ++++++ misc-utils/lsfd-sock.h | 1 + misc-utils/lsfd.1.adoc | 3 +++ misc-utils/lsfd.c | 2 ++ misc-utils/lsfd.h | 1 + tests/expected/lsfd/mkfds-unix-dgram | 12 ++++----- tests/expected/lsfd/mkfds-unix-in-netns | 24 ++++++++--------- tests/expected/lsfd/mkfds-unix-stream | 48 ++++++++++++++++----------------- tests/ts/lsfd/mkfds-unix-dgram | 8 +++--- tests/ts/lsfd/mkfds-unix-in-netns | 8 +++--- tests/ts/lsfd/mkfds-unix-stream | 12 ++++----- 12 files changed, 80 insertions(+), 56 deletions(-) commit 642e1c6994c52484b90facfeab534757d010feda Author: Masatake YAMATO Date: Sat Sep 24 07:10:51 2022 +0900 fadvise: new command wrapping posix_fadvise For measuring and monitoring the performance aspect of a command, people may want to drop the page caches related to specified files. In some cases, writing 1 to /proc/sys/vm/drop_caches is overkill. The fadvise command can be used for dropping page caches related to specified files; the impact on a system is much smaller than /proc/sys/vm/drop_caches. Signed-off-by: Masatake YAMATO configure.ac | 4 ++ misc-utils/Makemodule.am | 9 +++ misc-utils/fadvise.1.adoc | 57 ++++++++++++++++ misc-utils/fadvise.c | 161 ++++++++++++++++++++++++++++++++++++++++++++ misc-utils/meson.build | 4 ++ tests/commands.sh | 1 + tests/expected/fadvise/drop | 23 +++++++ tests/ts/fadvise/drop | 57 ++++++++++++++++ 8 files changed, 316 insertions(+) commit 7076703b529d255600631306419cca1b48ab850a Author: ThomasKaiser Date: Fri Sep 30 10:53:25 2022 +0200 lscpu: Add Kryo 3XX Gold core [kzak@redhat.com: - update patch to use '-' between words in CPU name] Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit 238ea44157da69eba43d7bd5ded2f710a5089760 Merge: e70e5258c fe267f8ab Author: Karel Zak Date: Fri Sep 30 10:46:11 2022 +0200 Merge branch 'patch-1' of https://github.com/sashashura/util-linux * 'patch-1' of https://github.com/sashashura/util-linux: build: harden coverity.yml permissions build: harden cibuild.yml permissions build: harden cifuzz.yml permissions commit e70e5258c05b856842ce5bd2ab2d6cb4d440162b Merge: e0b15af48 55529a262 Author: Karel Zak Date: Fri Sep 30 10:44:55 2022 +0200 Merge branch 'lsfd-sock-unix-xinfo' of https://github.com/masatake/util-linux * 'lsfd-sock-unix-xinfo' of https://github.com/masatake/util-linux: tests: (lsfd) add a case for testing SOCKNETNS column tests: (lsfd) extend unix-stream test case to test SEQPACKET socket tests: (lsfd) add a case testing UNIX+DGRAM socket tests: (lsfd) add a case testing UNIX-STREAM sockets tests: (mkfds) add a factory making unix sockets lsfd: (man) write about UNIX-STREAM and UNIX sockets lsfd: use extra information loaded from /proc/net/unix lsfd: add new columns: SOCKNETNS, SOCKSTATE, and SOCKTYPE as stubs lsfd: facilitate the way to attach extra info loaded from /proc/net/* to sockets tests: (mkfds) quit when a byte is given via standard input tests: (mkfds) call close method of factory only when it is specified tests: (mkfds) cosmetic change, deleting empty lines tests: (mkfds) add boolean, a new parameter type tests: (mkfds) add a method for printing factory specific data to struct factory tests: (mkfds) allow a factory to make a factory specific temporarily data tests: (mkfds) delete unused "child" parameter for factories tests: (mkfds) delete per-factory "fork" field commit e0b15af484e6e0c05d3af1bf6cd226ca9252849a Merge: c606c5372 d2081ec7a Author: Karel Zak Date: Fri Sep 30 10:43:44 2022 +0200 Merge branch 'ynezz/aarch64-kernel-5.15-lscpu-crash-fix' of https://github.com/ynezz/util-linux * 'ynezz/aarch64-kernel-5.15-lscpu-crash-fix' of https://github.com/ynezz/util-linux: lib/path: ul_path_cpuparse: fix parsing of empty sysfs files commit c606c537299ac9e561cc3e1727365028b56eab07 Merge: 65b982ea9 191998e70 Author: Karel Zak Date: Fri Sep 30 10:43:14 2022 +0200 Merge branch 'codeql' of https://github.com/mrc0mmand/util-linux * 'codeql' of https://github.com/mrc0mmand/util-linux: ci: use CodeQL instead of LGTM commit 65b982ea90b1f477fcd784b04d2a45a701322fc5 Merge: 2aa5e7064 0945f02e5 Author: Karel Zak Date: Fri Sep 30 10:42:13 2022 +0200 Merge branch 'xfs/checksum' of https://github.com/t-8ch/util-linux * 'xfs/checksum' of https://github.com/t-8ch/util-linux: libblkid: superblocks: add trailing comma to array libblkid: xfs: add checksum support libblkid: xfs: add more superblock fields commit d2081ec7a1ba302aa3f4414c007e782e08a32f6e Author: Petr Štetiar Date: Thu Sep 22 11:49:13 2022 +0200 lib/path: ul_path_cpuparse: fix parsing of empty sysfs files Kernel 5.15 returns empty content for topology/thread_siblings on aarch64 platform, which in conjunction of uninitialized `buf` memory buffer results in the garbage: (gdb) p buf $14 = " @\377\367\177\000\000\000\275\000\347j\032\236" This garbage is then being later consumed by underlying helper functions like for example cpumask_parse() and this leads to the following crash later: in __libc_free (p=0x7ff7f67c00) at src/malloc/mallocng/free.c:105 in free (p=) at src/malloc/free.c:5 in add_cpuset_to_array (setsize=, set=, items=, ary=) at ../sys-utils/lscpu-topology.c:29 in cputype_read_topology (cxt=cxt@entry=0x7ff7fffe70, ct=0x4298a0) at ../sys-utils/lscpu-topology.c:153 in lscpu_read_topology (cxt=cxt@entry=0x7ff7fffe70) at ../sys-utils/lscpu-topology.c:629 in main (argc=1, argv=0x7ffffffdb8) at ../sys-utils/lscpu.c:1341 It looks like the problem is that current logic expects fgets() to set errno on failure, but fgets() is not documented to do so and and neither glibc nor musl set errno. So if errno was set to 0 before fgets() call, the failure from fgets() is ignored and then invalid buffer is being parsed. Fixes: #1810 Suggested-by: Thomas Weißschuh Signed-off-by: Petr Štetiar lib/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe267f8ab0ec69d049d632444c8b6b6255342d1e Author: Alex Date: Tue Sep 27 00:01:39 2022 +0200 build: harden coverity.yml permissions Signed-off-by: Alex .github/workflows/coverity.yml | 3 +++ 1 file changed, 3 insertions(+) commit 459c535006e3ea18a4a2b53033f72190df13bf1b Author: Alex Date: Tue Sep 27 00:01:22 2022 +0200 build: harden cibuild.yml permissions Signed-off-by: Alex .github/workflows/cibuild.yml | 7 +++++++ 1 file changed, 7 insertions(+) commit 9872124bfb7e396bd48f6c8030736de512fe8653 Author: Alex Date: Mon Sep 26 23:59:29 2022 +0200 build: harden cifuzz.yml permissions Signed-off-by: Alex .github/workflows/cifuzz.yml | 7 +++++++ 1 file changed, 7 insertions(+) commit 55529a2620d5fd3cc549c38bf50455748da9020f Author: Masatake YAMATO Date: Sun Sep 25 02:17:59 2022 +0900 tests: (lsfd) add a case for testing SOCKNETNS column Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-in-netns | 18 +++ tests/helpers/test_mkfds.c | 199 ++++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-unix-in-netns | 91 +++++++++++++++ 3 files changed, 308 insertions(+) commit 223063b13fe0b577a699221a357028703c3a4eb9 Author: Masatake YAMATO Date: Sat Sep 24 18:21:30 2022 +0900 tests: (lsfd) extend unix-stream test case to test SEQPACKET socket Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-stream | 12 ++++++ tests/helpers/test_mkfds.c | 41 ++++++++++++++++--- tests/ts/lsfd/mkfds-unix-stream | 76 ++++++++++++++++++----------------- 3 files changed, 87 insertions(+), 42 deletions(-) commit 2229a4b4600dee38b0bb4c88d380256904174b14 Author: Masatake YAMATO Date: Sat Sep 24 17:54:38 2022 +0900 tests: (lsfd) add a case testing UNIX+DGRAM socket Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-dgram | 6 ++ tests/helpers/test_mkfds.c | 118 +++++++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-unix-dgram | 60 ++++++++++++++++++ 3 files changed, 184 insertions(+) commit eca0c148c9114c70622419bee6cf648e43c841f9 Author: Masatake YAMATO Date: Sat Sep 24 04:23:27 2022 +0900 tests: (lsfd) add a case testing UNIX-STREAM sockets This tests STTYPE, NAME, SOCKSTATE, SOCKTYPE, and UNIX.PATH columns. Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-stream | 12 ++++++ tests/helpers/test_mkfds.c | 2 +- tests/ts/lsfd/mkfds-unix-stream | 78 +++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) commit a234bad9934e7f0fc47a90303e1979656885d131 Author: Masatake YAMATO Date: Sat Sep 24 03:20:30 2022 +0900 tests: (mkfds) add a factory making unix sockets Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 198 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) commit 9681d2e966a1b56c6c8ffd3b1b4b6e8f268e2327 Author: Masatake YAMATO Date: Sat Sep 24 04:45:03 2022 +0900 lsfd: (man) write about UNIX-STREAM and UNIX sockets Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2e38e61ca6fcdd60cca7620abe33deae4927a12b Author: Masatake YAMATO Date: Wed Sep 21 06:16:15 2022 +0900 lsfd: use extra information loaded from /proc/net/unix The loaded information is displayed at SOCKNETNS, SOCKSTATE, SOCKTYPE, and/or UNIX.PATH columns of UNIX-STREAM and UNIX typed sockets. Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 204 +++++++++++++++++++++++++++++++++++++++- misc-utils/lsfd.c | 2 + misc-utils/lsfd.h | 1 + tests/expected/lsfd/column-name | 2 +- 4 files changed, 206 insertions(+), 3 deletions(-) commit 7b50bd25f4cfa55462151efe5f70efa956fc294f Author: Masatake YAMATO Date: Wed Sep 21 06:03:56 2022 +0900 lsfd: add new columns: SOCKNETNS, SOCKSTATE, and SOCKTYPE as stubs Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock.c | 44 ++++++++++++++++++++++++++++++++++++++------ misc-utils/lsfd-sock.h | 23 +++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 19 +++++++++++++++++++ misc-utils/lsfd.c | 6 ++++++ misc-utils/lsfd.h | 3 +++ 5 files changed, 89 insertions(+), 6 deletions(-) commit 0ee16e433422951bf6374921a5621ae2f9b1c485 Author: Masatake YAMATO Date: Wed Sep 21 05:25:49 2022 +0900 lsfd: facilitate the way to attach extra info loaded from /proc/net/* to sockets Files under /proc/net/ like unix, tcp, udp, etc. provides extra information about sockets. To unitize these information in lsfd, this change adds stub for loading the information form /proc/net/* and attaching it to struct file presenting sockets. Signed-off-by: Masatake YAMATO misc-utils/Makemodule.am | 2 + misc-utils/lsfd-sock-xinfo.c | 180 +++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd-sock.c | 21 +++++ misc-utils/lsfd-sock.h | 49 ++++++++++++ misc-utils/lsfd.c | 23 ++++++ misc-utils/lsfd.h | 8 ++ misc-utils/meson.build | 2 + 7 files changed, 285 insertions(+) commit caa97697a7c5ff3545d6aabdbf102b3f6a2d2608 Author: Masatake YAMATO Date: Sat Sep 24 02:38:24 2022 +0900 tests: (mkfds) quit when a byte is given via standard input The original code monitored only SIGCONT. It is suitable for using the command from a test script. Monitoring standard input is helpful for developing a new factory interactively. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 01f7300b62b81efddd41dfabb15faa9d35b4ee45 Author: Masatake YAMATO Date: Fri Sep 23 15:33:50 2022 +0900 tests: (mkfds) call close method of factory only when it is specified Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2cc1eace97a729acfd6ea4d13058426160cbdf9a Author: Masatake YAMATO Date: Fri Sep 23 10:34:31 2022 +0900 tests: (mkfds) cosmetic change, deleting empty lines Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 2 -- 1 file changed, 2 deletions(-) commit e24756294b2e8f39c5de718ae2f58b9db1449e5a Author: Masatake YAMATO Date: Fri Sep 23 10:32:56 2022 +0900 tests: (mkfds) add boolean, a new parameter type Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 271bc510c2efe84b365273b8f730aeb3aa258bed Author: Masatake YAMATO Date: Fri Sep 23 03:42:44 2022 +0900 tests: (mkfds) add a method for printing factory specific data to struct factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 3 +++ 1 file changed, 3 insertions(+) commit 67aab5a5daee7087a0a041f717e192f29e6d222d Author: Masatake YAMATO Date: Thu Sep 22 10:51:33 2022 +0900 tests: (mkfds) allow a factory to make a factory specific temporarily data Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 67 +++++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 21 deletions(-) commit b5eb0333ee456203f6e90c1e2cf21d992dda1026 Author: Masatake YAMATO Date: Thu Sep 22 03:13:30 2022 +0900 tests: (mkfds) delete unused "child" parameter for factories Any factory has never used the parameter. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 95ac0ff94ed4eff0ff643d603d16a9a9ba7ddceb Author: Masatake YAMATO Date: Thu Sep 22 03:03:58 2022 +0900 tests: (mkfds) delete per-factory "fork" field Any factory has never used the field. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 2aa5e706404e014accb2160596b7b47e179fa9dd Author: Karel Zak Date: Wed Sep 21 09:42:12 2022 +0200 libsmartcols: (sample) remove hidden variable [CodeQL scan] Signed-off-by: Karel Zak libsmartcols/samples/maxout.c | 1 - 1 file changed, 1 deletion(-) commit 191998e702310d33a639a520e431dbd10bbd37f6 Author: Frantisek Sumsal Date: Wed Sep 14 11:33:51 2022 +0200 ci: use CodeQL instead of LGTM As LGTM is going to be shut down by EOY[0], let's move the code scanning to CodeQL as recommended. Thanks to GH integration the results from such scans will be shown both in the respective PR and in the Security -> Code Scanning tab[1]. [0] https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/ [1] https://github.com/util-linux/util-linux/security/code-scanning .github/workflows/codeql.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 0cf2e9d3eec3620299c798c2618912d66c9b76bf Author: Karel Zak Date: Mon Sep 19 14:35:24 2022 +0200 write: (man) fix history section Fixes: https://github.com/util-linux/util-linux/issues/1817 Signed-off-by: Karel Zak term-utils/write.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eb31ca7f7971101846bd3668be5d7807200fa2f Author: Karel Zak Date: Mon Sep 19 14:23:25 2022 +0200 lsblk: fix endless loop if device specified more than once Fixes: https://github.com/util-linux/util-linux/issues/1814 Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 01cb80bae8e79b21067b4a85eb4f82b14104130c Author: Karel Zak Date: Mon Sep 19 13:30:14 2022 +0200 lscpu: use topology maps in more robust way Addresses: https://github.com/util-linux/util-linux/issues/1810 Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit c4de71a5e566cde2fd13506b15da407c044d86b2 Merge: 9cef51f60 198c64085 Author: Karel Zak Date: Mon Sep 19 13:06:43 2022 +0200 Merge branch 'lsfd-fix-counter-spec' of https://github.com/masatake/util-linux * 'lsfd-fix-counter-spec' of https://github.com/masatake/util-linux: lsfd: fix wrong counter expression used in --summary output commit 9cef51f60dcd6ee18404792e4e0d802098beccd2 Merge: 60ddfc8b4 50c9e4b08 Author: Karel Zak Date: Mon Sep 19 12:48:47 2022 +0200 Merge branch 'ubi/checksum' of https://github.com/t-8ch/util-linux * 'ubi/checksum' of https://github.com/t-8ch/util-linux: libblkid: ubifs: add checksum support libblkid: ubi: add checksum support commit 60ddfc8b4f087be651b009709a2c634229d053dd Merge: 44432a76d baac95792 Author: Karel Zak Date: Mon Sep 19 12:47:10 2022 +0200 Merge branch 'zonefs/checksum' of https://github.com/t-8ch/util-linux * 'zonefs/checksum' of https://github.com/t-8ch/util-linux: libblkid: zonefs: add checksum support commit 44432a76d75acbbdc44cff73f08780e5f5b5a0d2 Merge: f04eeebe7 1db1994e0 Author: Karel Zak Date: Mon Sep 19 12:38:49 2022 +0200 Merge branch 'bcache/cleanup' of https://github.com/t-8ch/util-linux * 'bcache/cleanup' of https://github.com/t-8ch/util-linux: libblkid: bcache: report wiped area libblkid: bcache: remove unused macros commit f04eeebe73733195c42972078fc233a849dae30f Merge: 306f6842f c68a29cab Author: Karel Zak Date: Mon Sep 19 12:38:06 2022 +0200 Merge branch 'linux_raid/checksum' of https://github.com/t-8ch/util-linux * 'linux_raid/checksum' of https://github.com/t-8ch/util-linux: libblkid: linux_raid: add checksum support libblkid: mdraid: add test for version 1 superblock commit 306f6842f6a5ba4b16b3c96baa4aa493295cf33b Merge: b39471078 6bebcc9f2 Author: Karel Zak Date: Mon Sep 19 12:36:16 2022 +0200 Merge branch 'f2fs/fixes' of https://github.com/t-8ch/util-linux * 'f2fs/fixes' of https://github.com/t-8ch/util-linux: libblkid: f2fs: ensure checksum offset is within superblock libblkid: f2fs: fix checksum initialization on big-endian commit b394710785b80acb01f6f868ae19ed9093703720 Author: Karel Zak Date: Mon Sep 19 12:04:37 2022 +0200 libblkid: (erofs) make blocksize use more restrictive * make sure we do not use any huge number when read from the device * cleanup the code Addresses: https://github.com/util-linux/util-linux/pull/1799 Signed-off-by: Karel Zak libblkid/src/superblocks/erofs.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit dac8edb710d09d8e20a3bf74a0d564133250f503 Author: Karel Zak Date: Mon Sep 19 11:39:09 2022 +0200 Revert "libblkid: luks: add checksum support" See discussion at https://github.com/util-linux/util-linux/pull/1801 The change is unwanted by LUKS upstream developers, the checksum functionality is designed for libcryptsetup internal use only. Issues: * introduces security issue (allocated buffer is not checked agaisnt maximal value) - inserting LUKS2 device with header faking oversized header size will cause allocating of huge amount of memory (perhaps crash of blkid) * we support JSON area up to 4MB in size (checksum covers also this part that was not intended to be read by blkid) - calculating SHA256 for such area is really not fast operation; readin of 4MB of data is waste of resources either (that's why there is smaill 4k binary header) * even if checksum check is disabled, it is calculated (complete waste of time here) * it does not support anything else that SHA256 (we can switch to different hash or other algorithm later); blkid should not introduce such limits. * checksum for the second heder is not calculated at all This reverts commit eca0d8b8b1360f745131158bf6b5b5c1c04d98c9. Signed-off-by: Karel Zak Addresses: https://github.com/util-linux/util-linux/pull/1801 libblkid/src/superblocks/luks.c | 20 -------------------- tests/ts/blkid/images-fs/luks2.img.xz | Bin 744 -> 276 bytes 2 files changed, 20 deletions(-) commit 0945f02e5c8d57952655cb778092c3be9cf0373e Author: Thomas Weißschuh Date: Wed Sep 14 13:10:30 2022 +0200 libblkid: superblocks: add trailing comma to array This avoids spurious changes for future additions. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/superblocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac5545f8dd9b5b46cfeb02dda44a126d022e3518 Author: Thomas Weißschuh Date: Tue Sep 13 11:47:05 2022 +0200 libblkid: xfs: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/xfs.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 6bebcc9f221450d9640fd8033308159d3aedfe06 Author: Thomas Weißschuh Date: Sun Sep 18 20:14:47 2022 +0200 libblkid: f2fs: ensure checksum offset is within superblock Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/f2fs.c | 2 ++ 1 file changed, 2 insertions(+) commit 02b978c65cb1ca18d589a7c8a0085172936eade0 Author: Thomas Weißschuh Date: Sun Sep 18 20:12:59 2022 +0200 libblkid: f2fs: fix checksum initialization on big-endian Fixes #1813 Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/f2fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 198c6408597b506936d5a4a5fe600bbd9fa50aab Author: Masatake YAMATO Date: Sun Sep 18 02:48:44 2022 +0900 lsfd: fix wrong counter expression used in --summary output In be019f664db6eef7f2df38d31f1627d74a82fe65, I changed the counter expression used in --summary output unexpectedly. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 50c9e4b0864ceb9bb9c4c415ebb72a5e7c3c487a Author: Thomas Weißschuh Date: Tue Sep 13 14:26:37 2022 +0200 libblkid: ubifs: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/ubifs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit baac95792658012e454023734ebc8d870e0ad6b8 Author: Thomas Weißschuh Date: Tue Sep 13 13:08:49 2022 +0200 libblkid: zonefs: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/zonefs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit e83923fedcbc250fc7516125852b7cc14778d97c Author: Thomas Weißschuh Date: Tue Sep 13 14:09:34 2022 +0200 libblkid: ubi: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/ubi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5e98d8edba109518dfd3f922ee920a4c7d084272 Author: Thomas Weißschuh Date: Tue Sep 13 10:43:01 2022 +0200 libblkid: xfs: add more superblock fields We need sb_crc for checksum support. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/xfs.c | 52 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) commit c68a29cabfd49052f1ec7fd50e99a03a5252ed01 Author: Thomas Weißschuh Date: Sun Sep 11 17:05:09 2022 +0200 libblkid: linux_raid: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/linux_raid.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 53e349b878bb565c1463a5f23de1711203f11efd Author: Thomas Weißschuh Date: Sun Sep 11 16:53:48 2022 +0200 libblkid: mdraid: add test for version 1 superblock Signed-off-by: Thomas Weißschuh tests/expected/blkid/low-probe-mdraid-1 | 9 +++++++++ tests/ts/blkid/images-fs/mdraid-1.img.xz | Bin 0 -> 1764 bytes 2 files changed, 9 insertions(+) commit 1db1994e06047c2eac5fe21a0b474edd70d9120f Author: Thomas Weißschuh Date: Mon Apr 12 14:11:15 2021 +0200 libblkid: bcache: report wiped area make-bcache always clears the first 0x1000 bytes Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 2 ++ 1 file changed, 2 insertions(+) commit e63dfa670624fbdea5ae70aac4859615bcf1694b Author: Thomas Weißschuh Date: Mon Apr 12 13:56:29 2021 +0200 libblkid: bcache: remove unused macros Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 4 ---- 1 file changed, 4 deletions(-) commit 3443cea28263e0ec554ca0e7317e40c9166c48fd Merge: 36f950f54 eca0d8b8b Author: Karel Zak Date: Tue Sep 13 09:11:58 2022 +0200 Merge branch 'luks/checksum' of https://github.com/t-8ch/util-linux * 'luks/checksum' of https://github.com/t-8ch/util-linux: libblkid: luks: add checksum support lib: add sha256 implementation commit 36f950f5412802778b65ce5a1795b9483914ada4 Merge: 5c7fe7a66 93fc0656d Author: Karel Zak Date: Tue Sep 13 09:10:00 2022 +0200 Merge branch 'bcache/checksum' of https://github.com/t-8ch/util-linux * 'bcache/checksum' of https://github.com/t-8ch/util-linux: libblkid: bcache: add checksum support libblkid: add blkid_probe_get_sb_buffer() lib: add crc64 implementation commit 5c7fe7a66e234cf4a4bc20f884d4ba7017b4967a Merge: d07ac7528 7a3c1bd53 Author: Karel Zak Date: Tue Sep 13 09:07:33 2022 +0200 Merge branch 'erofs/checksum' of https://github.com/t-8ch/util-linux * 'erofs/checksum' of https://github.com/t-8ch/util-linux: libblkid: erofs: add checksum support libblkid: add blkid_probe_get_sb_buffer() commit d07ac7528ffe0df9091f985dbde92832b38c78b2 Merge: 1e09ff31a 99da9d91a Author: Karel Zak Date: Tue Sep 13 09:05:46 2022 +0200 Merge branch 'f2fs/checksum' of https://github.com/t-8ch/util-linux * 'f2fs/checksum' of https://github.com/t-8ch/util-linux: blkid: f2fs: update testfile to include checksum libblkid: f2fs: add checksum support commit 1e09ff31a45e684da6fbd9d446b33a5cb7fa60fa Merge: f26c977b6 81bbdd0b3 Author: Karel Zak Date: Tue Sep 13 09:04:59 2022 +0200 Merge branch 'exfat/checksum' of https://github.com/t-8ch/util-linux * 'exfat/checksum' of https://github.com/t-8ch/util-linux: libblkid: exfat: add checksum support commit f26c977b66a73f65f63e49933533e5584ccc6f6c Merge: c67b77283 a71359578 Author: Karel Zak Date: Tue Sep 13 09:04:07 2022 +0200 Merge branch 'btrfs/checksum' of https://github.com/t-8ch/util-linux * 'btrfs/checksum' of https://github.com/t-8ch/util-linux: libblkid: btrfs: add checksum support commit c67b772834a88bfa728d833fa6cc0212b6011c09 Merge: fef9b04da 2df0e6fe6 Author: Karel Zak Date: Tue Sep 13 08:57:49 2022 +0200 Merge branch 'lsfd-refine-columns' of https://github.com/masatake/util-linux * 'lsfd-refine-columns' of https://github.com/masatake/util-linux: lsfd: cosmetic change lsfd: (man) write about PIDFD.* columns lsfd: show pid, comm, and nspid of pidfd in PIDFD.{PID,COMM,NSPID} columns lsfd: (filter): accept '.' used in column names tests: (lsfd) fix the potential problems reported by github-code-scan tests: (lsfd) put double quote characters around variable expansions lsfd: use NAME column to show cooked file names lsfd: use TYPE column to show cooked file types lsfd: show classes of anonyomous inodes in AINODECLASS column lsfd: cosmetic changes tests: (mkfds) add a factory for making an inotify fd tests: (mkfds) cosmetic change, deleting an empty line commit eca0d8b8b1360f745131158bf6b5b5c1c04d98c9 Author: Thomas Weißschuh Date: Sun Sep 11 15:46:19 2022 +0200 libblkid: luks: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/luks.c | 20 ++++++++++++++++++++ tests/ts/blkid/images-fs/luks2.img.xz | Bin 276 -> 744 bytes 2 files changed, 20 insertions(+) commit f5b7f9e2cfdb60fdc374799a4a550f057a88cc36 Author: Thomas Weißschuh Date: Sun Sep 11 16:15:18 2022 +0200 lib: add sha256 implementation Based on src/crypt/crypt_sha256.c from musl v1.2.3[0] https://musl.libc.org/releases/musl-1.2.3.tar.gz Signed-off-by: Thomas Weißschuh include/Makemodule.am | 1 + include/sha256.h | 10 ++++ lib/Makemodule.am | 1 + lib/meson.build | 1 + lib/sha256.c | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 176 insertions(+) commit 93fc0656d9a97452ad0d55a97bc6fd085e7a7a40 Author: Thomas Weißschuh Date: Sun Sep 11 13:44:10 2022 +0200 libblkid: bcache: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 11d1738d3756fde33c66a37de5704ed560ee958f Author: Thomas Weißschuh Date: Mon Apr 19 19:32:00 2021 +0200 libblkid: add blkid_probe_get_sb_buffer() Signed-off-by: Thomas Weißschuh libblkid/src/blkidP.h | 4 ++-- libblkid/src/probe.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f3e36f124a7a292677abf4ca526574062c212f4d Author: Thomas Weißschuh Date: Sun Sep 11 13:15:40 2022 +0200 lib: add crc64 implementation This was lifted from libcrc [0] commit 7719e2112a9a960b1bba130d02bebdf58e8701f1 https://github.com/lammertb/libcrc Signed-off-by: Thomas Weißschuh include/Makemodule.am | 1 + include/crc64.h | 12 ++ lib/Makemodule.am | 1 + lib/crc64.c | 366 ++++++++++++++++++++++++++++++++++++++++++++++++++ lib/meson.build | 1 + 5 files changed, 381 insertions(+) commit 2df0e6fe6b78add2c3fc4c5b4dcd6739361a620d Author: Masatake YAMATO Date: Sat Sep 10 02:11:52 2022 +0900 lsfd: cosmetic change Sort the elements in "struct colinfo infos" array literal. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2116342e9b2ddc4d581496078a8b222330af90e Author: Masatake YAMATO Date: Sat Sep 10 02:09:01 2022 +0900 lsfd: (man) write about PIDFD.* columns misc-utils/lsfd.1.adoc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 553a68178e6d2048fe7807a01a1876e3385ab261 Author: Masatake YAMATO Date: Sat Sep 10 02:03:45 2022 +0900 lsfd: show pid, comm, and nspid of pidfd in PIDFD.{PID,COMM,NSPID} columns The values shown in the new columns are already shown in NAME column. Showing these values together in the NAME column helps users understand the pidfds opened quickly. However, the showing them together is not suitable for machine processing. The newly introduced columns are for machine processing. Below an example output: $ ./lsfd -o COMMAND,TYPE,PIDFD.COMM,PIDFD.PID -Q '(TYPE == "pidfd")' COMMAND TYPE PIDFD.COMM PIDFD.PID dbus-broker-lau pidfd dbus-broker 4661 dbus-broker-lau pidfd dbus-broker 4924 Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 51 ++++++++++++++++++++++++++++++++++++++++- misc-utils/lsfd.c | 6 +++++ misc-utils/lsfd.h | 3 +++ tests/expected/lsfd/mkfds-pidfd | 4 ++-- tests/ts/lsfd/mkfds-pidfd | 6 ++--- 5 files changed, 64 insertions(+), 6 deletions(-) commit 546b26b1017f2b68ce2ef03106a74b0047af7ab6 Author: Masatake YAMATO Date: Sat Sep 10 00:40:19 2022 +0900 lsfd: (filter): accept '.' used in column names Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d0d32058f42b8b3314251eaed9e0c8782acb366 Author: Masatake YAMATO Date: Sat Sep 10 00:38:37 2022 +0900 tests: (lsfd) fix the potential problems reported by github-code-scan Use arrays. Signed-off-by: Masatake YAMATO tests/ts/lsfd/column-name | 6 ++++-- tests/ts/lsfd/column-type | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 7e51ea8679147af3d1db5bad6cbef4217889b393 Author: Masatake YAMATO Date: Sat Sep 10 00:38:37 2022 +0900 tests: (lsfd) put double quote characters around variable expansions This fixes the potential problems reported by github-code-scan. Signed-off-by: Masatake YAMATO tests/ts/lsfd/column-ainodeclass | 10 +++++----- tests/ts/lsfd/column-name | 10 +++++----- tests/ts/lsfd/column-type | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) commit f3609f0ac5d4a7ede5e0a6de3fb5252a5cddb65c Author: Masatake YAMATO Date: Tue Sep 6 06:27:50 2022 +0900 lsfd: use NAME column to show cooked file names This change splits the NAME column into cooked NAME column and raw KNAME column. KNAME represents the type information extracted from /proc/$pid/fd or /proc/$pid/map_files. NAME is the same as KNAME but humans friendly and talkative if a special handler is implemented for the type of the file. Currently only pidfd has such a handler. Below an example output: $ ./lsfd -o TYPE,STTYPE,KNAME,NAME -Q '(TYPE == "pidfd")' TYPE STTYPE KNAME NAME pidfd UNKN anon_inode:[pidfd] pid=4661 comm=dbus-broker nspid=4661 pidfd UNKN anon_inode:[pidfd] pid=4924 comm=dbus-broker nspid=4924 Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 1 + misc-utils/lsfd-sock.c | 7 ------ misc-utils/lsfd-unkn.c | 2 +- misc-utils/lsfd.1.adoc | 26 ++++++++++--------- misc-utils/lsfd.c | 4 ++- misc-utils/lsfd.h | 1 + tests/expected/lsfd/column-name | 6 +++++ tests/expected/lsfd/mkfds-pidfd | 2 +- tests/ts/lsfd/column-name | 56 +++++++++++++++++++++++++++++++++++++++++ 9 files changed, 83 insertions(+), 22 deletions(-) commit fef9b04dafd297dbb080c8ccbbcb6800184a9616 Author: Peter Ujfalusi Date: Wed Sep 7 08:41:41 2022 +0300 lib/timeutils: Require '@' prefix for seconds since the Epoch timestamp Since the seconds since the Epoch is just a number it might be better to require special prefix to indicate the intention that the user wants to interpret the number as seconds since the Epoch. Use the same '@' character as prefix as used by systemd.time to make it easier to integrate in scripts intended to be used on systems with or without systemd. Fix also the initial support which discarded the seconds from the converted timestamp. Signed-off-by: Peter Ujfalusi lib/timeutils.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 80e1d850577bd2b9f3e13d1cd36f504bc15adbed Merge: aed2c1295 fc63a3d06 Author: Karel Zak Date: Mon Sep 12 11:46:49 2022 +0200 Merge branch '1' of https://github.com/neheb/util-linux * '1' of https://github.com/neheb/util-linux: meson: enable nls support meson: add PACKAGE definition meson: use dependency('dl') commit 7a3c1bd538c5c2ff733b7da133fe6c6dc3d27fe8 Author: Thomas Weißschuh Date: Sun Sep 11 12:33:13 2022 +0200 libblkid: erofs: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/erofs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 1020a3ddd1f97e1491d1e9102bb54360a6341caa Author: Thomas Weißschuh Date: Mon Apr 19 19:32:00 2021 +0200 libblkid: add blkid_probe_get_sb_buffer() Signed-off-by: Thomas Weißschuh libblkid/src/blkidP.h | 4 ++-- libblkid/src/probe.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 99da9d91a844ade68f78c6572c11b625e46ae716 Author: Thomas Weißschuh Date: Sat Sep 10 13:09:45 2022 +0200 blkid: f2fs: update testfile to include checksum Signed-off-by: Thomas Weißschuh tests/expected/blkid/low-probe-f2fs | 2 +- tests/ts/blkid/images-fs/f2fs.img.xz | Bin 22188 -> 22432 bytes 2 files changed, 1 insertion(+), 1 deletion(-) commit 90488446da5f370794e7a58ed805a20a5b119740 Author: Thomas Weißschuh Date: Sat Sep 10 13:04:10 2022 +0200 libblkid: f2fs: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/f2fs.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 81bbdd0b37d2b08fd9c1cf41781dc8df937097da Author: Thomas Weißschuh Date: Sat Sep 10 12:18:14 2022 +0200 libblkid: exfat: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/exfat.c | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit a7135957848d2eba1132cf564833bd21adbafb40 Author: Thomas Weißschuh Date: Sat Sep 10 11:14:31 2022 +0200 libblkid: btrfs: add checksum support Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/btrfs.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit be019f664db6eef7f2df38d31f1627d74a82fe65 Author: Masatake YAMATO Date: Sun Sep 4 00:25:15 2022 +0900 lsfd: use TYPE column to show cooked file types lsfd has two exclusive requirements: A. show quickly understandable information in limited display area, and B. provide primitive raw information for post-process tools. For the purpose A, summarizing information is nice. However, the summarized information is not suitable for tools. To satisfy the both requirements, I plan introducing new fields with a new convention. STTYPE represents the type information returned from stat(2). TYPE is the same as STTYPE but two exceptions; TYPE is filled with PROTONAME value if the target fd is a socket, or with AINODECLASS value if the target fd is a anonymous inode. Below an example output: $ ./lsfd -o COMMAND,TYPE,STTYPE,NAME -Q '(TYPE != STTYPE)' | head COMMAND TYPE STTYPE NAME systemd UNIX-STREAM SOCK UNIX-STREAM:[25493] systemd UNIX-STREAM SOCK UNIX-STREAM:[25493] systemd UNIX SOCK UNIX:[31445] systemd eventpoll UNKN anon_inode:[eventpoll] systemd signalfd UNKN anon_inode:[signalfd] systemd inotify UNKN anon_inode:inotify systemd timerfd UNKN anon_inode:[timerfd] systemd eventpoll UNKN anon_inode:[eventpoll] systemd inotify UNKN anon_inode:inotify STTYPE, column for tools, is printed only when the column is specified with -o option. Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 1 + misc-utils/lsfd-sock.c | 6 ++-- misc-utils/lsfd-unkn.c | 6 ++-- misc-utils/lsfd.1.adoc | 8 ++++- misc-utils/lsfd.c | 18 ++++++----- misc-utils/lsfd.h | 1 + tests/expected/lsfd/column-ainodeclass | 8 ++--- tests/expected/lsfd/column-type | 8 +++++ tests/expected/lsfd/mkfds-pidfd | 4 +-- tests/expected/lsfd/mkfds-socketpair | 6 ++-- tests/ts/lsfd/column-ainodeclass | 4 +-- tests/ts/lsfd/column-type | 51 ++++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-mapped-packet-socket | 2 +- tests/ts/lsfd/mkfds-pidfd | 4 +-- tests/ts/lsfd/mkfds-socketpair | 4 +-- 15 files changed, 100 insertions(+), 31 deletions(-) commit fc63a3d06478bacb8a5d22310053ce7fd3084cec Author: Rosen Penev Date: Thu Sep 8 19:03:49 2022 -0700 meson: enable nls support This was not implemented in meson, probably because it's a mess to do before version 0.59.0. Speaking of which, restrict it to that. Signed-off-by: Rosen Penev meson.build | 12 ++++++++++++ meson_options.txt | 1 + 2 files changed, 13 insertions(+) commit 3e43f62954a80e5dd0a9b7f546114bdaed09d95c Author: Rosen Penev Date: Thu Sep 8 19:12:33 2022 -0700 meson: add PACKAGE definition In the transition to meson, it seems this was missing. Fixes compilation when ENABLE_NLS is defined. Signed-off-by: Rosen Penev meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 324aa32cb36184afd59d91578ea5715ece5487a1 Author: Rosen Penev Date: Thu Sep 8 18:54:08 2022 -0700 meson: use dependency('dl') if meson is new enough. Signed-off-by: Rosen Penev meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4cd4ed189a5112c8b64359fdde253f51113f126f Author: Masatake YAMATO Date: Sat Sep 3 06:24:03 2022 +0900 lsfd: show classes of anonyomous inodes in AINODECLASS column Below an example output: $ ./lsfd -oCOMMAND,PID,USER,ASSOC,TYPE,AINODECLASS -Q '(SOURCE == "anon_inodefs")' | head COMMAND PID USER ASSOC TYPE AINODECLASS systemd 1360 jet 4 UNKN eventpoll systemd 1360 jet 5 UNKN signalfd systemd 1360 jet 6 UNKN inotify systemd 1360 jet 8 UNKN timerfd systemd 1360 jet 9 UNKN eventpoll systemd 1360 jet 11 UNKN inotify systemd 1360 jet 13 UNKN inotify systemd 1360 jet 21 UNKN timerfd gnome-keyring-d 4598 jet 5 UNKN eventfd Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 28 +++++++++++++++++++++ misc-utils/lsfd.1.adoc | 3 +++ misc-utils/lsfd.c | 3 +++ misc-utils/lsfd.h | 1 + tests/expected/lsfd/column-ainodeclass | 4 +++ tests/ts/lsfd/column-ainodeclass | 45 ++++++++++++++++++++++++++++++++++ 6 files changed, 84 insertions(+) commit 9b00458518eb57b31dee9d6a09e30549d74b9ba6 Author: Masatake YAMATO Date: Sat Sep 3 05:32:12 2022 +0900 lsfd: cosmetic changes Align the column of members in a structure initializer. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4d51adc5965a0a9718ed792cb1df06f6deb2cf1b Author: Masatake YAMATO Date: Sat Sep 3 05:30:23 2022 +0900 tests: (mkfds) add a factory for making an inotify fd Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 4ef12b208e90048ccc191e949d9d35db4efa71e4 Author: Masatake YAMATO Date: Sat Sep 3 05:26:27 2022 +0900 tests: (mkfds) cosmetic change, deleting an empty line Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 1 - 1 file changed, 1 deletion(-) commit aed2c12959b0d5bab2e2e43d0b2ad37940192a4f Author: Jakub Wilk Date: Wed Sep 7 17:55:16 2022 +0200 Use "grep -E" instead of "egrep" The egrep command has been deprecated since GNU grep 2.5.3 (released in 2007). In GNU grep 3.8, it issues an obsolescence warning: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d4 Use portable "grep -E" instead. tests/functions.sh | 2 +- tests/ts/look/separator | 4 ++-- tests/ts/mount/remount | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 80e9e8ca9bba6dfd0884e0d7707d398c2ac9101d Author: Peter Ujfalusi Date: Tue Sep 6 10:04:36 2022 +0300 lib/timeutils: Add %s (seconds since the Epoch) to parse_timestamp() The %s comes handy with for example dmesg with the --since within scripts to handle log rages. Signed-off-by: Peter Ujfalusi lib/timeutils.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3e3f4c03896b075928cc6b244dbe237fc870fb5a Author: Karel Zak Date: Mon Sep 5 09:14:45 2022 +0200 rfkill: (man) List options for supported device types Fixes: https://github.com/util-linux/util-linux/issues/1790 Signed-off-by: Karel Zak sys-utils/rfkill.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8614324c1d8f15f21bc31b6ed41aa2cd20114ef7 Merge: e4ed8665e 15d2cfc5b Author: Karel Zak Date: Mon Sep 5 09:11:22 2022 +0200 Merge branch 'setterm' of https://github.com/jwilk-forks/util-linux * 'setterm' of https://github.com/jwilk-forks/util-linux: setterm: (man) clarify --hbcolor, --ulcolor syntax commit e4ed8665e159229f5ae79dc16a041ba18e9d9428 Author: Karel Zak Date: Mon Sep 5 09:01:42 2022 +0200 lsblk: add PARTN column Add PARTN column, the source for this column is ID_PART_ENTRY_NUMBER from udev db, the original source of this information comes from libblkid. There is also another PARTN in udevdb, but it's based on data from kernel uevent. Fixes: https://github.com/util-linux/util-linux/issues/1787 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 6 ++++++ misc-utils/lsblk.c | 7 +++++++ misc-utils/lsblk.h | 1 + 3 files changed, 14 insertions(+) commit 15d2cfc5be86095fb45ed1964a38f204babf7272 Author: Jakub Wilk Date: Sat Sep 3 20:11:48 2022 +0200 setterm: (man) clarify --hbcolor, --ulcolor syntax Remove superfluous [bright]. Optional "bright" is already part of the definition of "16-color". term-utils/setterm.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b22a3bb51cd070ab17c2b68ff78a181b7c2e19af Author: Jeremy Linton Date: Thu Sep 1 16:52:30 2022 -0500 lscpu: Even more Arm part numbers Arm has published further MIDR/part numbers on https://developer.arm.com/ip-products/processors/cortex-a. Some of the new ones have already been merged, so lets fill in the gaps with A34, A65AE and X1C. Signed-off-by: Jeremy Linton sys-utils/lscpu-arm.c | 3 +++ 1 file changed, 3 insertions(+) commit 36e0914f12f763e2f71bf526c97958e3876a99d4 Author: Karel Zak Date: Thu Sep 1 11:05:20 2022 +0200 lsblk: add DISK-SEQ (aka /sys/block//diskseq Addreses: https://github.com/util-linux/util-linux/issues/1786 Signed-off-by: Karel Zak misc-utils/lsblk.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b1fa9e610be1914d29fbe7979b52b3272f610877 Author: Enze Li Date: Wed Aug 31 16:47:43 2022 +0800 asciidoc: fix typo in hwclock.8 The typo here is inferred from the context of the "--delay" option in the document. in same cases -> in some cases ^ ^ Signed-off-by: Enze Li sys-utils/hwclock.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07935158b78b2275bb14557a2f80da8d27747a86 Author: Chris Webb Date: Wed Aug 24 12:52:55 2022 +0100 unshare: Don't waste an ID when -r is used with --map-auto When --map-root-user or --map-current-user are used with --map-auto, one of the IDs from the first range in /etc/subuid and /etc/subgid is wasted and left unmapped: $ cat /etc/subuid 1000:65536:100 $ unshare --map-auto cat /proc/self/uid_map 0 65536 100 $ unshare --map-root-user --map-auto cat /proc/self/uid_map 0 1000 1 1 65536 99 In the second unshare, only 99 of the 100 UIDs available from /etc/subuid are actually mapped, whereas in the first unshare, all 100 delegated UIDs are correctly mapped. Distinguish auto mappings from manually-specified ones so they can be handled correctly, while still ensuring explicit --map-users/groups that overlap with the single mapping are correctly reduced in length because of the hole that's punched: $ unshare --map-auto cat /proc/self/uid_map 0 65536 100 $ unshare --map-root-user --map-auto cat /proc/self/uid_map 0 1000 1 1 65536 100 Signed-off-by: Chris Webb sys-utils/unshare.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit c62b21208058dd279b25fa2b32ebf02ad427a4f4 Author: Karel Zak Date: Thu Sep 1 11:05:20 2022 +0200 lsblk: use strcoll() to sort It's more user-friendly to follow locale. Signed-off-by: Karel Zak libsmartcols/src/cell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 278e00b4cc96978b69b0e08bc1b8bbf6341a9e82 Author: Karel Zak Date: Thu Sep 1 11:05:20 2022 +0200 lsirq: use strcoll() to sort It's more user-friendly to follow locale. Reported-by: Radka Skvarilova Signed-off-by: Karel Zak sys-utils/irq-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b9373e06243d5adf93d627916a5421b34a7e63f Author: Karel Zak Date: Wed Aug 24 12:20:25 2022 +0200 lslogins: support more password methods * detect more hashing methods * don't care about hash size * follow crypt(5) when check for valid chars Reported-by: Radka Skvarilova Signed-off-by: Karel Zak login-utils/lslogins.c | 66 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 24 deletions(-) commit ebb107bcb1f50c8e12bb732f344536eeed1bb295 Author: Karel Zak Date: Wed Aug 24 10:32:22 2022 +0200 mount: (docs) fix typos in bind-mount references Fixes: https://github.com/util-linux/util-linux/issues/1783 Signed-off-by: Karel Zak sys-utils/mount.8.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5d1424d85ac9e2a1369ee920038825c154ee5443 Author: Michael Trapp Date: Tue Aug 2 14:16:43 2022 +0200 libuuid: check clock value from LIBUUID_CLOCK_FILE The clock value from the LIBUUID_CLOCK_FILE must be checked in case of an update of libuuid. If clock==CLOCK_SEQ_CONT it must be set to a new value. Signed-off-by: Karel Zak libuuid/src/gen_uuid.c | 5 +++++ 1 file changed, 5 insertions(+) commit 626043658a24ae404fea82b98df5357cc35d4c6a Author: Karel Zak Date: Fri Aug 19 17:42:34 2022 +0200 build-sys: make pipesz optional Addresses: https://github.com/util-linux/util-linux/pull/1775 Fixes: https://github.com/util-linux/util-linux/issues/1772 Signed-off-by: Karel Zak configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 263381ddd46eea2293c70bc811273b66bc52087b Author: Mateusz Marciniec Date: Fri Aug 19 14:47:49 2022 +0200 configure.ac: Improve check for magic Check whether magic.h header exists before defining HAVE_MAGIC. Despite library availability there still can be missing header. Current test doesn't cover that possibility which will lead compilation to fail in case of separate sysroot. Signed-off-by: Mateusz Marciniec Signed-off-by: Tomasz Dziendzielski configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 819210f37d66949f54fb2f830bc62cb3635a83d5 Author: Karel Zak Date: Fri Aug 19 11:40:27 2022 +0200 libblkid: (topology) init variables for DM Addresses: https://github.com/util-linux/util-linux/issues/1776 Signed-off-by: Karel Zak libblkid/src/topology/dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e86c5cedf30d9f3a51bf60163fdecc2c9479024f Merge: 1d5d50c27 9fbc6ec5d Author: Karel Zak Date: Fri Aug 19 10:18:31 2022 +0200 Merge branch 'master' of https://github.com/jamacku/util-linux * 'master' of https://github.com/jamacku/util-linux: ci(lint): add shell linter - Differential ShellCheck commit 1d5d50c277e459f4ccbb6e3db416dcb6eb2e2bc4 Merge: 852cc8d43 3f5dd5fa8 Author: Karel Zak Date: Fri Aug 19 09:41:55 2022 +0200 Merge branch 'master' of https://github.com/jiayi0118/util-linux * 'master' of https://github.com/jiayi0118/util-linux: libblkid/src/topology/dm: close redundant write file description for pipe before reading data. commit 852cc8d4327de0299866ef65ccfe372281e6a7c1 Merge: ae92cbaae aa5adf240 Author: Karel Zak Date: Fri Aug 19 09:32:25 2022 +0200 Merge branch 'meson-pidfd-header' of https://github.com/t-8ch/util-linux * 'meson-pidfd-header' of https://github.com/t-8ch/util-linux: meson: check for sys/pidfd.h commit ae92cbaaeb4e2b3ccefd098a1540bb29aba50586 Merge: 7b8cd3a55 9cf3ae98d Author: Karel Zak Date: Fri Aug 19 09:29:56 2022 +0200 Merge branch 'lsfd-pidfd' of https://github.com/masatake/util-linux * 'lsfd-pidfd' of https://github.com/masatake/util-linux: lsfd.1.adoc: write about how pidfds are represented in NAME column lsfd: show pids targeted by pidfds in NAME column lsfd: add a helper function to get 'struct proc' object for given pid lsfd: introduce a method table for supporting various anon inodes lsfd.1.adoc: write more about TYPE column lsfd.1.adoc: fix a wrong formatting lsfd.1.adoc: fix typos lsfd.1.adoc: use monospace face instead of italic face lsfd: delete __unused__ attr from a used parameter commit 3f5dd5fa812120764312a2326285e88b2be82c2f Author: jiayi0118 <1398871225@qq.com> Date: Wed Aug 17 22:25:27 2022 +0800 libblkid/src/topology/dm: close redundant write file description for pipe before reading data. libblkid/src/topology/dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9fbc6ec5d3ca478453727defb6f50a9c7ecba1a1 Author: Jan Macku Date: Tue Aug 16 15:40:06 2022 +0200 ci(lint): add shell linter - Differential ShellCheck It performs differential ShellCheck scans and report results directly in pull request. documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck .github/workflows/differential-shellcheck.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit aa5adf24052677d65f8f2f985f22fd95b58991f6 Author: Thomas Weißschuh Date: Mon Aug 15 20:07:27 2022 +0200 meson: check for sys/pidfd.h 84732a8849a introduced this check for autotools. Signed-off-by: Thomas Weißschuh meson.build | 1 + 1 file changed, 1 insertion(+) commit 7b8cd3a55f0a460bc1311858760312baea0c4de1 Author: Karel Zak Date: Thu Aug 11 13:25:30 2022 +0200 lib/sysfs: fix typo Signed-off-by: Karel Zak lib/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6a76a5a3e4ee9ee6a1367d9989737378b8b3654 Author: Karel Zak Date: Thu Aug 11 13:14:18 2022 +0200 sfdisk: inform about failed fsync() [coverity scan] Signed-off-by: Karel Zak disk-utils/sfdisk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 88e5bad6e506d1ce7479dd53b5d177ce5c89a7f4 Author: Karel Zak Date: Thu Aug 11 13:13:39 2022 +0200 lib/canonicalize: improve code readability for coverity scan Signed-off-by: Karel Zak lib/canonicalize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2ec04d304b0f002307dd6e690906f46822e617d Author: Karel Zak Date: Thu Aug 11 13:09:05 2022 +0200 libfdisk: (gpt) don't ignore fsync() errors Signed-off-by: Karel Zak libfdisk/src/gpt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8bc53cbd1b88b709b645790a041864db75ccc56 Author: Karel Zak Date: Thu Aug 11 13:04:58 2022 +0200 sfdisk: improve code readability for coverity scan Signed-off-by: Karel Zak disk-utils/sfdisk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit adc72421f4db93bc9cd932bac2b0be8197a1d64f Author: Karel Zak Date: Thu Aug 11 10:59:40 2022 +0200 taskset: warn if affinity is not settable Let's read /proc/#/stat to get process flags and print warning if the affinity is not settable. Based on patch from Carsten. Tested-by: Carsten Emde Signed-off-by: Karel Zak schedutils/taskset.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit c2ece66e6a7078edc11afd4f1a1a08de656564ee Author: Karel Zak Date: Thu Aug 11 10:56:02 2022 +0200 lib/procfs: add function to parse /proc/#/stat Signed-off-by: Karel Zak include/procfs.h | 1 + lib/procfs.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) commit fbb894b2d447f088b13b69f18837ee53452422ab Author: Karel Zak Date: Thu Aug 11 10:55:17 2022 +0200 tests: (mkfds) use getpagesize() Signed-off-by: Karel Zak tests/helpers/test_mkfds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9cf3ae98df0d71b2d45135ade1293d4ed0c289a7 Author: Masatake YAMATO Date: Sun Aug 7 05:04:06 2022 +0900 lsfd.1.adoc: write about how pidfds are represented in NAME column Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit ba8c749fa54780a7d64bdb89f53ee9893b171401 Author: Masatake YAMATO Date: Fri Aug 5 00:48:15 2022 +0900 lsfd: show pids targeted by pidfds in NAME column Example output: $ sudo ./lsfd -Q '(NAME =~ "pidfd: .*")' COMMAND PID ... TYPE SOURCE ... NAME dbus-broker-lau 1010 ... UNKN anon_inodefs ... pidfd: pid=1015 comm=dbus-broker nspid=1015 dbus-broker-lau 14786 ... UNKN anon_inodefs ... pidfd: pid=14788 comm=dbus-broker nspid=14788 dbus-broker-lau 15051 ... UNKN anon_inodefs ... pidfd: pid=15053 comm=dbus-broker nspid=15053 Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 74 ++++++++++++++++++++++++++++++++++++++++- tests/expected/lsfd/mkfds-pidfd | 2 ++ tests/helpers/test_mkfds.c | 66 ++++++++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-pidfd | 47 ++++++++++++++++++++++++++ 4 files changed, 188 insertions(+), 1 deletion(-) commit 7dc7b6f47aefdf4793c364b2e3402f9cec0524ec Author: Masatake YAMATO Date: Fri Aug 5 00:47:10 2022 +0900 lsfd: add a helper function to get 'struct proc' object for given pid Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 28 ++++++++++++++++++++++++++++ misc-utils/lsfd.h | 2 ++ 2 files changed, 30 insertions(+) commit 9a9c96b70c66d544550ec17176de71786340359f Author: Masatake YAMATO Date: Thu Jul 28 04:17:34 2022 +0900 lsfd: introduce a method table for supporting various anon inodes Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 3 deletions(-) commit d22b056836e93f3e52fa99a366269734b6c1fd14 Author: Masatake YAMATO Date: Sun Aug 7 04:33:33 2022 +0900 lsfd.1.adoc: write more about TYPE column Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b241363a53a5368f8eae0b917ee1a11f6605f882 Author: Masatake YAMATO Date: Sun Aug 7 04:32:39 2022 +0900 lsfd.1.adoc: fix a wrong formatting Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 56599e4e26693942c31f6b7933f8b7708216d78e Author: Masatake YAMATO Date: Sun Aug 7 04:16:32 2022 +0900 lsfd.1.adoc: fix typos Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7be720d5b6b91d9398edeaabbf0bbe7bf0558380 Author: Masatake YAMATO Date: Sun Aug 7 03:58:39 2022 +0900 lsfd.1.adoc: use monospace face instead of italic face We should the italic font face for representing parameter alike words. Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 122 ++++++++++++++++++++++++------------------------- 1 file changed, 61 insertions(+), 61 deletions(-) commit a9e36b094f2311fe330ac0bb955d89200d53363f Author: Masatake YAMATO Date: Thu Jul 28 02:41:49 2022 +0900 lsfd: delete __unused__ attr from a used parameter Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33610d98883bca7ede862289c33f6f05ebbbe208 Merge: f72a92acf e279e9b2e Author: Karel Zak Date: Mon Aug 8 11:34:32 2022 +0200 Merge branch '1' of https://github.com/neheb/util-linux commit f72a92acf104db7e807d8f99f56599a49cc0f8e5 Merge: cb0b6b3aa 84732a884 Author: Karel Zak Date: Mon Aug 8 11:31:46 2022 +0200 Merge branch 'master' of https://github.com/kraj/util-linux * 'master' of https://github.com/kraj/util-linux: check for sys/pidfd.h commit cb0b6b3aa73afc2d53106ab3037ae6ed0d67fb76 Merge: ba676a276 bce240a74 Author: Karel Zak Date: Mon Aug 8 11:18:49 2022 +0200 Merge branch 'lsfd--testing-mmapped-packet-socket' of https://github.com/masatake/util-linux * 'lsfd--testing-mmapped-packet-socket' of https://github.com/masatake/util-linux: test: (lsfd) add a case for displaying PROTONAME column of mmap'ed AF_PACKET socket commit 84732a8849a08d42a9a95dcbee9005116be78eb8 Author: Khem Raj Date: Sun Aug 7 14:39:19 2022 -0700 check for sys/pidfd.h This header in newer glibc defines the signatures of functions pidfd_send_signal() and pidfd_open() and when these functions are defined by libc then we need to include the relevant header to get the definitions. Clang 15+ has started to error out when function signatures are missing. Fixes errors like misc-utils/kill.c:402:6: error: call to undeclared function 'pidfd_send_signal'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (pidfd_send_signal(pfd, ctl->numsig, &info, 0) < 0) Signed-off-by: Khem Raj configure.ac | 1 + include/pidfd-utils.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit bce240a74538a886291104184fa200635399ea63 Author: Masatake YAMATO Date: Sat Aug 6 06:49:27 2022 +0900 test: (lsfd) add a case for displaying PROTONAME column of mmap'ed AF_PACKET socket Tools like tcpdump do mmap sockets! This test case proves lsfd can extract information such a exotic source of mmap. Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-mapped-packet-socket | 2 + tests/helpers/test_mkfds.c | 155 +++++++++++++++++++++++++ tests/ts/lsfd/mkfds-mapped-packet-socket | 49 ++++++++ 3 files changed, 206 insertions(+) commit ba676a2761523eb9859b18f670f5944f44bd2bee Author: Pankaj Raghav Date: Fri Apr 22 17:02:03 2022 +0200 blkzone: make alignment check for zone size generic The zone offset and length alignment checks are based on a power-of-2(po2) zone size assumption. Make that calculation generic as there are ongoing efforts[1] to support zoned devices with non-po2 zone sizes. [1] https://lore.kernel.org/all/20220803094801.177490-1-p.raghav@samsung.com/ Signed-off-by: Pankaj Raghav sys-utils/blkzone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ac75e31de0ece74515e98e0b22e54cc0a9808bd Author: Karel Zak Date: Thu Aug 4 10:13:49 2022 +0200 column: fix greedy mode on -l In the 'greedy' mode strtok() skips leading white chars, but code for -l (merge remaining data to the last column) do not count the skipped chars. Old version: $ printf ' a b c\n1 2 3\n' | column -t -o '-' -l2 a-a 1-2 3 Fixed version: $ printf ' a b c\n1 2 3\n' | column -t -o '-' -l2 a-b c 1-2 3 Note, see leading white chars ' a b c'. Fexes: https://github.com/util-linux/util-linux/issues/1763 Signed-off-by: Karel Zak text-utils/column.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 4aacf57da1e41643fa789d3ffe848d50029a62de Author: Karel Zak Date: Thu Aug 4 10:10:19 2022 +0200 column: fix buffer overflow when -l specified $ printf 'a b c\n1 2 3\n' | column -s : -t -o '-' -l2 a b c-ġ 1 2 3- Signed-off-by: Karel Zak text-utils/column.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit e8f872b46d0ac78155a14a8b5ccf01071cb0cc5b Merge: 55e034ece 6a106ac97 Author: Karel Zak Date: Wed Aug 3 07:38:44 2022 +0200 Merge branch 'add/tags-man' of https://github.com/alberand/util-linux * 'add/tags-man' of https://github.com/alberand/util-linux: libblkid: add tags list to the man commit 55e034eceea85c65c6c1c1716b9165c4b6336ac3 Merge: e47841820 28c20d30c Author: Karel Zak Date: Tue Aug 2 10:57:43 2022 +0200 Merge branch 'lsfd-fix-segv-for-empty-Q' of https://github.com/masatake/util-linux commit e4784182073be5f92e0757444aaeba403a5c2bee Merge: b334c5c95 0eb2a4769 Author: Karel Zak Date: Tue Aug 2 10:56:25 2022 +0200 Merge branch 'build-in-flatpak' of https://github.com/pothos/util-linux * 'build-in-flatpak' of https://github.com/pothos/util-linux: meson: Install binaries to prefix commit b334c5c9586fe8430b937972d2b6e9a768a0e3a4 Author: Karel Zak Date: Tue Aug 2 10:55:16 2022 +0200 switch_root: (man) fix return code description Fixes: https://github.com/util-linux/util-linux/issues/1761 Signed-off-by: Karel Zak sys-utils/switch_root.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a106ac97267b1b3a1b3afc2b374aa303d90c7c0 Author: Andrey Albershteyn Date: Tue Aug 2 10:26:11 2022 +0200 libblkid: add tags list to the man Signed-off-by: Andrey Albershteyn libblkid/libblkid.3.adoc | 79 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) commit 28c20d30c03a50f1adca5af45e5e0384bf0c6770 Author: Masatake YAMATO Date: Thu Jul 28 12:56:52 2022 +0900 lsfd: fix crash triggered by an empty filter expression $ lsfd -Q '' or $ lsfd --filter '' made lsfd process crash. Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 8 ++++++- tests/expected/lsfd/option-filter-broken-exp | 7 ++++++ tests/ts/lsfd/option-filter-broken-exp | 36 ++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) commit 60803291acc7f431fd7750de7b2a2f1d45db1f4d Author: Karel Zak Date: Wed Jul 20 16:57:15 2022 +0200 sulogin: print features on --version Signed-off-by: Karel Zak login-utils/sulogin.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 89c7c6ea6ef12722eac31c18b8fa6fbcf429525b Author: Karel Zak Date: Wed Jul 20 16:55:02 2022 +0200 sulogin: fix includes * support --enable-sulogin-emergency-mount on Linux only * don't include unnecessary linux/magic.h * don't include linux/fs.h, sys/mount.h should be enough, otherwise define a fallback for MS_RELATIME Reported-by: Andreas Schwab Signed-off-by: Karel Zak configure.ac | 2 ++ login-utils/sulogin-consoles.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 05c13b2b973f1d99d01e1fad8ef7e8208f44914b Author: Karel Zak Date: Wed Jul 20 15:23:01 2022 +0200 lib/fileutils: fix compiler warning lib/fileutils.c: In function ‘dup_fd_cloexec’: lib/fileutils.c:75:35: warning: unused parameter ‘lowfd’ [-Wunused-parameter] int dup_fd_cloexec(int oldfd, int lowfd) ^ Addresses: https://github.com/util-linux/util-linux/issues/1755 Signed-off-by: Karel Zak lib/fileutils.c | 4 ++++ 1 file changed, 4 insertions(+) commit 48893bc3420178b8e08da1ec093057b9ccba1ed6 Author: Andrew Price Date: Fri Jul 15 15:55:13 2022 +0100 libuuid: (man) uuid_copy() -- add missing parenthesis Signed-off-by: Andrew Price libuuid/man/uuid_copy.3.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b565d311e56d73ee81adeae97e3718c3468baf8 Author: ThomasKaiser Date: Mon Jul 18 12:56:44 2022 +0200 Remove closing braces in Apple cores names sys-utils/lscpu-arm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1d9568477e6d2a69fc0ca8c12e2cdbabc5380aad Author: Karel Zak Date: Mon Jul 18 12:49:12 2022 +0200 lscpu: add MODELNAME column (for -e) Signed-off-by: Karel Zak sys-utils/lscpu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c6df41faa4def43e02cf17d85dd1b3708c54c062 Author: Karel Zak Date: Mon Jul 18 12:37:25 2022 +0200 lscpu: (arm) don't use space in names It's seems better to be consistent and use the same convention for all the names. Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit cd7085b854a1e85f0881099a2a6d452c8b821f45 Merge: 11ebc3d26 07a1ddc44 Author: Karel Zak Date: Mon Jul 18 12:34:18 2022 +0200 Merge branch 'apple-midr' of https://github.com/chadmed/util-linux * 'apple-midr' of https://github.com/chadmed/util-linux: lscpu: add missing Apple parts lscpu: make Apple part names human-friendly commit 0eb2a4769100667d619de55ba7eabc9fc64a1dd4 Author: Kai Lüke Date: Thu Jul 14 23:49:16 2022 +0200 meson: Install binaries to prefix When compiled in Flatpak /usr is read-only and the /app prefix is used. However, the binary installation did not use the prefix but had /usr hardcoded. Use the prefix instead of /usr when assembling the prefix/(s)bin paths. Signed-off-by: Kai Lüke meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 07a1ddc44f133bf8d63b3c0deb28c927d4f34972 Author: James Calligeros Date: Sat Jul 9 15:08:41 2022 +1000 lscpu: add missing Apple parts Signed-off-by: James Calligeros sys-utils/lscpu-arm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 11ebc3d26e64e766d2a2ec670ca1a4ad4afdc381 Author: Karel Zak Date: Mon Jul 11 20:09:56 2022 +0200 libfdisk: fix typos Reported-by: Thomas Weißschuh Signed-off-by: Karel Zak libfdisk/src/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3d80e6371aa961beb97e752c4cafd78d018943d Author: Karel Zak Date: Mon Jul 11 19:51:21 2022 +0200 sfdisk: (man) fix sector-size description Addresses: https://github.com/util-linux/util-linux/issues/1744 Signed-off-by: Karel Zak disk-utils/sfdisk.8.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16467e474041f9ca4ea8d0f5ac6f0cf1142e0af9 Author: Karel Zak Date: Mon Jul 11 14:02:30 2022 +0200 libfdisk: make scripts portable between different sector sizes Fixes: https://github.com/util-linux/util-linux/issues/1744 Signed-off-by: Karel Zak libfdisk/src/script.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) commit 7e07aa75d5e69369cc73c403159514df497eda5b Author: Karel Zak Date: Mon Jul 11 12:49:21 2022 +0200 libfdisk: (gpt) fix PMBR read overflow Signed-off-by: Karel Zak libfdisk/src/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef5617c17fe023d4fc760499be417a26f54929a9 Author: James Calligeros Date: Sat Jul 9 14:52:35 2022 +1000 lscpu: make Apple part names human-friendly The internal Apple model numbers for the SoCs are somewhat confusing given that they are mostly similar and differ by only one or two digits. Instead, use the public nomenclature for these chips to avoid ambiguity and beautify the output. Signed-off-by: James Calligeros sys-utils/lscpu-arm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c6fa0ebd7b0b6d2da5dd4d3edd5e885632ff65d0 Author: Sol Boucher Date: Fri Jul 8 12:09:13 2022 -0400 unshare: Fix "you (user xxxx) don't exist" error when uid differs from primary gid This problem affected the --map-auto and --map-groups=auto command-line switches. The root cause is that /etc/subgid is indexed by user or uid, not by group or gid; therefore, we should be using the effective uid to find entries in this file, just as we do for /etc/subuid. Signed-off-by: Sol Boucher sys-utils/unshare.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aff94adda7d94f79d184db1a524c5a79119c8a28 Author: Karel Zak Date: Thu Jul 7 13:41:37 2022 +0200 lscpu: keep bogomips locale output locale sensitive Fixes: https://github.com/util-linux/util-linux/issues/1743 Signed-off-by: Karel Zak sys-utils/lscpu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 3cfba7d39b66eff4307218fefd8bb34bb1621f83 Author: Michael Trapp Date: Mon Jun 20 17:10:36 2022 +0200 libuuid: Implement continuous clock handling for time based UUIDs In a uuidd setup, the daemon is a singleton and can maintain it's own resources for time based UUID generation. This requires a dedicated 'clock sequence range' but does not need any further lock/update of the LIBUUID_CLOCK_FILE from uuidd. The range of available clock values is extended by a continuous handling of the clock updates - instead of updating the value to the current timestamp, it is incremented by the number of requested UUIDs. libuuid/src/gen_uuid.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++--- libuuid/src/libuuid.sym | 1 + libuuid/src/uuidd.h | 1 + misc-utils/uuidd.8.adoc | 3 ++ misc-utils/uuidd.c | 54 ++++++++++++++++++++++++++--- 5 files changed, 140 insertions(+), 10 deletions(-) commit ad10652dddf5bc1d54c4a95cfaae4ef61bc0069c Merge: cf15fdfdd e4e7a3c41 Author: Karel Zak Date: Mon Jul 4 12:15:17 2022 +0200 Merge branch 'misc-utils-fix-rename-from-empty' of https://github.com/ChickenProp/util-linux * 'misc-utils-fix-rename-from-empty' of https://github.com/ChickenProp/util-linux: rename tests: stop clobbering error output. Fix `rename -a ''`. Rename: fix empty 'from' with / in filename. commit e4e7a3c4138df6a05bfb3185ecf8f70353b41096 Author: Philip Hazelden Date: Sun Jul 3 23:22:58 2022 +0100 rename tests: stop clobbering error output. Fortunately there doesn't seem to have been any to clobber. tests/ts/rename/basic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2285629d7d4564773b106fa1fa29a3e34cbed3ea Author: Philip Hazelden Date: Sun Jul 3 18:54:43 2022 +0100 Fix `rename -a ''`. It previously entered an infinite loop. Now it inserts the `to` string between every character of `from`, including at the beginning and end. rename -a '' _ 123.txt # renames to _1_2_3_._t_x_t_ misc-utils/rename.c | 13 +++++++++---- tests/expected/rename/basic | 1 + tests/ts/rename/basic | 4 ++++ 3 files changed, 14 insertions(+), 4 deletions(-) commit 8a6c0e598937aa26ab061214a08374a708249306 Author: Philip Hazelden Date: Sun Jul 3 22:46:16 2022 +0100 Rename: fix empty 'from' with / in filename. Previously, if we did e.g. rename '' _ ./foo.txt it would try to rename to ._/foo.txt, because `string_replace` was passed `s="/foo.txt"` and `from` would match at the front. Now we pass `s="foo.txt"`. This doesn't affect the case when `to` contains a slash. In that situation we'll still place `to` at the very beginning of the path, e.g. rename '' _/ ./foo.txt # rename to _/./foo.txt rename '' /_ ./foo.txt # rename to /_./foo.txt misc-utils/rename.c | 7 ++++++- tests/expected/rename/subdir | 5 +++++ tests/ts/rename/subdir | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) commit cf15fdfdd0f9a33760f156092fcdfb1e38086731 Author: Thomas Kaiser Date: Fri Jul 1 14:16:49 2022 +0200 Fix formatting. sys-utils/lscpu-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd1a85bf13121a59ef07e6861f96e26acdf07f26 Author: ThomasKaiser Date: Fri Jul 1 11:24:04 2022 +0200 Adding Apple core names, distinguish by SoC/SiP name sys-utils/lscpu-arm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 8cdb31d149fb347d71ed266437eadf8df1ab4eb5 Author: ThomasKaiser Date: Thu Jun 30 07:32:40 2022 +0200 Add Makalu/Makalu-ELP (A715/X3) Also fix names of A510/A710 cores sys-utils/lscpu-arm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c91217918b3252e24e16abc62b44b6a3e13fe225 Author: Karel Zak Date: Wed Jun 29 15:35:43 2022 +0200 lscpu: add --hierarchic Fixes: https://github.com/util-linux/util-linux/issues/1735 Signed-off-by: Karel Zak sys-utils/lscpu.1.adoc | 8 +++++++- sys-utils/lscpu.c | 37 +++++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 11 deletions(-) commit e7cce92ea29fa30c4b46b8dcc93507a798e36b43 Author: Karel Zak Date: Wed Jun 29 12:36:18 2022 +0200 script: (man) be more explicit about log purpose Signed-off-by: Karel Zak term-utils/script.1.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcbddb95364a9da6483c2b801f595497a6347996 Merge: c8c5716a0 5c64ca96f Author: Karel Zak Date: Mon Jun 27 13:03:56 2022 +0200 Merge branch 'lsns-man-see-also' of https://github.com/masatake/util-linux * 'lsns-man-see-also' of https://github.com/masatake/util-linux: lsns: (man) add ip-netns to "SEE ALSO" section commit c8c5716a031948304f53e2449ce441704297ae11 Merge: d12e166da 2ccf0d4a5 Author: Karel Zak Date: Mon Jun 27 13:03:17 2022 +0200 Merge branch 'bobbyboy5069-date-pad' of https://github.com/bobbyboy5069/util-linux * 'bobbyboy5069-date-pad' of https://github.com/bobbyboy5069/util-linux: add padding to dates in issue file commit d12e166daaa160e8d9c81b64dcd616d7672bfaf1 Author: Karel Zak Date: Mon Jun 27 13:00:55 2022 +0200 libblkid: simplify 'leaf' detection References: https://github.com/util-linux/util-linux/pull/1729 Signed-off-by: Karel Zak libblkid/src/devname.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 2761c8e15b6ddc02007272bcd225fee76604a499 Merge: 33a48f443 689cdacff Author: Karel Zak Date: Mon Jun 27 12:40:29 2022 +0200 Merge branch 'dm_leaf_holders' of https://github.com/wjordan/util-linux * 'dm_leaf_holders' of https://github.com/wjordan/util-linux: Improve is_dm_leaf performance Read from `/holders` instead of `/slaves` to determine whether the device is a leaf node, eliminating a scan across all block devices in the system. commit 33a48f44361d7d468566f80b5ff797c60a01bae6 Merge: 52596c8e7 395f3baed Author: Karel Zak Date: Mon Jun 27 12:37:05 2022 +0200 Merge branch 'master' of https://github.com/lishengyu/util-linux * 'master' of https://github.com/lishengyu/util-linux: lsns: fix the memory leak. commit 52596c8e7dd8bf3e2dca259d6645053a1b4fc599 Merge: 90eeee21c 679b347e0 Author: Karel Zak Date: Mon Jun 27 12:36:01 2022 +0200 Merge branch 'lsfd--fix-ipc-memleak' of https://github.com/masatake/util-linux * 'lsfd--fix-ipc-memleak' of https://github.com/masatake/util-linux: lsfd: fix memory leak related to ENDPOINTS field commit 5c64ca96f4ae13ef9921e8bcd9b30486a92482a9 Author: Masatake YAMATO Date: Sun Jun 26 15:04:36 2022 +0900 lsns: (man) add ip-netns to "SEE ALSO" section Signed-off-by: Masatake YAMATO sys-utils/lsns.8.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ccf0d4a59cc0f7dd5b087e671e285e54a02b775 Author: bobbyboy5069 <106821778+bobbyboy5069@users.noreply.github.com> Date: Fri Jun 24 23:02:15 2022 +0300 add padding to dates in issue file Pad the day of the month so the length of the date string doesn't change. term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 689cdacffa6d9ebf3c27dd0813027fb02f9742ec Author: Will Jordan Date: Wed Jun 22 15:13:11 2022 -0700 Improve is_dm_leaf performance Read from `/holders` instead of `/slaves` to determine whether the device is a leaf node, eliminating a scan across all block devices in the system. libblkid/src/devname.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 395f3baed6df1eb736c872ecaa3aa2f05c5dc111 Author: lishengyu Date: Thu Jun 23 14:02:49 2022 +0800 lsns: fix the memory leak. ==28129== 96 bytes in 3 blocks are possibly lost in loss record 1 of 4 ==28129== at 0x4837B65: calloc (vg_replace_malloc.c:752) ==28129== by 0x405C83: xcalloc (xalloc.h:60) ==28129== by 0x405C83: netnsid_cache_add (lsns.c:389) ==28129== by 0x405C83: get_netnsid (lsns.c:486) ==28129== by 0x405C83: read_process (lsns.c:549) ==28129== by 0x403FB4: read_processes (lsns.c:586) ==28129== by 0x403FB4: main (lsns.c:1417) ==28129== ==28129== 119,664 (384 direct, 119,280 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4 ==28129== at 0x4837B65: calloc (vg_replace_malloc.c:752) ==28129== by 0x4055F5: xcalloc (xalloc.h:60) ==28129== by 0x4055F5: read_process (lsns.c:516) ==28129== by 0x403FB4: read_processes (lsns.c:586) ==28129== by 0x403FB4: main (lsns.c:1417) sys-utils/lsns.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 679b347e00f920b01c4a6c542ca4c23ae2abf10e Author: Masatake YAMATO Date: Wed Jun 22 02:39:09 2022 +0900 lsfd: fix memory leak related to ENDPOINTS field `struct ipc' is the data structure used behind ENDPOINTS field. The objects of the data structure and its hash table were not freed. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 90eeee21c69aa805709376ad8282e68b5bd65c34 Merge: e38b6885e 553151462 Author: Karel Zak Date: Tue Jun 21 09:38:03 2022 +0200 Merge branch 'master' of https://github.com/blacknon/util-linux * 'master' of https://github.com/blacknon/util-linux: update. Since the specified column is shifted by one column, subtract it. commit e38b6885e3d82349f68e05a0f466659dc660d9d1 Author: Masatake YAMATO Date: Mon Jun 20 22:56:22 2022 +0900 tests: (lsfd) update the expected output for "test_mkfds symlink" Though the code of lsfd was changed in 4b496e50ee4f6bd8256d082a85fc027a7eaa45cb, the expected output of the test case was not updated. Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-symlink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 553151462bd85166758b14b4b98f3e5462b9b398 Author: blacknon Date: Mon Jun 20 22:56:00 2022 +0900 update. Since the specified column is shifted by one column, subtract it. text-utils/column.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2d297bd514fc9be885ae664b153ebaed5785f0f Author: Karel Zak Date: Mon Jun 20 14:00:38 2022 +0200 hardlink: use info rather than warning message Fixes: https://github.com/util-linux/util-linux/issues/1710 Signed-off-by: Karel Zak misc-utils/hardlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c417ce68e4df3f1423fc680c514bfed82c0bc4d6 Author: Karel Zak Date: Mon Jun 20 13:42:35 2022 +0200 sfdiks: (man) fix example Fixes: https://github.com/util-linux/util-linux/discussions/1719 Signed-off-by: Karel Zak disk-utils/sfdisk.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 131a443459476301e73d900f6074ecb0102bf599 Author: Karel Zak Date: Mon Jun 20 13:25:59 2022 +0200 column: support ranges when addressing columns by numbers Fixes: https://github.com/util-linux/util-linux/issues/1723 Signed-off-by: Karel Zak text-utils/column.1.adoc | 1 + text-utils/column.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit 3509c1969a2ce55eaefb630ef947cdf20656abe8 Merge: cf966ab60 4b496e50e Author: Karel Zak Date: Mon Jun 20 12:44:36 2022 +0200 Merge branch 'lsfd-fix-contatns-for-decode-flags' of https://github.com/masatake/util-linux * 'lsfd-fix-contatns-for-decode-flags' of https://github.com/masatake/util-linux: lsfd: fix wrongly checked flag constants commit cf966ab601dcd76ec70b2aa7a365688b23923a21 Merge: 03eccf9ea 6b10da4ad Author: Karel Zak Date: Mon Jun 20 12:43:31 2022 +0200 Merge branch 'fix-github-issue-1720' of https://github.com/masatake/util-linux * 'fix-github-issue-1720' of https://github.com/masatake/util-linux: lsfd: try including asm/fcntl.h first for decoding flags of fdinfo commit 03eccf9ea76e9f585060a66ce504ca3e44525a4e Merge: 61394559c af229df78 Author: Karel Zak Date: Mon Jun 20 12:40:59 2022 +0200 Merge branch 'fix-github-issue-1717' of https://github.com/masatake/util-linux commit 61394559c695c1ce685890c535533e0ffca45303 Author: Karel Zak Date: Fri Jun 17 18:04:06 2022 +0200 libmount: remove mtab locking Signed-off-by: Karel Zak libmount/src/lock.c | 360 ++-------------------------------------------- libmount/src/mountP.h | 3 - libmount/src/tab_update.c | 4 - 3 files changed, 15 insertions(+), 352 deletions(-) commit 4b496e50ee4f6bd8256d082a85fc027a7eaa45cb Author: Masatake YAMATO Date: Sat Jun 18 00:48:41 2022 +0900 lsfd: fix wrongly checked flag constants The definition of O_FOLLOW was checked. However, it was a typo of O_NOFOLLOW. The definition of O_FASYNC was checked. However, it was a typo of FASYNC. Signed-off-by: Masatake YAMATO misc-utils/lsfd-decode-file-flags.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9d52e6e63e647405e88122c0c38700b4635de1b Author: Karel Zak Date: Fri Jun 17 17:45:29 2022 +0200 libmount: remove mtab related code Signed-off-by: Karel Zak libmount/src/cache.c | 24 ++--- libmount/src/context.c | 192 +++++++++++++++++++------------------- libmount/src/context_loopdev.c | 13 ++- libmount/src/context_mount.c | 30 +++--- libmount/src/context_umount.c | 102 +++++++++----------- libmount/src/fs.c | 2 +- libmount/src/libmount.h.in | 28 +++--- libmount/src/libmount.sym | 1 + libmount/src/mountP.h | 31 +++--- libmount/src/tab.c | 8 +- libmount/src/tab_parse.c | 20 ++-- libmount/src/tab_update.c | 66 ++++--------- libmount/src/utils.c | 52 +++-------- sys-utils/mount.8.adoc | 3 - sys-utils/umount.8.adoc | 3 - tests/ts/libmount/context-utab | 4 - tests/ts/libmount/context-utab-py | 4 - 17 files changed, 240 insertions(+), 343 deletions(-) commit 6b10da4adc7a4601990eb3faf09809a496cf25b1 Author: Masatake YAMATO Date: Sat Jun 18 00:28:38 2022 +0900 lsfd: try including asm/fcntl.h first for decoding flags of fdinfo Close #1720 The original code tried including asm-generic/fcntl.h before trying including asm/fcntl.h. This caused a bug in decoding flag of fdinfo on Linux running on armv7l. Signed-off-by: Masatake YAMATO misc-utils/lsfd-decode-file-flags.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7f56e4129f1c951acc1a5f6f1efa8cf8b85d0075 Author: Karel Zak Date: Fri Jun 17 13:42:11 2022 +0200 libmount: remove support for writable /etc/mtab This commit removes --enable-libmount-support-mtab. The classic /etc/mtab is broken by design. It does not support namespaces, chroots, etc. The only sane way to keep track of mounted filesystems is to ask the kernel. It's a bad idea to maintain a mount table in userspace. Signed-off-by: Karel Zak configure.ac | 4 -- libmount/src/context.c | 13 +----- libmount/src/context_mount.c | 42 ------------------ libmount/src/tab_parse.c | 24 ----------- libmount/src/tab_update.c | 15 +++---- libmount/src/version.c | 3 -- tests/functions.sh | 9 ---- tests/ts/libmount/context | 18 +------- tests/ts/libmount/context-py | 18 +------- tests/ts/libmount/update | 61 ++++---------------------- tests/ts/mount/devname | 4 -- tests/ts/mount/remount | 4 -- tests/ts/mount/rlimit | 93 ---------------------------------------- tests/ts/mount/umount-alltargets | 5 --- 14 files changed, 19 insertions(+), 294 deletions(-) commit af229df78cbff7da32fd2ab732a74d63f36909e3 Author: Masatake YAMATO Date: Thu Jun 16 22:42:12 2022 +0900 test: (lsfd) ignore noatime mnt flag when testing a fd opening / directory Close #1717. If the file system where the target directory is is mounted with "noatime" flag, Linux kernel may set O_NOATIME to the fd associated with the target directory. As a result, mkfds-directory test failed. With this change, mkfds-directory deletes "noatime" from the output of lsfd before verifying the output if "noatime" mount flag is set to the file system where the directory opened by mkfds-directory is. Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-directory | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 224410df38d03a572a3b5cd3000906fb1294ce4e Author: Karel Zak Date: Wed Jun 15 10:15:53 2022 +0200 more: (man) add note about POSIXLY_CORRECT Signed-off-by: Karel Zak text-utils/more.1.adoc | 3 +++ 1 file changed, 3 insertions(+) commit 28b391ce7e58f8327c092b3911c05f526d0ad586 Author: Karel Zak Date: Wed Jun 15 10:03:44 2022 +0200 more: restore exit-on-eof if POSIXLY_CORRECT is not set In version 2.38, exit-on-eof has been disabled by default. This change is annoying for users and forces many users to use 'alias more="more -e"'. It seems better to force POSIX lovers to use POSIXLY_CORRECT env. variable and stay backwardly compatible by default. Addresses: https://github.com/util-linux/util-linux/issues/1703 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2088493 Signed-off-by: Karel Zak text-utils/more.1.adoc | 2 +- text-utils/more.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 140e4c7b83fb6a4229940c58da751008f68167c8 Author: Karel Zak Date: Tue Jun 14 16:13:03 2022 +0200 build-sys: don't call AC_SUBST() if unnecessary Signed-off-by: Karel Zak configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f6d3f34a8593adee7ba3dfa933fb5fb2c9ea7ff3 Author: Karel Zak Date: Tue Jun 14 15:47:05 2022 +0200 build-sys: use PKG_CHECK_VAR() Do not call 'PKG_CONFIG --exists' and '$PKG_CONFIG --variable' if there is a much more robust PKG_CHECK_VAR() macro. It's also not necessary to check for the dirs if all the feature (systemd or bashcompletiondir) is disabled. Reported-by: Rolf Eike Beer Signed-off-by: Karel Zak configure.ac | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 0f854295f37bf06003a3bacd4e2765edfca19548 Merge: 6895cf92e 908ac36f2 Author: Karel Zak Date: Mon Jun 13 12:16:39 2022 +0200 Merge branch 'fix-github-issue-1709' of https://github.com/masatake/util-linux * 'fix-github-issue-1709' of https://github.com/masatake/util-linux: lsfd: use constants defined in asm/fctl.h flags field of a fdinfo commit 6895cf92e223a0c1ce0809af81be2599ae764167 Author: Karel Zak Date: Mon Jun 13 12:10:51 2022 +0200 include/c: add prefix to print_features() Signed-off-by: Karel Zak include/c.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6a2baa1a55d41a399c8d9a8c3ee92f3cf056f3cd Author: Karel Zak Date: Mon Jun 13 12:03:26 2022 +0200 hardlink: print supported feature on --version Signed-off-by: Karel Zak misc-utils/hardlink.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 4f5e14fd9c19a2356801a48074b4a1fa5bc1ed98 Author: Karel Zak Date: Mon Jun 13 12:02:49 2022 +0200 lib/fileeq: clean up ifdefs use Signed-off-by: Karel Zak include/fileeq.h | 4 ++++ lib/fileeq.c | 13 ++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) commit beafda1869e0f80d6adc55377c5d6e0427110087 Author: Karel Zak Date: Mon Jun 13 12:01:51 2022 +0200 include/c: add print_version_with_features() Signed-off-by: Karel Zak include/c.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 3b0ed60251d22a6730b3613abf458909b6a49053 Merge: 871110a4f 7d2de8d40 Author: Karel Zak Date: Mon Jun 13 11:17:35 2022 +0200 Merge branch 'change-default-comparison-method' of https://github.com/DrHyde/util-linux * 'change-default-comparison-method' of https://github.com/DrHyde/util-linux: change the default comparison method on Mac OS to suppress a warning that's going to fall back to memcmp commit 871110a4f074c5df845e5e1e1674862e1712b69d Author: Karel Zak Date: Mon Jun 13 10:34:52 2022 +0200 libblkid: (swap) fix magic string memcmp [fuzzing] Reported-by: Thibault Guittet Signed-off-by: Karel Zak libblkid/src/superblocks/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 908ac36f27bf1f86abcf4cad31318d84de544985 Author: Masatake YAMATO Date: Thu Jun 9 00:32:19 2022 +0900 lsfd: use constants defined in asm/fctl.h flags field of a fdinfo Close #1709. The original code decoded the field using constants defined in /usr/include/fcntl.h. The constants defined in /usr/include/fcntl.h was suitable for passing to the kernel as a part of arguments of system calls like open(2). However, they were not suitable for decoding the field. Let's think about decoding 0300000 in $ cat /proc/157067/fdinfo/3 pos: 0 flags: 0300000 $ lsfd -p 157067 -o+flags -Q -Q 'ASSOC == "3"' COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME FLAGS test_mkfds 125128 jet 3 r-- DIR dm-0 96 96 / ??????????????????? The decoded string is printed at ???????????????????. Quoted from /usr/include/bits/fcntl-linux.h: #ifndef __O_LARGEFILE # define __O_LARGEFILE 0100000 #endif #ifndef __O_DIRECTORY # define __O_DIRECTORY 0200000 #endif #ifndef __O_TMPFILE # define __O_TMPFILE (020000000 | __O_DIRECTORY) #endif ... #ifdef __USE_XOPEN2K8 # define O_DIRECTORY __O_DIRECTORY /* Must be a directory. */ ... #endif ... #ifdef __USE_LARGEFILE64 # define O_LARGEFILE __O_LARGEFILE #endif With these constants, 0300000 is decoded as "directory,_tmpfile" or "largefile,directory,_tmpfile". Unexpectedly the decoded string has "_tmpfile". It has "largefile" only when we define __USE_LARGEFILE64 when building lsfd though it should have "largefile" always. Quoted from /usr/include/asm-generic/fcntl.h: #ifndef O_LARGEFILE #define O_LARGEFILE 00100000 #endif #ifndef O_DIRECTORY #define O_DIRECTORY 00200000 /* must be a directory */ #endif #ifndef __O_TMPFILE #define __O_TMPFILE 020000000 #endif The decoded string is "largefile,directory". It doesn't depend on __USE_LARGEFILE64. This change adds lsfd-decode-file-flags.c, a new small and isolated source file, in which lsfd_decode_file_flags(), the function for decoding the field is defined. include/c.h includes /usr/include/fcntl.h. Almost all lsfd related source files includes include/c.h indirectly. On the other hand, lsfd-decode-file-flags.c includes only /usr/include/asm-generic/fcntl.h or /usr/include/asm/fcntl.h. So the function can decode the field expectedly. Signed-off-by: Masatake YAMATO configure.ac | 2 + meson.build | 2 + misc-utils/Makemodule.am | 1 + misc-utils/lsfd-decode-file-flags.c | 148 ++++++++++++++++++++++++++++++++++++ misc-utils/lsfd-file.c | 86 +-------------------- misc-utils/meson.build | 1 + tests/expected/lsfd/mkfds-directory | 2 +- 7 files changed, 157 insertions(+), 85 deletions(-) commit 7d2de8d403d11ce9502d4dd3dbe49d63489e3271 Author: David Cantrell Date: Thu Jun 9 19:13:01 2022 +0100 change the default comparison method on Mac OS to suppress a warning that's going to fall back to memcmp misc-utils/hardlink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1b5fc3fe13947baab133bd426f3377e2eb5ccc90 Author: Karel Zak Date: Wed Jun 8 11:50:04 2022 +0200 tests: (hardlink) remove runtime depend output The Method: field depends on kernel crypto support, otherwise hardlink falls back to memcpy(). Fixes: https://github.com/util-linux/util-linux/issues/1710 Signed-off-by: Karel Zak tests/expected/hardlink/options-maximum-size-8191 | 2 +- tests/expected/hardlink/options-maximum-size-8192 | 2 +- tests/ts/hardlink/options | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) commit d83a5f8c2b49b9f3a3c01d43c10286fbe463161e Author: Karel Zak Date: Wed Jun 8 11:31:57 2022 +0200 column: improve --table-hide This option affects list of visible columns, so it's better to apply it before any other flags, because "-1" placeholder depends on visible columns. For example: echo "A B C D" | column --table --table-maxout --table-right -1 --table-hide 4 needs to hide column #4 (D) and align #3 (C) to the right. Signed-off-by: Karel Zak text-utils/column.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 32e4c34f60a9fd20b2075eac9f7cefc364ed75b8 Author: Karel Zak Date: Wed Jun 8 11:28:02 2022 +0200 column: add -1 placeholder to address last visible column Addresses: https://github.com/util-linux/util-linux/issues/1700 Signed-off-by: Karel Zak text-utils/column.1.adoc | 2 +- text-utils/column.c | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 18 deletions(-) commit 1dbe96fb64d50471199cbde9503347de81b0c644 Author: Karel Zak Date: Wed Jun 8 11:07:58 2022 +0200 column: fix "0" placeholder Addresses: https://github.com/util-linux/util-linux/issues/1700 Signed-off-by: Karel Zak text-utils/column.c | 1 + 1 file changed, 1 insertion(+) commit e8de98e06af218d76f5640f5562fe16d40c6915c Author: Karel Zak Date: Wed Jun 8 10:44:03 2022 +0200 libmount: fix compilation Fixes: https://github.com/util-linux/util-linux/issues/1711 Signed-off-by: Karel Zak libmount/src/utils.c | 1 + 1 file changed, 1 insertion(+) commit 3769f26e8e17c4881b5405692ccee77f387c0b70 Author: Karel Zak Date: Tue Jun 7 09:57:01 2022 +0200 lsblk: fix memory leak and unnecessary allocation Signed-off-by: Karel Zak misc-utils/lsblk.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 890d4d3f236e2d28db35ea9bc9dc3e5e35db975c Author: Karel Zak Date: Tue Jun 7 09:46:54 2022 +0200 lslogins: fix free(): invalid pointer Signed-off-by: Karel Zak login-utils/lslogins.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c51cba1e838ae7e36a843ec785543492bb8737cd Author: Karel Zak Date: Tue Jun 7 09:11:56 2022 +0200 lslogins: improve prefixes interpretation It seems that for example 'passwd --lock' uses two exclamation marks in password field. It seems better to assume arbitrary number of '!' and '*' prefixes. The patch also makes description of the PWD-EMPTY output field more explicit. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2093166 Signed-off-by: Karel Zak login-utils/lslogins.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit e279e9b2e21f0c422ba4fd984dfb18958d207923 Author: Rosen Penev Date: Mon Jun 6 16:17:48 2022 -0700 remove faulty boolean It didn't work properly. Signed-off-by: Rosen Penev meson.build | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 8883f037466a5534554d7d9114aceb740295ef20 Author: Karel Zak Date: Mon Jun 6 16:19:16 2022 +0200 zramctl: fix compiler warning [-Werror=maybe-uninitialized] Signed-off-by: Karel Zak sys-utils/zramctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 084284f14e5d89ae8a7a6ac228a5d67d3bf767b4 Author: Karel Zak Date: Mon Jun 6 16:15:43 2022 +0200 lsfd: fix compiler warning [-Werror=maybe-uninitialized] Signed-off-by: Karel Zak misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7865ae165bb43b1626c6928250843cc2c96be57 Author: Karel Zak Date: Mon Jun 6 16:14:30 2022 +0200 irqtop: fix compiler warning [-Werror=format-truncation=] Signed-off-by: Karel Zak sys-utils/irq-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 977f98ee34ca002cb5301c2d3a5953c754f813ec Author: Karel Zak Date: Mon Jun 6 16:14:14 2022 +0200 lib/logindefs: fix compiler warning [-Werror=format-truncation=] Signed-off-by: Karel Zak lib/logindefs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 26f6fa2ba3b48092315093379846997ed6bd59f6 Author: Karel Zak Date: Mon Jun 6 12:36:13 2022 +0200 lsblk: simplify code by ul_path_count_dirents() Signed-off-by: Karel Zak misc-utils/lsblk.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit f1a714d869b0df59fd88ba0845acca5250f26152 Author: zhenwei pi Date: Fri Jun 3 20:24:02 2022 +0800 lsblk: enable 'MQ' for NVMe/virtio by default NVMe/virtio devices typically has MQ feature, enable this column by default for option '--nvme/--virtio'. Signed-off-by: zhenwei pi misc-utils/lsblk.c | 2 ++ 1 file changed, 2 insertions(+) commit 3b26273394259a0dbe77bdeb4b3adf3ceaef94a0 Author: zhenwei pi Date: Fri Jun 3 20:24:01 2022 +0800 lsblk: introduce 'MQ' column Typically a modern block device supports mutil queues feature, count queues by walking '$sysfs/mq' directory. If no '$sysfs/mq' exists, it is a legacy single queue. ~# lsblk --nvme -o NAME,TYPE,MODEL,TRAN,RQ-SIZE,MQ NAME TYPE MODEL TRAN RQ-SIZE MQ nvme0n1 disk INTEL SSDPF2KX038TZ nvme 1023 135 nvme3n1 disk INTEL SSDPE2KX020T8 nvme 1023 128 nvme1n1 disk SAMSUNG MZQL23T8HCLS-00A07 nvme 1023 129 nvme2n2 disk RP2A03T8RK004LX nvme 1023 64 nvme2n3 disk RP2A03T8RK004LX nvme 1023 64 Signed-off-by: zhenwei pi bash-completion/lsblk | 2 +- misc-utils/lsblk.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit 1b3e8f5d2c9c8a4eb2df578010c10f84b057d501 Author: zhenwei pi Date: Fri Jun 3 20:24:00 2022 +0800 lsblk: add -v/--virtio Add -v/--virtio to filter the virtio block devices. Signed-off-by: zhenwei pi bash-completion/lsblk | 1 + misc-utils/lsblk.8.adoc | 3 +++ misc-utils/lsblk.c | 23 ++++++++++++++++++++++- misc-utils/lsblk.h | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) commit 0540d07611a543371348109d6c06f707276ffbce Author: zhenwei pi Date: Fri Jun 3 20:23:59 2022 +0800 lsblk: support virtio block virtio blk is quite popular in the virtual machines, support 'TRAN' column for a virtio block device. Signed-off-by: zhenwei pi misc-utils/lsblk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 97afabf71b6177e36279c456c2de135ed0c9ba00 Author: zhenwei pi Date: Fri Jun 3 20:23:58 2022 +0800 lsblk: add -N/--nvme Add -N/--nvme to filter NVMe device only, NVMe usually has a larger I/O depth, also show COL_RQ_SIZE by default. Signed-off-by: zhenwei pi bash-completion/lsblk | 1 + misc-utils/lsblk.8.adoc | 3 +++ misc-utils/lsblk.c | 24 +++++++++++++++++++++++- misc-utils/lsblk.h | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) commit 44e64c574d3fa13bac315ed5f1c79422d1d8a0d0 Author: Karel Zak Date: Mon Jun 6 12:23:36 2022 +0200 tests: (pipesz) use helper to get pagesize Signed-off-by: Karel Zak tests/ts/misc/pipesz | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c84bdd8b925211e1f4357a02ee73d845838246be Author: Nathan Sharp Date: Fri Jun 3 20:00:22 2022 -0600 pipesz: use native PAGE_SIZE in tests Reported-by: Anatoly Pugachev Signed-off-by: Nathan Sharp tests/expected/misc/pipesz-get-fd | 2 +- tests/expected/misc/pipesz-get-file | 2 +- tests/ts/misc/pipesz | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) commit 065c8acf6e4987d2394e05b191977926bd31cb23 Author: Karel Zak Date: Mon Jun 6 12:14:10 2022 +0200 libblkid: minor changes to coding style Signed-off-by: Karel Zak libblkid/src/superblocks/btrfs.c | 12 +++++++----- libblkid/src/superblocks/ext.c | 14 ++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) commit c429cfaba333730a433fee0be77aa5db84e98441 Merge: 6be39224f d9d9a709c Author: Karel Zak Date: Mon Jun 6 12:10:45 2022 +0200 Merge branch 'add/btrfs-ext-fslastblock' of https://github.com/alberand/util-linux * 'add/btrfs-ext-fslastblock' of https://github.com/alberand/util-linux: libblkid: add FSSIZE implementation for btrfs and ext commit 6be39224f31ac81ba65c384fda90f9f52d41136f Author: Karel Zak Date: Mon Jun 6 11:41:35 2022 +0200 column: add --table-maxout Add option to fill all available space. Fizes: https://github.com/util-linux/util-linux/issues/1700 Signed-off-by: Karel Zak bash-completion/column | 1 + text-utils/column.1.adoc | 3 +++ text-utils/column.c | 10 +++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) commit c9671a3cf7738bb81e1cbef2f56485a36c6e7623 Author: Karel Zak Date: Fri Jun 3 09:07:09 2022 +0200 uuidd: remove also PrivateNetwork=yes from systemd service Fixes: https://github.com/util-linux/util-linux/issues/1704 References: 304b4dc4936b115ca33af5325c3b04d0997c1353 Signed-off-by: Karel Zak misc-utils/uuidd.service.in | 1 - 1 file changed, 1 deletion(-) commit 304b4dc4936b115ca33af5325c3b04d0997c1353 Author: Karel Zak Date: Thu Jun 2 16:55:49 2022 +0200 uuidd: allow AF_INET in systemd service libuuid uses socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) to get MAC address for time based UUIDs, but there is RestrictAddressFamilies=AF_UNIX in uuidd service file ... Fixes: https://github.com/util-linux/util-linux/issues/1704 Signed-off-by: Karel Zak misc-utils/uuidd.service.in | 1 - 1 file changed, 1 deletion(-) commit 7ebfe9b411c12223a2500ca62d6be37c48e2d83d Author: Karel Zak Date: Thu Jun 2 16:02:54 2022 +0200 libblkid: (hfs) fix make sure buffer is large enough Signed-off-by: Karel Zak libblkid/src/superblocks/ntfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 74e48269ee9a15e230e25d0e3d2e50f5b0ba2b04 Author: Karel Zak Date: Thu Jun 2 16:02:54 2022 +0200 libblkid: (hfs) fix label use [fuzzing] Reported-by: Thibault Guittet Signed-off-by: Karel Zak libblkid/src/superblocks/hfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0a0630133055c3b3daa3072a3fd9944a1a149401 Author: Karel Zak Date: Thu Jun 2 16:02:54 2022 +0200 libblkid: (bsd) fix buffer pointer use [fuzzing] Reported-by: Thibault Guittet Signed-off-by: Karel Zak libblkid/src/partitions/bsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e12fbca62be10b09503cecc7507757874043474 Author: Karel Zak Date: Thu Jun 2 16:02:54 2022 +0200 libblkid: (mac) make sure block size is large enough [fuzzing] Reported-by: Thibault Guittet Signed-off-by: Karel Zak libblkid/src/partitions/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit 106de261469e1001243d5b81ed895762fb34b2ba Author: Karel Zak Date: Thu Jun 2 16:02:54 2022 +0200 libblkid: (probe) fix size and offset overflows [fuzzing] Reported-by: Thibault Guittet Signed-off-by: Karel Zak libblkid/src/probe.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit d9d9a709ce6f22d4fbd09986d1372b3c06374e47 Author: Andrey Albershteyn Date: Fri May 27 13:57:14 2022 +0200 libblkid: add FSSIZE implementation for btrfs and ext The implementation does not take into account complete metadata overhead. The BTRFS one doesn't consider redundant data in RAID configuration. The ext one doesn't take into account file system overhead. Signed-off-by: Andrey Albershteyn libblkid/src/superblocks/btrfs.c | 6 ++++++ libblkid/src/superblocks/ext.c | 12 ++++++++++-- libblkid/src/superblocks/superblocks.c | 2 +- tests/expected/blkid/low-probe-btrfs | 1 + tests/expected/blkid/low-probe-ext2 | 1 + tests/expected/blkid/low-probe-ext3 | 1 + tests/expected/blkid/low-probe-jbd | 1 + 7 files changed, 21 insertions(+), 3 deletions(-) commit 9e33a15b59a2a5fef0254f335a2985752c6cbb5a Merge: 413f266b3 895f0b609 Author: Karel Zak Date: Mon May 30 12:07:16 2022 +0200 Merge branch 'fix/xfs-block-size' of https://github.com/alberand/util-linux * 'fix/xfs-block-size' of https://github.com/alberand/util-linux: libblkid: update documentation of BLOCK_SIZE tag libblkid: add FSBLOCKSIZE tag commit 413f266b33e1f540bcb9295056b65d9d467fe327 Author: Nathan Sharp Date: Thu May 26 20:59:44 2022 -0600 pipesz: correct manpage issues pipesz's manual page reflects an older version which examined all file descriptors when --get was specified without --fd or --file. This patch corrects this, fixes a spelling issue, and makes some formatting tweaks to improve the clarity of some sections. Signed-off-by: Nathan Sharp misc-utils/pipesz.1.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 895f0b609ce52eb3dca09aa14dd9457fc2f1d660 Author: Andrey Albershteyn Date: Fri May 27 12:56:27 2022 +0200 libblkid: update documentation of BLOCK_SIZE tag The name BLOCK_SIZE is unfortunate. This tag doesn't represent commonly used file system block size but minimal block size accessible by file system (sector size). Signed-off-by: Andrey Albershteyn libblkid/src/superblocks/superblocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f447d490c9558bbccc8e0d99c85acb1823bbb00 Author: Andrey Albershteyn Date: Fri May 27 12:05:32 2022 +0200 libblkid: add FSBLOCKSIZE tag The FSBLOCKSIZE tag exposes file system block size in contrast to the BLOCK_SIZE (unfortunate name) which returns minimal accessible block size (sector size). Signed-off-by: Andrey Albershteyn libblkid/src/superblocks/apfs.c | 1 + libblkid/src/superblocks/befs.c | 1 + libblkid/src/superblocks/btrfs.c | 1 + libblkid/src/superblocks/erofs.c | 5 ++++- libblkid/src/superblocks/exfat.c | 1 + libblkid/src/superblocks/exfs.c | 1 + libblkid/src/superblocks/ext.c | 4 +++- libblkid/src/superblocks/f2fs.c | 4 +++- libblkid/src/superblocks/gfs.c | 1 + libblkid/src/superblocks/hfs.c | 1 + libblkid/src/superblocks/hpfs.c | 1 + libblkid/src/superblocks/iso9660.c | 2 ++ libblkid/src/superblocks/jfs.c | 1 + libblkid/src/superblocks/minix.c | 1 + libblkid/src/superblocks/nilfs.c | 4 +++- libblkid/src/superblocks/ntfs.c | 2 ++ libblkid/src/superblocks/ocfs.c | 4 +++- libblkid/src/superblocks/reiserfs.c | 2 ++ libblkid/src/superblocks/romfs.c | 1 + libblkid/src/superblocks/squashfs.c | 1 + libblkid/src/superblocks/superblocks.c | 13 +++++++++++++ libblkid/src/superblocks/superblocks.h | 1 + libblkid/src/superblocks/udf.c | 1 + libblkid/src/superblocks/ufs.c | 8 ++++++-- libblkid/src/superblocks/vfat.c | 1 + libblkid/src/superblocks/vxfs.c | 2 ++ libblkid/src/superblocks/xfs.c | 1 + libblkid/src/superblocks/zfs.c | 4 +++- libblkid/src/superblocks/zonefs.c | 1 + tests/expected/blkid/low-probe-befs | 1 + tests/expected/blkid/low-probe-btrfs | 1 + tests/expected/blkid/low-probe-erofs | 1 + tests/expected/blkid/low-probe-exfat | 1 + tests/expected/blkid/low-probe-ext2 | 1 + tests/expected/blkid/low-probe-ext3 | 1 + tests/expected/blkid/low-probe-f2fs | 1 + tests/expected/blkid/low-probe-fat | 1 + tests/expected/blkid/low-probe-fat16_noheads | 1 + tests/expected/blkid/low-probe-fat32_cp850_O_tilde | 1 + tests/expected/blkid/low-probe-fat32_label_64MB | 1 + tests/expected/blkid/low-probe-fat32_mkdosfs_label1 | 1 + .../blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME | 1 + .../blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty | 1 + .../blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2 | 1 + .../blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME | 1 + .../blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase | 1 + .../expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase | 1 + .../expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2 | 1 + tests/expected/blkid/low-probe-fat32_mkdosfs_none | 1 + .../blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME | 1 + .../blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1 | 1 + ...low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 | 1 + tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1 | 1 + ...low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 | 1 + tests/expected/blkid/low-probe-fat32_xp_label1 | 1 + tests/expected/blkid/low-probe-fat32_xp_none | 1 + .../blkid/low-probe-fat32_xp_none_dosfslabel_label1 | 1 + tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1 | 1 + tests/expected/blkid/low-probe-gfs2 | 1 + tests/expected/blkid/low-probe-hfsplus | 1 + tests/expected/blkid/low-probe-hpfs | 1 + tests/expected/blkid/low-probe-iso | 1 + .../expected/blkid/low-probe-iso-different-iso-joliet-label | 1 + tests/expected/blkid/low-probe-iso-joliet | 1 + tests/expected/blkid/low-probe-iso-multi-genisoimage-0 | 1 + tests/expected/blkid/low-probe-iso-multi-genisoimage-174 | 1 + tests/expected/blkid/low-probe-iso-multi-genisoimage-348 | 1 + tests/expected/blkid/low-probe-iso-rr-joliet | 1 + tests/expected/blkid/low-probe-iso-unicode-long-label | 1 + tests/expected/blkid/low-probe-jbd | 1 + tests/expected/blkid/low-probe-jfs | 1 + tests/expected/blkid/low-probe-minix-BE | 1 + tests/expected/blkid/low-probe-minix-LE | 1 + tests/expected/blkid/low-probe-nilfs2 | 1 + tests/expected/blkid/low-probe-ntfs | 1 + tests/expected/blkid/low-probe-ocfs2 | 1 + tests/expected/blkid/low-probe-reiser3 | 1 + tests/expected/blkid/low-probe-reiser4 | 1 + tests/expected/blkid/low-probe-romfs | 1 + tests/expected/blkid/low-probe-small-fat32 | 1 + tests/expected/blkid/low-probe-udf | 1 + tests/expected/blkid/low-probe-udf-bdr-2.60-nero | 1 + tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 | 1 + tests/expected/blkid/low-probe-udf-cd-nero-6 | 1 + tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 | 1 + tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 | 1 + tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 | 1 + tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 | 1 + tests/expected/blkid/low-probe-udf-hdd-win7 | 1 + tests/expected/blkid/low-probe-udf-multi-genisoimage-0 | 1 + tests/expected/blkid/low-probe-udf-multi-genisoimage-417 | 1 + tests/expected/blkid/low-probe-udf-multi-genisoimage-834 | 1 + tests/expected/blkid/low-probe-udf-multi-mkudffs-0 | 1 + tests/expected/blkid/low-probe-udf-multi-mkudffs-320 | 1 + tests/expected/blkid/low-probe-udf-multi-mkudffs-640 | 1 + tests/expected/blkid/low-probe-ufs | 1 + tests/expected/blkid/low-probe-xfs | 1 + tests/expected/blkid/low-probe-xfs-v5 | 1 + tests/expected/blkid/low-probe-zfs | 1 + tests/expected/blkid/low-probe-zonefs | 1 + 110 files changed, 144 insertions(+), 8 deletions(-) commit 8abbb8e45c320071b05ea0a89994391cfe171887 Author: Mario Blättermann Date: Thu May 26 15:04:19 2022 +0200 Add pipesz.1.adoc to po4a configuration po-man/po4a.cfg | 1 + 1 file changed, 1 insertion(+) commit 854abba0dd9b45b4f40a9c934694b3f14052eceb Author: Hideki EIRAKU Date: Wed May 25 12:23:16 2022 +0900 loopdev: set block_size when using LOOP_CONFIGURE LOOP_CONFIGURE ioctl was introduced by commit d5fd456c88aba4fcf77d35fe38024a8d5c814686. Since the previous implementation set partscan flag but did not set block_size with the LOOP_CONFIGURE ioctl, an issue fixed by commit 422f0e9f206a145c59a71333dad20d38cbbfc0c4 was reappeared. Setting block_size in the LOOP_CONFIGURE ioctl parameter fixes the issue. Signed-off-by: Hideki EIRAKU lib/loopdev.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2c4d42126dca42c1afc3c78fe4da51619ba52387 Merge: e475b6f95 6ff679887 Author: Karel Zak Date: Thu May 26 09:49:29 2022 +0200 Merge branch 'taskset-mistake' of https://github.com/csbo98/util-linux * 'taskset-mistake' of https://github.com/csbo98/util-linux: Maybe there is a little mistake in do_taskset() function in taskset.c. In the first call of sched_getaffinity(), if the call is failed we should use err_affinity(ts->pid, 0) other than err_affinity(ts->pid, 1). commit 6ff67988785af818b97a7175c8ca80f2ee2d039f Author: csbo98 Date: Sun May 22 14:47:13 2022 +0800 Maybe there is a little mistake in do_taskset() function in taskset.c. In the first call of sched_getaffinity(), if the call is failed we should use err_affinity(ts->pid, 0) other than err_affinity(ts->pid, 1). schedutils/taskset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e475b6f954da9c1cca9bcc68666d74ff70cc2073 Author: Sebastian Pucilowski Date: Fri May 20 16:47:12 2022 +1000 minor: clarity in fstrim.timer sys-utils/fstrim.timer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 634446308fd590b830040a1a5ed6f42ebcea2fc5 Author: Karel Zak Date: Thu May 19 09:48:18 2022 +0200 pipesz: fix dead code [coverity scan] 309 if (!opt_quiet && n_opt_size > 1) >>> CID 378501: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "warnx(dcgettext(NULL, "usin...". 310 warnx(_("using last specified size")); Signed-off-by: Karel Zak misc-utils/pipesz.c | 1 + 1 file changed, 1 insertion(+) commit 410b261cce8294653c03cb678f61512fa52e81e8 Author: Karel Zak Date: Wed May 18 10:41:00 2022 +0200 pipesz: fix minor coding style issues * remove tailing white spaces * use {} for while() * fix --help indention Signed-off-by: Karel Zak misc-utils/pipesz.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 80af57ed9edf153d26b5ace9a283c24cb5a22762 Author: Nathan Sharp Date: Mon Apr 11 22:59:30 2022 -0600 pipesz: add bash-completion script Signed-off-by: Nathan Sharp bash-completion/Makemodule.am | 3 ++ bash-completion/pipesz | 102 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 3 files changed, 106 insertions(+) commit 62c27bd002cf0907587453b20d4c4ea7040d6552 Author: Nathan Sharp Date: Mon Apr 11 22:59:29 2022 -0600 pipesz: add manpage Signed-off-by: Nathan Sharp meson.build | 1 + misc-utils/Makemodule.am | 2 + misc-utils/pipesz.1.adoc | 109 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+) commit 2c4b7d9b54860102005242b2faeb797553ddd803 Author: Nathan Sharp Date: Mon Apr 11 22:59:28 2022 -0600 pipesz: add tests Signed-off-by: Nathan Sharp tests/commands.sh | 1 + tests/expected/misc/pipesz-exec | 1 + tests/expected/misc/pipesz-get-fd | 1 + tests/expected/misc/pipesz-get-fd-bad.err | 1 + tests/expected/misc/pipesz-get-file | 1 + tests/expected/misc/pipesz-get-file-bad.err | 1 + tests/expected/misc/pipesz-set-fd-bad.err | 1 + tests/expected/misc/pipesz-set-file-bad.err | 1 + tests/ts/misc/pipesz | 73 +++++++++++++++++++++++++++++ 9 files changed, 81 insertions(+) commit c221578e4b33abe14aebf5cf844ef87cd9844bae Author: Nathan Sharp Date: Mon Apr 11 22:59:27 2022 -0600 pipesz: add the pipesz utility pipesz is a utility to examine and adjust the size of pipe buffers. It uses fctnl F_GETPIPE_SZ and F_SETPIPE_SZ to examine and resize these buffers. This functionality is unique to Linux and was added in version 2.6.35. Minor bugfixes were made in 4.9, but these do not obviate the use of pipesz prior to that release. Signed-off-by: Nathan Sharp Signed-off-by: Karel Zak .gitignore | 1 + configure.ac | 8 ++ include/pathnames.h | 4 + meson.build | 12 ++ meson_options.txt | 2 + misc-utils/Makemodule.am | 7 + misc-utils/meson.build | 4 + misc-utils/pipesz.c | 347 +++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 385 insertions(+) commit 59d2a5751b50d53142ff5872559c4966706a9be4 Merge: a273bb355 20af6cee4 Author: Karel Zak Date: Wed May 18 09:30:38 2022 +0200 Merge branch 'issue-1686' of https://github.com/sshambar/util-linux * 'issue-1686' of https://github.com/sshambar/util-linux: fstrim: Remove all skipped entries before de-duplication commit a273bb355c8ce26fda9934df69a85f58ddf11933 Merge: 0d700ec0b e91a49c97 Author: Karel Zak Date: Wed May 18 09:24:04 2022 +0200 Merge branch 'patch-1' of https://github.com/neheb/util-linux * 'patch-1' of https://github.com/neheb/util-linux: meson: don't build po if no gettext commit 0d700ec0b062a042bf74731487177999a4b0c798 Merge: 034727a2e 5afe34ef2 Author: Karel Zak Date: Wed May 18 09:23:48 2022 +0200 Merge branch '1' of https://github.com/neheb/util-linux * '1' of https://github.com/neheb/util-linux: replace prefix with args meson: fix tzname check and simplify strsignal commit e91a49c9747fefbd2a7a5cca180ac0ed72084439 Author: Rosen Penev Date: Tue May 17 17:04:47 2022 -0700 meson: don't build po if no gettext po/meson.build | 4 ++++ 1 file changed, 4 insertions(+) commit 5afe34ef2bd3405d8c46dfe6b783bf0264f090ee Author: Rosen Penev Date: Sun May 15 20:36:39 2022 -0700 replace prefix with args meson reference says in case of _GNU_SOURCE that args should be used. Signed-off-by: Rosen Penev meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f3b9a18e6b0a436b95639ec7db4cc170f17bbb59 Author: Rosen Penev Date: Sun May 15 20:24:21 2022 -0700 meson: fix tzname check and simplify strsignal The former needs _GNU_SOURCE under musl. The latter can just use has_function. Signed-off-by: Rosen Penev meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20af6cee463cd6329b4f06db3282a09be942bd7a Author: Scott Shambarger Date: Thu May 12 16:27:26 2022 -0700 fstrim: Remove all skipped entries before de-duplication When processing fstab entries, de-duplication is performed based on the source before all tests on the target have been checked, resulting in some entries being skipped when a removed duplicate with a different target would not have been. The fix is to move all the target checks before the source de-duplication. Addresses: #1686 Signed-off-by: Scott Shambarger sys-utils/fstrim.c | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit 034727a2e48b67673fea59a746b5b5c077bc2b03 Author: Alberto Ruiz Date: Thu May 12 23:35:21 2022 +0200 losetup: Fix typo for the --sector-size docs sys-utils/losetup.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 581b77da7aa4a5205902857184d555bed367e3e0 Merge: 986b80d0b ef356f725 Author: Karel Zak Date: Wed May 11 10:21:34 2022 +0200 Merge branch 'hardlink-docs' of https://github.com/ferdnyc/util-linux * 'hardlink-docs' of https://github.com/ferdnyc/util-linux: hardlink: Fix man page docs for '-v/--verbose' hardlink: Wrap -b to 80 cols, in --help hardlink: Move reflink options in manpage hardlink: Move -c option in --help hardlink: Document '-c' option in manpage commit 986b80d0b2f30684f3bc96e4ae310b1c3c3b5ab5 Author: Rosen Penev Date: Mon May 2 17:53:07 2022 -0700 fix time_t format Use musl's define to test for 64-bit time_t. Signed-off-by: Rosen Penev sys-utils/unshare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 710e8ecb9f0eec24ad407b8fa8af8d4e58f558a9 Author: Rosen Penev Date: Mon May 2 17:43:32 2022 -0700 fix various formats Found with -Wformat. Signed-off-by: Rosen Penev disk-utils/sfdisk.c | 8 ++++---- lib/fileeq.c | 3 ++- libblkid/src/probe.c | 2 +- misc-utils/hardlink.c | 2 +- term-utils/script.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) commit ef356f725912171b6c8fcbea44d489e95fd174d3 Author: FeRD (Frank Dana) Date: Mon May 9 17:17:57 2022 -0400 hardlink: Fix man page docs for '-v/--verbose' Signed-off-by: FeRD (Frank Dana) misc-utils/hardlink.1.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 362a99ad29d6b2178a99c55e1a0fc11211ba6294 Author: FeRD (Frank Dana) Date: Mon May 9 17:14:48 2022 -0400 hardlink: Wrap -b to 80 cols, in --help Signed-off-by: FeRD (Frank Dana) misc-utils/hardlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d16e519c53c17b3f8708ab9812e45d89b5ba50c Author: FeRD (Frank Dana) Date: Mon May 9 07:32:44 2022 -0400 hardlink: Move reflink options in manpage The documentation for the --reflink and --skip-reflink options felt sort of shoe-horned into the rest of the options, in the man page. Reorder to match where they appear in the --help output. Signed-off-by: FeRD (Frank Dana) misc-utils/hardlink.1.adoc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit bae5e04f6b6d5f4d7b3d7c57c94ea6b5ee8dc22c Author: FeRD (Frank Dana) Date: Mon May 9 07:31:13 2022 -0400 hardlink: Move -c option in --help The new placement mirrors its position in the manpage, and keeps it grouped with the individual flags for which it acts as a shorthand. Signed-off-by: FeRD (Frank Dana) misc-utils/hardlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b18a986c4910f07717f611ba062beef480e68de8 Author: FeRD (Frank Dana) Date: Mon May 9 07:20:26 2022 -0400 hardlink: Document '-c' option in manpage Signed-off-by: FeRD (Frank Dana) misc-utils/hardlink.1.adoc | 3 +++ 1 file changed, 3 insertions(+) commit 7b8fda2e8e7b1752cba1fab01d7f569b5d87e661 Author: Narthorn Date: Sat May 7 07:43:02 2022 +0200 fstrim: check for ENOSYS when using --quiet-unsupported Some filesystems like bindfs report ENOSYS (Function not implemented) for the trim ioctl, which should be caught by --quiet-unsupported. sys-utils/fstrim.c | 1 + 1 file changed, 1 insertion(+) commit f9fb07ab1ee55cb09ab2c459a3db0c8bb51831f2 Merge: be1efc002 dc307e1cb Author: Karel Zak Date: Thu May 5 11:12:23 2022 +0200 Merge branch 'meson-fixups' of https://github.com/eli-schwartz/util-linux * 'meson-fixups' of https://github.com/eli-schwartz/util-linux: meson: fix error in processing version for pc files meson: get the project version from the version-gen script commit be1efc00234203557771b7c3360abecc67e15ce1 Merge: 9ae358a03 e610f5f09 Author: Karel Zak Date: Thu May 5 11:10:46 2022 +0200 Merge branch 'master' of https://github.com/mariobl/util-linux * 'master' of https://github.com/mariobl/util-linux: Add blkpr.8.adoc to po4a configuration commit 9ae358a031fd45c01b1d1808761b1db51dd67694 Merge: c9b2297eb f0cd1dadf Author: Karel Zak Date: Thu May 5 11:09:05 2022 +0200 Merge branch 'master' of https://github.com/jlinton/util-linux * 'master' of https://github.com/jlinton/util-linux: lscpu: Add Snapdragon parts commit dc307e1cbf73f6dbf72bb049c19d332774cdb4e7 Author: Eli Schwartz Date: Thu May 5 00:16:15 2022 -0400 meson: fix error in processing version for pc files This awk command was copied verbatim from configure.ac, which included non-awk syntax because configure.ac cannot contain [ literals. Rewrite these autoconf quadrigraphs as their actual values, for meson. Fixes always setting the micro version to "0". meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0c1a86bf88b568a7afe8ebaea1b9f84afb892c2 Author: Eli Schwartz Date: Wed May 4 23:52:31 2022 -0400 meson: get the project version from the version-gen script This matches autotools and ensures that the version number is actually reliable. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e610f5f0936d020a1804bbdb2875c88cc54815e5 Author: Mario Blättermann Date: Wed May 4 20:27:24 2022 +0200 Add blkpr.8.adoc to po4a configuration po-man/po4a.cfg | 1 + 1 file changed, 1 insertion(+) commit f0cd1dadf82096d1944e71ed6e95b9322775384d Author: Jeremy Linton Date: Wed May 4 12:30:34 2022 -0500 lscpu: Add Snapdragon parts QC updated the kernel cputype.h to include the Kyro 4xx and 3xx Silver part numbers's. Lets sync that commit and naming. Signed-off-by: Jeremy Linton sys-utils/lscpu-arm.c | 3 +++ 1 file changed, 3 insertions(+) commit c9b2297eb1f357d9bc9989aacc874f218081fcb8 Author: Andrey Albershteyn Date: Mon May 2 17:08:33 2022 +0200 libblkid: merge FS* flags into one FSINFO Put BLOCK_SIZE, FSSIZE and FSLASTBLOCK tags under one FSINFO flag. These, and probably future ones, are read directly from the superblock (with minor post-processing). These properties are combined under one flag to escape adding a flag per superblock member. Signed-off-by: Andrey Albershteyn libblkid/samples/superblocks.c | 3 +-- libblkid/src/blkid.h.in | 23 +++++++++++------------ libblkid/src/superblocks/superblocks.c | 9 +++++++-- misc-utils/blkid.c | 3 +-- 4 files changed, 20 insertions(+), 18 deletions(-) commit 1ec32f426c0f4705ea4e6e33b812b3b4c2c47faa Author: Karel Zak Date: Wed May 4 12:13:08 2022 +0200 libmount: fix and improve utab update on MS_MOVE * avoid double '//' * don't update /fooxxx when /foo update requested (make sure that startswith() returns path terminated by '/') * canonicalize only once the new path -- all in utab/mtab is already canonicalized, so after MS_MOVE we need to care about the new path only * use asprintf() rather than strcpy() and strcat(), don't compose a new path from prefix and subdir when replace entire path Addresses: https://github.com/util-linux/util-linux/pull/1660 Signed-off-by: Karel Zak libmount/src/tab_update.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit e6829b5cf463146eacc1c80353e4ac31ea95e899 Merge: cd23a4336 a04149fbb Author: Karel Zak Date: Wed May 4 11:22:58 2022 +0200 Merge branch 'fix-move-with-sub-mounted-trees' of https://github.com/fbuihuu/util-linux * 'fix-move-with-sub-mounted-trees' of https://github.com/fbuihuu/util-linux: libmount: when moving a mount point, all sub mount entries in utab should also be updated commit cd23a4336f49ba6a12ade557a09589f2a7c966f4 Author: Rosen Penev Date: Mon May 2 16:18:33 2022 -0700 meson: make libcap-ng dependent on setpriv Signed-off-by: Rosen Penev meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e2b4f5bee2afabb0ecd2a7f9776baab978085639 Author: Rosen Penev Date: Mon May 2 16:30:26 2022 -0700 meson: get rid of get_pkgconfig_variable deprecated in 0.56 Signed-off-by: Rosen Penev meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31f1198d6a65c09c8463a1d5a4703c6c68b18f63 Merge: 1d37c285b 800ed56f4 Author: Karel Zak Date: Mon May 2 15:45:30 2022 +0200 Merge branch 'add/fslastblock' of https://github.com/alberand/util-linux * 'add/fslastblock' of https://github.com/alberand/util-linux: blkid: add tests for FSLASTBLOCK tag blkid: add image for btrfs testing libblkid: add FSLASTBLOCK implementation for xfs, ext and btrfs libblkid: add FSLASTBLOCK field interface showing area occupied by fs commit 1d37c285b4b9e9a51caee67c8c42c0386e8c0274 Author: Karel Zak Date: Mon May 2 15:40:23 2022 +0200 agetty: fix prompt Reported-by: Jeff Chua Signed-off-by: Karel Zak term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ab10df254c62e1abf962a8756c0cd4aa333a47f Author: Karel Zak Date: Mon May 2 15:30:26 2022 +0200 logger: make sure structured data are escaped For the option --sd-param all formatting chars (" \ and ]) has to be escaped by \. This patch also allow escape [ to make it more user friendly. For example $ logger --rfc5424 --sd-id zoo@123 --sd-param 'foo="b\"A\"r"' --no-act --stderr "this is message" <13>1 2022-05-02T15:35:00.342141+02:00 ws.net.home kzak - - [timeQuality tzKnown="1" isSynced="1" syncAccuracy="45291"][zoo@123 foo="b\"A\"r"] this is message Reported-by: Ulrich Windl Signed-off-by: Karel Zak misc-utils/logger.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 63bb04509e79e2edc4b16962c7fa947b56b2a2a0 Author: Karel Zak Date: Mon May 2 15:07:42 2022 +0200 lib/strutils: add ul_strchr_escaped() Like strchr(), but ignores escaped chars. Signed-off-by: Karel Zak include/strutils.h | 2 ++ lib/strutils.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 5c8f5f171d5621a2bc540c21cc62f308a43d4fc5 Author: Karel Zak Date: Mon May 2 12:57:13 2022 +0200 more: avoid infinite loop on --squeeze The command 'echo | more -s' ends in infinite loop if exit-on-EOF is disabled (default now). We need to call more_key_command() to ask for user's reaction. Fixes: https://github.com/util-linux/util-linux/issues/1669 Signed-off-by: Karel Zak text-utils/more.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5e55415b779a2e7fd7affe71251c104cc0694ae Merge: 61060a02b 4c95e1790 Author: Karel Zak Date: Mon May 2 12:28:45 2022 +0200 Merge branch 'gpt-marvell' of https://github.com/pali/util-linux * 'gpt-marvell' of https://github.com/pali/util-linux: libfdisk: (gpt) Add UUID for Marvell Armada 3700 Boot partition commit 61060a02bf710fab1e89898b1992e0b5c3f108fe Merge: 1fe515a90 7bce94968 Author: Karel Zak Date: Mon May 2 12:15:32 2022 +0200 Merge branch 'meson' of https://github.com/neheb/util-linux * 'meson' of https://github.com/neheb/util-linux: meson: make libpam optional meson: fix tzname check meson: fix isnan check meson: add _GNU_SOURCE for sighandler_t meson: fix environ search meson: fix cpu_set_t test meson: don't use run meson: fix compilation without systemd commit 800ed56f4a34e943221bbd1217a78c1897d5d4e2 Author: Andrey Albershteyn Date: Wed Apr 27 17:33:33 2022 +0200 blkid: add tests for FSLASTBLOCK tag Signed-off-by: Andrey Albershteyn misc-utils/blkid.c | 2 +- tests/expected/blkid/low-probe-btrfs | 1 + tests/expected/blkid/low-probe-ext2 | 1 + tests/expected/blkid/low-probe-ext3 | 1 + tests/expected/blkid/low-probe-jbd | 1 + tests/expected/blkid/low-probe-xfs | 1 + tests/expected/blkid/low-probe-xfs-v5 | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) commit bf64c83ec384e430d2dbf185863e80b55f047e6f Author: Andrey Albershteyn Date: Wed Apr 27 17:29:27 2022 +0200 blkid: add image for btrfs testing The btrfs is one of the popular filesystem which is supported by blkid. However, the image for 'low-probe' tests was missing. Add 115M BTRFS default image (mkfs.btrfs btrfs.img). Signed-off-by: Andrey Albershteyn tests/expected/blkid/low-probe-btrfs | 7 +++++++ tests/ts/blkid/images-fs/btrfs.img.xz | Bin 0 -> 21696 bytes 2 files changed, 7 insertions(+) commit 5f995b3f1b190a5643df33f8c7142ed9355658c6 Author: Andrey Albershteyn Date: Wed Apr 27 14:46:33 2022 +0200 libblkid: add FSLASTBLOCK implementation for xfs, ext and btrfs Implementation of FSLASTBLOCK for most common filesystems. Most of the fs store total number of reserved blocks in superblock. Signed-off-by: Andrey Albershteyn libblkid/src/superblocks/btrfs.c | 5 +++++ libblkid/src/superblocks/ext.c | 10 ++++++++-- libblkid/src/superblocks/xfs.c | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) commit 1fe515a902da5f1d7293fda1a9d0c75d5e45b194 Merge: 53b996e29 a38d1f69f Author: Karel Zak Date: Mon May 2 12:03:49 2022 +0200 Merge branch 'better-bsd-compat' of https://github.com/bsdimp/util-linux * 'better-bsd-compat' of https://github.com/bsdimp/util-linux: BSD: Use byteswap.h and endian.h defined macos when present commit 53b996e293286f7fc729bfb69e731a129864f2e8 Merge: 73d242560 e51565b65 Author: Karel Zak Date: Mon May 2 11:59:42 2022 +0200 Merge branch 'master' of https://github.com/caramelli/util-linux * 'master' of https://github.com/caramelli/util-linux: meson: fix when HAVE_CLOCK_GETTIME is set commit 73d2425602cb073a6836e376a9dd11a8e2e389c6 Merge: 104dc2e09 16a2e0603 Author: Karel Zak Date: Mon May 2 11:43:08 2022 +0200 Merge branch 'safe-getenv' of https://github.com/floppym/util-linux * 'safe-getenv' of https://github.com/floppym/util-linux: lib: allow safe_getenv to work for non-root users commit 7bce94968ff62819862386ad65e5968556c4bdf6 Author: Rosen Penev Date: Sun May 1 20:28:39 2022 -0700 meson: make libpam optional libpam is only needed if 4 utilities are built Signed-off-by: Rosen Penev meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4c95e17903e0d14b4d395d119f5c5cc9783268c0 Author: Pali Rohár Date: Sat Apr 30 12:50:46 2022 +0200 libfdisk: (gpt) Add UUID for Marvell Armada 3700 Boot partition This GPT UUID is used by BootROM on Marvell Armada 3700 SoC. BootROM searches for GPT partition with this UUID on attached SATA disk and loads bootloader from it. Marvell Armada 3700 SoC is used e.g. on popular EspressoBIN SBC board which has relatively solid Linux support. Information about SATA booting and this GPT partition is currently documented only in development version of ARM Trusted-Firmware-A documentation: https://trustedfirmware-a.readthedocs.io/en/latest/plat/marvell/armada/build.html It is missing in official documentation for Armada 3720 BootROM and therefore hard to find it. Signed-off-by: Pali Rohár include/pt-gpt-partnames.h | 3 +++ 1 file changed, 3 insertions(+) commit 9a6b2618b46a859388139d1eb18f876886786659 Author: Rosen Penev Date: Fri Apr 29 19:00:53 2022 -0700 meson: fix tzname check tzname is not a type but a variable. sizeof only works on types. Signed-off-by: Rosen Penev meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 777652585924034deeba98ae3192f26bc32bb661 Author: Rosen Penev Date: Fri Apr 29 18:19:53 2022 -0700 meson: fix isnan check musl only has isnan as a macro, not as a function. Handle the former case. Signed-off-by: Rosen Penev meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d7557eb3827664b2b78145373907f2a6994bdf9 Author: Rosen Penev Date: Fri Apr 29 18:17:52 2022 -0700 meson: add _GNU_SOURCE for sighandler_t musl requires it. Signed-off-by: Rosen Penev meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e9e2b9fe365cc4a0025d44dc0a9c54bfffe9058 Author: Rosen Penev Date: Fri Apr 29 18:16:17 2022 -0700 meson: fix environ search musl has it defined in unistd.h and hidden behind _GNU_SOURCE. Signed-off-by: Rosen Penev meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4194bb5b35e9b5f3296bf17b7cabcc5cb1632ba3 Author: Rosen Penev Date: Fri Apr 29 16:55:15 2022 -0700 meson: fix cpu_set_t test _GNU_SOURCE is needed here. Signed-off-by: Rosen Penev meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e25db9169450d3d5fb43656a2eae5c08999310f4 Author: Rosen Penev Date: Fri Apr 29 16:56:54 2022 -0700 meson: don't use run Fixes cross compilation. run is not needed anyway. Signed-off-by: Rosen Penev meson.build | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 38b15ca2dc4ca32bbe4a2449e1c7b645e4577840 Author: Rosen Penev Date: Fri Apr 29 16:53:43 2022 -0700 meson: fix compilation without systemd systemdsystemunitdir is used elsewhere. Signed-off-by: Rosen Penev meson.build | 1 + 1 file changed, 1 insertion(+) commit a38d1f69fee5ca7e883b09ed3668a7da3b161051 Author: Warner Losh Date: Fri Apr 29 15:29:44 2022 -0600 BSD: Use byteswap.h and endian.h defined macos when present Newer versions of FreeBSD will have a glibc compatible byteswap.h. Currently, this file assumes that FreeBSD requires bswap{16,32,64} to always be defined. This isn't the case when we're using the byteswap.h file (which is enabled by HAVE_BYTESWAP_H define). Assume that if byteswap.h and endian.h are present, then the proper macros are defined. Otherwise, assume that sys/endian.h is present and paper over the small differences between the BSDs for this file. Signed-off-by: Warner Losh include/bitops.h | 7 +++++++ 1 file changed, 7 insertions(+) commit e51565b653cf09985df57cb7254b16d5af5df223 Author: Nicolas Caramelli Date: Fri Apr 29 18:16:36 2022 +0200 meson: fix when HAVE_CLOCK_GETTIME is set Signed-off-by: Nicolas Caramelli meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 104dc2e092058489a4be17d5b15902e58ca56804 Author: d032747 Date: Fri Apr 22 10:07:46 2022 +0200 libuuid: improve cache handling Short running applications with a few UUID request don't need a large cache. Therefore increment the cache size over runtime. libuuid/src/gen_uuid.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d382861c0815ff241fb2844a2a896f0fb1c7b73e Author: Karel Zak Date: Fri Apr 29 10:11:49 2022 +0200 lsirq: improve --sort IRQ IRQ column mixes numbers and text, it seems better to use strverscmp() rather than classic strcmp(). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2078787 Signed-off-by: Karel Zak sys-utils/irq-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7cb26ec37aca229ecc2b78ad83bec6fbd6a6940 Author: Andrey Albershteyn Date: Wed Apr 27 13:24:56 2022 +0200 libblkid: add FSLASTBLOCK field interface showing area occupied by fs Add interface to let filesystem set FSLASTBLOCK which is basically total number of fsblocks (area occupied by fs). Enable that field in the 'superblocks' sample. Signed-off-by: Andrey Albershteyn libblkid/samples/superblocks.c | 3 ++- libblkid/src/blkid.h.in | 23 ++++++++++++----------- libblkid/src/superblocks/superblocks.c | 13 +++++++++++++ libblkid/src/superblocks/superblocks.h | 1 + 4 files changed, 28 insertions(+), 12 deletions(-) commit 16a2e0603f15c4a8f4517264930c7bdea5885bae Author: Mike Gilbert Date: Tue Apr 26 13:58:12 2022 -0400 lib: allow safe_getenv to work for non-root users This allows users to override settings like BLKID_FILE, as is done in the e2fsprogs test suite. Bug: https://bugs.gentoo.org/839825 Fixes: 035507c84b53bceb143d0923e65916cbf90979c7 Signed-off-by: Mike Gilbert lib/env.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9c01f798f491a59bb1124776f24d983972491382 Author: Karel Zak Date: Tue Apr 26 10:32:05 2022 +0200 libblkid: fix FSSIZE docs Signed-off-by: Karel Zak libblkid/src/superblocks/superblocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60cedc9213c4b1fee557ec01f9628cd054ad4a56 Author: Andrey Albershteyn Date: Mon Apr 25 17:08:39 2022 +0200 blkid: add FSSIZE tag with tests for XFS The FSSIZE tag was added to the libblkid. Enable this tag in blkid and update tests golden output for XFS test cases. Signed-off-by: Andrey Albershteyn misc-utils/blkid.c | 3 ++- tests/expected/blkid/low-probe-xfs | 1 + tests/expected/blkid/low-probe-xfs-v5 | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit d7ec8fe8e45b8d3c843d54d2a8e8682e79d5eb5f Author: Andrey Albershteyn Date: Mon Apr 25 17:08:38 2022 +0200 libblkid: implement FSSIZE calculation for XFS The implementation is similar to one provided by statfs(2) + lsblk. Signed-off-by: Andrey Albershteyn libblkid/src/superblocks/xfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ad08ae0aa94092911a2e0b16b62d6457d1a3635e Author: Andrey Albershteyn Date: Mon Apr 25 17:08:37 2022 +0200 libblkid: add interface for FSSIZE field Add interface to let filesystem probe calculate and set FSSIZE. Enable that field in the 'superblocks' sample. Signed-off-by: Andrey Albershteyn libblkid/samples/superblocks.c | 2 +- libblkid/src/blkid.h.in | 1 + libblkid/src/superblocks/superblocks.c | 11 +++++++++++ libblkid/src/superblocks/superblocks.h | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) commit 28a43fc626b8dbe51270f8cf40a39c9ba714e70f Author: Enze Li Date: Wed Apr 20 17:37:01 2022 +0800 eject: update file provenance of DRIVER_SENSE in the comments The location where the macro DRIVER_SENSE is defined has been placed in include/scsi/sg.h in the kernel upstream, but the comment was not updated in time. This patch updates the contents of this comment. Signed-off-by: Enze Li sys-utils/eject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 875d6a31d7d5042a382fd7a4612e24f1582b062e Author: Karel Zak Date: Mon Apr 25 15:27:07 2022 +0200 lsblk: add ID column Addresses: https://github.com/util-linux/util-linux/issues/1658 Signed-off-by: Karel Zak misc-utils/lsblk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e054895f4a22680cfd41f875b842f1544090d379 Author: Karel Zak Date: Mon Apr 25 14:54:29 2022 +0200 lsblk: make ID-LINK code more readable Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 6 +++--- misc-utils/lsblk.c | 10 +++++----- misc-utils/lsblk.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit a04149fbb7c1952da1194d1514e298ff07dbc7ca Author: Franck Bui Date: Fri Apr 22 11:30:09 2022 +0200 libmount: when moving a mount point, all sub mount entries in utab should also be updated Given that /run/mount/utab stores paths, this file needs to be adjusted when a mount tree is moved. However the moved tree may contains sub mount points in which case their utab entries (if any) need to also be translated. This patch takes care of that. As suggested in https://github.com/systemd/systemd/issues/15266, a better approach might be to store mount IDs instead of paths since mount IDs remain unchanged when mount trees are moved. Fixes: #1659 libmount/src/tab_update.c | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) commit ef7d50a0cc59d3b55587c8ea5fa45db45b888aee Author: Karel Zak Date: Fri Apr 22 11:20:26 2022 +0200 lsblk: add ID-LINK column Addresses: https://github.com/util-linux/util-linux/issues/1658 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 26 ++++++++++++++++++++++++++ misc-utils/lsblk.c | 7 +++++++ misc-utils/lsblk.h | 1 + 3 files changed, 34 insertions(+) commit d1574dae64ca1dca67b69702257519c6ca53db8c Author: Karel Zak Date: Fri Apr 22 11:16:20 2022 +0200 lsblk: remove huge all-function if-condition Let's make it more readable and easy to extend. Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 120 +++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 60 deletions(-) commit 24e896c1400c2328b8bdffde674a3d74429acdf1 Author: Karel Zak Date: Thu Apr 21 11:41:00 2022 +0200 libmount: cleanup UID and GIR parsing, add tests * parse_uid_numeric() and parse_gid_numeric() assumes zero terminated strings, so do not require size. The function ul_strtou64() already checks that the number is terminated by \0 * use rc from ul_strtou64() * always set errno if necessary * return -errno or -EINVAL rather than generic -1 * add --parse-{uid,gid,mode} to test_mount_utils Signed-off-by: Karel Zak libmount/src/utils.c | 133 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 94 insertions(+), 39 deletions(-) commit 47f851e15eefc34c03620c367e585a198d12b279 Author: Karel Zak Date: Thu Apr 21 11:40:43 2022 +0200 lib/strutils: make sure ul_strtoXX functions always set errno Signed-off-by: Karel Zak lib/strutils.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 722c96974dd4009a334e4aee556eedaab5fb94b4 Author: наб Date: Tue Apr 19 16:56:07 2022 +0200 libmount: accept X-mount.{owner,group,mode}= Which take a user, group, and mode, respectively, and set them on the target after mounting This is vaguely similar to tmpfs(5)'s [ug]id= and mode= options, but we POSIX-parse the user- and group names Oft requested in systemd/zram-generator, since a common use-case is to use it to create /tmp or an equivalent directory that needs to be a=rwx,o+t (or a user's private temp that needs to be owned by them) ‒ this is impossible without terrible hacks, cf. https://github.com/systemd/zram-generator/issues/150, https://github.com/systemd/zram-generator/issues/146, &c. This started off as a Set{User,Group,Mode}= systemd mount unit, but was poetterung into libmount options: https://github.com/systemd/systemd/pull/22889 Signed-off-by: Ahelenia Ziemiańska Signed-off-by: Karel Zak libmount/src/context.c | 12 +++- libmount/src/context_mount.c | 87 ++++++++++++++++++++++++- libmount/src/libmount.h.in | 13 +++- libmount/src/mountP.h | 7 +++ libmount/src/optstr.c | 19 ++---- libmount/src/utils.c | 126 +++++++++++++++++++++++++++++++++++++ sys-utils/mount.8.adoc | 6 ++ tests/expected/mount/set_ugid_mode | 1 + tests/ts/mount/set_ugid_mode | 65 +++++++++++++++++++ 9 files changed, 315 insertions(+), 21 deletions(-) commit 4848ba31acf05a020c7251d31184ec89f70dcf5a Author: Karel Zak Date: Thu Apr 21 10:59:28 2022 +0200 tests: report failed tests Signed-off-by: Karel Zak tests/run.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit c9667633f1f6b7a84116f2af067d1d15c72e6382 Author: Karel Zak Date: Wed Apr 20 14:42:32 2022 +0200 dmesg: fix --since and --until Now --since and --until requires any time field in the output (e.g. --ctime,-T), it means "dmesg --since '1 day ago'" doesn't work, but "dmesg -T --since '1 day ago'" works as expected. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2076829 Signed-off-by: Karel Zak sys-utils/dmesg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fd5698ffe7ce8e9ce39a73b7230a0b53c5cff7a9 Author: Karel Zak Date: Tue Apr 19 12:28:09 2022 +0200 lib/pty: minor cleanups Signed-off-by: Karel Zak lib/pty-session.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 2a6d17689cf4225a77e7d237a9e2ca8ead880d76 Author: наб Date: Tue Apr 12 16:25:14 2022 +0200 lib/pty: Put master PTY into non-blocking mode and buffer its output to avoid deadlock If we filled the script->child buffer before the child had a chance to read any input, we'd sleep forever in write_all(pty->master), and the child would sleep forever in write(1slave>) By putting the master PTY in non-blocking mode, we can poll(pty->master, POLLOUT) and keep supplying more data as the child reads from the buffer Fixes Debian bug #1003095 Signed-off-by: Karel Zak include/pty-session.h | 7 +++ lib/pty-session.c | 126 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 110 insertions(+), 23 deletions(-) commit 5a6c6dcde054ac7c246783b5f9843d86d2d9f053 Author: Enze Li Date: Fri Apr 15 13:55:10 2022 +0800 build-sys: add blkpr to gitignore Since this commit 627428a95692 ("blkpr: add block persistent reservations command"), we introduced blkpr, but the compiled generated binary file is not added to the gitignore, so let's do it. v2: - Reorder blkxxx in alphabetical order. Signed-off-by: Enze Li .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 740b6c73874447b7b77d03c2b1f06c825a30a006 Author: Anatoly Pugachev Date: Thu Apr 14 10:39:54 2022 +0300 tests: test_buffer, return EXIT_SUCCESS at the end Signed-off-by: Anatoly Pugachev lib/buffer.c | 2 ++ 1 file changed, 2 insertions(+) commit 3b888573661d43ea069e98a083bd10e33a2ece69 Author: Karel Zak Date: Tue Apr 19 11:38:57 2022 +0200 lib/strutils: improve strtoul_or_err() for negative numbers Let's use the same code for strtoul_or_err() and strtol_or_err() as we already use for strtoxXX_or_err() functions. It resolves issue with negative numbers. This problem has been discovered by "./eject -x -1 -v" where -x is based on strtoul_or_err(), but accepts negative number (-1). Reported-by: Enze Li Signed-off-by: Karel Zak include/strutils.h | 4 ++-- lib/strutils.c | 42 ------------------------------------------ 2 files changed, 2 insertions(+), 44 deletions(-) commit d7c11b93397c2cff8d0b986110c1fd2ca533ad92 Merge: 41c499cb3 eefff5aac Author: Karel Zak Date: Tue Apr 19 11:14:38 2022 +0200 Merge branch 'meson-static' of https://github.com/eli-schwartz/util-linux * 'meson-static' of https://github.com/eli-schwartz/util-linux: meson: fix typoed copy-paste error that override other dependencies to blkid meson: pass the correct absolute path to config.h meson: fix static builds creating conflicting targets commit 41c499cb33ea572d5c3ba499634335a400ff4dde Merge: 96491daf7 9a6e8ecef Author: Karel Zak Date: Tue Apr 19 11:13:03 2022 +0200 Merge branch 'fdisktestsppc64le' of https://github.com/zeha/util-linux * 'fdisktestsppc64le' of https://github.com/zeha/util-linux: tests: fdisk/bsd: update expected output for ppc64le commit 96491daf7684b8f7b10586fa2702db77d42963f3 Merge: 133a0d70f 9aa68bf4a Author: Karel Zak Date: Tue Apr 19 11:10:30 2022 +0200 Merge branch 'lsfd-ipc-fifo' of https://github.com/masatake/util-linux * 'lsfd-ipc-fifo' of https://github.com/masatake/util-linux: test: (lsfd) add a case for testing ENDPOINTS column of FIFOs test: (lsfd) extend test_mkfds to manage optional file descriptors lsfd: fill ENDPOINTS column for FIFOs lsfd: add ENDPOINTS column lsfd: move xstrappend and xstrputc to lsfd.h lsfd: add basic code for tracking IPC endpoints lsfd: add static modifier to nodev_table lsfd: delete __unused__ attribute for an used parameter commit 133a0d70f637b4f4e4337811e452153b04f2bdcf Author: Karel Zak Date: Tue Apr 19 09:44:07 2022 +0200 libblkid: check fsync() return code Since 39f5af25982d8b0244000e92a9d0e0e6557d0e17 libblkid uses O_NONBLOCK. Now it's more obvious that check fsync() (and close()) return value after write() is always a good idea ... Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2074486 Signed-off-by: Karel Zak libblkid/src/probe.c | 3 ++- misc-utils/wipefs.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit eefff5aac7bce6979c950e3931a578efe03acbac Author: Eli Schwartz Date: Thu Apr 14 15:24:27 2022 -0400 meson: fix typoed copy-paste error that override other dependencies to blkid libmount/meson.build | 4 ++-- libsmartcols/meson.build | 4 ++-- libuuid/meson.build | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 5f2c862a4aff19f5bc732e677405f04e2d07c211 Author: Eli Schwartz Date: Thu Apr 14 10:55:29 2022 -0400 meson: pass the correct absolute path to config.h When building util-linux as a subproject inside another project (using dependency fallback to get e.g. libuuid), `-include config.h` will not work because it is generated private to util-linux. Build the project argument using the path to the current build dir instead. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c68d580d4969acd496916d8f41540e6d4dd0f81 Author: Eli Schwartz Date: Thu Apr 14 10:28:29 2022 -0400 meson: fix static builds creating conflicting targets Meson has a global option -Ddefault_library which determines whether to build all generic libraries as static, shared, or both. When creating a library of the same name twice, once with library() and once with either shared_library() or static_library(), some values for -Ddefault_library will result in a fatal configuration error because multiple rules try to create libXXX.a or libXXX.so The reason for creating these additional copies of the library is in order to optionally build some programs as both "prog" and "prog.static" (and the latter is, of course, static). So depending on the default_library value may not be desirable. libfdisk/meson.build | 2 +- libmount/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9a6e8ecef4b2baa963272443774079f392112510 Author: Chris Hofstaedtler Date: Wed Apr 13 11:11:50 2022 +0000 tests: fdisk/bsd: update expected output for ppc64le Update expected test data after upstream MRs #1385 and #1386. Signed-off-by: Chris Hofstaedtler tests/expected/fdisk/bsd_0_64.LE | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit e928e8ed61996d46be4bfd36367c0e1c798f84d7 Author: Karel Zak Date: Wed Apr 13 12:35:40 2022 +0200 namei: add -Z (selinux context report) Co-Author: CJ Kucera Addresses: https://github.com/util-linux/util-linux/pull/1630 Signed-off-by: Karel Zak misc-utils/Makemodule.am | 1 + misc-utils/namei.1.adoc | 4 ++++ misc-utils/namei.c | 49 ++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 50 insertions(+), 4 deletions(-) commit b95ad7d7520109c3695223feee111af991bd7610 Author: Enze Li Date: Wed Apr 13 15:53:50 2022 +0800 build-sys: add gnu global outputs to gitignore Some people like to use gnu global to browse code, so we add the global output files to gitignore, which is safe because no function-related code is changed. Signed-off-by: Enze Li .gitignore | 4 ++++ 1 file changed, 4 insertions(+) commit 579b8737a21ccb3bfe6c404b2866f8c8037e9c20 Author: Eli Schwartz Date: Tue Apr 12 21:50:57 2022 -0400 meson: validate the return code of subprocess commands run_command() has an unfortunate early design quirk in that it doesn't error when the command itself errors. Recent versions of Meson warn if you do not explicitly specify whether the return code matters by passing `check:` to it; this prevents building util-linux (including as a subproject) with --fatal-meson-warnings. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a246498349939c832489c96ed03580bcf9e46b14 Author: Eli Schwartz Date: Tue Apr 12 21:23:34 2022 -0400 meson: export dependencies as declared dependencies This allows util-linux to be built as a subproject in order to provide an alternative to a system version of e.g. fdisk.pc, uuid.pc libblkid/meson.build | 4 ++++ libfdisk/meson.build | 4 ++++ libmount/meson.build | 4 ++++ libsmartcols/meson.build | 4 ++++ libuuid/meson.build | 4 ++++ 5 files changed, 20 insertions(+) commit 97074bf1c4ebff26c69ed9ae2140b0a4c3068ee8 Author: Eli Schwartz Date: Tue Apr 12 21:25:01 2022 -0400 meson: declare the minimum required version of meson itself Features from Meson 0.53.0 are used, so declare this as required to prevent people from trying to use older versions and getting strange errors. Instead, Meson will tell them they need that version. meson.build | 1 + 1 file changed, 1 insertion(+) commit 2bb8e9fd536cadfe22105c4b2d29589b2d05f2b7 Merge: 654a443a6 2e7ef3103 Author: Karel Zak Date: Tue Apr 12 13:51:27 2022 +0200 Merge branch 'no_systemd' of https://github.com/data-man/util-linux * 'no_systemd' of https://github.com/data-man/util-linux: Don't install uuidd service if systemd isn't present commit 2e7ef31034db005305788740f08abafe61297aea Author: data-man Date: Tue Apr 12 15:29:06 2022 +0500 Don't install uuidd service if systemd isn't present misc-utils/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 654a443a628e21cc1ab016ff227fc81563b13c6e Author: Karel Zak Date: Tue Apr 12 11:56:40 2022 +0200 libfdisk: (gpt) add comment Signed-off-by: Karel Zak libfdisk/src/gpt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 17b4496a1819b8bf1b78683e49e3ade1f8941b3f Author: Philippe Reynes Date: Mon Apr 11 14:42:29 2022 +0200 libfdisk: (gpt) write PMBR only when useful The MBR is critical as it doesn't have a backup, so we only write it when it is really useful (ie: the current MBR is different than the new one). Signed-off-by: Philippe Reynes libfdisk/src/gpt.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit b956bc8662645b7cc6d43021ae33bd091c34d9e1 Author: Karel Zak Date: Tue Apr 12 10:57:33 2022 +0200 lscpu: fix incomplete column description Fixes: https://github.com/util-linux/util-linux/issues/1649 Signed-off-by: Karel Zak sys-utils/lscpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 113cb6a2f5703bb4e3a3018923de3f38a30a9ee3 Author: Karel Zak Date: Mon Apr 11 12:50:47 2022 +0200 blkpr: change description formatting * make it more usable for translators * keep output shorter Signed-off-by: Karel Zak sys-utils/blkpr.c | 78 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) commit dfe9410623a6c916118da86913506b106ac62495 Author: zhenwei pi Date: Thu Apr 7 11:49:32 2022 +0800 blkpr: add descriptions for arguments Karel pointed out that the arguments of this command is not obvious enough for end-users. So add the detailed descriptions. The description comes from linux/Documentation/block/pr.rst, and modify a bit. Signed-off-by: zhenwei pi sys-utils/blkpr.c | 81 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 19 deletions(-) commit 2a1203bb3c6f2c93581f530f8132083597b56f8f Author: zhenwei pi Date: Thu Apr 7 11:49:31 2022 +0800 blkpr: rename operation to command Suggested by Karel, rename operation to command. Thus make this more clear. Signed-off-by: zhenwei pi sys-utils/blkpr.8.adoc | 8 ++++---- sys-utils/blkpr.c | 44 ++++++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 26 deletions(-) commit ce24cf2659792aa67e0bfa91c4c553924c7e5f92 Merge: 40a153c2e c6725588c Author: Karel Zak Date: Mon Apr 11 11:31:03 2022 +0200 Merge branch 'macos-lsfd' of https://github.com/mator/util-linux * 'macos-lsfd' of https://github.com/mator/util-linux: tests: don't compile lsfd/mkfds helper on macos, since it's linux only commit 40a153c2e6b9baad6f5c61ac44b966c5de73684b Merge: 481ee5542 116592b41 Author: Karel Zak Date: Mon Apr 11 11:29:46 2022 +0200 Merge branch 'setarch-opts' of https://github.com/mator/util-linux * 'setarch-opts' of https://github.com/mator/util-linux: tests: fix misc/setarch run in a docker environment commit 481ee5542d61c55bc038fa8fff5ff6bb2c7d0df7 Merge: ea4e25c08 c387d4fe7 Author: Karel Zak Date: Mon Apr 11 11:29:01 2022 +0200 Merge branch 'libfdisk' of https://github.com/mator/util-linux * 'libfdisk' of https://github.com/mator/util-linux: libfdisk: meson.build fix typo commit ea4e25c085629da17db53f755e7cd8ef526d00bd Merge: 717fb797a e395a0388 Author: Karel Zak Date: Mon Apr 11 11:28:31 2022 +0200 Merge branch 'lsfd-map_files' of https://github.com/masatake/util-linux * 'lsfd-map_files' of https://github.com/masatake/util-linux: lsfd: use /proc/$PID/map_files as the fallback information source commit 717fb797a9a3b104a8caa0eac5ec8bcbeba0020a Merge: 10ddf058d cdbb34d0d Author: Karel Zak Date: Mon Apr 11 11:25:30 2022 +0200 Merge branch 'lsfd-filter-empty-string' of https://github.com/masatake/util-linux * 'lsfd-filter-empty-string' of https://github.com/masatake/util-linux: lsfd: (filter): parse "" in filter expression correctly lsfd: (filter): fix a codeing style of if/else commit e395a0388718b290662d87f32ebd5e2715aab3e6 Author: Masatake YAMATO Date: Mon Apr 4 21:05:31 2022 +0900 lsfd: use /proc/$PID/map_files as the fallback information source The original code scanning /proc/$PID/maps assumed two things; an entry of the file contains a path started from '/' if a file is mapped, and stat(2) works well with the path in the entry. A mmap'ed socket breaks the former assumption. tcpdump/lipcap does mmap an AF_PACKET socket to its address space! A file is deleted after mapping breaks the latter assumption. With this change, lsfd utilizes dentries under /proc/$PID/map_files for gathering information of the mapped file in the case that the assumptions are broken. Private anonymous mappings are skipped to avoid wasting CPU time. Example output: # ./lsfd -p 1541379 -Q '(ASSOC == "shm")' COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME tcpdump 1541379 tcpdump shm rw- SOCK sockfs 0 114535087 PACKET:[114535087] # ./lsfd -Q '(ASSOC == "shm") and DELETED' | head -2 COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME systemd-resolve 870 systemd-resolve shm r-- REG dm-0 0 1180413 /var/lib/sss/mc/passwd (deleted) NOTE: CAP_SYS_ADMIN capability is required to access map_files. See proc(5) for more details. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) commit c6725588cefbc4126bafbd45cca496f2f0f93b95 Author: Anatoly Pugachev Date: Sat Apr 9 12:44:06 2022 +0300 tests: don't compile lsfd/mkfds helper on macos, since it's linux only macos is missing linux only header "sys/prctl.h", so exclude lsfd/mkfds on macos from make 'check-programs' target tests/helpers/Makemodule.am | 2 ++ 1 file changed, 2 insertions(+) commit 116592b415876c1bff01925d461faa81a78a9dd9 Author: Anatoly Pugachev Date: Fri Apr 8 17:53:58 2022 +0300 tests: fix misc/setarch run in a docker environment Fixes: #601 tests/ts/misc/setarch | 1 + 1 file changed, 1 insertion(+) commit c387d4fe7a1435a762a5b7d8b75feb13ad613315 Author: Anatoly Pugachev Date: Fri Apr 8 15:34:16 2022 +0300 libfdisk: meson.build fix typo libfdisk/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10ddf058d4d2692a6f439f732e5d923635129130 Author: Karel Zak Date: Wed Apr 6 12:43:05 2022 +0200 blkpr: fix extra ';' outside of a function [clang] Signed-off-by: Karel Zak sys-utils/blkpr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f028fc21958494d6df891db0942945bc5cebbe13 Author: Karel Zak Date: Wed Apr 6 12:18:33 2022 +0200 blkpr: cosmetic coding style changes Signed-off-by: Karel Zak sys-utils/blkpr.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 3215d510887ef179080b86758b9296f35078a6c9 Author: Karel Zak Date: Wed Apr 6 12:14:12 2022 +0200 blkpr: cleanup --help output and man page Signed-off-by: Karel Zak sys-utils/blkpr.8.adoc | 10 ++++---- sys-utils/blkpr.c | 65 +++++++++++++++++++++++++------------------------- 2 files changed, 38 insertions(+), 37 deletions(-) commit 627428a95692eddf9d6a5f43a50f2fbcded5f5e5 Author: zhenwei pi Date: Thu Sep 16 11:29:01 2021 +0800 blkpr: add block persistent reservations command Linux kernel block layer supports PR (persistent reservations) ioctl on a block device. Typically SCSI and NVMe disk support PR feature, and blkpr could operation on them. Signed-off-by: zhenwei pi configure.ac | 11 ++ sys-utils/Makemodule.am | 8 ++ sys-utils/blkpr.8.adoc | 64 +++++++++++ sys-utils/blkpr.c | 277 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 360 insertions(+) commit fc686823b008bc95e2ebe904c706a117a03e2754 Author: Karel Zak Date: Wed Apr 6 10:38:43 2022 +0200 lsns: improve dependence on NS_GET_ ioctls Fixes: http://autobuild.buildroot.org/results/572ecf8e37ac733a4e4265f4f78f35230337278e Reported-by: Fabrice Fontaine Signed-off-by: Karel Zak sys-utils/lsns.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dcf8f3b40f73e99ff70d6fcc6e371b2e6ea8f95e Author: Fabrice Fontaine Date: Tue Apr 5 20:04:59 2022 +0200 configure.ac: add lsns option lsns unconditionally uses NS_GET_NSTYPE since version 2.38 and https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=de72df79d72fa906e71e2ac922d8745ff22deee5 which is only available since kernel 4.11 and https://github.com/torvalds/linux/commit/e5ff5ce6e20ee22511398bb31fb912466cf82a36 resulting in the following build failure: sys-utils/lsns.c: In function 'add_namespace_for_nsfd': sys-utils/lsns.c:719:25: error: 'NS_GET_NSTYPE' undeclared (first use in this function) 719 | clone_type = ioctl(fd, NS_GET_NSTYPE); | ^~~~~~~~~~~~~ So add an option to allow the user to disable lsns Fixes: - http://autobuild.buildroot.org/results/572ecf8e37ac733a4e4265f4f78f35230337278e Signed-off-by: Fabrice Fontaine configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3d1c41c8cff0872d5ee6db8e9ba152ab8eb67e03 Author: Karel Zak Date: Tue Apr 5 11:43:24 2022 +0200 libmount: add --onlyonce Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 2 ++ libmount/src/context.c | 25 +++++++++++++++++++++++++ libmount/src/context_mount.c | 17 +++++++++++++++++ libmount/src/libmount.h.in | 9 +++++++++ libmount/src/libmount.sym | 5 +++++ libmount/src/mountP.h | 1 + sys-utils/mount.8.adoc | 3 +++ sys-utils/mount.c | 10 ++++++++-- 8 files changed, 70 insertions(+), 2 deletions(-) commit cdbb34d0db5af6a4ebc7eff121eac1c818b9fce6 Author: Masatake YAMATO Date: Tue Apr 5 03:58:59 2022 +0900 lsfd: (filter): parse "" in filter expression correctly The original code cannot convert "" in filter expression to a token correctly. The following command line exposes the bug this change fixes: # ./lsfd -o+ENDPOINTS -Q '(TYPE == "")' zsh: IOT instruction sudo ./lsfd -Q '(TYPE == "")' Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 97a977cb85a0418a86e5a47b4c6862f225d7fa6b Author: Masatake YAMATO Date: Tue Apr 5 03:54:11 2022 +0900 lsfd: (filter): fix a codeing style of if/else This is only cosmetic change. Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9aa68bf4a905609c9d9ad0e36b53de1dd4791fe8 Author: Masatake YAMATO Date: Tue Apr 5 03:09:09 2022 +0900 test: (lsfd) add a case for testing ENDPOINTS column of FIFOs Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-pipe-no-fork | 2 ++ tests/helpers/test_mkfds.c | 45 +++++++++++++++++++++++++++++++++- tests/ts/lsfd/mkfds-pipe-no-fork | 29 +++++++++++++++++++++- 3 files changed, 74 insertions(+), 2 deletions(-) commit d14e9efd4c47fbfc0983af00d21346a71d001674 Author: Masatake YAMATO Date: Tue Apr 5 03:03:25 2022 +0900 test: (lsfd) extend test_mkfds to manage optional file descriptors This change may need to test ENDPOINTS column of lsfd. The core part of test_mkfds command could close pre-specified file descriptors opened by a factory. However, it could not handle file descriptors optionally opened. With this change, the core part can close such optionally opened file descriptors. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 5211d5a18082c52c31dfc92b3c710e8e32c8ef2c Author: Masatake YAMATO Date: Mon Mar 7 22:19:28 2022 +0900 lsfd: fill ENDPOINTS column for FIFOs For FIFO type files, lsof can fill ENDPOINTS as following: _PID_,_COMMAND_,_ASSOC_[-r][-w] Example output: $ dd if=/dev/zero | nc -l 127.0.0.1 9091 > /dev/null & [1] 1707808 1707809 $ ./lsfd -p "1707808 1707809" -o+ENDPOINTS -Q '(type == "FIFO")' COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME ENDPOINTS dd 1707808 yamato 1 -w- FIFO pipefs 14 73477636 pipe:[73477636] 1707809,nc,0r- nc 1707809 yamato 0 r-- FIFO pipefs 14 73477636 pipe:[73477636] 1707808,dd,1-w Signed-off-by: Masatake YAMATO misc-utils/lsfd-fifo.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++- misc-utils/lsfd.1.adoc | 11 +++++++ misc-utils/lsfd.c | 12 +++++-- 3 files changed, 106 insertions(+), 3 deletions(-) commit c5b61ee784e2117358e9476bc9761b571181ce96 Author: Karel Zak Date: Mon Apr 4 15:59:36 2022 +0200 tests: make libmount tests more portable git tree on macbook: ... warning: the following paths have collided (e.g. case-sensitive paths on a case-insensitive filesystem) and only one from the same colliding group is in the working tree: 'tests/expected/libmount/optstr-apply-user-X' 'tests/expected/libmount/optstr-apply-user-x' Let's rename the files. Addresses: https://github.com/util-linux/util-linux/issues/1583 Signed-off-by: Karel Zak .../libmount/{optstr-apply-user-X => optstr-apply-user-large-X} | 0 .../libmount/{optstr-apply-user-x => optstr-apply-user-small-x} | 0 tests/ts/libmount/optstr | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) commit 66f31d8dfdaae2dc98913138f200287db8db7669 Author: Masatake YAMATO Date: Mon Mar 7 22:18:15 2022 +0900 lsfd: add ENDPOINTS column The field is for printing the information about the IPC endpoints. Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 3 +++ misc-utils/lsfd.c | 2 ++ misc-utils/lsfd.h | 1 + 3 files changed, 6 insertions(+) commit fd79de87208f94d9588315244cfc882c565d1668 Author: Masatake YAMATO Date: Mon Mar 7 22:07:21 2022 +0900 lsfd: move xstrappend and xstrputc to lsfd.h Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 15 --------------- misc-utils/lsfd.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 15 deletions(-) commit feb48e880617cc4dad4d32a3390093dbfb429506 Author: Masatake YAMATO Date: Mon Mar 7 18:20:10 2022 +0900 lsfd: add basic code for tracking IPC endpoints Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.h | 24 ++++++++++++++++++++++ 2 files changed, 85 insertions(+) commit f3653e4e190588e5c1bab3dba524343fbecce3f7 Author: Masatake YAMATO Date: Mon Mar 7 18:17:25 2022 +0900 lsfd: add static modifier to nodev_table Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f54225c44908a88b57d77565b340f9e353d1dc71 Author: Masatake YAMATO Date: Mon Mar 7 17:10:17 2022 +0900 lsfd: delete __unused__ attribute for an used parameter Signed-off-by: Masatake YAMATO misc-utils/lsfd-fifo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c2ab4c16833ea215792358ad7c1509b7d06e574 Merge: 3671d4a87 6a2c79e7b Author: Karel Zak Date: Mon Apr 4 13:24:31 2022 +0200 Merge branch 'lsfd-test-add-missing-dup2' of https://github.com/masatake/util-linux commit 3671d4a878fb58aa953810ecf9af41809317294f Author: Karel Zak Date: Mon Apr 4 13:17:44 2022 +0200 build-sys: improve dependences for lib/procfs.c * add #ifdefs when use statfs() and include statfs.h or vfs.h Addresses: https://github.com/util-linux/util-linux/issues/1634 Signed-off-by: Karel Zak configure.ac | 2 ++ include/statfs_magic.h | 4 +++- lib/procfs.c | 15 +++++++++++++-- misc-utils/hardlink.c | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) commit 24f79730aa2cb95f5c9a3d11169a99d9cbfd0514 Author: Karel Zak Date: Mon Apr 4 11:26:59 2022 +0200 Revert "build-sys: compile procfs and sysfs code in Linux only" This reverts commit f30b16edb467484d8d9e5a5b5fd665b83a90ddc9. It seems better to use original solution and depend on HAVE_DIRFD and HAVE_OPENAT, because libblkid and another tools are compiled on non-Linux targets too. lib/Makemodule.am | 2 -- 1 file changed, 2 deletions(-) commit 6a2c79e7b0bba255152e9f7e7d110f7e42ea0845 Author: Masatake YAMATO Date: Sun Apr 3 11:19:43 2022 +0900 tests: (lsfd) add missing dup2 calls to assign proper file descriptors Close #1637. The test cases assumed the file descriptor #3 was not occupied. As reported in #1637, the assumption was wrong. This new code assigns the file descriptor #3 explicitly with dup2 as the other test cases did. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) commit a938f9f0c26cc1a7acb3afc608b00207379889a2 Author: наб Date: Thu Mar 31 18:55:35 2022 +0200 libmount: fix typos lib/colors.c | 4 ++-- lib/idcache.c | 2 +- libmount/src/optstr.c | 2 +- libmount/src/utils.c | 4 ++-- login-utils/sulogin-consoles.c | 2 +- misc-utils/lsfd-filter.c | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) commit 4b2fadb1bcd44101238941e7b54ecb66a33406d2 Author: zhenwei pi Date: Tue Mar 29 16:59:51 2022 +0800 irqtop: support -C/--cpu-list Specify cpus list format to show by -C/--cpu-list parameters, for example, on an AMD server with 192 CPUs, to show statistics on NUMA node 1: ~# ./irqtop -d 1 -C 48-95,144-191 Signed-off-by: zhenwei pi bash-completion/irqtop | 4 ++++ sys-utils/irq-common.c | 46 ++++++++++++++++++++++++++++++++++------------ sys-utils/irq-common.h | 9 +++++++-- sys-utils/irqtop.1.adoc | 3 +++ sys-utils/irqtop.c | 29 ++++++++++++++++++++++++++--- sys-utils/lsirq.c | 2 +- 6 files changed, 75 insertions(+), 18 deletions(-) commit 97ce458a0dc2465fca2b36a6a4aa3378b607476e Author: Karel Zak Date: Fri Apr 1 10:03:14 2022 +0200 lsblk: fix JSON output when without --bytes Fixes: https://github.com/util-linux/util-linux/issues/1636 Signed-off-by: Karel Zak misc-utils/lsblk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f30b16edb467484d8d9e5a5b5fd665b83a90ddc9 Author: Karel Zak Date: Fri Apr 1 09:44:18 2022 +0200 build-sys: compile procfs and sysfs code in Linux only Addresses: https://github.com/util-linux/util-linux/issues/1634 Signed-off-by: Karel Zak lib/Makemodule.am | 2 ++ 1 file changed, 2 insertions(+) commit 153607e20377f60ab9ff026c1a5c0d07f89f49a3 Author: Karel Zak Date: Thu Mar 31 10:55:30 2022 +0200 unshare: make pidfd_open() use more portable and robust * use #ifdef UL_HAVE_PIDFD for better portability * open and close fd_parent_pid only when --kill-child specified Signed-off-by: Karel Zak sys-utils/unshare.c | 62 +++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 28 deletions(-) commit 1f248f73d851518fb84d8dd4a1b9b15619454c4b Author: Earl Chew Date: Mon Mar 7 20:41:24 2022 -0800 unshare: Fix PDEATHSIG race for --kill-child with --pid Exit the child explicitly should the parent terminate just before the child invokes prctl(PR_SET_PDEATHSIG). Note that if the child is created as pid 1 in a new pid namespace, getppid(2) will return 0 because the parent resides in a different namespace, and SIGKILL will only be delivered if sent from the ancestor namespace. Instead of checking the pid of the parent, use a pidfd instance to detect the termination of the parent. The issue can be reproduced using the following script which must be run as root to permite the --pid option. The script will sometimes print 0..9 despite the parent being killed: while : ; do cat /proc/uptime sh -c ' unshare --kill-child --pid --fork bash -c " for X in {0..9} ; do echo \$X || break ; sleep 1 ; done" & sleep 0 # sleep 0.00$RANDOM kill -9 $! 2>/dev/null' | cat done Signed-off-by: Earl Chew sys-utils/unshare.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit e9fe488771b454934502a5ed0ba9b561c0cde87e Author: Karel Zak Date: Thu Mar 31 09:55:23 2022 +0200 column: fix memory use [coverity scan] Signed-off-by: Karel Zak text-utils/column.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 8a59ff19ffa12e3401724740bbc097d0059cd8b3 Author: Karel Zak Date: Wed Mar 23 13:06:09 2022 +0100 column: add missing help entry Signed-off-by: Karel Zak text-utils/column.c | 1 + 1 file changed, 1 insertion(+) commit fd75b96898c455c35c045bc59a2a4a546e79f223 Author: Karel Zak Date: Wed Mar 23 12:50:07 2022 +0100 column: don't require column name for JSON The "--table-hide -" hides all unnamed columns, but this does not work for JSON output. This patch fixes this issue. Signed-off-by: Karel Zak text-utils/column.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) commit b4526713bc90c5f18bb59ef5719debfc67f14430 Author: Karel Zak Date: Wed Mar 23 12:34:58 2022 +0100 column: add --table-column Signed-off-by: Karel Zak text-utils/column.1.adoc | 38 +++++++++++++++++++++++++-- text-utils/column.c | 67 +++++++++++++++++++++++++++++++++--------------- 2 files changed, 82 insertions(+), 23 deletions(-) commit 576f626b3ab9080d1458bfce3108fa9f9ab553d9 Author: Karel Zak Date: Wed Mar 23 11:59:27 2022 +0100 libsmartcols: add scols_column_set_properties() This function can set all column properties from comma separated string. Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 1 + libsmartcols/src/column.c | 95 ++++++++++++++++++++++++++++- libsmartcols/src/libsmartcols.h.in | 3 + libsmartcols/src/libsmartcols.sym | 6 ++ libsmartcols/src/table.c | 31 +++++++++- 5 files changed, 134 insertions(+), 2 deletions(-) commit 6c513f3c54b76666ac85cf1635a060efa327eaf3 Author: Karel Zak Date: Tue Mar 22 11:09:07 2022 +0100 libmount: move optstr parsing to lib/ Signed-off-by: Karel Zak include/strutils.h | 2 ++ lib/strutils.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++ libmount/src/optstr.c | 77 ++------------------------------------------------- 3 files changed, 75 insertions(+), 74 deletions(-) commit 866d922bf89151385cb9b82d6c3f8aec37df22b5 Author: Karel Zak Date: Mon Mar 21 13:40:40 2022 +0100 meson: update for logindefs move Signed-off-by: Karel Zak lib/meson.build | 1 + login-utils/meson.build | 15 ++++----------- meson.build | 25 ++++++++++++------------- term-utils/meson.build | 3 ++- 4 files changed, 19 insertions(+), 25 deletions(-) commit 556925fe4e63719756ce32c904e887d89d81f5b9 Author: Karel Zak Date: Mon Mar 21 13:19:38 2022 +0100 agetty: add support for LOGIN_PLAIN_PROMPT login(1) and agetty(8) are usually used together to log-in user. The initial login prompt is printed by agetty. login(1) can suppress hostname in the prompt by LOGIN_PLAIN_PROMPT=no (/etc/login.defs), but for agetty it's necessary to use --nohostname. It's pretty unfriendly for system admins. Let's share the same setting between all tools. Signed-off-by: Karel Zak term-utils/Makemodule.am | 6 +++++- term-utils/agetty.8.adoc | 11 ++++++++++- term-utils/agetty.c | 9 +++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) commit 420bce887dadc9c131432a7b9cef65b973e66408 Author: Karel Zak Date: Mon Mar 21 13:07:46 2022 +0100 build-sys: move login-utils/logindefs.c to lib Signed-off-by: Karel Zak include/Makemodule.am | 1 + {login-utils => include}/logindefs.h | 0 lib/Makemodule.am | 11 ++++++++++- {login-utils => lib}/logindefs.c | 0 login-utils/Makemodule.am | 29 ++++++----------------------- 5 files changed, 17 insertions(+), 24 deletions(-) commit fc047eb03c8d35e54ab5e7b8d00d03847249f1e0 Author: Karel Zak Date: Mon Mar 21 12:02:55 2022 +0100 agetty: cleanup login prompt macro use Signed-off-by: Karel Zak term-utils/agetty.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 35d5d655c5bc58c52ae6d440eea69b39f1cfb4fc Author: Karel Zak Date: Wed Mar 9 11:49:13 2022 +0100 column: implement "--output-width unlimited" Addresses: https://github.com/util-linux/util-linux/issues/1618 Signed-off-by: Karel Zak text-utils/column.1.adoc | 2 ++ text-utils/column.c | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 9d5424c26bf42f5a10b145393127f4e7ac977202 Author: Karel Zak Date: Wed Mar 9 11:28:07 2022 +0100 lib/loopdev: consolidate ioctls calls on EAGAIN Keep all logic to repeat ioctl calls in one macro rather than duplicate code. Signed-off-by: Karel Zak lib/loopdev.c | 97 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 43 deletions(-) commit 1328e0f72434fb160a32b5972ba030b700ee0a4c Author: Karel Zak Date: Tue Mar 8 13:02:38 2022 +0100 lib/loopdev: remove duplicate code Use loopcxt_ioctl_status() rather than duplicate code. Signed-off-by: Karel Zak lib/loopdev.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 478b9d477ecdd8f4e3a7b488524e1d4c6a113525 Author: Karel Zak Date: Wed Mar 30 10:50:38 2022 +0200 hardlink: require statfs_magic.h only when reflink support enabled Addresses: https://github.com/util-linux/util-linux/issues/1634 Signed-off-by: Karel Zak misc-utils/hardlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)