Changes between v2.39 and v2.40-rc1 -------------------------------------------- commit 3401d7c40824aea94edf3b0de5d23f2139115c4a Author: Karel Zak Date: Wed Jan 24 12:10:42 2024 +0100 build-sys: release++ (v2.40-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 28a56613dc9a04c07dd16a3557cdf27ec1dac5aa Author: Karel Zak Date: Wed Jan 24 12:08:10 2024 +0100 docs: update v2.40-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.40-ReleaseNotes | 1157 +++++++++++++++++++++++++++++ 1 file changed, 1157 insertions(+) commit c6f7ffd68fe6920246a234bf5a1caf35bf9da244 Author: Karel Zak Date: Wed Jan 24 11:06:09 2024 +0100 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit 52c35b4c1b9d68f53f9e875a49253ef90b8ead52 Author: Karel Zak Date: Wed Jan 24 10:56:43 2024 +0100 po-man: merge changes Signed-off-by: Karel Zak po-man/cs.po | 3148 +-- po-man/de.po | 33273 +++++++++++++++++++++------- po-man/es.po | 3154 +-- po-man/fr.po | 51267 ++++++++++++++++++++++++++++++++++---------- po-man/pt_BR.po | 3139 +-- po-man/sr.po | 34228 ++++++++++++++++++++++------- po-man/uk.po | 29701 +++++++++++++++++++------ po-man/util-linux-man.pot | 3070 +-- 8 files changed, 121664 insertions(+), 39316 deletions(-) commit d387c91b3f769fc41c9785bee59ea5d1a231596b Author: Karel Zak Date: Wed Jan 24 10:56:37 2024 +0100 po: merge changes Signed-off-by: Karel Zak po/ca.po | 8692 +++++++++++++++++++++++++++++---------------------- po/cs.po | 8851 ++++++++++++++++++++++++++++++---------------------- po/da.po | 8812 ++++++++++++++++++++++++++++++---------------------- po/de.po | 8925 +++++++++++++++++++++++++++++++---------------------- po/es.po | 8848 ++++++++++++++++++++++++++++++---------------------- po/et.po | 8551 ++++++++++++++++++++++++++++---------------------- po/eu.po | 8566 ++++++++++++++++++++++++++++---------------------- po/fi.po | 8680 +++++++++++++++++++++++++++++---------------------- po/fr.po | 8802 ++++++++++++++++++++++++++++++---------------------- po/gl.po | 8490 ++++++++++++++++++++++++++++---------------------- po/hr.po | 8840 ++++++++++++++++++++++++++++++---------------------- po/hu.po | 8639 +++++++++++++++++++++++++++++---------------------- po/id.po | 8633 +++++++++++++++++++++++++++++---------------------- po/it.po | 8622 +++++++++++++++++++++++++++++---------------------- po/ja.po | 8900 ++++++++++++++++++++++++++++++---------------------- po/ko.po | 8802 ++++++++++++++++++++++++++++++---------------------- po/nl.po | 8846 +++++++++++++++++++++++++++++----------------------- po/pl.po | 8802 ++++++++++++++++++++++++++++++---------------------- po/pt.po | 8841 ++++++++++++++++++++++++++++++---------------------- po/pt_BR.po | 8894 ++++++++++++++++++++++++++++++---------------------- po/ru.po | 8577 ++++++++++++++++++++++++++++---------------------- po/sk.po | 8487 ++++++++++++++++++++++++++++---------------------- po/sl.po | 8627 +++++++++++++++++++++++++++++---------------------- po/sr.po | 8854 ++++++++++++++++++++++++++++++---------------------- po/sv.po | 8856 ++++++++++++++++++++++++++++++---------------------- po/tr.po | 8812 ++++++++++++++++++++++++++++++---------------------- po/uk.po | 8797 ++++++++++++++++++++++++++++++---------------------- po/util-linux.pot | 8146 ++++++++++++++++++++++++++---------------------- po/vi.po | 8805 ++++++++++++++++++++++++++++++---------------------- po/zh_CN.po | 8858 ++++++++++++++++++++++++++++++---------------------- po/zh_TW.po | 8688 ++++++++++++++++++++++++++++----------------------- 31 files changed, 155129 insertions(+), 115414 deletions(-) commit c89f9b17502edd9b8d60c1ab16cbdab83c9aa6af Author: Remus-Gabriel Chelu Date: Wed Jan 24 10:54:24 2024 +0100 po-man: add ro.po (from translationproject.org) po-man/ro.po | 38277 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 38277 insertions(+) commit 92377e984506a4fb9306de608d9d8567ce97aca0 Author: Seong-ho Cho Date: Wed Jan 24 10:54:24 2024 +0100 po-man: add ko.po (from translationproject.org) po-man/ko.po | 38919 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 38919 insertions(+) commit ae4419414965552e1c97802bc8f11b6811fe8cf4 Author: Yuri Chornoivan Date: Wed Jan 24 10:54:24 2024 +0100 po-man: update uk.po (from translationproject.org) po-man/uk.po | 28178 ++++++++++++++------------------------------------------- 1 file changed, 6613 insertions(+), 21565 deletions(-) commit 9212c811001b30811e1bc2a191bb1dd5a72a2e12 Author: Мирослав Николић Date: Wed Jan 24 10:54:24 2024 +0100 po-man: update sr.po (from translationproject.org) po-man/sr.po | 33827 ++++++++++++++------------------------------------------- 1 file changed, 8301 insertions(+), 25526 deletions(-) commit d5f741a781f4d560f12deb56188290e3121bc0de Author: Frédéric Marchal Date: Wed Jan 24 10:54:24 2024 +0100 po-man: update fr.po (from translationproject.org) po-man/fr.po | 49217 ++++++++++++--------------------------------------------- 1 file changed, 10007 insertions(+), 39210 deletions(-) commit 108f534e64cd437b1a7e252c4061e09c24a7d290 Author: Mario Blättermann Date: Wed Jan 24 10:54:24 2024 +0100 po-man: update de.po (from translationproject.org) po-man/de.po | 31106 +++++++++++++-------------------------------------------- 1 file changed, 6906 insertions(+), 24200 deletions(-) commit 656985dc0073e67ecc1c0de046cd36f0df471a8d Author: Remus-Gabriel Chelu Date: Wed Jan 24 10:53:02 2024 +0100 po: add ro.po (from translationproject.org) po/ro.po | 24247 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 24247 insertions(+) commit 40d0f9ea3657485adb4aafff4c118c87575be36d Author: Emir SARI Date: Wed Jan 24 10:53:02 2024 +0100 po: update tr.po (from translationproject.org) po/tr.po | 4773 +++----------------------------------------------------------- 1 file changed, 177 insertions(+), 4596 deletions(-) commit 311b27593d1ff9862f855b7cb26279ea7097c16e Author: Мирослав Николић Date: Wed Jan 24 10:53:01 2024 +0100 po: update sr.po (from translationproject.org) po/sr.po | 2468 +++++++++++++++++++++----------------------------------------- 1 file changed, 818 insertions(+), 1650 deletions(-) commit 0770f796b32a1912dddff98a18f1888eca930d5e Author: Takeshi Hamasaki Date: Wed Jan 24 10:53:01 2024 +0100 po: update ja.po (from translationproject.org) po/ja.po | 259 ++++++++++++++++++++++++++++----------------------------------- 1 file changed, 114 insertions(+), 145 deletions(-) commit 9979e7c1317143fdffcfe19205e4109e479b4c47 Author: Božidar Putanec Date: Wed Jan 24 10:53:01 2024 +0100 po: update hr.po (from translationproject.org) po/hr.po | 195 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 99 insertions(+), 96 deletions(-) commit 25cdc42133fa58b7270a58d5cc98d445675f43c2 Author: Antonio Ceballos Roa Date: Wed Jan 24 10:53:01 2024 +0100 po: update es.po (from translationproject.org) po/es.po | 1881 +++++++++++++++++++++----------------------------------------- 1 file changed, 640 insertions(+), 1241 deletions(-) commit cd1dddaae9522e530bad680f3afc5319c8279334 Author: Hermann Beckers Date: Wed Jan 24 10:53:01 2024 +0100 po: update de.po (from translationproject.org) po/de.po | 175 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 88 insertions(+), 87 deletions(-) commit cc8cf254aa04874cc62b2666b72a4b3aa250903a Author: Karel Zak Date: Wed Jan 24 10:47:23 2024 +0100 agetty: remove duplicate include Signed-off-by: Karel Zak term-utils/agetty.c | 1 - 1 file changed, 1 deletion(-) commit 8fa4f92e4039b361ece0fdbe93887124393dcbc1 Author: Karel Zak Date: Wed Jan 24 10:32:24 2024 +0100 build-sys: improve checkadoc A man page name may include a number (e.g. lastlog2) Signed-off-by: Karel Zak tools/checkadoc-missing.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b6222c58c4abb1a3cda74306b2ca1f05d5cd2a8 Merge: 3bba0f654 48afece8f Author: Karel Zak Date: Wed Jan 24 09:56:13 2024 +0100 Merge branch 'boilerplate/test' of https://github.com/t-8ch/util-linux * 'boilerplate/test' of https://github.com/t-8ch/util-linux: Documentation: add basic smoketest for boilerplate.c treewide: fix newlines when using fputs commit 3bba0f6541012ed73740b16919176656f95a7084 Merge: 587f4ee1b 2b4809917 Author: Karel Zak Date: Wed Jan 24 09:55:36 2024 +0100 Merge branch 'master' of https://github.com/jengelh/util-linux * 'master' of https://github.com/jengelh/util-linux: lscpu: add procfs-sysfs dump from VisionFive 2 commit 587f4ee1b87efdcc779512b0de1fcf962c93e6cf Merge: 630dd235b f8a8cc2ff Author: Karel Zak Date: Wed Jan 24 09:55:04 2024 +0100 Merge branch 'lsfd--fix-typo-in-cwd-root' of https://github.com/masatake/util-linux * 'lsfd--fix-typo-in-cwd-root' of https://github.com/masatake/util-linux: lsfd: fix wrong inconsistency in extracting cwd and root associations commit 630dd235bce560476e0e3a92984091f1e50157c1 Author: Karel Zak Date: Wed Jan 24 09:54:19 2024 +0100 libmount: improve act file close Signed-off-by: Karel Zak libmount/src/tab_update.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd13d5160de8b6847f30aafe651ccbd6c97f4bcf Author: Karel Zak Date: Wed Jan 24 09:53:42 2024 +0100 dmesg: fix FD leak Signed-off-by: Karel Zak sys-utils/dmesg.c | 2 ++ 1 file changed, 2 insertions(+) commit cf0305dda5f254f1128a9a76651b74c606bce14b Author: Karel Zak Date: Wed Jan 24 09:49:39 2024 +0100 liblastlog2: fix leaks * close imported file in ll2_import_lastlog() * free error message in pam_lastlog2.c Signed-off-by: Karel Zak liblastlog2/src/lastlog2.c | 19 ++++++++++--------- pam_lastlog2/src/pam_lastlog2.c | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) commit 2b4809917840be0788302106dccb735cd6ec0bed Author: Jan Engelhardt Date: Tue Jan 23 21:58:17 2024 +0000 lscpu: add procfs-sysfs dump from VisionFive 2 Signed-off-by: Jan Engelhardt tests/expected/lscpu/lscpu-rv64-visionfive2 | 33 +++++++++++++++++++++++++++ tests/ts/lscpu/dumps/rv64-visionfive2.tar.gz | Bin 0 -> 14329 bytes 2 files changed, 33 insertions(+) commit f8a8cc2ffbb7d3b997919f474f92115e25a27440 Author: Masatake YAMATO Date: Wed Jan 24 05:24:09 2024 +0900 lsfd: fix wrong inconsistency in extracting cwd and root associations Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48afece8f77c2b8f2f41e4725f1db8a718f71e26 Author: Thomas Weißschuh Date: Sat Jan 20 13:10:01 2024 +0100 Documentation: add basic smoketest for boilerplate.c Signed-off-by: Thomas Weißschuh Documentation/Makemodule.am | 4 ++++ Makefile.am | 1 + meson.build | 9 +++++++++ tests/commands.sh | 1 + tests/expected/misc/boilerplate-exec | 1 + tests/expected/misc/boilerplate-help | 24 ++++++++++++++++++++++ tests/ts/misc/boilerplate | 39 ++++++++++++++++++++++++++++++++++++ 7 files changed, 79 insertions(+) commit f11785b5d50e3440261d01c98d7c580b5ca8975c Author: Thomas Weißschuh Date: Tue Jan 23 20:22:21 2024 +0100 treewide: fix newlines when using fputs The `fputs()` introduced in #2561 does not automatically include a trailing newline which the original `puts()` did. This broke the `--help` output of various utilities. Changing all format strings to include a newline is not feasible as it would force all translations to be adapted. Instead introduce a new helper `fputsln()` that works as expected. Documentation/boilerplate.c | 24 ++++++++++++------------ disk-utils/blockdev.c | 10 +++++----- disk-utils/mkfs.cramfs.c | 24 ++++++++++++------------ include/c.h | 6 ++++++ misc-utils/pipesz.c | 20 ++++++++++---------- misc-utils/uuidparse.c | 8 ++++---- misc-utils/wipefs.c | 24 ++++++++++++------------ sys-utils/hwclock.c | 6 +++--- sys-utils/lsirq.c | 2 +- 9 files changed, 65 insertions(+), 59 deletions(-) commit 7cbf73770efe8baf195eff16c65e14c8ee6866d9 Merge: 467a5b319 c2e299d0a Author: Karel Zak Date: Tue Jan 23 14:54:17 2024 +0100 Merge branch 'lastlog2' of https://github.com/schubi2/util-linux * 'lastlog2' of https://github.com/schubi2/util-linux: lastlog2 - Y2038 safe version of lastlog pam_lastlog2 - PAM module which logs user login with lastlog2 commit 467a5b3192f165f0638de26c9f92b54631c6bd8d Author: Edward Chron Date: Thu Jan 4 12:43:46 2024 -0800 dmesg: add caller_id support Submission to Project: util-linux Open Incident: #2609 at github.com/util-linux/util-linux/issues/2609 Component: util-linux/sys-utils File: dmesg.c Code level patch applied against: 2.39.3 - latest code pulled from git.github.com:util-linux/util-linux.git Revision: #1 on 2023/12/08 per Review from Karel Zak Revision: #2 on 2023/12/12 Adjust line offsets for master update and Add caller_id_size init to dmesg -K Revision: #3 on 2023/12/12 Use of sizeof for cidbuf and limit search for caller_id to dmesg prefix to msg text Revision: #4 on 2023/12/15 Ensure SYSLOG and kmsg inputs have caller_id_size set appropriately Revision: #5 on 2023/12/24 Make caller_id width consistent with makedumpfile Revision: #6 on 2023/12/30 Use updated test naming convention Revision: #7 on 2024/01/04 Normalize kmsg caller_id spacing for test platforms by removing caller_id padding in test generated output. Add support to standard dmesg command for the optional Linux Kernel debug CONFIG option PRINTK_CALLER which adds an optional dmesg field that contains the Thread Id or CPU Id that is issuing the printk to add the message to the kernel ring buffer. This makes debugging simpler as dmesg entries for a specific thread or CPU can be recognized. The dmesg -S using the old syslog interface supports printing the PRINTK_CALLER field but currently standard dmesg does not support printing the field if present. There are utilities that use dmesg and so it would be optimal if dmesg supported PRINTK_CALLER as well. The additional field provided by PRINTK_CALLER is only present if it was configured for the Linux kernel where the dmesg command is run. It is a debug option and not configured by default so the dmesg output will only change for those kernels where the option was configured when the kernel was built. For users who went to the trouble to configure PRINTK_CALLER and have the extra field available for debugging, having dmesg print the field is very helpful. Size of the PRINTK_CALLER field is determined by the maximum number tasks that can be run on the system which is limited by the value of /proc/sys/kernel/pid_max as pid values are from 0 to value - 1. This value determines the number of id digits needed by the caller id. The PRINTK_CALLER field is printed as T for a Task Id or C for a CPU Id for a printk in CPU context. The values are left space padded and enclosed in parentheses such as: [ T123] or [ C16] For consistency with dmesg -S which supports the PRINTK_CALLER field the field is printed followed by a space. For JSON format output the PRINTK_CALLER field is identified as caller as that is consistent with it's naming in /dev/kmsg. No space padding is used to reduce space consumed by the JSON output. So the output from the command on a system with PRINTK_CALLER field enabled in the Linux .config file the dmesg output appears as: > dmesg ... [ 520.897104] [ T3919] usb 3-3: Product: USB 2.0 Hub and > dmesg -x ... kern :info : [ 520.897104] [ T3919] usb 3-3: Product: USB 2.0 Hub and > dmesg -J ... },{ "pri": 6, "time": 520.897104, "caller": "T3919", "msg": "usb 3-3: Product: USB 2.0 Hub" },{ and > dmesg -J -x ... },{ "fac": "kern", "pri": "info", "time": 520.897104, "caller": "T3919", "msg": "usb 3-3: Product: USB 2.0 Hub" },{ > For comparison: > dmesg -S ... [ 520.897104] [ T3919] usb 3-3: Product: USB 2.0 Hub and > dmesg -S -x ... kern :info : [ 520.897104] [ T3919] usb 3-3: Product: USB 2.0 Hub Note: When dmesg uses the old syslog interface the reserved space for the PRINTK_CALLER field is capped at 5 digits because 32-bit kernels are capped at 32768 as the max number of PIDs. However, 64-bit systems are currently capped at 2^22 PIDs (0 - 4194303). The PID cap is set by PID_MAX_LIMIT but the system limit can be less so we use /proc/sys/kernel/pid_max to determine the size needed to hold the maximum PID value size for the current system. Many 64-bit systems support 2^22 PIDs (0 - 4194303) and you see: > dmesg -x ... kern :info : [ 520.899558] [ T3919] hub 3-3:1.0: USB hub found ... kern :info : [ 9830.456898] [ T98982] cgroup: fork rejected by pids ... kern :info : [14301.158878] [ T137336] cgroup: fork rejected by pids ... kern :info : [18980.803190] [T1637865] cgroup: fork rejected by pids ... > dmesg -S -x ... kern :info : [ 520.899558] [ T3919] hub 3-3:1.0: USB hub found ... kern :info : [ 9830.456898] [T98982] cgroup: fork rejected by pids ... kern :info : [14301.158878] [T137336] cgroup: fork rejected by pids ... kern :info : [18980.803190] [T1637865] cgroup: fork rejected by pids ... This is the only difference seen with PRINTK_CALLER configured and printing between the dmesg /dev/kmsg interface and the dmesg -S syslog interface. Tests naming has been revised based on naming convention Thomas used to introduce dmest json tests. The naming of test and input files that reside in tests/ts/dmeg include: are existing dmesg syslog interface tests and input files. cid- are dmesg syslog interface caller_id tests and input files. json- are dmesg kmsg interface tests and input files. cid-json- are dmesg kmsg interface caller_id tests and input files. Resulting expected files match the test names. Signed-off-by: Ivan Delalande Signed-off-by: Edward Chron Signed-off-by: Karel Zak include/pathnames.h | 3 + sys-utils/dmesg.c | 128 ++++++- tests/expected/dmesg/cid-json | 535 +++++++++++++++++++++++++++ tests/expected/dmesg/cid-kmsg-colors | 59 +++ tests/expected/dmesg/cid-kmsg-console-levels | 146 ++++++++ tests/expected/dmesg/cid-kmsg-decode | 59 +++ tests/expected/dmesg/cid-kmsg-delta | 59 +++ tests/expected/dmesg/cid-kmsg-facilities | 73 ++++ tests/expected/dmesg/cid-kmsg-indentation | 28 ++ tests/expected/dmesg/cid-kmsg-json | 295 +++++++++++++++ tests/expected/dmesg/cid-kmsg-limit | 31 ++ tests/expected/dmesg/kmsg-file | 126 ++++++- tests/ts/dmesg/cid-input | 106 ++++++ tests/ts/dmesg/cid-json | 28 ++ tests/ts/dmesg/cid-kmsg-colors | 34 ++ tests/ts/dmesg/cid-kmsg-console-levels | 49 +++ tests/ts/dmesg/cid-kmsg-decode | 33 ++ tests/ts/dmesg/cid-kmsg-delta | 33 ++ tests/ts/dmesg/cid-kmsg-facilities | 36 ++ tests/ts/dmesg/cid-kmsg-indentation | 45 +++ tests/ts/dmesg/cid-kmsg-input | Bin 0 -> 5464 bytes tests/ts/dmesg/cid-kmsg-json | 28 ++ tests/ts/dmesg/cid-kmsg-limit | 34 ++ tests/ts/dmesg/cid-kmsg-newlines | Bin 0 -> 152 bytes tests/ts/dmesg/kmsg-input | Bin 1955 -> 3944 bytes 25 files changed, 1948 insertions(+), 20 deletions(-) commit b90a0a19670e94bb5eb8f9d1c26b00204da81242 Author: Karel Zak Date: Tue Jan 23 12:32:03 2024 +0100 build-sys: fix po-man clean The files created by "make" should be removed by "clean". Signed-off-by: Karel Zak po-man/Makefile.am | 2 -- 1 file changed, 2 deletions(-) commit cd9c4cac3d7c7969c6ca7f063cef42e862ce98a7 Author: Jan Engelhardt Date: Thu Jan 18 00:50:01 2024 +0000 lscpu: cure empty output of lscpu -b/-p On riscv, /proc/cpuinfo looks like: processor : 3 hart : 4 isa : rv64imafdc_zicntr_zicsr_zifencei_zihpm_zba_zbb mmu : sv39 uarch : sifive,u74-mc mvendorid : 0x489 marchid : 0x8000000000000007 mimpid : 0x4210427 hart isa : rv64imafdc_zicntr_zicsr_zifencei_zihpm_zba_zbb As none of the cputype_patterns match any of the fields in that file, `cpu->type` is never set, which causes `get_cell_data` to always return nullptr. The output of `lscpu -b --extended=CPU` and `lscpu -p` is then empty. Resolve that. [kzak@redhat.com: - fix DEF_PAT_CPUTYPE()s order - refresh lscpu/lscpu-rv64-linux test] Signed-off-by: Jan Engelhardt Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 4 ++++ tests/expected/lscpu/lscpu-rv64-linux | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) commit be7a2d9e6d626e8ee8b936e5330e4ce87e66b21d Merge: 5f5ac1cf0 4d19f9bec Author: Karel Zak Date: Tue Jan 23 11:09:39 2024 +0100 Merge branch 'master' of https://github.com/biubiuzy/util-linux * 'master' of https://github.com/biubiuzy/util-linux: libblkid: (drbd) reduce false-positive commit 5f5ac1cf0152e423aa7db2dca3cc9a1724b809c1 Merge: 2e942875e 78e50225b Author: Karel Zak Date: Tue Jan 23 11:07:58 2024 +0100 Merge branch 'lsfd--fix-2691' of https://github.com/masatake/util-linux * 'lsfd--fix-2691' of https://github.com/masatake/util-linux: tests: (lsfd::column-xmode) skip some subtests if OFD locks are not available tests: (lsfd) skip mkfds-netns if SIOCGSKNS is not defined tests: (lsfd) add lsfd_check_mkfds_factory as a help function tests: (test_mkfds) add --is-available option lsfd: build lsfd even if kcmp.h is not available tests: (refactor (test_mkfds, lsfd)) use TS_EXIT_NOTSUPP instead of EXIT_ENOSYS commit 2e942875e9e4f741f09980392f9632579ae0d3cd Merge: ad8150ba2 3dd79293b Author: Karel Zak Date: Tue Jan 23 11:06:51 2024 +0100 Merge branch 'findmnt-inode' of https://github.com/masatake/util-linux * 'findmnt-inode' of https://github.com/masatake/util-linux: findmnt: add -I, --dfi options for imitating the output of df -i findmnt: add inode-related columns for implementing "df -i" like output commit ad8150ba29b1fdbba9a835c1baffed193bf397f9 Merge: 659b2654e 6287953ff Author: Karel Zak Date: Tue Jan 23 10:57:16 2024 +0100 Merge branch 'wipefs-man-typos' of https://github.com/codefiles/util-linux * 'wipefs-man-typos' of https://github.com/codefiles/util-linux: wipefs: (man) fix typos commit 659b2654e7d630cc1a4969e6808184f9dd2cc2b7 Merge: 552542f11 a2b5a4e0a Author: Karel Zak Date: Tue Jan 23 10:55:45 2024 +0100 Merge branch 'PR/libmount-utab-masking' of github.com:karelzak/util-linux-work * 'PR/libmount-utab-masking' of github.com:karelzak/util-linux-work: libmount: ignore unwanted kernel events in monitor libmount: add utab.act file libmount: cleanup locking in table update code libmount: introduce reference counting for libmnt_lock commit 552542f1182b129bc536ccd19bafc111d4025d5b Merge: b4766e8f0 62a69c7c8 Author: Karel Zak Date: Tue Jan 23 10:54:51 2024 +0100 Merge branch 'remove-geteuid-ctrlaltdel' of https://github.com/JJ-Meng/util-linux * 'remove-geteuid-ctrlaltdel' of https://github.com/JJ-Meng/util-linux: ctrlaltdel: remove unnecessary uid check commit 6287953ff4654059f43dc60586e46cc39df0c8f7 Author: codefiles <11915375+codefiles@users.noreply.github.com> Date: Mon Jan 22 20:14:33 2024 -0500 wipefs: (man) fix typos misc-utils/wipefs.8.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3dd79293b5b655da9d913dedd8facb08959a7826 Author: Masatake YAMATO Date: Tue Jan 23 06:05:39 2024 +0900 findmnt: add -I, --dfi options for imitating the output of df -i An example output: $ ./findmnt -I SOURCE FSTYPE INO.TOTAL INO.USED INO.AVAIL INO.USE% TARGET /dev/mapper/fedora_dev64-root ext4 5341184 1135307 4205877 21% / devtmpfs devtmpfs 32930640 1209 32929431 0% /dev tmpfs tmpfs 32938620 86 32938534 0% /dev/shm ... Signed-off-by: Masatake YAMATO bash-completion/findmnt | 1 + misc-utils/findmnt.8.adoc | 5 ++++- misc-utils/findmnt.c | 19 +++++++++++++++++-- misc-utils/findmnt.h | 1 + 4 files changed, 23 insertions(+), 3 deletions(-) commit 90201f5493f1e497ba28ef023d99953a05bfd5f6 Author: Masatake YAMATO Date: Tue Jan 23 05:38:50 2024 +0900 findmnt: add inode-related columns for implementing "df -i" like output Signed-off-by: Masatake YAMATO misc-utils/findmnt.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 78e50225b46cf6e33b3f203aee4b505d18e86dcc Author: Masatake YAMATO Date: Sat Jan 20 07:35:40 2024 +0900 tests: (lsfd::column-xmode) skip some subtests if OFD locks are not available Fixed #2691 partially. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 9 +++++++++ tests/ts/lsfd/column-xmode | 9 +++++++++ 2 files changed, 18 insertions(+) commit ce674525d482dbaa13cfbdf3f41d7bc9aa63d0e7 Author: Masatake YAMATO Date: Sat Jan 20 06:21:28 2024 +0900 tests: (lsfd) skip mkfds-netns if SIOCGSKNS is not defined Fixed #2691 partially. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 4 ++++ tests/ts/lsfd/mkfds-netns | 1 + 2 files changed, 5 insertions(+) commit 9f81038e0270cd01ab781133766b047c412612ec Author: Masatake YAMATO Date: Sat Jan 20 06:14:35 2024 +0900 tests: (lsfd) add lsfd_check_mkfds_factory as a help function Signed-off-by: Masatake YAMATO tests/ts/lsfd/lsfd-functions.bash | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a02851486f1f747cd2d84e1850feb615a1813446 Author: Masatake YAMATO Date: Sat Jan 20 05:26:23 2024 +0900 tests: (test_mkfds) add --is-available option Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 87a2cff681da73330cf3e3a6a8b4632488c38db1 Author: Masatake YAMATO Date: Sat Jan 20 05:06:58 2024 +0900 lsfd: build lsfd even if kcmp.h is not available As reported in #2691 by @rrrossi, lsfd was not built on the platform where kcmp.h was not available. However, lsfd just uses kcmp(2) only for optimization; it can work without kcmp. Signed-off-by: Masatake YAMATO configure.ac | 1 - misc-utils/lsfd.c | 26 +++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) commit b4766e8f01329ff454bbf2cfc0f069d0e8fd237e Merge: 950af7025 7ce88537d Author: Karel Zak Date: Mon Jan 22 13:21:57 2024 +0100 Merge branch 'lsfd--cosmetic-fix' of https://github.com/masatake/util-linux * 'lsfd--cosmetic-fix' of https://github.com/masatake/util-linux: lsfd,test_mkfds: (cosmetic) remove whitespaces between functions and their arglists commit 73a0eecffa9144a344f61cb03304f9f422378f4e Author: Masatake YAMATO Date: Mon Jan 22 19:15:00 2024 +0900 tests: (refactor (test_mkfds, lsfd)) use TS_EXIT_NOTSUPP instead of EXIT_ENOSYS Suggested by Thomas Weißschuh in #2722. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 14 +++++--------- tests/ts/lsfd/column-ainodeclass | 2 +- tests/ts/lsfd/column-name | 2 +- tests/ts/lsfd/column-type | 2 +- tests/ts/lsfd/lsfd-functions.bash | 1 - tests/ts/lsfd/mkfds-bpf-map | 2 +- tests/ts/lsfd/mkfds-bpf-prog | 2 +- tests/ts/lsfd/mkfds-netns | 2 +- tests/ts/lsfd/mkfds-pidfd | 2 +- 9 files changed, 12 insertions(+), 17 deletions(-) commit 950af70252ed9f221f84bdcab3a129ca05037a9a Merge: bb525b591 fa738e31c Author: Karel Zak Date: Mon Jan 22 13:21:03 2024 +0100 Merge branch 'fallocate--retval' of https://github.com/masatake/util-linux * 'fallocate--retval' of https://github.com/masatake/util-linux: fallocate: fix the way to evaluate values returned from posix_fallocate commit a2b5a4e0adf9543843bb0aef94d21e7105cf8159 Author: Karel Zak Date: Mon Jan 22 13:04:44 2024 +0100 libmount: ignore unwanted kernel events in monitor If the mount operation requires multiple steps, it's optimal for the libmount monitor to ignore the steps until we get a complete mount (reported by the utab.event file). This commit adds a new API function, mnt_monitor_veil_kernel(), to ignore unwanted kernel mount events. Note that this only makes sense when the application monitors kernel and userspace events simultaneously. Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 1 + libmount/src/libmount.h.in | 2 ++ libmount/src/libmount.sym | 1 + libmount/src/monitor.c | 55 +++++++++++++++++++++++++++++++++---- 4 files changed, 54 insertions(+), 5 deletions(-) commit 9218c9678a6aa9b163705364246ed128e94fabb7 Author: Karel Zak Date: Mon Jan 22 12:56:24 2024 +0100 libmount: add utab.act file The file exists when libmount works with utab, and more steps are expected during a single mount operation (more kernel events, more updates to utab, etc.). It is possible to monitor the file through the mnt_monitor_...() API by a simple access() after any event. No locks are expected in monitor, making it usable for non-root users without any security impact. The monitor can ignore events if the file exist. Signed-off-by: Karel Zak libmount/src/context.c | 7 +++ libmount/src/mountP.h | 2 + libmount/src/tab_update.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) commit b94b5929a63df9786020e0329e94d2f35f3993ae Author: Karel Zak Date: Fri Jan 19 12:58:50 2024 +0100 libmount: cleanup locking in table update code * use reference counting for libmnt_lock * remove lock use from mnt_update_already_done(), it's read-only operation and utab update is atomic (based on rename(2)) * keep the lock instance mandatory for all low-level update_* functions. The lock is always initialized, so all the 'if(lc)' are unnecessary. Signed-off-by: Karel Zak libmount/src/context.c | 2 +- libmount/src/mountP.h | 3 +- libmount/src/tab_update.c | 111 +++++++++++++++++++++------------------------- 3 files changed, 53 insertions(+), 63 deletions(-) commit 7ce88537d786fd6c53bced6fa6d402ff64e6ec28 Author: Masatake YAMATO Date: Sat Jan 20 00:03:46 2024 +0900 lsfd,test_mkfds: (cosmetic) remove whitespaces between functions and their arglists Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 2 +- misc-utils/lsfd-file.c | 20 ++++++++++---------- misc-utils/lsfd-unkn.c | 6 +++--- misc-utils/lsfd.c | 2 +- tests/helpers/test_mkfds.c | 18 +++++++++--------- 5 files changed, 24 insertions(+), 24 deletions(-) commit fa738e31cdc8b678c20c0c42d7432927db2640c2 Author: Masatake YAMATO Date: Fri Jan 19 23:47:30 2024 +0900 fallocate: fix the way to evaluate values returned from posix_fallocate Unlike Linux native system calls, posix_fallocate doesn't return -1 whe an error occurs; it returns a errno value directly. The bug of the original code was reported by @Yugend on #2714. Signed-off-by: Masatake YAMATO sys-utils/fallocate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62a69c7c813405bd728473d9be1364332786e2d2 Author: JJ-Meng <472537476@qq.com> Date: Fri Jan 19 20:08:55 2024 +0800 ctrlaltdel: remove unnecessary uid check sys-utils/ctrlaltdel.c | 4 ---- 1 file changed, 4 deletions(-) commit 87938635348a788ffd10cdbfb9055eddc2ed7a9f Author: Karel Zak Date: Fri Jan 19 12:15:48 2024 +0100 libmount: introduce reference counting for libmnt_lock Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 2 ++ libmount/src/context.c | 2 +- libmount/src/libmount.h.in | 2 ++ libmount/src/libmount.sym | 5 ++++ libmount/src/lock.c | 49 ++++++++++++++++++++++++++++++++++--- 5 files changed, 55 insertions(+), 5 deletions(-) commit bb525b59190e3b40b2424f4f1febc22ca9c6b9f3 Author: Karel Zak Date: Thu Jan 18 13:09:24 2024 +0100 libsmartcols: fix columns reduction * reduce_to_68() does not care if subtract from column width is possible (and width is size_t) * improve some calculations with 'double' Fixes: https://github.com/util-linux/util-linux/issues/2563 Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 6c639c8408194c74055a188d5b2707a3b5314f5e Merge: 5e4cf9e75 5a0f319f1 Author: Karel Zak Date: Fri Jan 19 09:41:18 2024 +0100 Merge branch 'audit/ret' of https://github.com/t-8ch/util-linux * 'audit/ret' of https://github.com/t-8ch/util-linux: login: ignore return of audit_log_acct_message hwclock: handle failure of audit_log_user_message commit 5a0f319f1ed37dfc587cf9a227e7ff06e16bdb1f Author: Thomas Weißschuh Date: Fri Jan 19 03:12:21 2024 +0100 login: ignore return of audit_log_acct_message The function is marked with `warn_unused_result` so handle the return value. Failures of `audit_open()` are also silently ignored so do the same for `audit_log_acct_message()` itself. Signed-off-by: Thomas Weißschuh login-utils/login.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8531c8bc5389a139d80f54abc4c1f12889d3d895 Author: Thomas Weißschuh Date: Fri Jan 19 03:11:22 2024 +0100 hwclock: handle failure of audit_log_user_message The function is marked was `warn_unused_result`, so do something with the return value. Signed-off-by: Thomas Weißschuh sys-utils/hwclock.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5e4cf9e7547b4211cc6a9dbf160af01bffea0261 Author: Karel Zak Date: Thu Jan 18 20:43:51 2024 +0100 fsck: initialize timevals [-Werror=maybe-uninitialized] Signed-off-by: Karel Zak disk-utils/fsck.c | 2 +- lib/monotonic.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1e7903c931bc1fbbde39d0493f319de4b893d196 Author: Karel Zak Date: Thu Jan 18 20:40:50 2024 +0100 flock: initialize timevals [-Werror=maybe-uninitialized] Signed-off-by: Karel Zak sys-utils/flock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 215d0be3f6a927f8f92e14b3d0b77263c86c3370 Author: Karel Zak Date: Thu Jan 18 17:35:51 2024 +0100 lib/pty-session: initialize timevals [-Werror=maybe-uninitialized] Signed-off-by: Karel Zak lib/pty-session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2e299d0acb2fa4ad1691452fa0eae76520bbdb0 Author: Stefan Schubert Date: Thu Sep 7 17:30:23 2023 +0200 lastlog2 - Y2038 safe version of lastlog pam_lastlog2 - PAM module which logs user login with lastlog2 .github/workflows/cibuild-setup-ubuntu.sh | 1 + .gitignore | 2 + .packit.yaml | 2 +- AUTHORS | 1 + Makefile.am | 11 +- bash-completion/Makemodule.am | 3 + bash-completion/lastlog2 | 57 +++ configure.ac | 49 ++ liblastlog2/COPYING | 24 + liblastlog2/Makemodule.am | 10 + liblastlog2/README.md | 40 ++ liblastlog2/lastlog2.pc.in | 11 + liblastlog2/man/Makemodule.am | 20 + liblastlog2/man/lastlog2.3.adoc | 51 ++ liblastlog2/man/ll2_import_lastlog.3.adoc | 65 +++ liblastlog2/man/ll2_new_context.3.adoc | 61 +++ liblastlog2/man/ll2_read_all.3.adoc | 74 +++ liblastlog2/man/ll2_read_entry.3.adoc | 72 +++ liblastlog2/man/ll2_remove_entry.3.adoc | 63 +++ liblastlog2/man/ll2_rename_user.3.adoc | 66 +++ liblastlog2/man/ll2_unref_context.3.adoc | 57 +++ liblastlog2/man/ll2_update_login_time.3.adoc | 67 +++ liblastlog2/man/ll2_write_entry.3.adoc | 70 +++ liblastlog2/meson.build | 63 +++ liblastlog2/src/Makemodule.am | 99 ++++ liblastlog2/src/lastlog2.c | 594 ++++++++++++++++++++++++ liblastlog2/src/lastlog2.h | 91 ++++ liblastlog2/src/lastlog2P.h | 37 ++ liblastlog2/src/liblastlog2.sym | 13 + liblastlog2/src/tests/tst_dlopen.c | 40 ++ liblastlog2/src/tests/tst_pam_lastlog2_output.c | 115 +++++ liblastlog2/src/tests/tst_remove_entry.c | 88 ++++ liblastlog2/src/tests/tst_rename_user.c | 112 +++++ liblastlog2/src/tests/tst_write_read_user.c | 165 +++++++ liblastlog2/src/tests/tst_y2038_ll2_read_all.c | 156 +++++++ liblastlog2/src/tests/tst_y2038_sqlite3_time.c | 83 ++++ meson.build | 30 ++ meson_options.txt | 8 + misc-utils/.gitignore | 2 + misc-utils/Makemodule.am | 14 + misc-utils/lastlog2-import.service.in | 15 + misc-utils/lastlog2.8.adoc | 96 ++++ misc-utils/lastlog2.c | 337 ++++++++++++++ misc-utils/lastlog2.conf.in | 5 + misc-utils/meson.build | 25 + pam_lastlog2/COPYING | 24 + pam_lastlog2/Makemodule.am | 8 + pam_lastlog2/man/Makemodule.am | 6 + pam_lastlog2/man/pam_lastlog2.8.adoc | 78 ++++ pam_lastlog2/meson.build | 39 ++ pam_lastlog2/src/Makemodule.am | 21 + pam_lastlog2/src/pam_lastlog2.c | 340 ++++++++++++++ pam_lastlog2/src/pam_lastlog2.sym | 11 + tests/commands.sh | 7 + tests/ts/liblastlog2/dlopen | 23 + tests/ts/liblastlog2/pam_lastlog2_output | 17 + tests/ts/liblastlog2/remove_entry | 15 + tests/ts/liblastlog2/rename_user | 15 + tests/ts/liblastlog2/sqlite3_time | 15 + tests/ts/liblastlog2/write_read_user | 15 + tests/ts/liblastlog2/y2038_ll2_read_all | 15 + 61 files changed, 3710 insertions(+), 4 deletions(-) commit 4d19f9bec7997e90b36422c6779ec1d98def95f3 Author: biubiuzy <294772273@qq.com> Date: Wed Jan 17 11:23:47 2024 +0800 libblkid: (drbd) reduce false-positive libblkid/src/superblocks/drbd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 07f0f0f5bd1e5e2268257ae1ff6d76a9b6c6ea8b Author: Karel Zak Date: Wed Jan 17 12:37:08 2024 +0100 wall: fix calloc cal [-Werror=calloc-transposed-args] term-utils/wall.c:143:37: error: xcalloc sizes specified with sizeof in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 143 | buf->groups = xcalloc(sizeof(*buf->groups), buf->ngroups); | ^ term-utils/wall.c:143:37: note: earlier argument should specify number of elements, later size of each element Signed-off-by: Karel Zak term-utils/wall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb02db62685cca30e5afc61652c8b6e9cd0774e9 Author: Christian Göttsche Date: Wed Dec 13 16:53:20 2023 +0100 sulogin: relabel terminal according to SELinux policy The common SELinux practice is to have a distinct label for terminals in use by logged in users. This allows to differentiate access on the associated terminal (e.g. user_tty_device_t) vs foreign ones (e.g. tty_device_t or sysadm_tty_device_t). Therefore the application performing the user login and setting up the associated terminal should label that terminal according to the loaded SELinux policy. Commonly this is done by pam_selinux(7). Since sulogin(8) does not use pam(7) perform the necessary steps manually. Fixes: https://github.com/util-linux/util-linux/issues/1578 Reviewed-by: James Carter Signed-off-by: Christian Göttsche Signed-off-by: Karel Zak login-utils/sulogin-consoles.c | 4 ++ login-utils/sulogin-consoles.h | 4 ++ login-utils/sulogin.c | 156 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 146 insertions(+), 18 deletions(-) commit bf6dbd34534c9233d6eb4607003a4fd1f1db94e7 Merge: 51d0f5b87 4ee2db2a2 Author: Karel Zak Date: Wed Jan 17 09:43:05 2024 +0100 Merge branch 'libblkid/drbd/padding' of https://github.com/t-8ch/util-linux * 'libblkid/drbd/padding' of https://github.com/t-8ch/util-linux: libblkid: (drbd) validate zero padding libblkid: avoid aligning out of probing area commit 51d0f5b8724f28a8aef0230386e5dae30390d4a3 Author: Thomas Weißschuh Date: Tue Jan 16 14:34:54 2024 +0100 libfdisk: (tests) fix tests for removal of non-blockdev sync() Fixes: 101dca2f18eb ("libfdisk: fdisk_deassign_device: only sync(2) blockdevs") Signed-off-by: Thomas Weißschuh tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end | 1 - tests/expected/fdisk/sunlabel-create-second-partition | 1 - tests/expected/libfdisk/gpt-all-defaults | 1 - tests/expected/libfdisk/gpt-all-defaults-with-typo | 1 - 4 files changed, 4 deletions(-) commit 5505d3396ae9b8e793ff4ba0d06d31c47592344b Merge: 101dca2f1 5c31f7ffe Author: Karel Zak Date: Tue Jan 16 11:17:55 2024 +0100 Merge branch 'time64' of https://github.com/t-8ch/util-linux * 'time64' of https://github.com/t-8ch/util-linux: build-sys: (tests) validate that time_t is 64bit meson: try to always use 64bit time support on glibc build-sys: try to always use 64bit time support on glibc build-sys: backport autoconf year2038 macros tests: add sysinfo to show sizeof(time_t) tests: constify a sysinfo helpers struct commit 101dca2f18eb1435332a3faa8e15a1787f814887 Author: наб Date: Sat Jan 13 23:35:31 2024 +0100 libfdisk: fdisk_deassign_device: only sync(2) blockdevs When not editing a blockdev, syncing disks provides no benefit (we already fsync() above), takes a long time, and affects unrelated caches. BLKRRPART is similarly gated on !S_ISBLK(st_mode) in fdisk_reread_partition_table. libfdisk/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f80a913325f43f2f3fdb5bf5a56a5f0407560cc Merge: 40ff02512 fa54895a4 Author: Karel Zak Date: Mon Jan 15 10:38:45 2024 +0100 Merge branch 'PR/uuidd-cont-clock-persistence' of github.com:karelzak/util-linux-work * 'PR/uuidd-cont-clock-persistence' of github.com:karelzak/util-linux-work: libuuid: fix uint64_t printf and scanf format uuidd: add cont_clock persistence commit 40ff0251225f6d75b7d2aca086ead6badbbbea48 Merge: be809ef07 a002df07a Author: Karel Zak Date: Mon Jan 15 10:38:27 2024 +0100 Merge branch 'PR/libmount-utab-event' of github.com:karelzak/util-linux-work * 'PR/libmount-utab-event' of github.com:karelzak/util-linux-work: libmount: don't assume errno after failed asprintf() libmount: reduce utab.lock permissions libmount: introduce /run/mount/utab.event libmount: add mnt_context_within_helper() wrapper commit fa54895a4f689b89e95debd596c833db3c6f79bd Author: Karel Zak Date: Fri Jan 12 10:52:40 2024 +0100 libuuid: fix uint64_t printf and scanf format Signed-off-by: Karel Zak libuuid/src/gen_uuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be809ef0738930e63d0fed2a72c47aeb81903169 Merge: 2d07a4deb 4583e6b22 Author: Karel Zak Date: Fri Jan 12 10:31:38 2024 +0100 Merge branch 'libblkid/const' of https://github.com/t-8ch/util-linux * 'libblkid/const' of https://github.com/t-8ch/util-linux: libblkid: constify return values of blkid_probe_get_sb include/c.h: handle members of const struct commit 955f0938851931e037db34bdc8a353f6799e877d Author: Michael Trapp Date: Wed Jan 10 17:29:38 2024 +0100 uuidd: add cont_clock persistence cont_clock requires a correct time setup and therefore it must be possible to detect a step back between uuidd starts. Reserving the next 10 seconds is sufficient and should not have a noticeable performance impact. It will also provide the possibility to start with the clock_reg from the previous session when the system was rebooted. Whith that, the early cont_clock initialization in uuidd should be removed because writing the cont_clock persitence when -C was not set is useless and might be confusing. libuuid/src/gen_uuid.c | 120 ++++++++++++++++++++++++++++++++++++------------- libuuid/src/uuidP.h | 1 + misc-utils/uuidd.c | 9 ---- 3 files changed, 90 insertions(+), 40 deletions(-) commit 4ee2db2a221f6404f9fe9470da7c384a25cceea3 Author: Thomas Weißschuh Date: Fri Jan 12 08:50:14 2024 +0100 libblkid: (drbd) validate zero padding This should reduce false-positives. See #2701. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/drbd.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 025b11465d086c55948eff484f40c993f2184990 Author: Thomas Weißschuh Date: Fri Jan 12 08:47:50 2024 +0100 libblkid: avoid aligning out of probing area When reading from the end of the device the IO size alignment could enlarge the read buffer outside of the probing area. This would then trigger a read failure. Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4583e6b22d8e19857d73f4a548d1b157ada29e33 Author: Thomas Weißschuh Date: Fri Jan 12 07:47:12 2024 +0100 libblkid: constify return values of blkid_probe_get_sb The macro contains a cast, removing the constness of blkid_probe_get_sb_buffer(). Readd the constness and adapt the callers. Signed-off-by: Thomas Weißschuh libblkid/src/blkidP.h | 2 +- libblkid/src/superblocks/apfs.c | 2 +- libblkid/src/superblocks/bcache.c | 4 ++-- libblkid/src/superblocks/bluestore.c | 2 +- libblkid/src/superblocks/btrfs.c | 2 +- libblkid/src/superblocks/cramfs.c | 4 ++-- libblkid/src/superblocks/cs_fvault2.c | 2 +- libblkid/src/superblocks/drbd.c | 4 ++-- libblkid/src/superblocks/erofs.c | 2 +- libblkid/src/superblocks/exfat.c | 4 ++-- libblkid/src/superblocks/exfs.c | 6 +++--- libblkid/src/superblocks/f2fs.c | 2 +- libblkid/src/superblocks/gfs.c | 4 ++-- libblkid/src/superblocks/hfs.c | 2 +- libblkid/src/superblocks/hpfs.c | 6 +++--- libblkid/src/superblocks/jfs.c | 2 +- libblkid/src/superblocks/lvm.c | 6 +++--- libblkid/src/superblocks/mpool.c | 2 +- libblkid/src/superblocks/netware.c | 2 +- libblkid/src/superblocks/ocfs.c | 4 ++-- libblkid/src/superblocks/reiserfs.c | 4 ++-- libblkid/src/superblocks/romfs.c | 2 +- libblkid/src/superblocks/squashfs.c | 4 ++-- libblkid/src/superblocks/sysv.c | 2 +- libblkid/src/superblocks/ubi.c | 2 +- libblkid/src/superblocks/ubifs.c | 2 +- libblkid/src/superblocks/vdo.c | 2 +- libblkid/src/superblocks/vfat.c | 15 ++++++++------- libblkid/src/superblocks/vmfs.c | 4 ++-- libblkid/src/superblocks/vxfs.c | 2 +- libblkid/src/superblocks/xfs.c | 8 ++++---- 31 files changed, 56 insertions(+), 55 deletions(-) commit 24fce5a36c2cb126f3fc27b34ba368f94941c039 Author: Thomas Weißschuh Date: Fri Jan 12 07:51:39 2024 +0100 include/c.h: handle members of const struct Trying to copy into a local const struct will lead to a compiler error. By adding a "+ 0" to the argument of __typeof__() the type of the resulting express will loose its constness. Signed-off-by: Thomas Weißschuh include/c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d07a4deb71aa564d740b8f3c82c8808431a0ccf Author: Thomas Weißschuh Date: Thu Jan 11 21:50:08 2024 +0100 libfdisk: add shortcut for Linux extended boot See #2670 Signed-off-by: Thomas Weißschuh libfdisk/src/gpt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 489b175c11cee48a4a2ee094075d0ff2a4da0024 Merge: c1b1b22e8 9f492c496 Author: Karel Zak Date: Thu Jan 11 17:48:19 2024 +0100 Merge branch 'PR/libblkid-hfsplus' of github.com:karelzak/util-linux-work * 'PR/libblkid-hfsplus' of github.com:karelzak/util-linux-work: libblkid: (hfsplus) reduce false positive commit c1b1b22e87c03bd99f7a1ff79c3cc6968f95658a Author: Karel Zak Date: Thu Jan 11 17:00:25 2024 +0100 lsblk: add docs for filters and counters Fixes: https://github.com/util-linux/util-linux/issues/2697 Signed-off-by: Karel Zak bash-completion/lsblk | 4 ++++ misc-utils/lsblk.8.adoc | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- misc-utils/lsblk.c | 8 ++++---- 3 files changed, 55 insertions(+), 6 deletions(-) commit fb428649e1cde2433cfa42a6dd42d9eb896860f4 Merge: 0daa14bf6 a53f5d9bb Author: Karel Zak Date: Thu Jan 11 15:43:50 2024 +0100 Merge branch 'login' of https://github.com/stoeckmann/util-linux * 'login' of https://github.com/stoeckmann/util-linux: login: document blank treatment in shell field login: unify pw_shell script test login: simplify name creation commit 9f492c4963bb1a003de400a9d1fc0872a3b213d3 Author: Karel Zak Date: Wed Jan 10 09:35:35 2024 +0100 libblkid: (hfsplus) reduce false positive Fixes: https://github.com/util-linux/util-linux/issues/2692 Signed-off-by: Karel Zak libblkid/src/superblocks/hfs.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 0daa14bf61892f161f5e20b41293ee609655552f Author: Karel Zak Date: Thu Jan 11 15:36:19 2024 +0100 bash-completion: update for mkswap Signed-off-by: Karel Zak bash-completion/mkswap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 981cfb61a0b7959ed1c282da4d3ff6229789eaee Merge: 6f558584a 7377b0d99 Author: Karel Zak Date: Thu Jan 11 15:28:48 2024 +0100 Merge branch 'mkswapfile' of https://github.com/endrift/util-linux * 'mkswapfile' of https://github.com/endrift/util-linux: mkswap: implement --file commit 6f558584ad455a60d04bb45d33d1bffc45f3ffa7 Merge: 3ca03d59f 61386e530 Author: Karel Zak Date: Thu Jan 11 15:25:43 2024 +0100 Merge branch 'include/parttypes' of https://github.com/t-8ch/util-linux * 'include/parttypes' of https://github.com/t-8ch/util-linux: include: add U-Boot environment partition type include: add some more ChromeOS partition types commit 3ca03d59f2e70d7f2bb33e23e34693f61423cfa5 Author: Thomas Weißschuh Date: Thu Jan 11 08:12:45 2024 +0100 libfdisk: constify builtin fdisk_parttype The builtin struct fdisk_parttypes are not supposed to be modified. This is enforced in the mutation functions. While the API could be cleaned up to distinguish between const and non-const versions of fdisk_parttype this could break user code. Instead preserve the API and add some internal casts. Signed-off-by: Thomas Weißschuh libfdisk/src/bsd.c | 2 +- libfdisk/src/dos.c | 2 +- libfdisk/src/fdiskP.h | 2 +- libfdisk/src/gpt.c | 2 +- libfdisk/src/parttype.c | 13 +++++++------ libfdisk/src/sgi.c | 2 +- libfdisk/src/sun.c | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) commit 61386e530e1ee030c3b5395790c793f9cfcdbd07 Author: Thomas Weißschuh Date: Thu Jan 11 07:37:21 2024 +0100 include: add U-Boot environment partition type Signed-off-by: Thomas Weißschuh include/pt-gpt-partnames.h | 3 +++ 1 file changed, 3 insertions(+) commit b507d910bde53d6707856b4b4a4342d66cf652ce Author: Thomas Weißschuh Date: Thu Jan 11 07:37:14 2024 +0100 include: add some more ChromeOS partition types Signed-off-by: Thomas Weißschuh include/pt-gpt-partnames.h | 3 +++ 1 file changed, 3 insertions(+) commit a53f5d9bbc1674158bba1b998255087534fb111c Author: Tobias Stoeckmann Date: Tue Jan 9 21:07:39 2024 +0100 login: document blank treatment in shell field If the shell field contains a blank, then the shell field is interpreted as a shell script. Signed-off-by: Tobias Stoeckmann login-utils/login.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f3f22438234b626c388f336d637905aaf12dbd2 Author: Karel Zak Date: Tue Jan 9 13:05:30 2024 +0100 losetup: improve "sector boundary" warning Fixes: https://github.com/util-linux/util-linux/issues/2689 Signed-off-by: Karel Zak sys-utils/losetup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d829e785f218714102f23940e68dc71be20cfbd4 Author: Karel Zak Date: Tue Jan 9 12:59:24 2024 +0100 hardlink: fix fiemap use Handle cases where the number of fm_mapped_extents is zero by ignoring the fm_extents array, as zero is a valid value. Fixes: https://github.com/util-linux/util-linux/issues/2687 Signed-off-by: Karel Zak misc-utils/hardlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 563fdcb08fb904ee78cd7b2c0b966054c4311066 Author: Karel Zak Date: Tue Jan 9 12:45:53 2024 +0100 lsblk: explain FSAVAIL in better way Addresses: https://github.com/util-linux/util-linux/discussions/2690 Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7377b0d99560460806eab9efa9d8224d084c2082 Author: Vicki Pfau Date: Fri Jan 5 19:50:29 2024 -0800 mkswap: implement --file Addresses #2359 Signed-off-by: Vicki Pfau disk-utils/mkswap.8.adoc | 12 +++++++-- disk-utils/mkswap.c | 67 +++++++++++++++++++++++++++++++++++++----------- tests/ts/mkswap/mkswap | 13 ++++++++++ 3 files changed, 75 insertions(+), 17 deletions(-) commit 2bc9cd09f23733c84789f1d3b2284d4c3ddae5c2 Author: Sebastian Pipping Date: Sat Jan 6 00:46:49 2024 +0100 runuser|su: Start supporting option -T|--no-pty .. to pave the way for a future with -P|--pty for a default. login-utils/runuser.1.adoc | 4 ++++ login-utils/su-common.c | 8 +++++++- login-utils/su.1.adoc | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) commit 0bf937559b81ec4ceec09848ea59eb9cf65a751e Author: Sebastian Pipping Date: Sat Jan 6 00:43:20 2024 +0100 runuser.1.adoc: Move -m|-p|--preserve-environment in order .. for alphabetical order and to match sibling file su.1.adoc. login-utils/runuser.1.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aa88815653145b7e2b27fbb8a808971d779c2e05 Merge: f7299d846 35fc08f99 Author: Karel Zak Date: Mon Jan 8 10:37:54 2024 +0100 Merge branch 'libmount/tests/root' of https://github.com/t-8ch/util-linux * 'libmount/tests/root' of https://github.com/t-8ch/util-linux: libmount: (tests) don't require root for update tests commit f7299d846c6f5c5e031af3cedea891711af9aef7 Merge: 72889ccd7 d7621b7c6 Author: Karel Zak Date: Mon Jan 8 10:37:09 2024 +0100 Merge branch 'tests--lsfd--mkfds-inotify-on-btrfs' of https://github.com/masatake/util-linux * 'tests--lsfd--mkfds-inotify-on-btrfs' of https://github.com/masatake/util-linux: tests: (lsfd) add a case testing INOTIFY.INODES.RAW column on btrfs tests: (test_mkfds::inotify) add "dir" and "file" parameters tests: (lsfd::mkfds-inotify) use findmnt(1) instead of stat(1) to get bdev numbers commit a002df07ac15c370381cb44f06afeaa333685780 Author: Karel Zak Date: Mon Jan 8 10:32:54 2024 +0100 libmount: don't assume errno after failed asprintf() Reported-by: Thomas Weißschuh Signed-off-by: Karel Zak libmount/src/monitor.c | 2 +- libmount/src/tab_update.c | 2 +- libmount/src/utils.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 72889ccd79bf2a5e440885f0f399668626d0e12a Merge: dec1a4268 28d212c7c Author: Karel Zak Date: Mon Jan 8 10:27:24 2024 +0100 Merge branch 'patch-24' of https://github.com/mariobl/util-linux * 'patch-24' of https://github.com/mariobl/util-linux: hexdump: Add missing section header in man page commit dec1a4268737fdea0a9d08f6bd7d1be43f06cba0 Merge: a9eb1a368 bf8719d69 Author: Karel Zak Date: Mon Jan 8 10:26:53 2024 +0100 Merge branch 'patch-25' of https://github.com/mariobl/util-linux * 'patch-25' of https://github.com/mariobl/util-linux: write: Add missing section header in man page commit a9eb1a3689da9436f8bcf944b4f1dd7e5f3d91f2 Merge: 662fd1649 917f8478e Author: Karel Zak Date: Mon Jan 8 10:26:40 2024 +0100 Merge branch 'patch-23' of https://github.com/mariobl/util-linux * 'patch-23' of https://github.com/mariobl/util-linux: fadvise: Fix markup in man page commit 662fd1649dc469189779ef61beb99cdbd34ab9c8 Merge: 92fa0a603 9fa92c9e9 Author: Karel Zak Date: Mon Jan 8 10:25:54 2024 +0100 Merge branch 'patch-21' of https://github.com/mariobl/util-linux * 'patch-21' of https://github.com/mariobl/util-linux: fstab: Fix markup in man page commit 92fa0a603e7086fce85b244bf2a002526ed937a9 Merge: dd68e4c7c 8ffd686dc Author: Karel Zak Date: Mon Jan 8 10:25:37 2024 +0100 Merge branch 'patch-20' of https://github.com/mariobl/util-linux * 'patch-20' of https://github.com/mariobl/util-linux: uuidd: Fix markup in man page (uuidd.8) commit dd68e4c7c6886f7f3ce16af400412e6d13144a5d Merge: 2946244ca fe8348469 Author: Karel Zak Date: Mon Jan 8 10:24:58 2024 +0100 Merge branch 'patch-16' of https://github.com/mariobl/util-linux * 'patch-16' of https://github.com/mariobl/util-linux: sfdisk: Fix markup in man page commit 2946244ca0f3c41725bc9b8539cacafd3a13a223 Merge: d08fa06f1 0d3595016 Author: Karel Zak Date: Mon Jan 8 10:24:07 2024 +0100 Merge branch 'patch-17' of https://github.com/mariobl/util-linux * 'patch-17' of https://github.com/mariobl/util-linux: hardlink: Fix markup in man page commit d08fa06f16387f7b9a1a621b18d3315729688a35 Merge: 7f498bc6f 8440f1e18 Author: Karel Zak Date: Mon Jan 8 10:23:38 2024 +0100 Merge branch 'patch-18' of https://github.com/mariobl/util-linux * 'patch-18' of https://github.com/mariobl/util-linux: lsclocks: Fix markup and typos in man page commit 7f498bc6fd0a1f6d0db8917bfc311ac330d423c9 Merge: ba743b8e4 4b8c52045 Author: Karel Zak Date: Mon Jan 8 10:23:09 2024 +0100 Merge branch 'patch-19' of https://github.com/mariobl/util-linux * 'patch-19' of https://github.com/mariobl/util-linux: lsfd: Fix typos in man page commit ba743b8e4c8797a3d225629ba0c6f3e24baa6ab7 Merge: 634a625d8 cc3edae77 Author: Karel Zak Date: Mon Jan 8 10:22:31 2024 +0100 Merge branch 'patch-22' of https://github.com/mariobl/util-linux * 'patch-22' of https://github.com/mariobl/util-linux: mount: Fix markup and typos in man page commit 634a625d8232d49d5c850171a5d4f543bbeeb10f Merge: fe139bbd6 0cd80a0ea Author: Karel Zak Date: Mon Jan 8 10:08:05 2024 +0100 Merge branch 'hwclock-set-jitter' of https://github.com/badgerious/util-linux * 'hwclock-set-jitter' of https://github.com/badgerious/util-linux: hwclock: Improve set error in the face of jitter commit 35fc08f997e1b99c8f851d4c6b759a5717b20fd0 Author: Thomas Weißschuh Date: Sat Jan 6 09:52:42 2024 +0100 libmount: (tests) don't require root for update tests Signed-off-by: Thomas Weißschuh tests/ts/libmount/update | 1 - tests/ts/libmount/update-py | 1 - 2 files changed, 2 deletions(-) commit d7621b7c65e9bb4207e9d016a36c021594ed7227 Author: Masatake YAMATO Date: Fri Jan 5 23:31:05 2024 +0900 tests: (lsfd) add a case testing INOTIFY.INODES.RAW column on btrfs Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-inotify-btrfs | 4 ++ tests/ts/lsfd/mkfds-inotify-btrfs | 91 +++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) commit c41d66375b6fb696f5d385d24c0350ac62c8c23f Author: Masatake YAMATO Date: Fri Jan 5 23:25:49 2024 +0900 tests: (test_mkfds::inotify) add "dir" and "file" parameters Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit cc937cf3acfbdd89fd1ce318d764f89bfd0f12fc Author: Masatake YAMATO Date: Fri Jan 5 17:54:36 2024 +0900 tests: (lsfd::mkfds-inotify) use findmnt(1) instead of stat(1) to get bdev numbers Close #2349 stat(2) on some filesystems including btrfs reports a block device number (bdev number) with a offset. On the other hand, "inotify wd" field of /proc/$pid/fdinfo/$fd for an inotify file reports bdev numbers without offsets. The offset caused the failure of lsfd::mkfds-inotify test case on btrfs. Unlike stat(2), findmnt can report bdev numbers without offsets. Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-inotify | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bf8719d69a65c40582bc5c69a90a915a1e87ce4e Author: Mario Blättermann Date: Thu Jan 4 21:59:43 2024 +0100 write: Add missing section header in man page term-utils/write.1.adoc | 2 ++ 1 file changed, 2 insertions(+) commit 28d212c7c38962b39d766f36533735224b6347b6 Author: Mario Blättermann Date: Thu Jan 4 21:58:04 2024 +0100 hexdump: Add missing section header in man page text-utils/hexdump.1.adoc | 2 ++ 1 file changed, 2 insertions(+) commit 917f8478e38751d9adb85eb57b15845681e159e2 Author: Mario Blättermann Date: Thu Jan 4 20:58:53 2024 +0100 fadvise: Fix markup in man page misc-utils/fadvise.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc3edae773a7811df9a07c0a2968703def264d55 Author: Mario Blättermann Date: Thu Jan 4 17:30:27 2024 +0100 mount: Fix markup and typos in man page sys-utils/mount.8.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9fa92c9e933ec50dbd5e023969b1b7c6435bc28e Author: Mario Blättermann Date: Thu Jan 4 17:22:33 2024 +0100 fstab: Fix markup in man page sys-utils/fstab.5.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ffd686dce830370132831726170bf40be6dabe5 Author: Mario Blättermann Date: Thu Jan 4 17:20:44 2024 +0100 uuidd: Fix markup in man page (uuidd.8) misc-utils/uuidd.8.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b8c5204544f00e6843219a3bfe8fe14a07efeef Author: Mario Blättermann Date: Thu Jan 4 17:18:20 2024 +0100 lsfd: Fix typos in man page misc-utils/lsfd.1.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8440f1e188574c14cacc69fedcbda151cc94814f Author: Mario Blättermann Date: Thu Jan 4 17:15:29 2024 +0100 lsclocks: Fix markup and typos in man page misc-utils/lsclocks.1.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d359501606b6865fb2cb5cf8ab1422569b0e1ab Author: Mario Blättermann Date: Thu Jan 4 17:13:01 2024 +0100 hardlink: Fix markup in man page misc-utils/hardlink.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe8348469d941df25105c9633494319929b7e904 Author: Mario Blättermann Date: Thu Jan 4 17:10:01 2024 +0100 sfdisk: Fix markup in man page disk-utils/sfdisk.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe139bbd691d82353518c4bacf21ce742eeaf4ea Author: Karel Zak Date: Thu Jan 4 11:54:23 2024 +0100 autotools: add missing dist_noinst_DATA Addresses: https://github.com/util-linux/util-linux/pull/2668 Signed-off-by: Karel Zak misc-utils/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 04e06558e969396014aa2dc24ca9bb380543ec01 Merge: 966ae13a7 646754647 Author: Karel Zak Date: Thu Jan 4 11:53:27 2024 +0100 Merge branch 'patch-15' of https://github.com/mariobl/util-linux * 'patch-15' of https://github.com/mariobl/util-linux: man: Add enosys and lsclocks to po4a.cfg commit 966ae13a7097e2ba3f3ef53b1c4a36b340b14401 Merge: af4f92a7f 30720c90e Author: Karel Zak Date: Thu Jan 4 11:52:08 2024 +0100 Merge branch 'patch-14' of https://github.com/mariobl/util-linux * 'patch-14' of https://github.com/mariobl/util-linux: lsclocks: Fix markup in man page commit af4f92a7f381951c6060887b29188db585a1aa54 Merge: 2113e34d7 2295e6636 Author: Karel Zak Date: Thu Jan 4 11:51:40 2024 +0100 Merge branch 'wipefs/improvements' of https://github.com/t-8ch/util-linux * 'wipefs/improvements' of https://github.com/t-8ch/util-linux: wipefs: allow storage of backups in specific location wipefs: (tests) remove necessity of root permissions commit 2113e34d7cd92705a3c94cf6fddfc23e9becd3f8 Merge: 1973f3330 76283efac Author: Karel Zak Date: Thu Jan 4 11:50:19 2024 +0100 Merge branch 'PR/dmesg-timestamps' of github.com:karelzak/util-linux-work * 'PR/dmesg-timestamps' of github.com:karelzak/util-linux-work: Dividing tests into subtest based on recommendation from review util-linux/sys-utils test dmesg support for additional human-readable timestamp dmesg: man and coding style changes dmesg: support for additional human readable timestamp commit 0cd80a0ea118ecca6b0f4d55cf024204770a59e6 Author: Eric Badger Date: Wed Jan 3 13:11:43 2024 -0800 hwclock: Improve set error in the face of jitter set_hardware_clock_exact() spins in a loop, trying to exit when we are `delay` seconds from an integer time on the system clock. However, there might be jitter which causes an exit a little bit later than ideal. The prior code could cause a relatively small error in loop exit time to produce a relatively large error in the RTC. For example, suppose upon exit from the loop, we have: sethwtime=1704239206 refsystime=1704239206.000000 nowsystime=1704239206.500372 delay=0.5 In this case, the error is very small: 0.000372. However, we will compute: newhwtime = 1704239206 + ceil(0.500371 - 0.5) = 1704239207 And in slightly less than `delay` seconds, the system clock will be 1704239207 while the RTC will be approximately 1704239208, about 1 second of error. We are better off rounding in this case. The RTC will be behind the system clock, but only very slightly: newhwtime = 1704239206 + round(0.500371 - 0.5) = 1704239206 I find passing `--ul-debug 0xffff` readily produces the original issue. Signed-off-by: Eric Badger sys-utils/hwclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c14bee4d44ac8c61d56028f2f032e35c32533c38 Author: Karel Zak Date: Wed Jan 3 14:40:07 2024 +0100 libmount: reduce utab.lock permissions Signed-off-by: Karel Zak libmount/src/lock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 544824929a740ed5f8108c752872c7f082f301cf Author: Karel Zak Date: Wed Jan 3 14:13:28 2024 +0100 libmount: introduce /run/mount/utab.event The mnt_monitor_...() API uses /run/mount/utab.lock to monitor utab changes. The same file is used to control access to the utab file. The utab can be updated more than once during one mount(8) call, for example, one update is done in /sbin/mount.nfs and next in mount(8). This situation triggers two (e.g. inotify) events when monitoring is based on the lock file. It seems better to introduce separate file to trigger the event and do not trigger this event in /sbin/mount. helpers. References: 477401f0de404aafbc7630f70c2f8b1d670e32f8 Signed-off-by: Karel Zak libmount/src/context.c | 6 ++++-- libmount/src/monitor.c | 16 +++++++--------- libmount/src/mountP.h | 1 + libmount/src/tab_update.c | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 11 deletions(-) commit 0f9b2438c927d2787bf43b693809af3719e15646 Author: Karel Zak Date: Wed Jan 3 12:38:21 2024 +0100 libmount: add mnt_context_within_helper() wrapper Signed-off-by: Karel Zak libmount/src/context.c | 9 ++++++++- libmount/src/context_umount.c | 2 +- libmount/src/mountP.h | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) commit 1973f33305b6d6b21b97fcd90581075ba78722f4 Author: Karel Zak Date: Wed Jan 3 09:34:31 2024 +0100 logger: make sure path is terminated [coverity scan] Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 646754647b64c7770ab7fa76a3a39461bc6ad3b4 Author: Mario Blättermann Date: Tue Jan 2 18:42:40 2024 +0100 man: Add enosys and lsclocks to po4a.cfg po-man/po4a.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 30720c90eac2a2ca0b1ff5831337e4b1af607c89 Author: Mario Blättermann Date: Tue Jan 2 17:39:30 2024 +0100 lsclocks: Fix markup in man page misc-utils/lsclocks.1.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2295e66361c82eb371d017f993aad4a2c6a3c6ea Author: Thomas Weißschuh Date: Sun Dec 31 14:10:01 2023 +0100 wipefs: allow storage of backups in specific location This also avoids cluttering the home directory during test execution. Signed-off-by: Thomas Weißschuh bash-completion/wipefs | 4 ++++ misc-utils/wipefs.8.adoc | 4 ++-- misc-utils/wipefs.c | 44 ++++++++++++++++++++++++-------------------- tests/ts/wipefs/wipefs | 8 +++++--- 4 files changed, 35 insertions(+), 25 deletions(-) commit fd3388c5895a79a2f6630b7bff7c5388c72f1f55 Author: Thomas Weißschuh Date: Sun Dec 31 14:00:18 2023 +0100 wipefs: (tests) remove necessity of root permissions Signed-off-by: Thomas Weißschuh tests/ts/wipefs/wipefs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5df4dd14f1e853a23a50e715d68f6e31d7600624 Merge: cd6812cbd 1049c4a2f Author: Karel Zak Date: Tue Jan 2 11:15:57 2024 +0100 Merge branch 'fixes' of https://github.com/t-8ch/util-linux * 'fixes' of https://github.com/t-8ch/util-linux: libmount: (context) avoid dead store libmount: (utils) avoid dead store pipesz: avoid dead store fileeq: optimize size of ul_fileeq_method sha1: properly wipe variables libfdisk: (sgi): use strncpy over strcpy libfdisk: (sun) properly initialize partition data libmount: (tests) fix --filesystems crash on invalid argument libmount: (tests) fix --filesystems test argument parsing libmount: (veritydev) use asprintf to build string libsmartcols: (samples/fromfile) properly handle return value from getline() libuuid: (test_uuid) make reading UUIDs from file more robust libblkid: (dev) use strdup to duplicate string pg: use snprintf to build string hexdump: use xasprintf to build string readprofile: use xasprintf to build string cal: avoid out of bound write logger: use strncpy instead of strcpy exec_shell: use xasprintf strv: make strv_new_api static commit cd6812cbd6f425b8afebf8e36a378ff2ab19a23c Author: Thomas Weißschuh Date: Sun Dec 31 00:32:46 2023 +0100 libblkid: (bcachefs) add support for superblock at end of disk Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 6 ++++++ tests/expected/wipefs/signatures-bcachefs | 1 + 2 files changed, 7 insertions(+) commit 8ca20ff6a27c9ba2ab66cf913d3863c91aff6fc8 Author: Thomas Weißschuh Date: Sun Dec 31 00:06:36 2023 +0100 libblkid: (bcachefs) add support for 2nd superblock at 2MiB Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 6 ++++++ tests/expected/wipefs/signatures-bcachefs | 1 + 2 files changed, 7 insertions(+) commit da349956c19f3a8eff5f525d4899822d4a6f0cc9 Author: Thomas Weißschuh Date: Sun Dec 31 13:32:56 2023 +0100 wipefs: (tests) add test for all detected signatures This is useful to validate that multiple signatures were detected. Use it for bcachefs, as that prober will gain support for backup superblocks. Signed-off-by: Thomas Weißschuh tests/expected/wipefs/signatures-bcachefs | 1 + tests/ts/wipefs/images/bcachefs.img.xz | Bin 0 -> 5312 bytes tests/ts/wipefs/signatures | 40 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) commit ca466a27fbd4bedb573725d1038d454d15cdd0d9 Author: Thomas Weißschuh Date: Sat Dec 30 23:58:23 2023 +0100 libblkid: (bcachefs) compare against offset from idmag A future patch will introduce more superblock locations which need to use their matching superblock location. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0928e6ed566bc05218851f084915bde9cfaa42e0 Author: Thomas Weißschuh Date: Sun Dec 31 00:26:22 2023 +0100 libblkid: introduce helper to get offset for idmag As idmag->kboff can be negative to refer to an offset from the end of the device, introduce a helper so probers don't have to worry about this detail. Signed-off-by: Thomas Weißschuh libblkid/src/blkidP.h | 3 +++ libblkid/src/probe.c | 8 ++++++++ 2 files changed, 11 insertions(+) commit 1049c4a2f10a9ed4127c7bc0485faa53ea28abac Author: Thomas Weißschuh Date: Sun Dec 24 12:44:35 2023 +0100 libmount: (context) avoid dead store Signed-off-by: Thomas Weißschuh libmount/src/context.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3f459ccb71ac90a69171f23676c56a457d651cc8 Author: Thomas Weißschuh Date: Sun Dec 24 13:08:15 2023 +0100 libmount: (utils) avoid dead store Signed-off-by: Thomas Weißschuh libmount/src/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 132422bdd6be3d800cfeaabcef60f7dd3cbaf720 Author: Thomas Weißschuh Date: Sun Dec 24 14:12:46 2023 +0100 pipesz: avoid dead store Signed-off-by: Thomas Weißschuh misc-utils/pipesz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1987c031bb5b49223d2a3acfecaa445be05d05ac Author: Thomas Weißschuh Date: Sun Dec 24 14:04:42 2023 +0100 fileeq: optimize size of ul_fileeq_method Signed-off-by: Thomas Weißschuh lib/fileeq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8902e4cdd6149e5124383b25db8688dcdacd790 Author: Thomas Weißschuh Date: Sun Dec 24 13:50:40 2023 +0100 sha1: properly wipe variables Dead stores may very well be optimized away. Signed-off-by: Thomas Weißschuh lib/sha1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5d051cd6c69cb073f5cccbe2d8196929fde61fad Author: Thomas Weißschuh Date: Sun Dec 24 13:45:38 2023 +0100 libfdisk: (sgi): use strncpy over strcpy Signed-off-by: Thomas Weißschuh libfdisk/src/sgi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5672ba4fb56cce00615b235210d3801a0353c42f Author: Thomas Weißschuh Date: Sun Dec 24 13:32:56 2023 +0100 libfdisk: (sun) properly initialize partition data Signed-off-by: Thomas Weißschuh libfdisk/src/sun.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2f43ebcda0ba8bea82ae65040cea76305077dbab Author: Thomas Weißschuh Date: Sun Dec 24 13:05:20 2023 +0100 libmount: (tests) fix --filesystems crash on invalid argument Signed-off-by: Thomas Weißschuh libmount/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28a77504155987c3348516440d8d06a91fe77228 Author: Thomas Weißschuh Date: Sun Dec 24 13:04:59 2023 +0100 libmount: (tests) fix --filesystems test argument parsing Signed-off-by: Thomas Weißschuh libmount/src/utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 745d0f42777e5f03afa37b0da4865dccceb95055 Author: Thomas Weißschuh Date: Sun Dec 24 12:50:02 2023 +0100 libmount: (veritydev) use asprintf to build string Signed-off-by: Thomas Weißschuh libmount/src/hook_veritydev.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 39527b2075d45521fe74c1a80471607a39a0d877 Author: Thomas Weißschuh Date: Sun Dec 24 12:38:53 2023 +0100 libsmartcols: (samples/fromfile) properly handle return value from getline() Signed-off-by: Thomas Weißschuh libsmartcols/samples/fromfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a2ad9a59ece4332cd34fdc6cc6826c2fba3c887 Author: Thomas Weißschuh Date: Sun Dec 24 12:35:25 2023 +0100 libuuid: (test_uuid) make reading UUIDs from file more robust Instead of relying on fixed width entries, read line-by-line. Signed-off-by: Thomas Weißschuh libuuid/src/test_uuid.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit fa80b610725d1b06ccbfa5b4d08c5340cb4dc0e9 Author: Thomas Weißschuh Date: Sun Dec 24 12:35:18 2023 +0100 libblkid: (dev) use strdup to duplicate string Signed-off-by: Thomas Weißschuh libblkid/src/dev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8b1324c5b0d97bf33e362a88c5e563e4adc4b6a2 Author: Thomas Weißschuh Date: Tue Dec 26 11:33:17 2023 +0100 pg: use snprintf to build string Signed-off-by: Thomas Weißschuh text-utils/pg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 41e002220a5ec7dc67876c72eeb12754343188bd Author: Thomas Weißschuh Date: Tue Dec 26 11:21:10 2023 +0100 hexdump: use xasprintf to build string Signed-off-by: Thomas Weißschuh text-utils/hexdump-parse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6657ea47f9421481b835994ffbc78722cc742d2d Author: Thomas Weißschuh Date: Tue Dec 26 11:20:03 2023 +0100 readprofile: use xasprintf to build string Signed-off-by: Thomas Weißschuh sys-utils/readprofile.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1be53cb47e5e94f5efecaf6ebc55311493343183 Author: Thomas Weißschuh Date: Tue Dec 26 11:18:00 2023 +0100 cal: avoid out of bound write Signed-off-by: Thomas Weißschuh misc-utils/cal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f9f3e991780b77f982edd64de11248ee57df8d8e Author: Thomas Weißschuh Date: Sun Dec 24 14:12:52 2023 +0100 logger: use strncpy instead of strcpy This is not strictly necessary but better style. Signed-off-by: Thomas Weißschuh misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b377f9ab15c87933281f6821819d7e43ac0d3b49 Author: Thomas Weißschuh Date: Sun Dec 24 12:00:53 2023 +0100 exec_shell: use xasprintf It removes an unbounded strcpy and makes the code shorter and clearer. Signed-off-by: Thomas Weißschuh lib/exec_shell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a2126e3c95eca2296a77a7b573ca40c3fbdad7ab Author: Thomas Weißschuh Date: Sun Dec 24 12:00:58 2023 +0100 strv: make strv_new_api static It is never used outside of strv.c. Signed-off-by: Thomas Weißschuh include/strv.h | 1 - lib/strv.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit c243442962ee43e26c8cd6d0e08acd3fb92be07d Merge: 80fac9312 fe7f73992 Author: Karel Zak Date: Sun Dec 31 11:24:27 2023 +0100 Merge branch 'wdctl/timeout-condition' of https://github.com/t-8ch/util-linux * 'wdctl/timeout-condition' of https://github.com/t-8ch/util-linux: wdctl: properyl test timeout conditions commit 80fac9312b48cd2471d210662e0b25a9c6071dd3 Merge: 34946316f ee57cc3d1 Author: Karel Zak Date: Sun Dec 31 11:23:39 2023 +0100 Merge branch 'patch-12' of https://github.com/mariobl/util-linux * 'patch-12' of https://github.com/mariobl/util-linux: Update po4a.cfg to assign exch.1 correctly to misc-utils exch: Add man page to po4a.cfg to make it translatable commit 34946316f4d3b40a084af113f52848a5c995976a Merge: 75f4d8097 a2f069d58 Author: Karel Zak Date: Sun Dec 31 11:00:23 2023 +0100 Merge branch 'fallocate/warning' of https://github.com/t-8ch/util-linux * 'fallocate/warning' of https://github.com/t-8ch/util-linux: fdisk: guard posix variable commit 75f4d8097667b524b16ee497de4133628ed6641a Author: Karel Zak Date: Sun Dec 31 10:58:32 2023 +0100 exch: use NULL rather than zero Signed-off-by: Karel Zak misc-utils/exch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2b16344907bebcdd806fc4dcbe1f042150acd8e Merge: 80ed01d6b 5fc5e4e7c Author: Karel Zak Date: Sun Dec 31 10:57:28 2023 +0100 Merge branch 'exch/options' of https://github.com/t-8ch/util-linux * 'exch/options' of https://github.com/t-8ch/util-linux: build-sys: fail build for untracked files gitignore: ignore exch exch: properly terminate options array commit 80ed01d6b5da6706023ec5f6278a434d90d00fc0 Merge: b55a6b058 c2d7b262a Author: Karel Zak Date: Sun Dec 31 10:55:16 2023 +0100 Merge branch 'logger-wrong-typo' of https://github.com/chentooerl/util-linux * 'logger-wrong-typo' of https://github.com/chentooerl/util-linux: Fix typo: octen -> octet commit 8d1ca13c989d54fe4a3654b7feba3e7dba78fad9 Author: Tobias Stoeckmann Date: Fri Dec 29 18:11:42 2023 +0100 login: unify pw_shell script test At first, a blank in pw_shell is sufficient to assume that the user login shell is actually a shell script. If execution fails, the test consists of testing argv[0] for "/bin/sh" which is set in case of shell script. But "/bin/sh" can also be the actual login shell set for the user. If execution fails, the error message erroneously talks about a shell script. Keep a boolean variable around to perform the test exactly once to have a precise error message. Signed-off-by: Tobias Stoeckmann login-utils/login.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7ca9a10fb53786782135c68308db7111193b6711 Author: Tobias Stoeckmann Date: Fri Dec 29 18:07:55 2023 +0100 login: simplify name creation The function xasprintf is simpler to handle than calling xstrncpy and xstrdup for the same task. Introduced buff variable to make the whole else-block look like the if-block. Signed-off-by: Tobias Stoeckmann login-utils/login.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit fe7f739928442ff6fdb15c1c8544e3f4595dcc82 Author: Thomas Weißschuh Date: Thu Dec 28 20:44:34 2023 +0100 wdctl: properyl test timeout conditions Fixes #2660 Signed-off-by: Thomas Weißschuh sys-utils/wdctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee57cc3d1c38a85d6047f558ea621d5743bf9931 Author: Mario Blättermann Date: Tue Dec 26 15:45:29 2023 +0100 Update po4a.cfg to assign exch.1 correctly to misc-utils po-man/po4a.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff0bff72a66b0d1c74528786115b4d76a1d30b7f Author: Mario Blättermann Date: Tue Dec 26 15:37:04 2023 +0100 exch: Add man page to po4a.cfg to make it translatable po-man/po4a.cfg | 1 + 1 file changed, 1 insertion(+) commit a2f069d58437b6741c4b26f5f4da65c8c6375b9c Author: Thomas Weißschuh Date: Sun Dec 24 11:47:02 2023 +0100 fdisk: guard posix variable Otherwise it can generate a unused variable warning. Signed-off-by: Thomas Weißschuh sys-utils/fallocate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 76283efacfa4f22738c343e83b0ebd514c96e564 Author: Rishabh Thukral Date: Sat Dec 23 18:44:22 2023 -0800 Dividing tests into subtest based on recommendation from review Signed-off-by: Rishabh Thukral tests/expected/dmesg/timestamp-format | 424 ---------------------- tests/expected/dmesg/timestamp-format-delta | 106 ++++++ tests/expected/dmesg/timestamp-format-delta-ctime | 106 ++++++ tests/expected/dmesg/timestamp-format-delta-raw | 106 ++++++ tests/expected/dmesg/timestamp-format-multiple | 106 ++++++ tests/ts/dmesg/timestamp-format | 11 + 6 files changed, 435 insertions(+), 424 deletions(-) commit 0570359146621b6086afe0e0faaf9e222c3f0697 Author: Rishabh Thukral Date: Sat Dec 23 15:13:36 2023 -0800 util-linux/sys-utils test dmesg support for additional human-readable timestamp This commit adds tests for new functionality in dmesg to support multiple timestamp formats. The user can specify multiple timestamp formats with --time-format option and dmesg prints all the logs with desired timestamp formats in the sequence of user-provided formats. This test verifies that output contains multiple formats in the sequence of input and it also tests for the special case where the user specifies delta format along with either ctime or raw. Signed-off-by: Rishabh Thukral tests/expected/dmesg/timestamp-format | 424 ++++++++++++++++++++++++++++++++++ tests/ts/dmesg/timestamp-format | 31 +++ 2 files changed, 455 insertions(+) commit 5fc5e4e7cf6455743a6801ce9a694b2d73be6153 Author: Thomas Weißschuh Date: Fri Dec 22 23:31:39 2023 +0100 build-sys: fail build for untracked files All build artifacts should be covered by a gitignore entry. Validate that at build-time. Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit 2e666861a6faa620d5993072c3aae6e7ec8e0a4c Author: Thomas Weißschuh Date: Fri Dec 22 23:20:32 2023 +0100 gitignore: ignore exch Signed-off-by: Thomas Weißschuh .gitignore | 1 + 1 file changed, 1 insertion(+) commit 5c31f7ffe7ec33b0925be758597eefa4bd7c0d49 Author: Thomas Weißschuh Date: Fri Dec 22 17:58:41 2023 +0100 build-sys: (tests) validate that time_t is 64bit Signed-off-by: Thomas Weißschuh tests/expected/misc/time_t | 1 + tests/ts/misc/time_t | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit a31f4c4f47219f1e2c1c970efbcc069bf5986b67 Author: Thomas Weißschuh Date: Sun Apr 16 09:11:41 2023 +0200 meson: try to always use 64bit time support on glibc Signed-off-by: Thomas Weißschuh meson.build | 13 +++++++++++++ meson_options.txt | 2 ++ 2 files changed, 15 insertions(+) commit f6e7a21ce91df5a0051a47d175408ebc77b3d7b3 Author: Thomas Weißschuh Date: Sat Apr 15 10:57:02 2023 +0200 build-sys: try to always use 64bit time support on glibc Signed-off-by: Thomas Weißschuh configure.ac | 2 ++ tools/oss-fuzz.sh | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 9e4f3c7bc013e1dc83719887eca2babd47b8cd28 Author: Thomas Weißschuh Date: Fri Dec 22 18:02:53 2023 +0100 build-sys: backport autoconf year2038 macros Backported from 2.72e which is a release candidate for the final 2.72 release. Signed-off-by: Thomas Weißschuh m4/year2038.m4 | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) commit 73e865b695595ab6c77d226d42f7bef8cd5f3fa9 Author: Thomas Weißschuh Date: Sun Apr 16 09:11:49 2023 +0200 tests: add sysinfo to show sizeof(time_t) Signed-off-by: Thomas Weißschuh tests/helpers/test_sysinfo.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a072613ba2aa9b47157c2512b5627cec2627bc88 Author: Thomas Weißschuh Date: Sun Apr 16 09:13:34 2023 +0200 tests: constify a sysinfo helpers struct Signed-off-by: Thomas Weißschuh tests/helpers/test_sysinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f69c6dcf50897ebdfb15804ac801913b8e01cf3 Author: Thomas Weißschuh Date: Fri Dec 22 11:41:37 2023 +0100 exch: properly terminate options array Signed-off-by: Thomas Weißschuh misc-utils/exch.c | 1 + 1 file changed, 1 insertion(+) commit c2d7b262a6e292bea5e3ee438c211a8511f68c5d Author: zeyun chen Date: Thu Dec 21 10:31:20 2023 +0800 Fix typo: octen -> octet misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b55a6b058d52e7cec1d4936eaa037045795d2a8c Author: Thomas Weißschuh Date: Tue Dec 19 22:11:09 2023 +0100 lsclocks: refer to correct lsclocks(1) manpage Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a7c8803d60f5131b123fd17d9dc422f2f1dcffd Author: Karel Zak Date: Thu Dec 14 11:44:14 2023 +0100 exch: fix typo Signed-off-by: Karel Zak misc-utils/exch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6df1d92b7a11c7f24a557431ab3451effc42a188 Author: Karel Zak Date: Thu Dec 14 10:12:46 2023 +0100 docs: move Copyright in boilerplate.c Let's keep it in order SPDX-License-Identifier License block Copyright command description Signed-off-by: Karel Zak Documentation/boilerplate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b6252de2556367f16ef54b55b974233445fe0f0c Author: Karel Zak Date: Thu Dec 14 10:11:47 2023 +0100 build-sys: add --disable-exch Signed-off-by: Karel Zak configure.ac | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 8380ce7289f9d36e924ec544ec8c266da6dea837 Author: Karel Zak Date: Thu Dec 14 10:06:06 2023 +0100 exch: cosmetic changes * use the same license header as in other utuls * make sure SYS_renamea2 defined * small change to usage() Signed-off-by: Karel Zak misc-utils/exch.1.adoc | 2 +- misc-utils/exch.c | 28 +++++++++++----------------- 2 files changed, 12 insertions(+), 18 deletions(-) commit cd094a05880cf1132762c5f9724c0945557c7638 Author: Masatake YAMATO Date: Thu Dec 7 00:17:26 2023 +0900 exch: new command exchaging two files atomically An example session: $ echo A > a $ echo B > b $ ./exch a b $ cat a B $ cat b A Signed-off-by: Masatake YAMATO bash-completion/Makemodule.am | 3 ++ bash-completion/exch | 26 +++++++++++ configure.ac | 12 +++++ meson.build | 16 +++++++ misc-utils/Makemodule.am | 9 ++++ misc-utils/exch.1.adoc | 51 +++++++++++++++++++++ misc-utils/exch.c | 100 ++++++++++++++++++++++++++++++++++++++++++ misc-utils/meson.build | 4 ++ tests/commands.sh | 1 + tests/expected/exch/exch | 4 ++ tests/ts/exch/exch | 40 +++++++++++++++++ 11 files changed, 266 insertions(+) commit 2f252cc8b19d96085c691ba75ed0ca3f2ae3aa7d Merge: fff33391c d546d7516 Author: Karel Zak Date: Thu Dec 14 09:45:05 2023 +0100 Merge branch 'fix-getsz-verbose-output' of https://github.com/calestyo/util-linux * 'fix-getsz-verbose-output' of https://github.com/calestyo/util-linux: blockdev: add missing verbose output for --getsz commit fff33391c83507c663ea9d361cbbf09b7620da8a Author: Karel Zak Date: Thu Dec 14 09:44:40 2023 +0100 libsmartcols: fix typo in comment Signed-off-by: Karel Zak libsmartcols/src/filter-parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5b9e85b4c1d6eac6a5888cec2e8d9ce11ef28de Merge: c08a10bfb ef5c0a871 Author: Karel Zak Date: Thu Dec 14 09:43:54 2023 +0100 Merge branch 'PR/libsmartcols-cell-data' of github.com:karelzak/util-linux-work * 'PR/libsmartcols-cell-data' of github.com:karelzak/util-linux-work: libsmartcols: fix memory leak on filter parser error libsmartcols: free after error in filter sample libsmartcols: make cell data printing more robust commit c08a10bfb4a83ccd1ea481f7c644ecd430e910a1 Author: Christian Göttsche <> Date: Wed Dec 13 16:53:16 2023 +0100 gitignore: ignore setpgid binary Signed-off-by: Christian Göttsche .gitignore | 1 + 1 file changed, 1 insertion(+) commit ef5c0a87137ab3a7eebd66328e1374e5f2247d8a Author: Karel Zak Date: Wed Dec 13 11:09:41 2023 +0100 libsmartcols: fix memory leak on filter parser error Signed-off-by: Karel Zak libsmartcols/src/filter-parser.y | 9 +++++++++ 1 file changed, 9 insertions(+) commit 71bf4b291dfed04a710b561326107d33f4d7e4e3 Author: Karel Zak Date: Tue Dec 12 20:38:34 2023 +0100 libsmartcols: free after error in filter sample Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 2d9e5c9eb6692b796ec62b713efe0c522e1afb05 Author: Karel Zak Date: Tue Dec 12 20:11:22 2023 +0100 libsmartcols: make cell data printing more robust * use zero terminated data in continuous sample * don't call strlen() for empty strings * make sure library check for data size during printing Unfortunately, previous library versions support cell data buffer update without inform library about a change. Signed-off-by: Karel Zak libsmartcols/samples/continuous.c | 2 +- libsmartcols/src/cell.c | 4 ++-- libsmartcols/src/print.c | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) commit be59729281c63eb8f226bdbdc9a356276be5eeae Author: Thomas Weißschuh Date: Tue Dec 12 19:40:31 2023 +0100 libsmartcols: (tests) add test for continuous json output Signed-off-by: Thomas Weißschuh libsmartcols/samples/Makemodule.am | 5 ++ libsmartcols/samples/continuous-json.c | 80 +++++++++++++++++++++++++++++ meson.build | 9 ++++ tests/commands.sh | 1 + tests/expected/libsmartcols/continuous-json | 40 +++++++++++++++ tests/ts/libsmartcols/continuous-json | 28 ++++++++++ 6 files changed, 163 insertions(+) commit 5130ce8ee5b71c249e0c8bb7a4975dc8a48c64fa Author: Thomas Weißschuh Date: Tue Dec 12 18:42:44 2023 +0100 libsmartcols: only recognize closed object as final element When streaming JSON normal values also have indent == 1. For those however it is incorrect to close the stream. Fixes #2644 Signed-off-by: Thomas Weißschuh lib/jsonwrt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 36a853a9a71c46f088ab8f7416d68af112a59ce4 Author: Thomas Weißschuh Date: Tue Dec 12 18:42:11 2023 +0100 libsmartcols: flush correct stream Signed-off-by: Thomas Weißschuh misc-utils/findmnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2b0bf88d35513a746c144f35826eb47692386dc Author: Thomas Weißschuh Date: Tue Dec 12 18:41:33 2023 +0100 libsmartcols: drop spourious newline in between streamed JSON objects scols_table_print_range() already appends a newline correctly. Signed-off-by: Thomas Weißschuh misc-utils/findmnt.c | 2 -- 1 file changed, 2 deletions(-) commit d546d7516d481a9bcff3e2db852ef1b999825ece Author: Christoph Anton Mitterer Date: Tue Dec 12 17:23:09 2023 +0100 blockdev: add missing verbose output for --getsz Signed-off-by: Christoph Anton Mitterer disk-utils/blockdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 423ed6e6eb0d064a54a95ba4c067f13fcef6f791 Author: Karel Zak Date: Tue Dec 12 11:40:01 2023 +0100 dmesg: man and coding style changes * add note about delta time to the man page * make the latest changes to the code less talkative Signed-off-by: Karel Zak sys-utils/dmesg.1.adoc | 4 +++- sys-utils/dmesg.c | 35 +++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 15 deletions(-) commit 3de2e556da09d7b08ffaca3513a7be606b290a86 Author: Rishabh Thukral Date: Tue Dec 5 11:53:33 2023 -0800 dmesg: support for additional human readable timestamp The dmesg logs have timestamps in seconds since boot format which can be converted to other formats. However, there is no option to include both the original timestamp as present in the buffer along with the converted timestamp in the specified format. This change updates the --time-format option in dmesg to enable the user to specify it multiple times with different formats with each input providing a timestamp format among the currently supported choices. This enables seeing the dmesg logs in both seconds since boot and human readable format simultaneously in each row of the log output. The sequence of timestamp format follows the order in which the user provides the desired formats. Signed-off-by: Rishabh Thukral sys-utils/dmesg.1.adoc | 4 +- sys-utils/dmesg.c | 257 +++++++++++++++++++++++++++++++------------------ 2 files changed, 168 insertions(+), 93 deletions(-) commit 294aa16fab0ff3db6e15727a110c2689848c16d2 Merge: aa49261b2 01c54718f Author: Karel Zak Date: Tue Dec 12 10:22:25 2023 +0100 Merge branch 'dmesg/kmsg-file' of https://github.com/t-8ch/util-linux * 'dmesg/kmsg-file' of https://github.com/t-8ch/util-linux: dmesg: support reading kmsg format from file commit aa49261b2113f3f210eddb66ca034a431c180859 Merge: ae015d713 899f554f1 Author: Karel Zak Date: Tue Dec 12 10:21:19 2023 +0100 Merge branch 'dmesg/tests' of https://github.com/t-8ch/util-linux * 'dmesg/tests' of https://github.com/t-8ch/util-linux: dmesg: use symbolic defines for second conversions dmesg: add support for reserved and local facilities dmesg: (tests) validate json output dmesg: only write one message to json jsonwrt: add ul_jsonwrt_value_s_sized dmesg: open-code LOG_MAKEPRI dmesg: correctly print all supported facility names dmesg: error out instead of silently ignoring force_prefix commit 01c54718fc1634099972f6d2ffe6bce4175bb53a Author: Thomas Weißschuh Date: Mon Dec 11 21:38:43 2023 +0100 dmesg: support reading kmsg format from file Signed-off-by: Thomas Weißschuh sys-utils/dmesg.1.adoc | 5 ++- sys-utils/dmesg.c | 57 ++++++++++++++++++++++--- tests/expected/dmesg/kmsg-file | 93 +++++++++++++++++++++++++++++++++++++++++ tests/ts/dmesg/kmsg-file | 28 +++++++++++++ tests/ts/dmesg/kmsg-input | Bin 0 -> 1955 bytes 5 files changed, 176 insertions(+), 7 deletions(-) commit ae015d713895c4d72589a656a9ca359ede3d5073 Author: Thomas Weißschuh Date: Wed Dec 6 18:39:51 2023 +0100 setpriv: add landlock support landlock [0] is a Linux stackable LSM that can be used by unprivileged processes to build a sandbox around them. With support for landlock in setpriv users can easily construct a sandbox on-the-fly when executing programs. [0] https://landlock.io/ Signed-off-by: Thomas Weißschuh bash-completion/setpriv | 12 ++ configure.ac | 5 + meson.build | 4 + sys-utils/Makemodule.am | 4 + sys-utils/meson.build | 3 + sys-utils/setpriv-landlock.c | 211 +++++++++++++++++++++ sys-utils/setpriv-landlock.h | 52 +++++ sys-utils/setpriv.1.adoc | 27 +++ sys-utils/setpriv.c | 20 +- tests/commands.sh | 1 + tests/expected/setpriv/landlock-nothing-allowed | 1 + .../expected/setpriv/landlock-partial-access-fail | 1 + tests/ts/setpriv/landlock | 64 +++++++ 13 files changed, 404 insertions(+), 1 deletion(-) commit 9abd5e4b99fb2d78d8dbbb9144aef68972c65e83 Author: Karel Zak Date: Mon Dec 11 13:37:41 2023 +0100 sys-utils: cleanup license lines, add SPDX Signed-off-by: Karel Zak sys-utils/ctrlaltdel.c | 16 +++++++++++----- sys-utils/dmesg.c | 11 ++++++++--- sys-utils/hwclock-cmos.c | 6 ++++++ sys-utils/hwclock-rtc.c | 5 +++++ sys-utils/hwclock.c | 15 +++++++++++---- sys-utils/hwclock.h | 8 ++++++++ sys-utils/ipcrm.c | 11 ++++++++--- sys-utils/ipcs.c | 16 +++++++++++++--- sys-utils/ipcutils.c | 11 +++++++++++ sys-utils/ipcutils.h | 11 +++++++++++ sys-utils/irq-common.c | 12 ++---------- sys-utils/irq-common.h | 11 +++++++++++ sys-utils/irqtop.c | 11 ++--------- sys-utils/ldattach.c | 19 ++++++++----------- sys-utils/losetup.c | 12 ++++++++++-- sys-utils/lscpu-arm.c | 13 ++----------- sys-utils/lscpu-cpu.c | 10 ++++++++++ sys-utils/lscpu-cputype.c | 11 ++++++++++- sys-utils/lscpu-dmi.c | 8 ++++++-- sys-utils/lscpu-topology.c | 11 +++++++++++ sys-utils/lscpu-virt.c | 11 +++++++++++ sys-utils/lscpu.c | 16 ++++------------ sys-utils/lscpu.h | 11 +++++++++++ sys-utils/lsirq.c | 11 ++--------- sys-utils/lsmem.c | 11 ++--------- sys-utils/lsns.c | 11 ++--------- sys-utils/mount.c | 12 ++---------- sys-utils/mountpoint.c | 17 ++++------------- sys-utils/nsenter.c | 14 +++----------- sys-utils/pivot_root.c | 9 ++------- sys-utils/prlimit.c | 22 +++++++--------------- sys-utils/readprofile.c | 21 +++++++-------------- sys-utils/renice.c | 2 ++ sys-utils/rfkill.c | 3 ++- sys-utils/rtcwake.c | 11 ++++++++++- sys-utils/setpgid.c | 8 ++++---- sys-utils/setsid.c | 8 +++++--- sys-utils/swapoff.c | 13 +++++++++++++ sys-utils/swapon-common.c | 14 +++++++++++++- sys-utils/swapon-common.h | 13 +++++++++++++ sys-utils/swapon.c | 13 +++++++++++++ 41 files changed, 296 insertions(+), 183 deletions(-) commit 899f554f19beded78fce1bbe1ee0c0b9355db27d Author: Thomas Weißschuh Date: Sun Dec 10 09:58:27 2023 +0100 dmesg: use symbolic defines for second conversions Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 040567280e8a2bc8993c72c27a3f4db55d463992 Author: Thomas Weißschuh Date: Fri Dec 8 18:10:55 2023 +0100 dmesg: add support for reserved and local facilities Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 12 ++++++++++++ tests/expected/dmesg/colors | 19 ++++++++++--------- tests/expected/dmesg/console-levels | 5 +++++ tests/expected/dmesg/decode | 19 ++++++++++--------- tests/expected/dmesg/delta | 1 + tests/expected/dmesg/facilities | 8 ++++++++ tests/expected/dmesg/json | 13 +++++++++++++ tests/ts/dmesg/input | 1 + 8 files changed, 60 insertions(+), 18 deletions(-) commit 0448e15f3b927db137de852168144f21851b6931 Author: Thomas Weißschuh Date: Fri Dec 8 18:10:53 2023 +0100 dmesg: (tests) validate json output Signed-off-by: Thomas Weißschuh tests/expected/dmesg/json | 416 ++++++++++++++++++++++++++++++++++++++++++++++ tests/ts/dmesg/json | 28 ++++ 2 files changed, 444 insertions(+) commit 159ea1470d712a92e0e0b02a8d10e072acbfbaf8 Author: Thomas Weißschuh Date: Fri Dec 8 18:10:50 2023 +0100 dmesg: only write one message to json Before we would add all of the message buffer. Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e60bc3a1a1d0d976a408b9edf21e7d755af88fe6 Author: Thomas Weißschuh Date: Fri Dec 8 18:10:47 2023 +0100 jsonwrt: add ul_jsonwrt_value_s_sized Signed-off-by: Thomas Weißschuh include/jsonwrt.h | 2 ++ lib/jsonwrt.c | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) commit 38a4480bbf807b26bedf39f68c81b20828681b02 Author: Thomas Weißschuh Date: Fri Dec 8 18:10:44 2023 +0100 dmesg: open-code LOG_MAKEPRI LOG_MAKEPRI between musl and glibc differ in their behavior. musl performs the '<< 3' as part of the macro while glibc expects the caller to do so. Just provide our own implementation to avoid the issue. Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e07c072c15fe11efe8c3d034cd4b362593f0bd20 Author: Thomas Weißschuh Date: Fri Dec 8 18:10:42 2023 +0100 dmesg: correctly print all supported facility names Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ead076318216203162da24ac1d2759f579b178b5 Author: Thomas Weißschuh Date: Fri Dec 8 18:10:34 2023 +0100 dmesg: error out instead of silently ignoring force_prefix When using the option with one of the input mechanisms the user has to look at the source to figure out why nothing is happening. Signed-off-by: Thomas Weißschuh sys-utils/dmesg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 35fe9802cf584c4ff2acce67e695d67bad34361c Merge: a43116e7f a5fdf8f51 Author: Karel Zak Date: Mon Dec 11 10:57:27 2023 +0100 Merge branch 'uuid-time64_t' of https://github.com/thkukuk/util-linux * 'uuid-time64_t' of https://github.com/thkukuk/util-linux: libuuid: Add uuid_time64 for 64bit time_t on 32bit commit a43116e7f430b90296fccf798e3b8dad19085cde Merge: 24efda975 68e14d3d5 Author: Karel Zak Date: Mon Dec 11 10:52:47 2023 +0100 Merge branch 'master' of https://github.com/goldwynr/util-linux * 'master' of https://github.com/goldwynr/util-linux: more: exit if POLLERR and POLLHUP on stdin is received commit 24efda9751453fba0ad0d4fcf9bba8b60a995269 Merge: d45820df1 f0b2d0983 Author: Karel Zak Date: Mon Dec 11 10:52:11 2023 +0100 Merge branch 'fix-bash-completion-rules' of https://github.com/masatake/util-linux * 'fix-bash-completion-rules' of https://github.com/masatake/util-linux: bash-completion: (lslocks): add --bytes option to the rules bash-completion: (fadvise): fix a typo commit f0b2d0983566e176f31202eedc44bbe291fbf1fd Author: Masatake YAMATO Date: Sat Dec 9 02:33:40 2023 +0900 bash-completion: (lslocks): add --bytes option to the rules Signed-off-by: Masatake YAMATO bash-completion/lslocks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da42eb688d36389bc8f11c5047c2adc09e75957f Author: Masatake YAMATO Date: Sat Dec 9 02:33:14 2023 +0900 bash-completion: (fadvise): fix a typo Signed-off-by: Masatake YAMATO bash-completion/fadvise | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d45820df1058027fd986db250681de25b8ce92a2 Author: Thomas Weißschuh Date: Sun Nov 19 17:20:55 2023 +0100 fdisk: add support for partition resizing Fixes #2555 Signed-off-by: Thomas Weißschuh disk-utils/fdisk-menu.c | 4 ++ disk-utils/fdisk.c | 95 +++++++++++++++++++++++++++++++++++++++++++++ disk-utils/fdisk.h | 2 + tests/expected/fdisk/resize | 75 +++++++++++++++++++++++++++++++++++ tests/ts/fdisk/resize | 66 +++++++++++++++++++++++++++++++ 5 files changed, 242 insertions(+) commit 68e14d3d5f4116ad3aca0e392d008645ea90cf70 Author: Goldwyn Rodrigues Date: Fri Dec 8 09:04:39 2023 -0600 more: exit if POLLERR and POLLHUP on stdin is received more command continues to run in case stdin have closed the file and it takes 100% of CPU. This is because revents on stdin send POLLIN | POLLHUP | POLLERR once stdin is closed. more receives it even though it is not requested in events. This is common Linux behaviour to never mask out POLLHUP or POLLERR. The loop in more_key_command() runs infinitely because more_poll() returns 0 and read_command() reads 0 bytes. Check for POLLERR and POLLHUP, and exit more in case of an error. Steps to reproduce: 1. Setup /etc/systemd/logind.conf with KillUserProcesses=no 2. Add config "Defaults use_pty" in /etc/sudoers 3. Start an ssh session to the machine 4. # sudo su - 5. # more 6. kill the parent ssh process, say close the tab At this time "more" runs with 100% CPU utilization. Signed-off-by: Goldwyn Rodrigues text-utils/more.c | 5 +++++ 1 file changed, 5 insertions(+) commit a5fdf8f5136bb6a5b22907fc22ae47c4d75b48a1 Author: Thorsten Kukuk Date: Thu Nov 30 16:28:53 2023 +0100 libuuid: Add uuid_time64 for 64bit time_t on 32bit Signed-off-by: Thorsten Kukuk libuuid/src/libuuid.sym | 9 ++++++++ libuuid/src/uuid.h | 3 +++ libuuid/src/uuid_time.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 70 insertions(+), 1 deletion(-) commit 6b081fa421f4028bad0be22178f8d8e5e9015041 Author: Karel Zak Date: Fri Dec 8 13:26:52 2023 +0100 Revert "more: exit if POLLHUP or POLLERR on stdin is received" the regression test more/regexp failed. This reverts commit 9be4122b1d8c1c2b8eb270998838c73bae7ff2ff. text-utils/more.c | 5 ----- 1 file changed, 5 deletions(-) commit 6bd99ecdaa505ec3e1847bb6c3b573a54650493a Author: Karel Zak Date: Fri Dec 8 13:16:23 2023 +0100 hwclock: reuse error message The only hwclock is the place we use this message. Signed-off-by: Karel Zak sys-utils/hwclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit faa07b67e66a9a61ca8ec0157d12760347c71fff Author: Eli Schwartz Date: Wed Dec 6 19:40:44 2023 -0500 bash-completion: make sure that "lastb" actually completes Building util-linux logs a warning on Gentoo: ``` * Problems with installed bash completions were found: * * lastb: incorrect name, no completions for 'lastb' command defined. * * For more details on installing bash-completions, please see: * https://wiki.gentoo.org/wiki/Bash/Installing_completion_files ``` A bash-completion file is usually composed of two parts: - a function that knows how to produce completions - a specification of which command should be completed In cases where multiple commands have the same options, e.g. commands that are symlinked to each other, it is common to symlink the completion files as well. This shares the first part. But the second part cannot be shared, it must be implemented twice by specifying two different commands to be completed. "lastb" had a symlinked completion, but when the completion system processes /usr/share/bash-completion/completions/lastb, it would only define a completion for "last". Define both completions in one file, so that sourcing it works regardless of command used. bash-completion/last | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9be4122b1d8c1c2b8eb270998838c73bae7ff2ff Author: Goldwyn Rodrigues Date: Wed Dec 6 13:19:17 2023 -0600 more: exit if POLLHUP or POLLERR on stdin is received more command continues to run in case stdin have closed the file and it takes 100% of CPU. This is because revents on stdin send POLLIN | POLLHUP | POLLERR once stdin is closed. more receives it even though it is not requested in events. This is common Linux behaviour to never mask out POLLHUP or POLLERR. The loop in more_key_command() runs infinitely because more_poll() returns 0 and read_command() reads 0 bytes. Steps to reproduce: 1. Setup /etc/systemd/logind.conf with KillUserProcesses=no 2. Add config "Defaults use_pty" in /etc/sudoers 3. Start an ssh session to the machine 4. # sudo su - 5. # more 6. kill the parent ssh process, say close the tab At this time "more" runs with 100% CPU utilization. Signed-off-by: Goldwyn Rodrigues text-utils/more.c | 5 +++++ 1 file changed, 5 insertions(+) commit 75f9816a0a9d2a1cae555a44295b82b0412b6b5c Merge: 7bc52cc04 eb4e426c7 Author: Karel Zak Date: Fri Dec 8 11:31:03 2023 +0100 Merge branch 'PR/list-columns' of github.com:karelzak/util-linux-work * 'PR/list-columns' of github.com:karelzak/util-linux-work: findmnt: add --list-columns lslocks: improve --list-columns lsblk: add --list-columns commit 7bc52cc04ce12decd2ea1b00dace1edcfb90682f Author: Masatake YAMATO Date: Fri Dec 8 04:35:29 2023 +0900 tests: (lslcoks) insert a sleep between taking a lock and running lslocks Close #2624. It appears that there is a time lag between locking and its visibility in /proc/locks. See the unstbale results of errors I observed in https://github.com/util-linux/util-linux/pull/2629. Signed-off-by: Masatake YAMATO tests/ts/lslocks/lslocks | 11 +++++++++++ 1 file changed, 11 insertions(+) commit eb4e426c7c5d00155657cec288248bda88ee4a7e Author: Karel Zak Date: Wed Dec 6 13:56:28 2023 +0100 findmnt: add --list-columns Signed-off-by: Karel Zak bash-completion/findmnt | 1 + misc-utils/findmnt.8.adoc | 3 ++ misc-utils/findmnt.c | 104 +++++++++++++++++++++++++++++++--------------- 3 files changed, 74 insertions(+), 34 deletions(-) commit 4173496f497459fbfc8f2da1f4fd325406c88357 Author: Karel Zak Date: Wed Dec 6 13:25:20 2023 +0100 lslocks: improve --list-columns Signed-off-by: Karel Zak bash-completion/lslocks | 1 + misc-utils/lslocks.8.adoc | 2 +- misc-utils/lslocks.c | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) commit ed02618d5274a897ef668770fed4140089a40528 Author: Karel Zak Date: Wed Dec 6 13:19:34 2023 +0100 lsblk: add --list-columns Signed-off-by: Karel Zak bash-completion/lsblk | 1 + misc-utils/lsblk.8.adoc | 5 ++- misc-utils/lsblk.c | 81 ++++++++++++++++++++++++++++++++++--------------- 3 files changed, 62 insertions(+), 25 deletions(-) commit 717f267b75d79c1e94c31c76a3591df70b6a0fce Author: Karel Zak Date: Thu Dec 7 13:54:26 2023 +0100 unshare: make sure map_range.next is initialized [coverity scan] * initialize during declaration (if possible), unspecified fields defaults to zero in this case. * fix coverity warnings: CID 410290: Uninitialized variables (UNINIT) Using uninitialized value "mid". Field "mid.next" is uninitialized when calling "insert_map_range". CID 410289: Uninitialized variables (UNINIT) Using uninitialized value "hi". Field "hi.next" is uninitialized when calling "insert_map_range". CID 410288: Uninitialized variables (UNINIT) Using uninitialized value "lo". Field "lo.next" is uninitialized when calling "insert_map_range". Signed-off-by: Karel Zak sys-utils/unshare.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit a7c416994a7953e1c11d200e6bd51abfa745e448 Merge: fca008881 dfabda8bb Author: Karel Zak Date: Thu Dec 7 11:30:26 2023 +0100 Merge branch 'master' of https://github.com/mystuffs/util-linux * 'master' of https://github.com/mystuffs/util-linux: lscpu-cputype.c: assign value to multiple variables (ar->bit32 and ar->bit64) clang with -Wcomma will emit an warning of "misuse of comma operator". Since the value that will be assigned, is the same for both (bit32 and bit64), just assigning directly to both variables seems reasonable. commit fca0088812e9389f091f6851ac39524bbf58dedc Merge: a192bc1d7 ccd7d3dd7 Author: Karel Zak Date: Thu Dec 7 11:29:29 2023 +0100 Merge branch 'lslocks-issue-2624' of https://github.com/masatake/util-linux * 'lslocks-issue-2624' of https://github.com/masatake/util-linux: tests: (lslocks) add missing ts_finalize call commit a192bc1d7f67bf61b1302504125ce3ea6b5c3577 Merge: f5a81caf1 06507c72d Author: Karel Zak Date: Thu Dec 7 11:29:13 2023 +0100 Merge branch 'usr_etc' of https://github.com/schubi2/util-linux * 'usr_etc' of https://github.com/schubi2/util-linux: using libeconf for reading blkid.conf commit dfabda8bbcf1a7d7b5b435eaef470cc07f99bfe7 Merge: c6e4c15b9 f5a81caf1 Author: rilysh Date: Wed Dec 6 11:35:04 2023 -0500 Merge branch 'util-linux:master' into master commit ccd7d3dd78b66065b9feb20879e569e244cf7c18 Author: Masatake YAMATO Date: Thu Dec 7 00:05:34 2023 +0900 tests: (lslocks) add missing ts_finalize call Signed-off-by: Masatake YAMATO tests/ts/lslocks/lslocks | 2 ++ 1 file changed, 2 insertions(+) commit f5a81caf106d46ebf7f8eb2815f2de8c7febcf22 Author: Karel Zak Date: Wed Dec 6 12:37:10 2023 +0100 lsfd: cleanup --list-columns * remove dependence on command-line options order ("-H -J" vs. "-J -H") References: https://github.com/util-linux/util-linux/pull/2602 Signed-off-by: Karel Zak misc-utils/lsfd.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ff578e0a4001ec022f81334b4fb974e58a2ee5fa Author: Karel Zak Date: Wed Dec 6 12:26:39 2023 +0100 lslocks: cleanup --list-columns * remove "Available columns" from --help * remove dependence on command-line options order ("-H -J" vs. "-J -H") * remove global variable shadowing for 'raw' and 'json' * keep --list-columns in "help & version block" in usage() output References: https://github.com/util-linux/util-linux/pull/2602 Signed-off-by: Karel Zak misc-utils/lslocks.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 79d78a3312353d55974c1e92293a408a0ac3db9f Merge: 6016e40a0 06bb044c9 Author: Karel Zak Date: Wed Dec 6 11:59:37 2023 +0100 Merge branch 'list-columns-options' of https://github.com/masatake/util-linux * 'list-columns-options' of https://github.com/masatake/util-linux: lslocks: add -H option printing avaiable columns lslocks: (refactor) add a helper function returning JSON type for a given column lslocks: (fix) set JSON type for COL_SIZE even when --bytes is specified lsfd: use helper functions in column-list-table.h add helper functions for implementing -H/--list-columns option commit 06507c72d9aed1db204cf8802e2a9b35c45491d5 Author: Stefan Schubert Date: Fri Dec 1 18:33:12 2023 +0100 using libeconf for reading blkid.conf libblkid/meson.build | 2 +- libblkid/src/Makemodule.am | 3 ++ libblkid/src/config.c | 107 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 104 insertions(+), 8 deletions(-) commit 6016e40a08fc311ef9be9d1de6fc2bcef166a0ac Author: Karel Zak Date: Tue Dec 5 15:55:31 2023 +0100 github: add labeler For more details see https://github.com/actions/labeler Signed-off-by: Karel Zak .github/labeler.yml | 2 ++ .github/workflows/labeler.yml | 12 ++++++++++++ 2 files changed, 14 insertions(+) commit c6e4c15b9b4b20b51ae23c5e78f0ee68a895fd34 Author: rilysh Date: Wed Dec 6 00:21:27 2023 -0500 lscpu-cputype.c: assign value to multiple variables (ar->bit32 and ar->bit64) clang with -Wcomma will emit an warning of "misuse of comma operator". Since the value that will be assigned, is the same for both (bit32 and bit64), just assigning directly to both variables seems reasonable. Signed-off-by: rilysh sys-utils/lscpu-cputype.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5ad87d6ea2a212f0015b3ed28eecdbebdbcf43aa Merge: 32e729dcd 6240e4458 Author: Karel Zak Date: Tue Dec 5 13:52:03 2023 +0100 Merge branch 'fixes' of https://github.com/t-8ch/util-linux * 'fixes' of https://github.com/t-8ch/util-linux: build: use -std=c99 and -std=c++11 by default coverage.h: mark _exit as noreturn lsfd: switch to c99-conformant alignment specification blkdev.h: avoid some unused argument warnings m4: update pkg.m4 include/c.h: implement reallocarray libblkid: avoid use of non-standard typeof() meson: bump required version to 0.60.0 commit 32e729dcd321558bfaf74e1dedf75177aaca677a Merge: 224f29989 7b67193a5 Author: Karel Zak Date: Tue Dec 5 11:34:11 2023 +0100 Merge branch 'rename-basename' of https://github.com/t-8ch/util-linux * 'rename-basename' of https://github.com/t-8ch/util-linux: rename: properly handle directories with trailing slash commit 224f299896db3021e4761e5f8abf9f2ec1d74c47 Author: Samuel Thibault Date: Tue Dec 5 11:13:04 2023 +0100 libblkid: improve portability Signed-off-by: Karel Zak libblkid/src/probe.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4524f5d6b7d90684f2b205e472cd65a682d5fab5 Author: Goldwyn Rodrigues Date: Wed Nov 29 11:36:23 2023 -0600 tests: increase delay for waitpid test In some test executions on s390x, the waitpid test fails because 1 gets printed before 2. [ 557s] --- /home/abuild/rpmbuild/BUILD/util-linux-2.39.2/tests/expected/misc/waitpid-normal 2023-06-14 09:11:15.910887765 +0000 [ 557s] +++ /home/abuild/rpmbuild/BUILD/util-linux-2.39.2/tests/output/misc/waitpid-normal 2023-11-27 23:30:30.406675022 +0000 [ 557s] @@ -1,4 +1,4 @@ [ 557s] 3 [ 557s] -2 [ 557s] 1 [ 557s] +2 [ 557s] 4 Increase the time to print 1, so the test numbers are printed in expected order. Signed-off-by: Goldwyn Rodrigues tests/ts/misc/waitpid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a25ccda012a378c8e140b62e91fbd2d7f78c32f3 Merge: 6f7529a2a 4e1d7bf84 Author: Karel Zak Date: Tue Dec 5 11:09:38 2023 +0100 Merge branch 'PR/libmount-utab-external' of github.com:karelzak/util-linux-work * 'PR/libmount-utab-external' of github.com:karelzak/util-linux-work: tests: make mount/special more robust tests: add missing file and improve options-missing test libmount: test utab options after helper call libmount: add missing utab options after helper call libmount: add private mnt_optstr_get_missing() commit 6f7529a2a780bcf042bac570078f1127fcf862cc Merge: aa19e6dcf 22bef46c3 Author: Karel Zak Date: Tue Dec 5 11:08:57 2023 +0100 Merge branch 'unshare-maps' of https://github.com/arachsys-prs/util-linux * 'unshare-maps' of https://github.com/arachsys-prs/util-linux: unshare: Add --map-users=all and --map-groups=all unshare: Set uid and gid maps directly when run as root unshare: Support multiple ID ranges for user and group maps commit aa19e6dcf35e5f1750271b23e10a785850cd1a76 Merge: 641e65f15 2ee2f2821 Author: Karel Zak Date: Tue Dec 5 11:08:15 2023 +0100 Merge branch 'unblockable-kill' of https://github.com/arachsys-prs/util-linux * 'unblockable-kill' of https://github.com/arachsys-prs/util-linux: unshare: don't try to reset the disposition of SIGKILL commit 641e65f15785010a9b1b63cc6810d0a11a0e1cfc Merge: 7375b276e 77454e58d Author: Karel Zak Date: Tue Dec 5 11:06:57 2023 +0100 Merge branch 'kraj/basename' of https://github.com/kraj/util-linux * 'kraj/basename' of https://github.com/kraj/util-linux: login-utils: include libgen.h for basename API commit 7375b276e2fb0559c308d6a9646bdff556d62848 Merge: e8b7e9884 e118f8cd2 Author: Karel Zak Date: Tue Dec 5 11:01:25 2023 +0100 Merge branch 'audit-arch/alpha' of https://github.com/t-8ch/util-linux * 'audit-arch/alpha' of https://github.com/t-8ch/util-linux: audit-arch: add support for alpha commit e8b7e98844cc742857f044aa8ba6b791c5f99017 Merge: 608d4840f bbcb2b8be Author: Karel Zak Date: Tue Dec 5 10:51:43 2023 +0100 Merge branch 'libblkid/wipe-all' of https://github.com/t-8ch/util-linux * 'libblkid/wipe-all' of https://github.com/t-8ch/util-linux: libfdisk: use new blkid_wipe_all helper libblkid: introduce blkid_wipe_all commit 4e1d7bf84209e03ffe632f048fb8bbb1e6edacd4 Author: Karel Zak Date: Fri Dec 1 11:45:10 2023 +0100 tests: make mount/special more robust Signed-off-by: Karel Zak tests/ts/mount/special | 55 +++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 23 deletions(-) commit 7b67193a53209907f84a6253dcf3aceaf2eb8da1 Author: Thomas Weißschuh Date: Tue Dec 5 00:06:59 2023 +0100 rename: properly handle directories with trailing slash Instead of hand-rolling a basename() function use the standard one which provides the functionality that we want to use. Also add a testcase. Fixes #2569 Signed-off-by: Thomas Weißschuh misc-utils/rename.c | 8 ++------ tests/expected/rename/basic | 1 + tests/ts/rename/basic | 4 ++++ 3 files changed, 7 insertions(+), 6 deletions(-) commit 2ee2f2821b3d0b3779f62eb3b9aa817b844c94fd Author: Chris Webb Date: Mon Dec 4 18:15:14 2023 +0000 unshare: don't try to reset the disposition of SIGKILL If the child process is killed with SIGKILL, don't attempt to reset the disposition of SIGKILL (which can't be caught or ignored anyway) before self-signalling. This caused a misleading 'sigprocmask unblock failed' error instead of dying with the same SIGKILL status as the child. Fixes: https://github.com/util-linux/util-linux/issues/2614 Signed-off-by: Chris Webb sys-utils/unshare.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 77454e58d58f904cfdc02d3ca5bb65f1bd8739fc Author: Khem Raj Date: Sun Dec 3 19:59:46 2023 -0800 login-utils: include libgen.h for basename API musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler include libgen.h for using the posix declaration of the funciton. Fixes ../util-linux-2.39.2/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 847 | shell_basename = basename(shell); | ^ [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 Signed-off-by: Khem Raj login-utils/su-common.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 608d4840f8f191529108fc2bdc0dd3dcb4bb7ab8 Author: Karel Zak Date: Fri Dec 1 11:10:50 2023 +0100 libmount: fix fsconfig value unescaping Signed-off-by: Karel Zak libmount/src/hook_mount.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit e118f8cd204521b6b864bc1dc4148041eaafdcc3 Author: Thomas Weißschuh Date: Fri Dec 1 09:45:21 2023 +0100 audit-arch: add support for alpha Signed-off-by: Thomas Weißschuh include/audit-arch.h | 2 ++ 1 file changed, 2 insertions(+) commit 6240e4458cdf5a17c7b795def33b81cb5a987aed Author: Thomas Weißschuh Date: Thu Nov 30 23:24:37 2023 +0100 build: use -std=c99 and -std=c++11 by default Relying on the compiler default is problematic: * New constructs may be introduced accidentally that break backwards compatibility. * Older compilers may default to a more restricted standard than the codebase is actually developed with. Explicitly select C99 (and C++11 for the fuzzing part). Autotools does not want to default to C99, so set it explcitly during CI. Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.sh | 4 ++-- meson.build | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 7bf1f1090f9cdc18f775e0d65d713c1ecfcf6726 Author: Thomas Weißschuh Date: Fri Dec 1 08:59:22 2023 +0100 coverage.h: mark _exit as noreturn Otherwise the compiler may complain: ././include/coverage.h: In function ‘_coverage__exit’: ././include/coverage.h:22:1: error: ‘noreturn’ function does return [-Werror] 22 | } Signed-off-by: Thomas Weißschuh include/coverage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cde78d79352617e198305771405ca5053e24337 Author: Thomas Weißschuh Date: Fri Dec 1 08:54:36 2023 +0100 lsfd: switch to c99-conformant alignment specification While the new standard specifier is nicer, it's not compatible with C99. Signed-off-by: Thomas Weißschuh misc-utils/lsfd-sock-xinfo.c | 3 +-- misc-utils/lsfd-unkn.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 2dce92d00fe289a4d2e73aedba207fed617157c1 Author: Thomas Weißschuh Date: Fri Dec 1 08:07:50 2023 +0100 blkdev.h: avoid some unused argument warnings Signed-off-by: Thomas Weißschuh include/blkdev.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d88026e09de45c4fae05275f42405ec61dffcbe2 Author: Thomas Weißschuh Date: Fri Dec 1 08:07:06 2023 +0100 m4: update pkg.m4 configure.ac uses PKG_CHECK_VAR which needs a newer version of pkg.m4. Import the file from pkg-config 2.0.3. Signed-off-by: Thomas Weißschuh m4/pkg.m4 | 321 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 320 insertions(+), 1 deletion(-) commit 0322c9cdd78ce2dde2235c9351891aa54ddb4e12 Author: Thomas Weißschuh Date: Fri Sep 22 12:23:03 2023 +0200 include/c.h: implement reallocarray reallocarray() is not specified by any standard and may be missing from older versions of glibc. Fixes #2491 Signed-off-by: Thomas Weißschuh configure.ac | 1 + include/c.h | 13 +++++++++++++ meson.build | 1 + 3 files changed, 15 insertions(+) commit c81f7efc978aa384be7afb0b2ebefdb010e496a0 Author: Thomas Weißschuh Date: Thu Nov 30 23:26:27 2023 +0100 libblkid: avoid use of non-standard typeof() __typeof__ is also non-standard but it's obviously so and consistent with the rest of the codebase. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 6 +++--- libblkid/src/superblocks/zonefs.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit c12276dd3db693e67d8bab05934b8e963a507a50 Author: Thomas Weißschuh Date: Thu Nov 30 23:23:33 2023 +0100 meson: bump required version to 0.60.0 We already rely on 0.60.0 features: libsmartcols/meson.build:44: WARNING: Project targets '>=0.57.0' but uses feature introduced in '0.60.0': list.. The right hand operand was not a list. Signed-off-by: Thomas Weißschuh meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 201bc72ef7893d8215cb6065458360868a29c9c3 Author: Karel Zak Date: Thu Nov 30 10:25:45 2023 +0100 tests: add missing file and improve options-missing test * remove optional ID= field (not on systems without statx()) * add missing tests/expected/mount/special-missing-options * make sure utab is created * use udevadm settle to wait for systemd Signed-off-by: Karel Zak tests/expected/mount/special-missing-options | 1 + tests/ts/mount/special | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit af0c6e12a24c281bb827ba59aba476b771f2db8d Merge: 02d6e367e fbd1a5ef2 Author: Karel Zak Date: Thu Nov 30 11:28:21 2023 +0100 Merge branch 'ci/meson-werror' of https://github.com/t-8ch/util-linux * 'ci/meson-werror' of https://github.com/t-8ch/util-linux: ci: enable -Werror for meson commit 06bb044c90349f6449a4b06ca3278a46b210deea Author: Masatake YAMATO Date: Thu Nov 30 12:30:20 2023 +0900 lslocks: add -H option printing avaiable columns Signed-off-by: Masatake YAMATO misc-utils/lslocks.8.adoc | 3 +++ misc-utils/lslocks.c | 39 +++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-) commit 92660b8f0ba092cee457a60bbfc591a68e3aa862 Author: Masatake YAMATO Date: Thu Nov 30 11:41:11 2023 +0900 lslocks: (refactor) add a helper function returning JSON type for a given column Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit 02df3918dd75916df7b68a8d404a2c23f00b7978 Author: Masatake YAMATO Date: Thu Nov 30 11:56:31 2023 +0900 lslocks: (fix) set JSON type for COL_SIZE even when --bytes is specified Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0cd21cf68c1f16ab21baa273f507c1a9cf2bb0cb Author: Masatake YAMATO Date: Sat Nov 25 01:07:44 2023 +0900 lsfd: use helper functions in column-list-table.h With this change, the combination of "--json -H" works like: $ ./lsfd --json -H | head { "lsfd-columns": [ { "holder": "AINODECLASS", "type": "", "desc": "class of anonymous inode" },{ "holder": "ASSOC", "type": "", "desc": "association between file and process" ... Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit abccd63d8a32a5164899f4db4dcf1c8dc772e306 Author: Masatake YAMATO Date: Sat Nov 25 01:07:03 2023 +0900 add helper functions for implementing -H/--list-columns option Signed-off-by: Masatake YAMATO include/Makemodule.am | 1 + include/column-list-table.h | 88 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit 22bef46c3bdf70fcc5d68ef9623a9e420955d7f7 Author: Chris Webb Date: Thu Nov 23 14:06:02 2023 +0000 unshare: Add --map-users=all and --map-groups=all Accept the special value 'all' for --map-users and --map-groups, configuring a pass-through mapping of every user or group ID available in the parent user namespace. These are invaluable for scripting tests, for example when you want to remap users leaving groups unchanged, remap groups leaving users unchanged, or create a pass-through user namespace which maps the same users and groups as its parent but has no capabilities in that parent namespace. In the root user namespace, 'all' is equivalent to '0:0:4294967295', but in child namespaces it may represent a fragmented mapping corresponding to multiple --map-users or --map-groups options. Signed-off-by: Chris Webb sys-utils/unshare.1.adoc | 8 ++++---- sys-utils/unshare.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 4 deletions(-) commit cf22a0c56888aa902cd353c9f05d75f9c4d71245 Author: Chris Webb Date: Thu Nov 23 13:14:58 2023 +0000 unshare: Set uid and gid maps directly when run as root The newuidmap and newgidmap setuid helpers provided by shadow don't allow root to set up arbitrary mappings without explicit wildcard configuration in /etc/subuid and /etc/subgid, and are an unnecessary dependency when unshare is run privileged. ID-mapped mount already knows how to create uid/gid maps directly for new user namespaces, so teach unshare to do the same thing when run as root. Continue to use the setuid helpers when we are not sufficiently privileged to do the job ourselves. Signed-off-by: Chris Webb sys-utils/unshare.1.adoc | 4 ++-- sys-utils/unshare.c | 51 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 6 deletions(-) commit a212f1fc8319efa19e55686f31deb65372343a01 Author: Chris Webb Date: Thu Nov 23 12:24:58 2023 +0000 unshare: Support multiple ID ranges for user and group maps Accept multiple --map-users and --map-groups options to specify disjoint ID ranges to map inside a user namespace. This was already supported by mount --map-groups and --map-users, but paradoxically not by unshare itself. Factor out the hole-punching logic which removes single-ID mappings set with --map-user and --map-group from range mappings set with --map-users and --map-groups. add_single_map_range() now performs this fixup for every given range before prepending the single-ID mapping. Signed-off-by: Chris Webb sys-utils/unshare.1.adoc | 4 +- sys-utils/unshare.c | 274 +++++++++++++++++++++++++---------------------- 2 files changed, 149 insertions(+), 129 deletions(-) commit bbcb2b8bec02420acd55743860aba0a912e528a8 Author: Thomas Weißschuh Date: Wed Nov 29 19:51:49 2023 +0100 libfdisk: use new blkid_wipe_all helper Signed-off-by: Thomas Weißschuh libfdisk/src/wipe.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 0c92c65a9906088f6237d709c9a135751e9029a5 Author: Thomas Weißschuh Date: Wed Nov 29 19:51:37 2023 +0100 libblkid: introduce blkid_wipe_all This helper makes the common task of wiping all signatures easier. Fixes #2592 Signed-off-by: Thomas Weißschuh libblkid/docs/libblkid-sections.txt | 1 + libblkid/src/blkid.h.in | 2 ++ libblkid/src/libblkid.sym | 4 ++++ libblkid/src/probe.c | 42 +++++++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) commit 3a06bd68bbc3c19fe2f70e37b45704374f8b179c Author: Thomas Weißschuh Date: Wed Nov 29 19:15:47 2023 +0100 libmount: test utab options after helper call See #2607 Signed-off-by: Thomas Weißschuh tests/ts/mount/special | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 477401f0de404aafbc7630f70c2f8b1d670e32f8 Author: Karel Zak Date: Wed Nov 29 12:37:52 2023 +0100 libmount: add missing utab options after helper call libmount is able to add missing entry to /run/mount/utab after external /sbin/mouht. helper execution. This is not enough, it's possible that the helper write proper entry to the utab, but there is missing some options expected by libmount (usually because the options are irrelevant fro the helper. Reproducer: Create a stupid mount.foo which writes x-foo=123 to utab: # echo -e '#!/bin/bash\n\n/bin/mount -i "$1" "$2" -o x-foo=123' > /sbin/mount.foo # chmod +x /sbin/mount.foo Run mount which needs to write x-bar=BAR options to utab and executes the helper (due to "-t foo", /dev/sdc1 is ext4): # mount -t foo /dev/sdc1 /mnt/test -o x-bar=BAR old mount: # cat /run/mount/utab ID=121 SRC=/dev/sdc1 TARGET=/mnt/test ROOT=/ OPTS=x-foo=123 fixed mount: # cat /run/mount/utab ID=121 SRC=/dev/sdc1 TARGET=/mnt/test ROOT=/ OPTS=x-foo=123,x-bar=BAR Fixes: https://github.com/util-linux/util-linux/issues/2554 Signed-off-by: Karel Zak libmount/src/tab_update.c | 81 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 7 deletions(-) commit 722e4d47a9a21f09a6a719a0f510f29f12497ce5 Author: Karel Zak Date: Wed Nov 29 12:19:55 2023 +0100 libmount: add private mnt_optstr_get_missing() The function compares two options strings and returns options which are missing. Signed-off-by: Karel Zak libmount/src/mountP.h | 1 + libmount/src/optstr.c | 100 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 89 insertions(+), 12 deletions(-) commit 02d6e367ea140c43294155a73735afa205a6e4a9 Merge: c5d9cc4c7 b8ecc2d3e Author: Karel Zak Date: Wed Nov 29 09:39:41 2023 +0100 Merge branch 'chsh-getusershell' of https://github.com/thkukuk/util-linux * 'chsh-getusershell' of https://github.com/thkukuk/util-linux: chsh: use libeconf to read /etc/shells commit c5d9cc4c787b8e58f918c901ee5a92286bf891e8 Author: zuoqian Date: Wed Nov 29 02:57:52 2023 +0000 Add Phytium FTC310 & FTC664 support Signed-off-by: zuoqian sys-utils/lscpu-arm.c | 2 ++ 1 file changed, 2 insertions(+) commit b8ecc2d3ef8894f24c6c80835e4abb3e51d16893 Author: Thorsten Kukuk Date: Thu Nov 23 14:23:00 2023 +0100 chsh: use libeconf to read /etc/shells Signed-off-by: Thorsten Kukuk include/shells.h | 1 + lib/shells.c | 102 +++++++++++++++++++++++++++++++++++++---------------- login-utils/chsh.c | 14 +------- 3 files changed, 74 insertions(+), 43 deletions(-) commit f6c29efa929cb8c741591ab38061e7921d53a997 Author: Karel Zak Date: Tue Nov 28 14:40:48 2023 +0100 libmount: accept '\' as escape for options separator The libmount library can accept any characters as an option value when the value is quoted (e.g., foo="b,a,r"). However, overlayfs users have been using '\' as an escape character (e.g., lowerdir=foo\,bar). Although this escaping mechanism was never officially supported by libmount/mount, it worked for the old mount(2) API because it kept the options string unparsed for the mount(2) syscall. The introduction of the new mount API, which utilizes fsconfig(2) per option, has brought attention to this issue. This patch addresses the problem by introducing official support for '\' as an escape character for options separator. Suggested-by: Miklos Szeredi References: https://lore.kernel.org/all/CAOQ4uxhgUSPkYAV8SJu-SFszkJcVO3-M4DXf46nJUtXODrPk2g@mail.gmail.com/T/#ma8e6cfc1ce7229abc089e03eed99b23b90d701e5 Signed-off-by: Karel Zak lib/strutils.c | 2 +- libmount/src/hook_mount.c | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) commit 556dac801322edd60485bc45312523527d7e5fc2 Author: Junxiao Bi Date: Tue Nov 7 10:48:06 2023 -0800 losetup: report lost loop devices for finding free loop commit a6ca0456cc6d("loopdev: report lost loop devices") forgot to report lost loop device for finding free loop case. With this path, it will show the following if next free loop device is lost. # ./losetup -f /dev/loop1 (lost) # ./losetup -f /tmp/test.img lt-losetup: /tmp/test.img: failed to set up loop device: No such file or directory lt-losetup: device node /dev/loop1 (7:1) is lost. You may use mknod(1) to recover it. Signed-off-by: Junxiao Bi sys-utils/losetup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fbd1a5ef2806578f54ffe4b2f819029618555534 Author: Thomas Weißschuh Date: Fri Nov 24 11:38:12 2023 +0100 ci: enable -Werror for meson Now that all warnings have been eliminated from the meson build, make sure no new ones are introduced. Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa531311ab4d762afcd76f686350eeaacbe1a555 Merge: 7d530bfab ce870c06b Author: Karel Zak Date: Fri Nov 24 10:21:58 2023 +0100 Merge branch 'minor-changes-about-new-filter' of https://github.com/masatake/util-linux * 'minor-changes-about-new-filter' of https://github.com/masatake/util-linux: lsfd: (man) document --list-columns as the way to list columns lsfd: (man) refer to scols-filter(5) libsmartcols: (man) fix typos commit 7d530bfab4701b3db572f26e68c11ce30dc9d652 Merge: 445b88837 503b1faa8 Author: Karel Zak Date: Fri Nov 24 10:21:36 2023 +0100 Merge branch 'lslocks--co-holders' of https://github.com/masatake/util-linux * 'lslocks--co-holders' of https://github.com/masatake/util-linux: tests: (lslocks) add cases testing HOLDERS column tests: (cosmetic,lslocks) trim whitespaces at the end of line tests: (test_mkfds::make-regular-file) add a new parameter, "dupfd" lslocks: add HOLDERS column lslocks: store list_add_tail when storing information extracted from /proc/$pid/fdinfo/$fd tests: (test_mkfds) initialize a proper union member xalloc.h: add new functions: xstrappend, xstrputc, xstrvfappend, and xstrfappend lsfd: (refactor) make the code comparing struct lock objects reusable lslocks: add a missing "break;" in a switch/case statement lslocks: (preparation) add a fd number to the lock struct when loading lock info from /proc/$pid/fdinfo/$fd lslocks: (refactor) use a tree for storing lock information extracted from /proc/$pid/fdinfo/$fd lslocks: (refactor) make the data structure for storing lock information replacable commit 445b888375f70c8cf4030b8d945e561a140d048e Author: Karel Zak Date: Fri Nov 24 10:20:54 2023 +0100 libsmartcols: (filter) fix dereferences and leaks [coverity scann] Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 5 +++++ libsmartcols/src/filter-param.c | 19 ++++++++++++------- libsmartcols/src/filter-parser.y | 6 +++--- 3 files changed, 20 insertions(+), 10 deletions(-) commit ce870c06bd27ae0ce37abe1d5fa8e023900f3333 Author: Masatake YAMATO Date: Thu Nov 23 22:48:52 2023 +0900 lsfd: (man) document --list-columns as the way to list columns Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 699a1952c810d6359a6143076c2e78ec4d336097 Author: Masatake YAMATO Date: Thu Nov 23 22:41:38 2023 +0900 lsfd: (man) refer to scols-filter(5) Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 109 ++----------------------------------------------- 1 file changed, 3 insertions(+), 106 deletions(-) commit 885ad8175495955f68611f1f637fb682c457e0a4 Author: Masatake YAMATO Date: Thu Nov 23 22:36:26 2023 +0900 libsmartcols: (man) fix typos Signed-off-by: Masatake YAMATO libsmartcols/scols-filter.5.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 503b1faa8d52e4b59d4c261e0329f14a93149bea Author: Masatake YAMATO Date: Wed Nov 22 04:37:30 2023 +0900 tests: (lslocks) add cases testing HOLDERS column Signed-off-by: Masatake YAMATO tests/expected/lslocks/lslocks-flock-ex+HOLDERS | 2 ++ tests/expected/lslocks/lslocks-flock-sh+HOLDERS | 2 ++ tests/expected/lslocks/lslocks-lease-w+HOLDERS | 2 ++ tests/expected/lslocks/lslocks-ofd--w+HOLDERS | 2 ++ tests/expected/lslocks/lslocks-ofd-r-+HOLDERS | 2 ++ tests/expected/lslocks/lslocks-ofd-rw+HOLDERS | 3 ++ tests/ts/lslocks/lslocks | 37 ++++++++++++++++++++++++- 7 files changed, 49 insertions(+), 1 deletion(-) commit 59342d8933e6dba83debe3ab6446baadcd4ef9e5 Author: Masatake YAMATO Date: Thu Nov 23 22:29:41 2023 +0900 tests: (cosmetic,lslocks) trim whitespaces at the end of line Signed-off-by: Masatake YAMATO tests/ts/lslocks/lslocks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2580d2238d76a103dc1079dbe9cdd965d4deceed Author: Masatake YAMATO Date: Wed Nov 22 04:00:50 2023 +0900 tests: (test_mkfds::make-regular-file) add a new parameter, "dupfd" Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 72 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 13 deletions(-) commit 7edae94208d90a87c74037a03ba381613a68fcca Author: Masatake YAMATO Date: Wed Nov 22 03:58:51 2023 +0900 lslocks: add HOLDERS column Signed-off-by: Masatake YAMATO misc-utils/lslocks.8.adoc | 5 +++++ misc-utils/lslocks.c | 56 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 53 insertions(+), 8 deletions(-) commit 3ec6f464d146db2fc1eed80004ab52c854be33c2 Author: Masatake YAMATO Date: Wed Nov 22 04:30:59 2023 +0900 lslocks: store list_add_tail when storing information extracted from /proc/$pid/fdinfo/$fd Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df62a893c817d2fd2b608a4d173d36b032fd113e Author: Masatake YAMATO Date: Wed Nov 22 03:57:54 2023 +0900 tests: (test_mkfds) initialize a proper union member Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdd28aba63b6cebb92af221bcf41d2b5512fec43 Author: Masatake YAMATO Date: Tue Nov 21 22:19:29 2023 +0900 xalloc.h: add new functions: xstrappend, xstrputc, xstrvfappend, and xstrfappend Signed-off-by: Masatake YAMATO include/xalloc.h | 38 ++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.h | 38 -------------------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) commit d009501a84c22f4ca6a52e2acf0bb2cd1f31fed6 Author: Masatake YAMATO Date: Thu Nov 16 04:03:23 2023 +0900 lsfd: (refactor) make the code comparing struct lock objects reusable Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 6049dfe52835ce933cee3c59d78a11f41835cb50 Author: Masatake YAMATO Date: Wed Nov 15 19:45:53 2023 +0900 lslocks: add a missing "break;" in a switch/case statement Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 1 + 1 file changed, 1 insertion(+) commit b28481cd8a6921dfd7f80578bbae1ada103f1565 Author: Masatake YAMATO Date: Wed Nov 15 19:41:09 2023 +0900 lslocks: (preparation) add a fd number to the lock struct when loading lock info from /proc/$pid/fdinfo/$fd Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 751ca46e2c52fdd6ef2f5dfb0c5ac506ef8f9171 Author: Masatake YAMATO Date: Wed Nov 15 19:35:00 2023 +0900 lslocks: (refactor) use a tree for storing lock information extracted from /proc/$pid/fdinfo/$fd Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 8 deletions(-) commit ec1d83068ebd153d9891911a6bbf47d87df991b7 Author: Masatake YAMATO Date: Wed Nov 15 17:04:04 2023 +0900 lslocks: (refactor) make the data structure for storing lock information replacable Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 6a82643ad3ff237181b7e0fca1640282430625ca Merge: 3ffae0284 a5b0d0996 Author: Karel Zak Date: Thu Nov 23 12:51:38 2023 +0100 Merge branch 'PR/libsmartcols-filter' of github.com:karelzak/util-linux-work * 'PR/libsmartcols-filter' of github.com:karelzak/util-linux-work: (88 commits) meson: remove scols filter sample tests: use array keys in more robust way lsblk: update after rebase tests: add libsmartcols filter tests libsmartcols: (sample) fix error message tests: use scols_column_set_properties() in 'fromfile' sample libsmartcols: improve and fix scols_column_set_properties() libsmartcols: (samples) remove filter.c libsmartcols: add filter support to 'fromfile' sample libsmartcols: fix filter param copying tests: don't keep bison messages in tests autotools: use stamp file to build filter parser, improve portability meson: use bison --defines=HEADER libsmartcols: fix typo in parser tokens libsmartcols: add scols-filter.5 man page libsmartcols: (filter) add upper case EQ,NE,LE,LT,GT and GE operators ci: packit: add flex meson: fix copy & past error libsmartcols: build filter scanner and parser header files too meson: add missing scols sample ... commit 3ffae02846b1031f8632987b41ea86b9be82ca29 Merge: 007b88b60 65ca50801 Author: Karel Zak Date: Thu Nov 23 11:36:48 2023 +0100 Merge branch 'irqtop-fix-sort' of https://github.com/nbuwe/util-linux * 'irqtop-fix-sort' of https://github.com/nbuwe/util-linux: irqtop: fix numeric sorting commit a5b0d099627b915b5d5abcfd1d9bfd7a71059f34 Author: Karel Zak Date: Thu Nov 23 11:32:37 2023 +0100 meson: remove scols filter sample Signed-off-by: Karel Zak meson.build | 9 - po-man/cs.po | 5318 +++++++++++++++++++++++++------------------ po-man/de.po | 5528 +++++++++++++++++++++++++++------------------ po-man/es.po | 5415 ++++++++++++++++++++++++++------------------ po-man/fr.po | 5452 ++++++++++++++++++++++++++------------------ po-man/pt_BR.po | 5274 ++++++++++++++++++++++++------------------ po-man/sr.po | 5503 ++++++++++++++++++++++++++------------------ po-man/uk.po | 5463 ++++++++++++++++++++++++++------------------ po-man/util-linux-man.pot | 5196 ++++++++++++++++++++++++------------------ 9 files changed, 25515 insertions(+), 17643 deletions(-) commit c10f144a6deef274bfe2eaf3752192b03b1f9a55 Author: Karel Zak Date: Thu Nov 23 11:08:17 2023 +0100 tests: use array keys in more robust way Let's use while-loop to support arbitrary key and to avoid fragile quotes for strings . Signed-off-by: Karel Zak tests/ts/libsmartcols/filter | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 007b88b602a701147591449fa33ba954a16e8040 Merge: bf40dc09c 2a472ae89 Author: Karel Zak Date: Thu Nov 23 10:41:47 2023 +0100 Merge branch 'unused' of https://github.com/t-8ch/util-linux * 'unused' of https://github.com/t-8ch/util-linux: treewide: explicitly mark unused arguments commit bf40dc09c0e2cd8bf8eed1d503c372326f810bb7 Merge: 61c40f484 816109f6f Author: Karel Zak Date: Thu Nov 23 10:40:18 2023 +0100 Merge branch 'undefined' of https://github.com/t-8ch/util-linux * 'undefined' of https://github.com/t-8ch/util-linux: lsfd: avoid undefined behavior commit 61c40f484563881420e1606a27663aee930cbe53 Author: Karel Zak Date: Wed Nov 22 12:12:01 2023 +0100 lsblk: add hint that partition start is in sectors Reported-by: Dusty Mabe Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65ca5080159444e25b13e092678bf84164f9de6e Author: Valery Ushakov Date: Wed Nov 22 03:56:19 2023 +0300 irqtop: fix numeric sorting qsort(3) requires three-way result like that from strcmp(3), not an std::less like boolean. sys-utils/irq-common.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit bf9a7c5461861baead5265d8d61b654c2ad80944 Author: Karel Zak Date: Mon Nov 20 22:26:33 2023 +0100 lsblk: update after rebase Signed-off-by: Karel Zak misc-utils/lsblk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b208ed680c64198f2f19ba760fc5529671132d38 Author: Karel Zak Date: Mon Nov 20 22:15:31 2023 +0100 tests: add libsmartcols filter tests Signed-off-by: Karel Zak tests/expected/libsmartcols/filter | 1 + tests/expected/libsmartcols/filter-bool-and | 7 + tests/expected/libsmartcols/filter-bool-as-string | 2 + tests/expected/libsmartcols/filter-bool-as-string2 | 2 + tests/expected/libsmartcols/filter-bool-eq-false | 8 + tests/expected/libsmartcols/filter-bool-eq-false2 | 8 + tests/expected/libsmartcols/filter-bool-eq-false3 | 9 + tests/expected/libsmartcols/filter-bool-eq-true | 7 + tests/expected/libsmartcols/filter-bool-eq-true2 | 7 + tests/expected/libsmartcols/filter-bool-eq-true3 | 7 + tests/expected/libsmartcols/filter-bool-is | 7 + tests/expected/libsmartcols/filter-bool-ne | 7 + tests/expected/libsmartcols/filter-bool-ne2 | 8 + tests/expected/libsmartcols/filter-bool-neg | 9 + tests/expected/libsmartcols/filter-bool-or | 13 ++ .../expected/libsmartcols/filter-broken-bad-column | 4 + .../expected/libsmartcols/filter-broken-bad-float | 3 + .../expected/libsmartcols/filter-broken-bad-number | 3 + tests/expected/libsmartcols/filter-broken-bad-oper | 3 + .../expected/libsmartcols/filter-broken-bad-oper2 | 3 + tests/expected/libsmartcols/filter-broken-no-close | 3 + .../expected/libsmartcols/filter-broken-no-column | 3 + tests/expected/libsmartcols/filter-broken-no-param | 3 + tests/expected/libsmartcols/filter-broken-no-start | 3 + tests/expected/libsmartcols/filter-float-and | 12 ++ tests/expected/libsmartcols/filter-float-as-string | 4 + .../expected/libsmartcols/filter-float-as-string2 | 4 + tests/expected/libsmartcols/filter-float-eq | 4 + tests/expected/libsmartcols/filter-float-eq2 | 4 + tests/expected/libsmartcols/filter-float-ge | 11 + tests/expected/libsmartcols/filter-float-ge2 | 10 + tests/expected/libsmartcols/filter-float-gt | 6 + tests/expected/libsmartcols/filter-float-gt2 | 5 + tests/expected/libsmartcols/filter-float-is | 12 ++ tests/expected/libsmartcols/filter-float-le | 6 + tests/expected/libsmartcols/filter-float-le2 | 7 + tests/expected/libsmartcols/filter-float-lt | 5 + tests/expected/libsmartcols/filter-float-lt2 | 6 + tests/expected/libsmartcols/filter-float-ne | 12 ++ tests/expected/libsmartcols/filter-float-ne2 | 12 ++ tests/expected/libsmartcols/filter-float-neg | 4 + tests/expected/libsmartcols/filter-float-or | 13 ++ tests/expected/libsmartcols/filter-number-and | 12 ++ tests/expected/libsmartcols/filter-number-and-or | 7 + .../expected/libsmartcols/filter-number-as-string | 4 + tests/expected/libsmartcols/filter-number-eq | 4 + .../libsmartcols/filter-number-expr-and-expr | 7 + .../libsmartcols/filter-number-expr-or-expr | 5 + tests/expected/libsmartcols/filter-number-ge | 10 + tests/expected/libsmartcols/filter-number-gt | 7 + tests/expected/libsmartcols/filter-number-is | 12 ++ tests/expected/libsmartcols/filter-number-le | 7 + tests/expected/libsmartcols/filter-number-lt | 6 + tests/expected/libsmartcols/filter-number-ne | 12 ++ tests/expected/libsmartcols/filter-number-neg | 4 + tests/expected/libsmartcols/filter-number-or | 13 ++ tests/expected/libsmartcols/filter-string-eq | 4 + tests/expected/libsmartcols/filter-string-ge | 12 ++ tests/expected/libsmartcols/filter-string-gt | 11 + tests/expected/libsmartcols/filter-string-is | 13 ++ tests/expected/libsmartcols/filter-string-le | 5 + tests/expected/libsmartcols/filter-string-lt | 4 + tests/expected/libsmartcols/filter-string-ne | 12 ++ tests/expected/libsmartcols/filter-string-neg | 2 + tests/expected/libsmartcols/filter-string-nreg | 12 ++ tests/expected/libsmartcols/filter-string-reg | 4 + tests/ts/libsmartcols/files/col-bool | 1 + tests/ts/libsmartcols/files/col-float | 1 + tests/ts/libsmartcols/files/data-bool | 10 + tests/ts/libsmartcols/files/data-float | 10 + tests/ts/libsmartcols/filter | 222 +++++++++++++++++++++ 71 files changed, 700 insertions(+) commit 7f15d8e22c120f823c2a3c974f411fac64d5c9d0 Author: Karel Zak Date: Mon Nov 20 22:14:39 2023 +0100 libsmartcols: (sample) fix error message Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 762298be2ca78ddbf3fa02de8c41ab3fcffaca85 Author: Karel Zak Date: Mon Nov 20 14:58:08 2023 +0100 tests: use scols_column_set_properties() in 'fromfile' sample The library already can read column properties from a column separated string. Let's use it in 'fromfile' sample to avoid duplicate code and to test this function too. Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 121 +++---------------------- tests/expected/libsmartcols/fromfile-tree-json | 20 ++-- tests/ts/libsmartcols/files/col-hidden | 4 +- tests/ts/libsmartcols/files/col-id | 4 +- tests/ts/libsmartcols/files/col-name | 4 +- tests/ts/libsmartcols/files/col-noextremes | 4 +- tests/ts/libsmartcols/files/col-number | 4 +- tests/ts/libsmartcols/files/col-parent | 4 +- tests/ts/libsmartcols/files/col-strict | 4 +- tests/ts/libsmartcols/files/col-string | 4 +- tests/ts/libsmartcols/files/col-tree | 4 +- tests/ts/libsmartcols/files/col-trunc | 4 +- tests/ts/libsmartcols/files/col-wrap | 4 +- tests/ts/libsmartcols/files/col-wrapnl | 4 +- tests/ts/libsmartcols/files/col-wrapzero | 4 +- 15 files changed, 35 insertions(+), 158 deletions(-) commit 8abcb04dab6314782e649b81a130e418affb7790 Author: Karel Zak Date: Mon Nov 20 14:56:58 2023 +0100 libsmartcols: improve and fix scols_column_set_properties() * fix typos and copy & past bug * add support for data types Signed-off-by: Karel Zak libsmartcols/src/column.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit ab1afb38acb44dcfcf44f7d0582125dc4005a997 Author: Karel Zak Date: Mon Nov 20 12:53:56 2023 +0100 libsmartcols: (samples) remove filter.c It seems better to use fromfile.c sample where we do not have hardcoded table data, but it's possible to use data from files (see tests/ts/libsmartcols/files) as already used in in our tests. Signed-off-by: Karel Zak libsmartcols/samples/Makemodule.am | 5 - libsmartcols/samples/filter.c | 217 ------------------------------------- 2 files changed, 222 deletions(-) commit 4e00fad3d5f4f4aef4d7fa83346b3509947d3562 Author: Karel Zak Date: Mon Nov 20 12:38:43 2023 +0100 libsmartcols: add filter support to 'fromfile' sample Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 97 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) commit 7a854a68f0695fde6c1418b2bccb93ad7962ba18 Author: Karel Zak Date: Mon Nov 20 12:36:39 2023 +0100 libsmartcols: fix filter param copying Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 76b9791ef73bcaafa9d4912e16d0eb4a8d7ebba4 Author: Karel Zak Date: Tue Nov 14 09:31:31 2023 +0100 tests: don't keep bison messages in tests Bison generates the 'syntax error' messages and depends on the Bison version. For example, the current bison uses lsfd: failed to parse "(": syntax error, unexpected end of file But the old version: lsfd: failed to parse "(": syntax error, unexpected $end We do not control these strings, so it's better not to save them to our tests. Signed-off-by: Karel Zak tests/expected/lsfd/filter-broken-exp | 6 +++--- tests/ts/lsfd/filter-broken-exp | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 55a460055204047a196efdc2826b3493ee0b6194 Author: Karel Zak Date: Mon Nov 13 14:16:03 2023 +0100 autotools: use stamp file to build filter parser, improve portability * use .stamp files to generate .c and .h by only one flex and bison call * use bison --defines=HEADER rather than --header=, the --header is supported also by old bison version (like common bison 3.0.4) * make sure there is defined dependence between the scanner and parser .c and .h files (scanner need header from parser and vice-versa) * distribute .stamp files to avoid flex and bison for people who use sources from tarball (we distribute generated source files) Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 46 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) commit c4555b426dbaf13360a2b926bca107ed1f3abd0d Author: Karel Zak Date: Mon Nov 13 14:12:07 2023 +0100 meson: use bison --defines=HEADER It's more backwardly compatible than --header=. Signed-off-by: Karel Zak libsmartcols/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c248bd02057b4051afd6fbdfdf94f9457515822 Author: Karel Zak Date: Wed Nov 8 12:33:25 2023 +0100 libsmartcols: fix typo in parser tokens Signed-off-by: Karel Zak libsmartcols/src/filter-scanner.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da12f19176e4bd7d80bf087f0cf29243c1492c4d Author: Karel Zak Date: Wed Nov 8 11:56:22 2023 +0100 libsmartcols: add scols-filter.5 man page Signed-off-by: Karel Zak libsmartcols/Makemodule.am | 3 + libsmartcols/scols-filter.5.adoc | 121 +++++++++++++++++++++++++++++++++++++++ libsmartcols/src/.gitignore | 2 + 3 files changed, 126 insertions(+) commit d17f7c2fa5efe433d4eb145db90f420b09e98f79 Author: Karel Zak Date: Wed Nov 8 11:42:11 2023 +0100 libsmartcols: (filter) add upper case EQ,NE,LE,LT,GT and GE operators Signed-off-by: Karel Zak libsmartcols/src/filter-scanner.l | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit dde0829c46d2d057a60d4c14ebda7d8ae20f5543 Author: Karel Zak Date: Mon Nov 6 22:34:49 2023 +0100 ci: packit: add flex Signed-off-by: Karel Zak .packit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 665304869c49d1d666b3c89d8633c2281f0ad03a Author: Karel Zak Date: Mon Nov 6 22:16:47 2023 +0100 meson: fix copy & past error Signed-off-by: Karel Zak libsmartcols/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf4f9ec8f2f8e336ff8295db5f0f285093a895aa Author: Karel Zak Date: Mon Nov 6 21:45:10 2023 +0100 libsmartcols: build filter scanner and parser header files too * if .c and .h generated in the same time then bison does not duplicate declarations from .h in .c * it seems better to generate everything and exclude header files from git * the patch excludes autotools YACC support, we need reentrant parser with some cool features from bison; autotools assumes POSIX compatibility for YACC (bison -y), we do not need it. Signed-off-by: Karel Zak configure.ac | 6 +- libsmartcols/meson.build | 8 +- libsmartcols/src/Makemodule.am | 22 +- libsmartcols/src/filter-parser.h | 127 ---------- libsmartcols/src/filter-parser.y | 6 +- libsmartcols/src/filter-scanner.h | 505 -------------------------------------- libsmartcols/src/filter-scanner.l | 1 + libsmartcols/src/filter.c | 4 - 8 files changed, 23 insertions(+), 656 deletions(-) commit 206c1e452a6cd3377ff8b18eb099bde56e0783f7 Author: Karel Zak Date: Mon Nov 6 21:44:09 2023 +0100 meson: add missing scols sample Signed-off-by: Karel Zak meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) commit 90683b1a344893e6b157212b1335dc6b7dbf7f84 Author: Karel Zak Date: Fri Nov 3 09:30:38 2023 +0100 github: fix build with clang and in ubuntu build-root Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 2 ++ libsmartcols/src/filter-parser.y | 7 +++++++ 2 files changed, 9 insertions(+) commit 7b9da71c46df4b316123000711d4ce39c494745e Author: Karel Zak Date: Thu Nov 2 14:17:33 2023 +0100 tests: update lsfd broken filter test * empty filter is valid in the new implementation * expression without operators (for example -Q 'FD') is valid. The library check is the cell is non-empty in this case. * update error messages Signed-off-by: Karel Zak tests/expected/lsfd/filter-broken-exp | 9 +++------ tests/ts/lsfd/filter-broken-exp | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) commit 454349a2128c072d7f9f72173f4fe8d9208a771d Author: Karel Zak Date: Thu Nov 2 14:11:22 2023 +0100 libsmartcols: improve parser error messages * remove T_ prefix for tokens in error message (the error message is generated by bison) * use rename T_NAME to T_HOLDER to be consistent with library API Signed-off-by: Karel Zak libsmartcols/src/filter-parser.h | 4 ++-- libsmartcols/src/filter-parser.y | 13 +++++++++++-- libsmartcols/src/filter-scanner.l | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) commit 7a9af89f2d1fe999cf89edc890ece16494fb256f Author: Karel Zak Date: Thu Nov 2 13:44:32 2023 +0100 libsmartcols: prefer float in filter expression Reported-by: Masatake YAMATO Addresses: https://github.com/util-linux/util-linux/pull/2531#discussion_r1373797202 Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bdc89612c27a63395e9573457bcdca1fe741f327 Author: Karel Zak Date: Thu Nov 2 13:22:00 2023 +0100 lsfd: use SCOLS_JSON_FLOAT * use a new SCOLS_JSON_FLOAT * add "float" to the columns description * add space before '?' operator Reported-by: Masatake YAMATO Addresses: https://github.com/util-linux/util-linux/pull/2531#issuecomment-1780164195 Signed-off-by: Karel Zak misc-utils/lsfd.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit f2174749cc8d20c943809e9c0614b4a88cdf8997 Author: Karel Zak Date: Thu Nov 2 13:18:08 2023 +0100 libsmartcols: fix filter parser initialization Addresses: https://github.com/util-linux/util-linux/pull/2531#discussion_r1372360666 Reported-by: Masatake YAMATO Signed-off-by: Karel Zak libsmartcols/src/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53bcec4b25a60c125403a80a18ca3aacf1dc8269 Author: Karel Zak Date: Thu Nov 2 12:42:55 2023 +0100 lsfd: fix memory leak in append_filter_expr() Signed-off-by: Karel Zak misc-utils/lsfd.c | 2 ++ 1 file changed, 2 insertions(+) commit 8eebca514a0b42f39eec8ddea7f881ccb442c43d Author: Karel Zak Date: Tue Oct 31 12:56:21 2023 +0100 libsmartcols: accept also '/' in column name for filters Signed-off-by: Karel Zak libsmartcols/src/filter-scanner.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f9e9e5e9bcc4248ca135b8968321ff020b48d64 Author: Karel Zak Date: Tue Oct 31 12:47:10 2023 +0100 libsmartcols: accept '%:-' in column name for filters Signed-off-by: Karel Zak libsmartcols/src/filter-scanner.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1aca49899f6ce97b3c73b2393e7dbab63dd62aff Author: Karel Zak Date: Tue Oct 31 12:44:36 2023 +0100 lsblk: make sure all line data are deallocated Signed-off-by: Karel Zak misc-utils/lsblk.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 2b0a221ddbb109d41b2d4d0bf95b280f11234b41 Author: Karel Zak Date: Fri Oct 27 13:12:07 2023 +0200 libsmartcols: add filter API docs Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-docs.xml | 13 ++ libsmartcols/docs/libsmartcols-sections.txt | 29 ++++ libsmartcols/src/column.c | 4 +- libsmartcols/src/filter-param.c | 19 ++- libsmartcols/src/filter.c | 196 ++++++++++++++++++++++++++++ 5 files changed, 259 insertions(+), 2 deletions(-) commit b0df377d4c996c69381115872c915e05db1f401b Author: Karel Zak Date: Fri Oct 27 11:58:00 2023 +0200 libsmartcols: cleanup datafunc() API Signed-off-by: Karel Zak libsmartcols/src/column.c | 23 ++++++++++++++--------- libsmartcols/src/filter-param.c | 2 +- libsmartcols/src/libsmartcols.h.in | 4 ++-- libsmartcols/src/libsmartcols.sym | 4 ++-- misc-utils/lsblk.c | 8 ++++---- 5 files changed, 23 insertions(+), 18 deletions(-) commit 429b5840348918a08a79fb5646f1933b790bb26e Author: Karel Zak Date: Fri Oct 27 11:42:15 2023 +0200 libsmartcols: don't directly access struct members Signed-off-by: Karel Zak libsmartcols/src/column.c | 8 ++++---- libsmartcols/src/filter-param.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 7de6a8a91448c9bffdd3370a9884d6c4771de4f3 Author: Karel Zak Date: Wed Oct 25 12:25:37 2023 +0200 lsblk: ignore duplicate lines for counters Signed-off-by: Karel Zak misc-utils/lsblk.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 56aad5a88467f3388e5559e717de5b64160478d7 Author: Karel Zak Date: Mon Oct 23 22:34:18 2023 +0200 libsmartcols: (filter) normalize param strings Let's ignore space at the beginning and end of the string. It's possible that filling functions in applications use extra space to align data in columns. We need to ignore it. Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 4 ++++ libsmartcols/src/filter.c | 2 ++ 2 files changed, 6 insertions(+) commit b2da3f00a480622af5697d54aaa97d2c41c2c20a Author: Karel Zak Date: Mon Oct 9 13:58:53 2023 +0200 libsmartcols: (filter) cleanup __filter_new_node() Reported-by: Thomas Weißschuh Signed-off-by: Karel Zak libsmartcols/src/filter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3831d65311df28d9411607d78bd1a8f182c4505a Author: Karel Zak Date: Mon Oct 9 13:56:24 2023 +0200 libsmartcols: (filter) fix regex deallocation Reported-by: Thomas Weißschuh Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 1 + 1 file changed, 1 insertion(+) commit 722aea1e0fbe4bf2fbb0ca8eec60961ed8d1bd3e Author: Karel Zak Date: Mon Oct 9 13:41:06 2023 +0200 libsmartcols: (filter) use also rpmatch() for boolean Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b78339f874798a73d0780ac3862253162512d0f5 Author: Karel Zak Date: Mon Oct 9 13:21:45 2023 +0200 libsmartcols: (filter) improve holder use Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 7db7ea29e1d701844bd6d57d591c0a37dcfd30fd Author: Karel Zak Date: Thu Oct 5 20:21:20 2023 +0200 libsmartcols: (filter) support period in identifier Signed-off-by: Karel Zak libsmartcols/src/filter-scanner.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8f945e4543b58ba38585cd6dc60e8d6a8dd0e50 Author: Karel Zak Date: Thu Oct 5 20:09:15 2023 +0200 lsfd: keep filter-only columns hidden Signed-off-by: Karel Zak misc-utils/lsfd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a4eeda562106a6160bd427457e229cb412416ed4 Author: Karel Zak Date: Wed Oct 4 18:42:44 2023 +0200 meson: update for libsmartcols filter Signed-off-by: Karel Zak libsmartcols/meson.build | 19 ++++++++++++++++++- meson.build | 6 +++--- misc-utils/meson.build | 4 ---- 3 files changed, 21 insertions(+), 8 deletions(-) commit 32ae0cd29ab456404041b9c58c61b84c99a13651 Author: Karel Zak Date: Wed Oct 4 17:26:16 2023 +0200 libsmartcols: (filter) improve holder status Split "fetched" and "empty" filter param status. Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 46eca86e0aaeeac724e9d298998bf71c082817ae Author: Karel Zak Date: Mon Oct 2 19:52:40 2023 +0200 lsfd: use filter and counters from libsmartcols Signed-off-by: Karel Zak misc-utils/Makemodule.am | 4 - misc-utils/lsfd-counter.c | 56 -- misc-utils/lsfd-counter.h | 30 - misc-utils/lsfd-filter.c | 1499 --------------------------------------------- misc-utils/lsfd-filter.h | 43 -- misc-utils/lsfd.c | 235 ++++--- 6 files changed, 149 insertions(+), 1718 deletions(-) commit 01d24f7387fe01971130a075c3188ffd1c33ab88 Author: Karel Zak Date: Mon Oct 2 19:41:26 2023 +0200 libsmartcols: accept apostrophe as quote for strings in filter lsfd supports "abc" as well as 'abc'. Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 21 +++++++++++++-------- libsmartcols/src/filter-scanner.h | 2 +- libsmartcols/src/filter-scanner.l | 5 +++-- 3 files changed, 17 insertions(+), 11 deletions(-) commit 15a07bc71e11d1c8ecd91ef67a61fb49b4a6e762 Author: Karel Zak Date: Mon Oct 2 18:19:00 2023 +0200 lsblk: report all unknown columns in filter Signed-off-by: Karel Zak misc-utils/lsblk.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit af5fa636b3910058242f1aa36868b54d2c821dd4 Author: Karel Zak Date: Wed Sep 27 14:14:44 2023 +0200 lsblk: define cell data-types, use raw data for SIZEs Signed-off-by: Karel Zak misc-utils/lsblk.c | 80 ++++++++++++++++++++++++++++++++++++++++-------------- misc-utils/lsblk.h | 1 + 2 files changed, 60 insertions(+), 21 deletions(-) commit 98c12238b3194cadd6eb0df5704f32903f611cdc Author: Karel Zak Date: Wed Sep 27 14:00:38 2023 +0200 libsmartcols: introduce column type Now the column can define JSON-type, this commit introduces data-type. This type is hint for filters and counters how to convert strings from cells to raw data. If the conversion from string is not possible, then application can define callback for this purpose (aka. "datafunc"), this function has to return the raw data as a void pointer. This solution allows to use human readable things in cells (e.g. "123MiB"), but filters and counters can still use the original data. Signed-off-by: Karel Zak libsmartcols/src/column.c | 77 ++++++++++++++++++++++++++++++++++++++ libsmartcols/src/filter-param.c | 57 ++++++++++++++++++---------- libsmartcols/src/libsmartcols.h.in | 10 +++++ libsmartcols/src/libsmartcols.sym | 4 ++ libsmartcols/src/smartcolsP.h | 6 +++ 5 files changed, 134 insertions(+), 20 deletions(-) commit ba1caa68a0eafefe8656c6acb7c57decef8575fd Author: Karel Zak Date: Wed Sep 27 12:47:15 2023 +0200 libsmartcols: Export internally used types to API We anticipate a need for improved interaction between applications and the library in certain scenarios. For instance, when a table contains strings that cannot be readily converted from strings to numbers (e.g., strings like "15.3MiB") but the application possesses data in a more suitable format. Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 18 ++--- libsmartcols/src/filter-param.c | 147 ++++++++++++++++++------------------- libsmartcols/src/filter-parser.y | 12 +-- libsmartcols/src/filter.c | 2 +- libsmartcols/src/libsmartcols.h.in | 11 +++ libsmartcols/src/smartcolsP.h | 15 +--- 6 files changed, 101 insertions(+), 104 deletions(-) commit b816c845b6cdc87f90aea17339e029536713c70c Author: Karel Zak Date: Wed Sep 27 11:26:23 2023 +0200 lsblk: rename sortdata to rawdata We can use the data for another purpose too. Signed-off-by: Karel Zak misc-utils/lsblk.c | 110 ++++++++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) commit f7c9b28ad5e836368f1f035dbfafcd8f48b1ae5e Author: Karel Zak Date: Tue Sep 26 14:51:34 2023 +0200 lsblk: always set column type Signed-off-by: Karel Zak misc-utils/lsblk.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit 30edd8e1eb20fa8a2e16e371ad48ed866b0e5458 Author: Karel Zak Date: Tue Sep 26 14:45:13 2023 +0200 lsblk: support normalized column names on command line For example column name "LOG-SEC" is possible to use as LOG_SEC in some output formats and in filter expressions. Signed-off-by: Karel Zak misc-utils/lsblk.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 8aeb57b1d85be29a0ae00870cab6074526d8d83f Author: Karel Zak Date: Tue Sep 26 14:44:02 2023 +0200 libsmartcols: search also by normalized column names (aka 'shellvar' name) Signed-off-by: Karel Zak libsmartcols/src/column.c | 77 +++++++++++++++++++++++++++----------- libsmartcols/src/filter-param.c | 3 +- libsmartcols/src/libsmartcols.h.in | 1 + libsmartcols/src/libsmartcols.sym | 1 + libsmartcols/src/table.c | 9 +++++ 5 files changed, 68 insertions(+), 23 deletions(-) commit d2e43c6b39956a9f5f659feb3932416842c5c1c6 Author: Karel Zak Date: Tue Sep 26 13:18:42 2023 +0200 libsmartcols: make sure counter is initialized Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 9 +++++++-- libsmartcols/src/smartcolsP.h | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) commit 0398951e877cede5543dcbc23704a2cf9a93beaa Author: Karel Zak Date: Tue Sep 26 12:52:32 2023 +0200 lsblk: add scols counters support * add --ct-filter to restrict the next next counters * add --ct [::func] to define counter. The counter assigned to the previously specified filter, if no filter specified then it's applied to all output lines. Examples: $ lsblk --ct "number of block devices" ... Summary: 21 number of block devices The filter uses default count() function and is applied to all lines. $ lsblk --ct-filter 'TRAN=="nvme"' --ct "number of NVMEs" ... Summary: 4 number of NVMEs The filter is restricted by filter. $ lsblk --bytes --ct-filter 'TRAN=="sata" && TYPE=="disk"' --ct "size of all SATAs disks":SIZE:sum ... Summary: 320083771392 size of all SATAs disks The counter uses sum() built-in function for specified column (SIZE) and is restricted by filter. Signed-off-by: Karel Zak misc-utils/lsblk.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++-- misc-utils/lsblk.h | 3 ++ 2 files changed, 125 insertions(+), 4 deletions(-) commit 3aeacd6a47df358da0b945496e5e29c5063aca4d Author: Karel Zak Date: Tue Sep 26 12:43:01 2023 +0200 libsmartcols: implement filter based counters * add support for empty filter; the result of the empty expression is always "true" * Filter can hold arbitrary number of counters * A counter is based on a built-in function. Now supported are count, max, min and sum functions. * The default function is "count" (count lines) * It's possible to assign column (param) to the counter, for example count sum of all data in the column * The param is used in the same way as params in the filter (and initialized in the same way) Based on Masatake YAMATO's work on lsfd. Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 45 +++++++++++++ libsmartcols/src/filter.c | 132 +++++++++++++++++++++++++++++++++++-- libsmartcols/src/libsmartcols.h.in | 26 ++++++++ libsmartcols/src/libsmartcols.sym | 7 ++ libsmartcols/src/smartcolsP.h | 17 +++++ 5 files changed, 223 insertions(+), 4 deletions(-) commit 9f55de7896fa8580fdaf496c93c7839fad45dbb5 Author: Karel Zak Date: Tue Sep 26 10:17:22 2023 +0200 lsblk: split filter allocation and initialization A small refactoring to parse filters during getopt_long() time. Signed-off-by: Karel Zak misc-utils/lsblk.c | 44 +++++++++++++++++++++++--------------------- misc-utils/lsblk.h | 4 ++-- 2 files changed, 25 insertions(+), 23 deletions(-) commit c4b7821456f1645f4caf015c2e82a37af5f6bdfa Author: Karel Zak Date: Mon Sep 25 13:19:49 2023 +0200 lsblk: fix in-tree filtering The function device_to_scols() is used recursively (for children). It's impossible leave the function on filter status=false, it's necessary to continue in the tree. Signed-off-by: Karel Zak misc-utils/lsblk.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c3317cdc76f348910baa48cb397f361cdbd766ea Author: Karel Zak Date: Wed Sep 20 14:34:09 2023 +0200 lsblk: add --highlight The new option can colorize lines specified by scols query. The columns (in the expression) does not have to be in the output. Signed-off-by: Karel Zak meson.build | 1 + misc-utils/Makemodule.am | 3 ++- misc-utils/lsblk.c | 26 ++++++++++++++++++++++++-- misc-utils/lsblk.h | 2 ++ 4 files changed, 29 insertions(+), 3 deletions(-) commit 3e0b4a827db10327eea16fff62e466692f9106b8 Author: Karel Zak Date: Wed Sep 20 14:07:39 2023 +0200 lsblk: add --filter Signed-off-by: Karel Zak misc-utils/lsblk.c | 169 +++++++++++++++++++++++++++++++++++++++++++---------- misc-utils/lsblk.h | 1 + 2 files changed, 138 insertions(+), 32 deletions(-) commit 58b6bd7137dcff608e90db52da077d4940fa482f Author: Karel Zak Date: Wed Sep 20 13:47:43 2023 +0200 libsmartcols: (filter) Add on-demand data filler When dealing with really large data sets, we need to reduce overhead by filtering out unnecessary lines. The traditional approach, using: lstool | grep requires the tool to read all data from the system and then filter out (and throw away) a lot of data. The filter-filler now allows us to use an empty line. The filter will request data through a callback, and when a line passes the filter, the application can fill in the rest of the columns. For example, in a query like "FOO > 10 && BAR < 10," libsmartcols will never ask for "BAR" if "FOO" is smaller than 10. This means the application doesn't have to gather additional columns. Signed-off-by: Karel Zak libsmartcols/src/cell.c | 2 ++ libsmartcols/src/filter-param.c | 6 ++++++ libsmartcols/src/filter.c | 13 +++++++++++++ libsmartcols/src/libsmartcols.h.in | 5 +++++ libsmartcols/src/libsmartcols.sym | 2 ++ libsmartcols/src/line.c | 14 ++++++++++++++ libsmartcols/src/smartcolsP.h | 6 +++++- 7 files changed, 47 insertions(+), 1 deletion(-) commit 1db278f95fdc4916a57f038a60e0ef980a1eb57e Author: Karel Zak Date: Tue Sep 19 11:15:15 2023 +0200 libsmartcols: Add --highlight option to filter sample This commit demonstrates another example of how to use the filter. It also enables testing of two filters for the same table to ensure that Bison and Flex generate a reentrant parser. Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 122 ++++++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 45 deletions(-) commit 408ae150a6a170708e2f678c594f415dd83eb65e Author: Karel Zak Date: Thu Sep 14 11:55:03 2023 +0200 libsmartcols: (filter) add regular expression operators Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 3 +-- libsmartcols/src/filter-param.c | 45 ++++++++++++++++++++++++++++++++++++++-- libsmartcols/src/filter-parser.y | 18 +++++++++++++--- libsmartcols/src/smartcolsP.h | 2 +- 4 files changed, 60 insertions(+), 8 deletions(-) commit 778981eea339a8fa5c09feb57ca252ccc867eb99 Author: Karel Zak Date: Wed Sep 13 13:06:06 2023 +0200 libsmartcols: (filter) move struct filter_param Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 6 +-- libsmartcols/src/filter-param.c | 103 ++++++++++++++++++++++++++++++++++++++-- libsmartcols/src/filter.c | 73 +--------------------------- libsmartcols/src/smartcolsP.h | 26 ++-------- 4 files changed, 107 insertions(+), 101 deletions(-) commit b1e8c6e1373c8b8f1b8e9b3c5e40f7672ec5bb97 Author: Karel Zak Date: Wed Sep 13 12:54:18 2023 +0200 libsmartcols: (filter) move struct filter_expr Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 8 ++++++++ libsmartcols/src/smartcolsP.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 04b1132b2b0b8eff300ad3c7fa5f576f0bc64d7a Author: Karel Zak Date: Wed Sep 13 11:59:13 2023 +0200 libsmartcols: (filter) support empty values Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 39 ++++++++++++++------------ libsmartcols/src/filter-param.c | 61 ++++++++++++++++++++++++----------------- 2 files changed, 58 insertions(+), 42 deletions(-) commit d2cb7328ffc0ae0a22c72c0305e1cc819aa54c16 Author: Karel Zak Date: Wed Sep 13 11:28:36 2023 +0200 libsmartcols: (filter) improve scols_filter_assign_column() * make it more usable with scols_filter_next_holder() and avoid name * make it usable with only with name * fix return codes Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 2 +- libsmartcols/src/filter.c | 49 ++++++++++++++++++++++++++++++-------- libsmartcols/src/libsmartcols.h.in | 1 + 3 files changed, 41 insertions(+), 11 deletions(-) commit 477655d32033623ded334ca4cff57c9b1a51020a Author: Karel Zak Date: Tue Sep 12 21:16:37 2023 +0200 libsmartcols: support SCOLS_JSON_FLOAT in print API Signed-off-by: Karel Zak libsmartcols/src/column.c | 2 ++ libsmartcols/src/print.c | 1 + 2 files changed, 3 insertions(+) commit ea36de1223698ea16f1f5f70fba77eff63a39312 Author: Karel Zak Date: Tue Sep 12 14:22:40 2023 +0200 libsmartcols: (filter) add ability to cast data * add FLOAT type for JSON JSON standard does not care and everything is number, but for libsmartcols it would be better to differentiate between the types. * add functions to cast data in the filter param * cast data from scols rows * cast data in the filter expression if necessary Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 2 +- libsmartcols/src/filter-expr.c | 85 +++++++++++- libsmartcols/src/filter-param.c | 265 +++++++++++++++++++++++++++++++++++-- libsmartcols/src/filter.c | 12 +- libsmartcols/src/init.c | 1 + libsmartcols/src/libsmartcols.h.in | 1 + libsmartcols/src/smartcolsP.h | 12 ++ 7 files changed, 362 insertions(+), 16 deletions(-) commit a57de0efc19ac813aa7c3fff753b0acf3eb0eacc Author: Karel Zak Date: Tue Sep 12 14:14:50 2023 +0200 include/strutils: add ul_strtold() Signed-off-by: Karel Zak include/strutils.h | 1 + lib/strutils.c | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) commit f482ff2a01001f2709ed5c27b234d8d8ac154813 Author: Karel Zak Date: Thu Sep 7 10:53:21 2023 +0200 libsmartcols: (filter) cleanup function arguments Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 15 +++++++-------- libsmartcols/src/filter-param.c | 2 +- libsmartcols/src/filter.c | 10 +++++----- libsmartcols/src/smartcolsP.h | 12 ++++++------ 4 files changed, 19 insertions(+), 20 deletions(-) commit 2a4183e588cbaa145e97edb0ed3e354972309566 Author: Karel Zak Date: Thu Sep 7 10:24:03 2023 +0200 libsmartcols: (filter) implement data basic operators Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 6 ++ libsmartcols/src/filter-param.c | 147 ++++++++++++++++++++++++++++++++++++++++ libsmartcols/src/smartcolsP.h | 7 ++ 3 files changed, 160 insertions(+) commit ee8b7c45b4f3af8463a64676d0857bc0b68f208a Author: Karel Zak Date: Tue Sep 5 13:43:37 2023 +0200 libsmartcols (filter) fetch data from columns Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 3 ++ libsmartcols/src/filter-param.c | 64 +++++++++++++++++++++++++++++++++-------- libsmartcols/src/filter.c | 10 +++++-- libsmartcols/src/smartcolsP.h | 1 + 4 files changed, 63 insertions(+), 15 deletions(-) commit 8ab9a512406734be8e7ec3cff81754019c408eba Author: Karel Zak Date: Tue Sep 5 12:51:16 2023 +0200 libsmartcols: (filter) param data refactoring Signed-off-by: Karel Zak libsmartcols/src/filter-param.c | 98 ++++++++++++++++++++++++++--------------- libsmartcols/src/smartcolsP.h | 2 + 2 files changed, 65 insertions(+), 35 deletions(-) commit 70e0f980dba015b29aa65edd2bd377e7eb705b20 Author: Karel Zak Date: Tue Sep 5 11:52:39 2023 +0200 libsmartcols: (filter) make holders API more generic The internal implementation is generic (can hold something else than only column name). Let's make the API also generic. Maybe later we can support something else than only column names in expressions (e.g. env.variables ?). Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 2 +- libsmartcols/src/filter.c | 11 ++++++++--- libsmartcols/src/libsmartcols.h.in | 4 ++-- libsmartcols/src/libsmartcols.sym | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) commit a70c4ecda597688b3415af4106546f83a1544e75 Author: Karel Zak Date: Tue Sep 5 11:43:23 2023 +0200 libsmartcols: (filter) cleanup data types * split placeholders (e.g. column name) and data types * make data type enums independent on params Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 1 + libsmartcols/src/filter-param.c | 60 ++++++++++++++++++++++++++-------------- libsmartcols/src/filter-parser.y | 12 ++++---- libsmartcols/src/filter.c | 4 +-- libsmartcols/src/smartcolsP.h | 28 +++++++++++-------- 5 files changed, 65 insertions(+), 40 deletions(-) commit 01d04adecba58ccc4c461b5893c9f183378bd219 Author: Karel Zak Date: Tue Sep 5 10:57:42 2023 +0200 libsmartcols: (filter) implement logical operators Signed-off-by: Karel Zak libsmartcols/src/filter-expr.c | 30 ++++++++++++++++++++++++++++++ libsmartcols/src/filter-param.c | 1 - libsmartcols/src/filter.c | 2 -- libsmartcols/src/smartcolsP.h | 3 ++- 4 files changed, 32 insertions(+), 4 deletions(-) commit d73d8b6484206730ab501c6f7fe62691fd2bf10b Author: Karel Zak Date: Tue Sep 5 10:54:53 2023 +0200 libsmartcols: (filter) evaluate params Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 14 ++++++++++++-- libsmartcols/src/filter-param.c | 31 +++++++++++++++++++++++++++++++ libsmartcols/src/filter.c | 25 +++++++++++++++++++++++++ libsmartcols/src/libsmartcols.h.in | 3 +++ libsmartcols/src/libsmartcols.sym | 1 + libsmartcols/src/smartcolsP.h | 4 ++++ 6 files changed, 76 insertions(+), 2 deletions(-) commit b0139f5f4aba23cbf4d29719a9fa95bc9afa7ecc Author: Karel Zak Date: Tue Sep 5 10:45:45 2023 +0200 libsmartcols: update gitignore Signed-off-by: Karel Zak libsmartcols/src/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 4e3330eb989eac513b5c467c90c374edeca65767 Author: Karel Zak Date: Tue Sep 5 09:51:25 2023 +0200 libsmartcols: (filter) split code Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 5 +- libsmartcols/src/filter-expr.c | 87 ++++++++++++++++++ libsmartcols/src/filter-param.c | 102 +++++++++++++++++++++ libsmartcols/src/filter.c | 197 ++-------------------------------------- libsmartcols/src/smartcolsP.h | 18 ++++ 5 files changed, 219 insertions(+), 190 deletions(-) commit 67fb7851e4b65ca1567f33bad7059de8d9dd3833 Author: Karel Zak Date: Thu Aug 31 17:41:04 2023 +0200 libsmartcols: add API to join filter and columns Signed-off-by: Karel Zak libsmartcols/samples/filter.c | 27 ++++++++++++++- libsmartcols/src/filter.c | 67 +++++++++++++++++++++++++++++++++++++- libsmartcols/src/libsmartcols.h.in | 5 +++ libsmartcols/src/libsmartcols.sym | 2 ++ libsmartcols/src/smartcolsP.h | 5 +++ 5 files changed, 104 insertions(+), 2 deletions(-) commit 88128214a899925872d4cb25052b625d3e0830fa Author: Karel Zak Date: Thu Aug 31 13:55:16 2023 +0200 autotools: check for flex in autogen.sh Signed-off-by: Karel Zak autogen.sh | 5 +++++ 1 file changed, 5 insertions(+) commit 6126b91ec7331438bce649915406c583025821f5 Author: Karel Zak Date: Thu Aug 31 13:47:50 2023 +0200 libsmartcols: add parser header files The header files are generated by bison and flex, but it seems that it's expected that developer generate it only rarely and manually. So, it seems better to keep it in git. Signed-off-by: Karel Zak libsmartcols/src/filter-parser.h | 127 ++++++++++ libsmartcols/src/filter-scanner.h | 505 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 632 insertions(+) commit 905dde8fa5d41b10b16a6fe707aa44f1610ef2e1 Author: Karel Zak Date: Tue Aug 8 12:19:26 2023 +0200 libsmartcols: add filter sample Signed-off-by: Karel Zak Makefile.am | 4 +- libsmartcols/samples/Makemodule.am | 5 ++ libsmartcols/samples/filter.c | 142 +++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 1 deletion(-) commit 322779d7576ce7ba63b470f18965e6881455077b Author: Karel Zak Date: Tue Aug 8 12:18:56 2023 +0200 libsmartcols: improve filter integration, use JSON to dump Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 21 ++- libsmartcols/src/filter-nodes.c | 211 ----------------------------- libsmartcols/src/filter-parser.y | 30 +++-- libsmartcols/src/filter-scanner.l | 38 +++--- libsmartcols/src/filter.c | 267 +++++++++++++++++++++++++++++++++++-- libsmartcols/src/init.c | 1 + libsmartcols/src/libsmartcols.h.in | 16 +++ libsmartcols/src/libsmartcols.sym | 5 + libsmartcols/src/smartcolsP.h | 8 +- 9 files changed, 338 insertions(+), 259 deletions(-) commit 418e4be179b858edc6b2bd6e13e45563e4209d81 Author: Karel Zak Date: Tue Aug 8 12:16:23 2023 +0200 lib/jsonwrt: add support for float numbers Signed-off-by: Karel Zak include/jsonwrt.h | 2 ++ lib/jsonwrt.c | 8 ++++++++ 2 files changed, 10 insertions(+) commit d5702ce648be38f4340e42144436c55e8b5345a1 Author: Karel Zak Date: Tue Aug 8 12:15:50 2023 +0200 autotools: fix AC_PROG_LEX use Signed-off-by: Karel Zak configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43fc3eec75bb0b06b58551ebb497a900e57ebf88 Author: Karel Zak Date: Thu Jul 20 23:08:07 2023 +0200 libsmartcols: introduce basic files for filter implementation Signed-off-by: Karel Zak configure.ac | 1 + libsmartcols/src/Makemodule.am | 14 ++- libsmartcols/src/filter-nodes.c | 211 ++++++++++++++++++++++++++++++++++++++ libsmartcols/src/filter-parser.y | 100 ++++++++++++++++++ libsmartcols/src/filter-scanner.l | 58 +++++++++++ libsmartcols/src/filter.c | 55 ++++++++++ libsmartcols/src/smartcolsP.h | 83 +++++++++++++++ 7 files changed, 520 insertions(+), 2 deletions(-) commit 816109f6ffb99d3a7aee1ff6c3467803dcd7939c Author: Thomas Weißschuh Date: Sun Nov 19 17:21:25 2023 +0100 lsfd: avoid undefined behavior Passing a pointer to a different datatype to tfind() then were inserted evokes undefines behavior. This triggers UBSAN as shown below. Instead pass the proper structs. ``` ../misc-utils/lsfd.c:513:27: runtime error: member access within misaligned address 0x7ffe9ee6495c for type 'struct proc', which requires 8 byte alignment 0x7ffe9ee6495c: note: pointer points here 1a 1a 1a 1a 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 49 e6 9e fe 7f 00 00 ^ #0 0x56159cfa4a3b in proc_tree_compare ../misc-utils/lsfd.c:513 #1 0x7f9dd4d2d743 in __tfind (/usr/lib/libc.so.6+0x10f743) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658) #2 0x56159cfa4ac3 in get_proc ../misc-utils/lsfd.c:518 #3 0x56159cfe217b in anon_pidfd_get_name ../misc-utils/lsfd-unkn.c:203 #4 0x56159cfe1040 in unkn_fill_column ../misc-utils/lsfd-unkn.c:93 #5 0x56159cfaaa37 in fill_column ../misc-utils/lsfd.c:1178 #6 0x56159cfaaac5 in convert_file ../misc-utils/lsfd.c:1193 #7 0x56159cfaac4f in convert ../misc-utils/lsfd.c:1212 #8 0x56159cfb2b54 in main ../misc-utils/lsfd.c:2317 #9 0x7f9dd4c45ccf (/usr/lib/libc.so.6+0x27ccf) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658) #10 0x7f9dd4c45d89 in __libc_start_main (/usr/lib/libc.so.6+0x27d89) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658) #11 0x56159cfa3c34 in _start (util-linux/build-meson/lsfd+0x41c34) (BuildId: 35fece1a205f96a2dbfe7a0e93b658530de675c4) ``` Signed-off-by: Thomas Weißschuh misc-utils/lsfd-sock-xinfo.c | 9 ++++++--- misc-utils/lsfd.c | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) commit 2a472ae894033b22b4beaa17c1c6e363c4ee3c9b Author: Thomas Weißschuh Date: Sun Nov 19 17:27:40 2023 +0100 treewide: explicitly mark unused arguments The autotools build used -Wno-unused-parameter to silence these warnings for a few files. On meson however this configuration was not duplicated leading to persistent warnings, preventing the usage of -Werror. Instead of having to maintain the exceptions in two buildsystems, mark the exceptions directly in the source code. Afterward clean up autotools to not use -Wno-unused-parameter anymore. Signed-off-by: Thomas Weißschuh configure.ac | 3 -- libfdisk/samples/Makemodule.am | 3 +- libfdisk/samples/mkpart-fullspec.c | 2 +- libfdisk/samples/mkpart.c | 2 +- libfdisk/src/Makemodule.am | 4 +- libfdisk/src/ask.c | 4 +- libfdisk/src/gpt.c | 12 +++++- libfdisk/src/item.c | 6 ++- libfdisk/src/script.c | 30 ++++++++++--- libfdisk/src/utils.c | 10 +++-- libfdisk/src/version.c | 4 +- libmount/samples/Makemodule.am | 3 +- libmount/src/Makemodule.am | 2 +- libmount/src/cache.c | 12 ++++-- libmount/src/context.c | 18 +++++--- libmount/src/context_mount.c | 6 ++- libmount/src/lock.c | 3 +- libmount/src/monitor.c | 6 ++- libmount/src/optlist.c | 24 +++++++---- libmount/src/optstr.c | 30 ++++++++----- libmount/src/tab.c | 45 ++++++++++++++----- libmount/src/tab_diff.c | 6 ++- libmount/src/tab_update.c | 15 ++++--- libmount/src/utils.c | 88 +++++++++++++++++++++++++++++++------- libmount/src/version.c | 3 +- libsmartcols/samples/Makemodule.am | 3 +- libsmartcols/samples/continuous.c | 2 +- libsmartcols/samples/maxout.c | 2 +- meson.build | 6 +-- 29 files changed, 255 insertions(+), 99 deletions(-) commit 129f1c83b4fa2d485b04f3d4479b021593197dca Merge: 1b6a2dc02 b895f9072 Author: Karel Zak Date: Mon Nov 20 11:03:39 2023 +0100 Merge branch 'authors' of https://github.com/t-8ch/util-linux * 'authors' of https://github.com/t-8ch/util-linux: AUTHORS: add tools contributed by myself commit 1b6a2dc0270797c477e0fe211ae9b8a6ca773c1d Merge: 0dbb3e06b 78fd73001 Author: Karel Zak Date: Mon Nov 20 11:03:18 2023 +0100 Merge branch 'cfdisk/resize-out-of-order' of https://github.com/t-8ch/util-linux * 'cfdisk/resize-out-of-order' of https://github.com/t-8ch/util-linux: cfdisk: properly handle out-of-order partitions during resize libfdisk: add fdisk_partition_get_max_size libfdisk: fix typo in debug message commit b895f9072e6df5ab1cc29c2ba2f1a122bf932fae Author: Thomas Weißschuh Date: Wed Nov 15 22:18:04 2023 +0100 AUTHORS: add tools contributed by myself Signed-off-by: Thomas Weißschuh AUTHORS | 3 +++ 1 file changed, 3 insertions(+) commit 78fd7300140c5e2f4e210aa1163468ef83b9c2fe Author: Thomas Weißschuh Date: Tue Nov 14 17:53:29 2023 +0100 cfdisk: properly handle out-of-order partitions during resize Fixes #2580 Signed-off-by: Thomas Weißschuh disk-utils/cfdisk.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 5ee1a36cdd02dd09aba9a3e40c52efdc04c60f14 Author: Thomas Weißschuh Date: Tue Nov 14 17:53:21 2023 +0100 libfdisk: add fdisk_partition_get_max_size Signed-off-by: Thomas Weißschuh libfdisk/docs/libfdisk-sections.txt | 1 + libfdisk/src/libfdisk.h.in | 3 +++ libfdisk/src/libfdisk.sym | 4 +++ libfdisk/src/partition.c | 52 +++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) commit c2a8706039733bd9571dceacf1a0c96f6fdb1c7a Author: Thomas Weißschuh Date: Wed Oct 18 10:58:46 2023 +0200 libfdisk: fix typo in debug message Signed-off-by: Thomas Weißschuh libfdisk/src/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dbb3e06b859021020e27a8fef4076321f81c69e Author: Karel Zak Date: Tue Nov 14 12:50:38 2023 +0100 lsblk: add separate MAJ and MIN columns Signed-off-by: Karel Zak misc-utils/lsblk.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2071997e98a8d78a235e83ba48e06023ee92b9d0 Author: Karel Zak Date: Tue Nov 14 12:46:49 2023 +0100 libsmartcols: accept no data for custom wrapping cells Don't re-use previously used 'rc' variable, otherwise empty cell will be interpreted as error. Signed-off-by: Karel Zak libsmartcols/src/print.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f169ab3dff8d5a6fe4e1a9a1234b0dceb6607b58 Merge: c2fbc59d9 f5715c117 Author: Karel Zak Date: Tue Nov 14 10:18:43 2023 +0100 Merge branch 'fincore-err' of https://github.com/t-8ch/util-linux * 'fincore-err' of https://github.com/t-8ch/util-linux: fincore: (tests) also use nosize error file commit c2fbc59d9f652420861f6e286c757db065ba49f9 Author: Masatake YAMATO Date: Tue Nov 14 11:21:22 2023 +0900 tests: (lsfd::column-xmode) ignore "rwx" mappings This change fixes the issue about lsfd reported in https://marc.info/?l=util-linux-ng&m=169972678725084&w=2 column-xmode test case assumes an executable file has only one "x" mapping like: % pmap $$ | grep ${SHELL##*/} 1292343: zsh 0000562386c1c000 92K r---- zsh 0000562386c33000 716K r-x-- zsh << 0000562386ce6000 88K r---- zsh 0000562386cfc000 8K r---- zsh 0000562386cfe000 24K rw--- zsh However, this assumption is wrong on Sparc64: % pmap $$ 1490470: zsh 0000010000000000 792K r-x-- zsh << 00000100001fe000 8K r---- zsh 0000010000200000 32K rwx-- zsh << Two "x" mappings are found. As a result, the original test case failed. Signed-off-by: Masatake YAMATO Tested-by: John Paul Adrian Glaubitz tests/ts/lsfd/column-xmode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5715c117e727d4ff45e0d8568f188753620356e Author: Thomas Weißschuh Date: Mon Nov 13 21:05:59 2023 +0100 fincore: (tests) also use nosize error file Link: https://lore.kernel.org/util-linux/b8cafd0d89878949705782312dfe800ec2779035.camel@physik.fu-berlin.de/ Signed-off-by: Thomas Weißschuh tests/ts/fincore/count | 1 + 1 file changed, 1 insertion(+) commit 1d98827edde4b88068d295bbd20c31333b2ad5d4 Author: Goldwyn Rodrigues Date: Tue Oct 10 18:08:59 2023 -0500 libuuid: avoid truncate clocks.txt to improve performance Instead of explicitly truncating clocks.txt file, pad with whitespaces in the end of file. This is done to improve performance of libuuid on xfs filesystems. Instead of truncating the file, pad it with whitespaces. This is anyways used as a failsafe method in case truncate fails. The reason why this regression was introduced was because of: 869ae85dae64 ("xfs: flush new eof page on truncate to avoid post-eof corruption") An attempt to move the clocks.txt to /run (tmpfs) has been attempted before [1] and with commit ab2e7dd17 ("libuuid: move clock state file from /var/lib to /var/run"). The latter was reverted. [1] https://www.spinics.net/lists/util-linux-ng/msg17331.html Signed-off-by: Goldwyn Rodrigues libuuid/src/gen_uuid.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8d7d7ac070c2d18165ab9f8e019bbbd18f724942 Merge: 420699c48 548e821c7 Author: Karel Zak Date: Mon Nov 13 10:36:16 2023 +0100 Merge branch 'lslocks--per-process' of https://github.com/masatake/util-linux * 'lslocks--per-process' of https://github.com/masatake/util-linux: lslocks: (man) update the note about OFDLCK lslocks: (test) add a case for OFDLCK type locks lslocks: use information extracted from "locks: " column of /proc/$pid/fdinfo/* lslocks: (refactor) lift up the code destroying the lock list for future extension lslocks: rename functions for future extension lslocks: refactor the code reading /proc/locks lslocks: (refactor) remove 'pid' global variable lslocks: (man) document LEASE type lslocks: (test) add a case commit 420699c48b45f95990c124f839f9c4673b1cddef Merge: e0f3b02d5 07e5c29d5 Author: Karel Zak Date: Mon Nov 13 10:34:39 2023 +0100 Merge branch 'master' of https://github.com/ffontaine/util-linux * 'master' of https://github.com/ffontaine/util-linux: libuuid/src/gen_uuid.c: fix cs_min declaration commit 548e821c7b29f0d3c26211effd6dc50986c97a60 Author: Masatake YAMATO Date: Mon Nov 13 02:26:53 2023 +0900 lslocks: (man) update the note about OFDLCK Signed-off-by: Masatake YAMATO misc-utils/lslocks.8.adoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 8a3873235fc5eedd60c42522834ab9405b12e1e2 Author: Masatake YAMATO Date: Mon Nov 13 01:43:36 2023 +0900 lslocks: (test) add a case for OFDLCK type locks Signed-off-by: Masatake YAMATO tests/expected/lslocks/lslocks-ofd--w | 4 ++++ tests/expected/lslocks/lslocks-ofd-r- | 4 ++++ tests/expected/lslocks/lslocks-ofd-rw | 6 ++++++ tests/ts/lslocks/lslocks | 6 +++--- 4 files changed, 17 insertions(+), 3 deletions(-) commit 6c2c1b11a22a8a1e5ae4ab3425dde2b7f4150585 Author: Masatake YAMATO Date: Fri Nov 10 07:08:45 2023 +0900 lslocks: use information extracted from "locks: " column of /proc/$pid/fdinfo/* Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 173 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 159 insertions(+), 14 deletions(-) commit 53ce6e704d6c4e32182bfd035d5ab8e6b2b744ac Author: Masatake YAMATO Date: Mon Nov 13 00:30:32 2023 +0900 lslocks: (refactor) lift up the code destroying the lock list for future extension Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 7b26824c73fe33f6b6e785bc89dc84c3ebb1f1d1 Author: Masatake YAMATO Date: Mon Nov 13 00:25:51 2023 +0900 lslocks: rename functions for future extension Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5697f991b32f0acbd8fd90f19534adf23d7a6d13 Author: Masatake YAMATO Date: Fri Nov 10 06:14:36 2023 +0900 lslocks: refactor the code reading /proc/locks Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 160 ++++++++++++++++++++++++++------------------------- 1 file changed, 83 insertions(+), 77 deletions(-) commit 8199879e48f223254898bb4ec08d8042a99a7148 Author: Masatake YAMATO Date: Mon Nov 13 03:03:03 2023 +0900 lslocks: (refactor) remove 'pid' global variable Signed-off-by: Masatake YAMATO misc-utils/lslocks.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ea03d77623b3b26a124b2167c6f30f63a587a93c Author: Masatake YAMATO Date: Mon Nov 13 02:21:43 2023 +0900 lslocks: (man) document LEASE type Signed-off-by: Masatake YAMATO misc-utils/lslocks.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1fa0c9f0250db15dd483b42b1369a48f87e9e19 Author: Masatake YAMATO Date: Sun Nov 12 02:39:22 2023 +0900 lslocks: (test) add a case Signed-off-by: Masatake YAMATO tests/commands.sh | 1 + tests/expected/lslocks/lslocks-flock-ex | 4 ++ tests/expected/lslocks/lslocks-flock-sh | 4 ++ tests/expected/lslocks/lslocks-lease-w | 4 ++ tests/expected/lslocks/lslocks-posix--w | 4 ++ tests/expected/lslocks/lslocks-posix-r- | 4 ++ tests/expected/lslocks/lslocks-posix-rw | 6 +++ tests/ts/lslocks/lslocks | 69 +++++++++++++++++++++++++++++++++ 8 files changed, 96 insertions(+) commit 07e5c29d501c19e7af84fecb5915e0f9f94cb49f Author: Fabrice Fontaine Date: Tue Nov 7 18:43:57 2023 +0100 libuuid/src/gen_uuid.c: fix cs_min declaration Define cs_min through a define and not a const int to avoid the following build failure with -O0 raised since version 2.39 and https://github.com/util-linux/util-linux/commit/2fa4168c8bc9d5438bc1dfadda293c7c21b6fa59: libuuid/src/gen_uuid.c: In function 'uuid_generate_time_generic': libuuid/src/gen_uuid.c:536:33: error: initializer element is not constant THREAD_LOCAL int cache_size = cs_min; ^~~~~~ For consistency, also use define for cs_max and cs_factor Fixes: - http://autobuild.buildroot.org/results/2f80a5cdb523cc3c8c0f3693607a1be036b2ae98 Signed-off-by: Fabrice Fontaine libuuid/src/gen_uuid.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit e0f3b02d579f69580c02feb514751dba12eb5db8 Merge: 03ade3384 bedfc7dd7 Author: Karel Zak Date: Wed Nov 8 12:35:30 2023 +0100 Merge branch 'lsfd--tty' of https://github.com/masatake/util-linux * 'lsfd--tty' of https://github.com/masatake/util-linux: tests: (lsfd) add a case testing NAME, SOURCE, ENDPOINTS, and PTMX.TTY-INDEX columns of pts fds tests: (test_mkfds::pty) add a new factory lsfd: fill ENDPOINTS column for pty devices lsfd: add attach_xinfo and get_ipc_class methods to cdev_ops lsfd: add PTMX.TTY-INDEX column lsfd: utilize /proc/tty/drivers for filling SOURCE column of tty devices lsfd: make the order of calling finalize_* and initialize_* consistent commit 03ade3384fdf6bcc92a58cda12ef478586011673 Merge: c84484950 fee8f82d0 Author: Karel Zak Date: Tue Nov 7 11:21:07 2023 +0100 Merge branch 'lslocks--man-missing-fields' of https://github.com/masatake/util-linux * 'lslocks--man-missing-fields' of https://github.com/masatake/util-linux: lslocks: (man) add missing fields commit fee8f82d0647b6158336da3a1fa436d2517c4f9d Author: Masatake YAMATO Date: Tue Nov 7 05:30:33 2023 +0900 lslocks: (man) add missing fields Signed-off-by: Masatake YAMATO misc-utils/lslocks.8.adoc | 6 ++++++ 1 file changed, 6 insertions(+) commit c8448495049b22e6ee30c84c377e61f65d886ca3 Author: Karel Zak Date: Mon Nov 6 11:40:27 2023 +0100 libmount: fix possible NULL dereference [coverity scan] Signed-off-by: Karel Zak libmount/src/tab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bedfc7dd72ed7a50758c6290600b51fd8db656dd Author: Masatake YAMATO Date: Sat Nov 4 05:22:21 2023 +0900 tests: (lsfd) add a case testing NAME, SOURCE, ENDPOINTS, and PTMX.TTY-INDEX columns of pts fds Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-pty | 10 ++++++ tests/ts/lsfd/mkfds-pty | 73 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) commit a76ea60adab8b1562a5ccb2d9b497e72be500b9f Author: Masatake YAMATO Date: Sat Nov 4 04:38:52 2023 +0900 tests: (test_mkfds::pty) add a new factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 108 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) commit 52e94d61b09a05f7ee5ef0dddf75e9c69b3f0368 Author: Masatake YAMATO Date: Thu Nov 2 02:47:35 2023 +0900 lsfd: fill ENDPOINTS column for pty devices An example output: $ ./lsfd -o+ENDPOINTS -Q '(COMMAND =~ "tmux") and ((SOURCE == "ptmx") or (SOURCE =~ "pts:.*"))' COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME ENDPOINTS tmux: client 3717086 yamato 0 rw---- CHR pts:9 27 12 /dev/pts/9 2143274,xfce4-terminal,34rw tmux: client 3717086 yamato 1 rw---- CHR pts:9 27 12 /dev/pts/9 2143274,xfce4-terminal,34rw tmux: client 3717086 yamato 2 rw---- CHR pts:9 27 12 /dev/pts/9 2143274,xfce4-terminal,34rw tmux: server 3717088 yamato 5 rw---m CHR pts:9 27 12 /dev/pts/9 2143274,xfce4-terminal,34rw tmux: server 3717088 yamato 8 rw---m CHR ptmx 24 208 tty-index=16 3717089,zsh,0rw 3717089,zsh,1rw 3717089,zsh,2rw 3717089,zsh,10rw $ ./lsfd -o+ENDPOINTS -Q '(PID == 3717089) and (FD == 0)' COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME ENDPOINTS zsh 3717089 yamato 0 rw---- CHR pts:16 27 19 /dev/pts/16 3717088,tmux: server,8rw Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++-- misc-utils/lsfd.1.adoc | 1 + 2 files changed, 118 insertions(+), 3 deletions(-) commit 036a12d4888289579f324e32ebffd94c2827a506 Author: Masatake YAMATO Date: Thu Nov 2 02:42:27 2023 +0900 lsfd: add attach_xinfo and get_ipc_class methods to cdev_ops Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 6919acfff864d36f84d84b5509133377b2f051b5 Author: Masatake YAMATO Date: Thu Nov 2 00:44:20 2023 +0900 lsfd: add PTMX.TTY-INDEX column tty-index field in /proc/$pid/fdinfo/$fd is the data source of the column. The value is helpful for looking up the conterpart of /dev/ptmx. Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 9 +++++++++ misc-utils/lsfd.c | 3 +++ misc-utils/lsfd.h | 1 + 4 files changed, 63 insertions(+) commit f5bc75bff728036d140e9fdd54594166437f5114 Author: Masatake YAMATO Date: Thu Nov 2 00:05:12 2023 +0900 lsfd: utilize /proc/tty/drivers for filling SOURCE column of tty devices The original code referenced /proc/devices using major numbers as keys to obtain the name of the device driver corresponding to a file descriptor. However, it turnes out that some drivers share a same major number; there are cases that a key is not unique. Character devices: 1 mem 4 /dev/vc/0 4 tty 4 ttyS ... About tty-related devices, /proc/tty/drivers is better information source; both major and minor numbers can be used as keys: /dev/tty /dev/tty 5 0 system:/dev/tty /dev/console /dev/console 5 1 system:console /dev/ptmx /dev/ptmx 5 2 system /dev/vc/0 /dev/vc/0 4 0 system:vtmaster usbserial /dev/ttyUSB 188 0-511 serial dbc_serial /dev/ttyDBC 242 0-63 serial serial /dev/ttyS 4 64-95 serial pty_slave /dev/pts 136 0-1048575 pty:slave pty_master /dev/ptm 128 0-1048575 pty:master unknown /dev/tty 4 1-63 console This commit extracts the second column of the /proc/tty/drivers as driver names after removing "/dev": tty, console, ptmx, ... With the orinal code: # lsfd -n -p 1789 -Q '(FD == 25)' systemd-logind 1789 root 25 rw- CHR /dev/vc/0:6 432 25 /dev/tty6 --------------------------------------------^^^^^^^^^^^ With this commit: # ./lsfd -n -p 1789 -Q '(FD == 25)' systemd-logind 1789 root 25 rw---- CHR tty:6 432 25 /dev/tty6 ----------------------------------------------^^^^^ Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 169 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 164 insertions(+), 5 deletions(-) commit 5f3359c5c9dab9d5791d05a646b9c04c19eeb80e Author: Christian Hesse Date: Thu Nov 2 11:37:33 2023 +0100 meson: install wall executable with group 'tty' ... for proper permissions. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00f115d81146599324c454f6756db6491855f430 Author: Christian Hesse Date: Tue Oct 31 08:38:15 2023 +0100 meson: install write executable with group 'tty' ... to fix: write: effective gid does not match group of /dev/pts/3 meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab0ff638e09c7a7c33cf9976c6a2af79e39323dd Merge: 1bb137d79 a6ca0456c Author: Karel Zak Date: Thu Nov 2 11:34:39 2023 +0100 Merge branch 'PR/losetup-lost' of github.com:karelzak/util-linux-work * 'PR/losetup-lost' of github.com:karelzak/util-linux-work: loopdev: report lost loop devices commit 1bb137d79920c131ba0616e3877d2f9c92f1ff55 Merge: f64ea9979 6575d8f4e Author: Karel Zak Date: Thu Nov 2 11:34:20 2023 +0100 Merge branch 'libblkid/enum' of https://github.com/t-8ch/util-linux * 'libblkid/enum' of https://github.com/t-8ch/util-linux: libblkid: make enum libblkid_endianness lowercase commit f64ea9979a5eaddaed98bde17832f855f2f0daee Author: Karel Zak Date: Thu Nov 2 10:41:03 2023 +0100 libmount: improve mnt_table_next_child_fs() The function utilizes the struct libmnt_itr to iterate through the mountinfo file but neglects the direction specified by the iterator. This a bug. The application must manage the direction, as, for instance, umount(8) requires the children of the mountpoint in reverse order. Fixes: https://github.com/util-linux/util-linux/issues/2552 Signed-off-by: Karel Zak libmount/src/tab.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 38d9e7c8f353d77bcc2714b7b39082b83de874ff Author: Karel Zak Date: Wed Nov 1 14:58:57 2023 +0100 docs: add SPDX to boilerplate.c Signed-off-by: Karel Zak Documentation/boilerplate.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 9e95aa1298d67331cab00f385d7e0cb9c64a263b Author: Karel Zak Date: Wed Nov 1 14:47:41 2023 +0100 disk-utils: add SPDX and Copyright notices Explicitly state the license (usually GPL-2.0-or-later; our default) and include copyright statements in all files to prevent false positive reports from license analysis tools. Add also add SPDX-License-Identifier tag to all files. Signed-off-by: Karel Zak README.licensing | 6 ++++-- disk-utils/addpart.c | 10 ++++++++++ disk-utils/blockdev.c | 10 +++++++++- disk-utils/cfdisk.c | 12 +++++++----- disk-utils/cramfs.h | 4 ++-- disk-utils/cramfs_common.c | 2 ++ disk-utils/delpart.c | 10 ++++++++++ disk-utils/fdformat.c | 9 +++++++++ disk-utils/fdisk-list.c | 10 ++++++++++ disk-utils/fdisk-list.h | 10 ++++++++++ disk-utils/fdisk-menu.c | 11 ++++++++++- disk-utils/fdisk.c | 12 +++++++----- disk-utils/fdisk.h | 10 ++++++++++ disk-utils/fsck.c | 12 ++++++++---- disk-utils/fsck.cramfs.c | 2 ++ disk-utils/fsck.minix.c | 12 +++++++++--- disk-utils/isosize.c | 11 +++++++++-- disk-utils/minix_programs.h | 10 ++++++++++ disk-utils/mkfs.bfs.c | 14 +++++++++++--- disk-utils/mkfs.c | 13 ++++++++++--- disk-utils/mkfs.cramfs.c | 2 ++ disk-utils/mkfs.minix.c | 10 +++++++--- disk-utils/mkswap.c | 7 +++++++ disk-utils/partx.c | 9 ++++++++- disk-utils/resizepart.c | 10 ++++++++++ disk-utils/swaplabel.c | 2 ++ 26 files changed, 195 insertions(+), 35 deletions(-) commit 001baf5ad4f614fd0756bd8e4c5fea468f53e227 Author: Karel Zak Date: Wed Nov 1 13:56:01 2023 +0100 include/audit-arch: add missing SPDX Signed-off-by: Karel Zak include/audit-arch.h | 2 ++ 1 file changed, 2 insertions(+) commit 87f0a503c92242feeea2afcfcdcce3c446f5f52c Author: Chris Hofstaedtler Date: Tue Oct 31 14:52:26 2023 +0100 setterm: avoid restoring flags from uninitialized memory Depending on the used compiler and flags, previously either F_SETFL was called with 0 or with a random value. Never with the intended previous flags. [kzak@redhat.com: - tiny coding style change] Signed-off-by: Chris Hofstaedtler Tested-by: Emanuele Rocca Signed-off-by: Karel Zak term-utils/setterm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a6ca0456cc6d704a786f6b66d8bb2d89ff18eba7 Author: Junxiao Bi Date: Wed Oct 25 13:36:03 2023 -0700 loopdev: report lost loop devices If a /dev/loopX is lost because someone might have removed it by mistake, future losetup operations on that loop device will fail and losetup --all and --list will not report the devices (although kernel still uses it). Since /sysfs still have the loop device intact, detect that and report it. Changes: * --list and --all add "(lost)" after device node path # losetup NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop0 (lost) 0 0 0 0 /root/l0.img 0 512 # losetup -a /dev/loop0 (lost): []: (/root/l0.img) * use /sys to get devno rather than stat() * report warning after failed operation # losetup -d /dev/loop0 losetup: /dev/loop0: detach failed: No such file or directory losetup: device node /dev/loop0 (7:0) is lost. You may use mknod(1) to recover it. * fix copy & past bugs in some API comments Co-Author: Karel Zak Signed-off-by: Junxiao Bi Signed-off-by: Karel Zak include/loopdev.h | 4 +++ lib/loopdev.c | 36 ++++++++++++++++++------- sys-utils/losetup.c | 77 +++++++++++++++++++++++++++++------------------------ 3 files changed, 72 insertions(+), 45 deletions(-) commit 837c9eeccdc4bc99382394121bbb1b63eba2b866 Author: Masatake YAMATO Date: Wed Nov 1 08:18:11 2023 +0900 lsfd: make the order of calling finalize_* and initialize_* consistent Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6575d8f4e7a4f57a94ca6ba9846f1a2b711ac861 Author: Thomas Weißschuh Date: Tue Oct 31 20:55:14 2023 +0100 libblkid: make enum libblkid_endianness lowercase As discussed in #2548 Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/squashfs.c | 2 +- libblkid/src/superblocks/superblocks.c | 2 +- libblkid/src/superblocks/superblocks.h | 6 +++--- libblkid/src/superblocks/swap.c | 2 +- libblkid/src/superblocks/vxfs.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit d8379563fe5c8a4adba12804abbe20e43a8e1cde Merge: 7b4c62b0d bad4c7294 Author: Karel Zak Date: Wed Oct 25 11:37:21 2023 +0200 Merge branch 'refine-the-choice-of-stream-related-functions-in-usage' of https://github.com/masatake/util-linux * 'refine-the-choice-of-stream-related-functions-in-usage' of https://github.com/masatake/util-linux: Make the ways of using output stream consistent in usage() Use fputs instead of fprintf if possible commit 7b4c62b0d5a230febf8f3fc14f83925a2b3902f8 Merge: 765a39dad 200828792 Author: Karel Zak Date: Wed Oct 25 11:34:43 2023 +0200 Merge branch 'umount/recursive-bind' of https://github.com/t-8ch/util-linux * 'umount/recursive-bind' of https://github.com/t-8ch/util-linux: umount: handle bindmounts during --recursive mount: (tests) don't create /dev/nul commit 765a39dad539e5c2891efede997dbe977256c9bd Author: Karel Zak Date: Tue Oct 24 20:13:29 2023 +0200 tests: fix memory leak in scols fromfile Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit bad4c729483ab31bb1cadc541817c139f41fb8aa Author: Masatake YAMATO Date: Wed Oct 25 02:21:45 2023 +0900 Make the ways of using output stream consistent in usage() Signed-off-by: Masatake YAMATO Documentation/boilerplate.c | 30 +++++++++++++++--------------- disk-utils/addpart.c | 4 ++-- disk-utils/blockdev.c | 22 +++++++++++----------- disk-utils/cfdisk.c | 4 ++-- disk-utils/delpart.c | 4 ++-- disk-utils/fdformat.c | 4 ++-- disk-utils/fdisk.c | 4 ++-- disk-utils/fsck.c | 6 +++--- disk-utils/fsck.cramfs.c | 4 ++-- disk-utils/fsck.minix.c | 4 ++-- disk-utils/isosize.c | 4 ++-- disk-utils/mkfs.bfs.c | 4 ++-- disk-utils/mkfs.c | 4 ++-- disk-utils/mkfs.cramfs.c | 34 +++++++++++++++++----------------- disk-utils/mkfs.minix.c | 4 ++-- disk-utils/mkswap.c | 4 ++-- disk-utils/partx.c | 4 ++-- disk-utils/raw.c | 4 ++-- disk-utils/resizepart.c | 4 ++-- disk-utils/sfdisk.c | 7 +++---- disk-utils/swaplabel.c | 5 ++--- login-utils/chsh.c | 4 ++-- login-utils/last.c | 4 ++-- login-utils/lslogins.c | 4 ++-- login-utils/newgrp.c | 4 ++-- login-utils/nologin.c | 4 ++-- login-utils/sulogin.c | 4 ++-- login-utils/utmpdump.c | 4 ++-- login-utils/vipw.c | 4 ++-- misc-utils/blkid.c | 6 +++--- misc-utils/cal.c | 4 ++-- misc-utils/fadvise.c | 4 ++-- misc-utils/fincore.c | 4 ++-- misc-utils/findfs.c | 5 ++--- misc-utils/findmnt.c | 4 ++-- misc-utils/getopt.c | 4 ++-- misc-utils/hardlink.c | 4 ++-- misc-utils/kill.c | 5 ++--- misc-utils/logger.c | 4 ++-- misc-utils/look.c | 4 ++-- misc-utils/lsblk.c | 4 ++-- misc-utils/lsclocks.c | 4 ++-- misc-utils/lslocks.c | 4 ++-- misc-utils/mcookie.c | 6 +++--- misc-utils/namei.c | 5 ++--- misc-utils/pipesz.c | 30 +++++++++++++++--------------- misc-utils/rename.c | 4 ++-- misc-utils/uuidd.c | 4 ++-- misc-utils/uuidgen.c | 6 +++--- misc-utils/uuidparse.c | 12 ++++++------ misc-utils/whereis.c | 4 ++-- misc-utils/wipefs.c | 34 +++++++++++++++++----------------- schedutils/chrt.c | 4 ++-- schedutils/ionice.c | 4 ++-- schedutils/taskset.c | 4 ++-- schedutils/uclampset.c | 4 ++-- sys-utils/blkdiscard.c | 6 +++--- sys-utils/blkpr.c | 4 ++-- sys-utils/blkzone.c | 6 +++--- sys-utils/chcpu.c | 4 ++-- sys-utils/chmem.c | 4 ++-- sys-utils/choom.c | 4 ++-- sys-utils/ctrlaltdel.c | 4 ++-- sys-utils/dmesg.c | 4 ++-- sys-utils/eject.c | 4 ++-- sys-utils/fallocate.c | 6 +++--- sys-utils/flock.c | 6 +++--- sys-utils/fsfreeze.c | 5 ++--- sys-utils/fstrim.c | 6 +++--- sys-utils/hwclock.c | 12 ++++++------ sys-utils/ipcmk.c | 6 +++--- sys-utils/ipcrm.c | 4 ++-- sys-utils/ipcs.c | 4 ++-- sys-utils/irqtop.c | 4 ++-- sys-utils/ldattach.c | 4 ++-- sys-utils/losetup.c | 5 ++--- sys-utils/lscpu.c | 4 ++-- sys-utils/lsipc.c | 5 ++--- sys-utils/lsirq.c | 6 +++--- sys-utils/lsmem.c | 4 ++-- sys-utils/lsns.c | 4 ++-- sys-utils/mount.c | 6 +++--- sys-utils/mountpoint.c | 4 ++-- sys-utils/nsenter.c | 4 ++-- sys-utils/pivot_root.c | 4 ++-- sys-utils/prlimit.c | 4 ++-- sys-utils/readprofile.c | 4 ++-- sys-utils/renice.c | 6 +++--- sys-utils/rfkill.c | 2 +- sys-utils/rtcwake.c | 4 ++-- sys-utils/setarch.c | 8 ++++---- sys-utils/setpgid.c | 4 ++-- sys-utils/setpriv.c | 4 ++-- sys-utils/setsid.c | 4 ++-- sys-utils/swapoff.c | 4 ++-- sys-utils/swapon.c | 4 ++-- sys-utils/switch_root.c | 5 ++--- sys-utils/tunelp.c | 4 ++-- sys-utils/umount.c | 5 ++--- sys-utils/unshare.c | 4 ++-- sys-utils/wdctl.c | 4 ++-- sys-utils/zramctl.c | 6 +++--- term-utils/agetty.c | 6 +++--- term-utils/mesg.c | 4 ++-- term-utils/script.c | 4 ++-- term-utils/scriptlive.c | 4 ++-- term-utils/scriptreplay.c | 4 ++-- term-utils/setterm.c | 6 +++--- term-utils/wall.c | 4 ++-- term-utils/write.c | 4 ++-- text-utils/col.c | 6 +++--- text-utils/colcrt.c | 4 ++-- text-utils/colrm.c | 4 ++-- text-utils/column.c | 4 ++-- text-utils/hexdump.c | 6 +++--- text-utils/line.c | 4 ++-- text-utils/pg.c | 4 ++-- text-utils/rev.c | 5 ++--- text-utils/ul.c | 4 ++-- 119 files changed, 331 insertions(+), 342 deletions(-) commit 38b8eac6eb9a372e0a2b9c8f2b4abb816c6f17ee Author: Masatake YAMATO Date: Wed Oct 25 01:41:58 2023 +0900 Use fputs instead of fprintf if possible Signed-off-by: Masatake YAMATO disk-utils/fdisk-list.c | 3 +-- misc-utils/fincore.c | 2 +- misc-utils/lsblk.c | 2 +- misc-utils/lsclocks.c | 2 +- misc-utils/lsfd.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) commit 24947d367e81a8a1ecfe17232230eae2b19616db Author: Karel Zak Date: Mon Oct 23 15:20:47 2023 +0200 libsmartcols: fix uninitialized local variable in sample Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d585a4159d5dac1889bccfc8d3b17e3795ef8de6 Author: Karel Zak Date: Mon Oct 23 14:47:35 2023 +0200 libsmartcols: add wrap-zero test * modify samples/fromfile.c to use scols_wrapzero_nextchunk() callback if "wrapzero" specified for the test colum * add col-wrapzero and data-string-zero to define the column and zero separated data Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 8 ++++++- tests/expected/libsmartcols/fromfile-wrapzero | 19 ++++++++++++++++ tests/expected/libsmartcols/fromfile-wrapzero-tree | 19 ++++++++++++++++ tests/ts/libsmartcols/files/col-wrapzero | 3 +++ tests/ts/libsmartcols/files/data-string-zero | 10 +++++++++ tests/ts/libsmartcols/fromfile | 26 ++++++++++++++++++++++ 6 files changed, 84 insertions(+), 1 deletion(-) commit 301d02816f070ad4c66f7b8fb789d5d5e121ab9b Author: Karel Zak Date: Mon Oct 23 14:35:21 2023 +0200 libsmartcols: support \x?? for data by samples/fromfile.c The test (sample) binary already supports \n in strings to covert it to the real line-break. It seem more generic to use \x?? (hex) to support arbitrary byte in the column data. Signed-off-by: Karel Zak libsmartcols/samples/fromfile.c | 34 ++++++++++++++++++++---------- tests/ts/libsmartcols/files/data-string-nl | 10 ++++----- 2 files changed, 28 insertions(+), 16 deletions(-) commit fa4e6939838fbdf2f054451fccd85b93850d0b32 Author: Karel Zak Date: Mon Oct 23 13:37:51 2023 +0200 libsmartcols: add new functions to API docs Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 5 +++++ libsmartcols/src/cell.c | 4 ++++ libsmartcols/src/column.c | 2 ++ 3 files changed, 11 insertions(+) commit 295bbcf676ee958727970174e421618b9d473398 Author: Karel Zak Date: Thu Oct 19 13:42:08 2023 +0200 findmnt: use zero to separate lines in multi-line cells Fixes: https://github.com/util-linux/util-linux/issues/2533 Signed-off-by: Karel Zak misc-utils/findmnt.8.adoc | 4 ++++ misc-utils/findmnt.c | 56 ++++++++++++++++++++++++++++++++--------------- 2 files changed, 42 insertions(+), 18 deletions(-) commit a9c1e5e58d61faa601b9b50157cac9ece595c98d Author: Karel Zak Date: Mon Oct 23 21:33:38 2023 +0200 libsmartcols: improve cell data preparation for non-wrapping cases Signed-off-by: Karel Zak libsmartcols/src/print.c | 91 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 26 deletions(-) commit b24cdac1e702db86aa17e722d0ed0219588a0d13 Author: Karel Zak Date: Thu Oct 19 12:42:35 2023 +0200 libsmartcols: add --{export,raw,json} to wrap sample Signed-off-by: Karel Zak libsmartcols/samples/wrap.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e2e94816c8456557975edc1bfe8ab9e8701f34a1 Author: Karel Zak Date: Thu Oct 19 11:23:20 2023 +0200 libsmartcols: make calculation more robust * add debug messages * make columns stat debug more compact * default to zero if data undefined * fix "extreme" column enlarging Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 50 ++++++++++++++++++++++++++------------------ libsmartcols/src/print.c | 2 +- 2 files changed, 31 insertions(+), 21 deletions(-) commit c5310d4a3121dbcb2e137a0a2db20bca3c3e4ad5 Author: Karel Zak Date: Thu Oct 19 10:48:59 2023 +0200 libsmartcols: reset cell wrapping if all done Signed-off-by: Karel Zak libsmartcols/src/column.c | 2 +- libsmartcols/src/print.c | 8 +++++++- libsmartcols/src/smartcolsP.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) commit 2eab8ab48681cd2e52b08d116522207d6d2b28c3 Author: Karel Zak Date: Wed Oct 18 12:29:17 2023 +0200 lsblk: use zero to separate lines in multi-line cells Fixes: https://github.com/util-linux/util-linux/issues/2533 Signed-off-by: Karel Zak misc-utils/lsblk.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit 9ab58a4301ee6920a291df47899eb8b2df217d64 Author: Karel Zak Date: Wed Oct 18 12:28:40 2023 +0200 libsmartcols: add support for zero separated wrap data Signed-off-by: Karel Zak libsmartcols/src/column.c | 66 +++++++++++++++++++++++++++++++++++++- libsmartcols/src/libsmartcols.h.in | 5 +++ libsmartcols/src/libsmartcols.sym | 2 ++ 3 files changed, 72 insertions(+), 1 deletion(-) commit c57e73eac9334d5196599511939e2b57e588ff54 Author: Karel Zak Date: Wed Oct 18 10:20:12 2023 +0200 libsmartcols: add scols_cell_refer_memory() * allow to use non-string data * use memcpy() rather than strdup() for data Signed-off-by: Karel Zak libsmartcols/src/cell.c | 67 +++++++++++++++++++++++++++++++++----- libsmartcols/src/libsmartcols.h.in | 5 +++ libsmartcols/src/libsmartcols.sym | 2 ++ libsmartcols/src/print.c | 12 +++++-- libsmartcols/src/smartcolsP.h | 1 + 5 files changed, 75 insertions(+), 12 deletions(-) commit 958d0b7fbc501d9b07b13265c92378dfd8dd9832 Author: Karel Zak Date: Thu Oct 12 23:15:06 2023 +0200 libsmartcols: always print vertical symbol Signed-off-by: Karel Zak libsmartcols/src/print.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit e222a23f110e4859655fcb5b9f7e3ad5d7f03e01 Author: Karel Zak Date: Thu Oct 12 22:38:43 2023 +0200 libsmartcols: multi-line cells refactoring * move data wrapping code to column.c * do data wrapping on one place when copy cell data to buffer * use table cursor in affected functions * calculate tree ASCII-art to wrapped data * mark wrap_chunksize() callback as deprecated; library calculates the size itself from real data Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 39 ++++---- libsmartcols/src/column.c | 132 +++++++++++++++++++++++++- libsmartcols/src/print.c | 214 +++++++++++++++++------------------------- libsmartcols/src/smartcolsP.h | 36 ++++--- 4 files changed, 256 insertions(+), 165 deletions(-) commit 97448130fe342813ebd0453ed0280ac18d287629 Author: Karel Zak Date: Thu Oct 12 11:57:10 2023 +0200 libsmartcols: add table cursor The cursor makes it simple for callbacks to access information about the current cell, line and column. It will reduce number of necessary arguments for callbacks. Signed-off-by: Karel Zak libsmartcols/src/libsmartcols.h.in | 6 ++++++ libsmartcols/src/libsmartcols.sym | 5 ++++- libsmartcols/src/smartcolsP.h | 9 ++++++++ libsmartcols/src/table.c | 44 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 1 deletion(-) commit 6b7247411d9ddfcfeb0933b3ab44bf295c071f7b Author: Karel Zak Date: Thu Oct 12 22:12:58 2023 +0200 lib/mbsalign: calculate size of decoded string The "safe" encoding replaces each unsafe byte with \x, the new function mbs_safe_decoded_size() calculates the original size of the string. Signed-off-by: Karel Zak include/mbsalign.h | 1 + lib/mbsalign.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit f9ba5fa0ca612756887ce7c8c01ce6d43827241c Author: Karel Zak Date: Tue Oct 10 19:35:34 2023 +0200 lib/buffer: make buffer usable for non-string data Signed-off-by: Karel Zak lib/buffer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 357e6a0efc62f2151ba24b4730cc35015559bd41 Author: Karel Zak Date: Wed Oct 11 12:37:40 2023 +0200 lib/strutils: add ul_next_string() The function jumps to the next string in buffer where strings are separated by \0. Signed-off-by: Karel Zak include/strutils.h | 17 +++++++++++++++++ lib/strutils.c | 9 +++++++++ 2 files changed, 26 insertions(+) commit c2f3f40ecc78ac298118d14a6ec037f854076afe Merge: 4cb795965 5fbfa64eb Author: Karel Zak Date: Mon Oct 23 12:50:22 2023 +0200 Merge branch 'master' of https://github.com/Connor-GH/util-linux * 'master' of https://github.com/Connor-GH/util-linux: Fix man page for col to correct documentation error Update col.c to fix option mistake commit 4cb795965d6f0c6cfc8988cd582556be230800d6 Merge: b65edc8ad dc9642802 Author: Karel Zak Date: Mon Oct 23 12:47:19 2023 +0200 Merge branch 'libblkid/vxfs/cleanup' of https://github.com/t-8ch/util-linux * 'libblkid/vxfs/cleanup' of https://github.com/t-8ch/util-linux: libblkid: (vxfs) simplify prober libblkid: (superblocks) add helper blkid32_to_cpu() libblkid: (vxfs) use hex escape for magic libblkid: (vxfs) add test files commit b65edc8adabd72fc4094474ff5561570a803560e Merge: e0ff28712 6de3def84 Author: Karel Zak Date: Mon Oct 23 12:37:19 2023 +0200 Merge branch 'wdctl/sysfs' of https://github.com/t-8ch/util-linux * 'wdctl/sysfs' of https://github.com/t-8ch/util-linux: wdctl: use only sysfs if sufficient commit e0ff28712fac42c1c49586eb8f48d0c09390ca10 Merge: 42f7e2641 2adad194c Author: Karel Zak Date: Mon Oct 23 12:35:57 2023 +0200 Merge branch 'libmount/null-api' of https://github.com/t-8ch/util-linux * 'libmount/null-api' of https://github.com/t-8ch/util-linux: libmount: guard against sysapi == NULL commit 42f7e2641ed0c81d5588d1cb347a0ea16c931c4b Merge: 1c8e42e2e 369c89e78 Author: Karel Zak Date: Mon Oct 23 12:35:34 2023 +0200 Merge branch 'PR/lscpu-caches-sep' of github.com:karelzak/util-linux-work * 'PR/lscpu-caches-sep' of github.com:karelzak/util-linux-work: lscpu: fix caches separator for --parse= commit 1c8e42e2e31fc8c7c780a1811712a3978199851b Merge: 03133e822 cff4e5a68 Author: Karel Zak Date: Mon Oct 23 12:34:56 2023 +0200 Merge branch 'chfn_gecos' of https://github.com/mator/util-linux * 'chfn_gecos' of https://github.com/mator/util-linux: Use empty libuser config file. commit 03133e822d7be04baa707ce9cec140a7a0576e9f Merge: 89972f74a 07b2450d1 Author: Karel Zak Date: Mon Oct 23 12:32:58 2023 +0200 Merge branch 'topic-fix-fail-to-find-exfat-volume-label' of https://github.com/YuezhangMo/util-linux * 'topic-fix-fail-to-find-exfat-volume-label' of https://github.com/YuezhangMo/util-linux: libblkid: exfat: fix fail to find volume label commit 89972f74a861e9f8b348e241cb6b9032496be3bc Merge: e15518d0d 512c91a64 Author: Karel Zak Date: Mon Oct 23 12:29:50 2023 +0200 Merge branch 'misc/fixes' of https://github.com/t-8ch/util-linux * 'misc/fixes' of https://github.com/t-8ch/util-linux: meson: don't try to build test_ca without libcap-ng blkpr: store return value of getopt_long in int commit e15518d0dd791bf84bf702237dfd6a8adb1cafbb Merge: ed263d917 941e1d555 Author: Karel Zak Date: Mon Oct 23 12:28:26 2023 +0200 Merge branch 'meson/int-cmp' of https://github.com/t-8ch/util-linux * 'meson/int-cmp' of https://github.com/t-8ch/util-linux: meson: avoid int operation with non-int commit ed263d91733d75fdd7180bb459b139e25efd603b Merge: aa90cceaf 9fa970fb9 Author: Karel Zak Date: Mon Oct 23 12:26:45 2023 +0200 Merge branch 'path' of https://github.com/stoeckmann/util-linux * 'path' of https://github.com/stoeckmann/util-linux: sys-utils/lscpu: Use ul_path_scanf where possible lib/path: Set errno in case of fgets failure lib/path: fix typos lib/path: remove ul_prefix_fopen lib/path: set errno in case of error lib/path: fix possible out of boundary access commit aa90cceafd815d6fb9e2e234f8649592fe8bcec8 Merge: f3fd64111 601686e83 Author: Karel Zak Date: Mon Oct 23 12:23:51 2023 +0200 Merge branch 'login-simplify' of https://github.com/stoeckmann/util-linux * 'login-simplify' of https://github.com/stoeckmann/util-linux: login: access login.noauth file directly login: use xasprintf commit 5fbfa64eb490e262274c29e5a705df122d651401 Author: Connor-GH <72793802+Connor-GH@users.noreply.github.com> Date: Sat Oct 21 17:58:36 2023 -0500 Fix man page for col to correct documentation error text-utils/col.1.adoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 77bf9737bb398e82588e91744547dccf0f5d0ed0 Author: Connor-GH <72793802+Connor-GH@users.noreply.github.com> Date: Sat Oct 21 17:55:49 2023 -0500 Update col.c to fix option mistake text-utils/col.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 200828792846da755d0cf8c08af487c7c745c559 Author: Thomas Weißschuh Date: Tue Oct 17 18:06:15 2023 +0200 umount: handle bindmounts during --recursive Fixes #2551 Signed-off-by: Thomas Weißschuh sys-utils/umount.c | 2 +- tests/expected/mount/umount-recursive | 1 + tests/ts/mount/umount-recursive | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) commit cdd1ad7d7b1eae9fd55369099e74138faa14f0b3 Author: Thomas Weißschuh Date: Tue Oct 17 18:01:31 2023 +0200 mount: (tests) don't create /dev/nul Signed-off-by: Thomas Weißschuh tests/ts/mount/umount-recursive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6de3def84cf48b68b79d0cc4b5e1d2696e0484d1 Author: Thomas Weißschuh Date: Fri Oct 13 16:44:51 2023 +0200 wdctl: use only sysfs if sufficient Also avoid opening device if nowayout is set. Opening the device node starts the watchdog. With 'nowayout' enabled unstoppably. Also the device node can only be opened once at the same time which can be problematic. Prefer to retrieve the information via sysfs which does not have such problems. Fixes #2543 Signed-off-by: Thomas Weißschuh sys-utils/wdctl.c | 50 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 11 deletions(-) commit dc9642802ed914098f1f6bd686e555767abc11bc Author: Thomas Weißschuh Date: Sat Oct 14 12:56:42 2023 +0200 libblkid: (vxfs) simplify prober Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/vxfs.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 5a60209f0143ed76bc717166337e7740d4f6b518 Author: Thomas Weißschuh Date: Sat Oct 14 12:56:04 2023 +0200 libblkid: (superblocks) add helper blkid32_to_cpu() Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/superblocks.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 522af0ff51276a2143ec4547b102eec1ee110eb7 Author: Thomas Weißschuh Date: Sat Oct 14 12:18:14 2023 +0200 libblkid: (vxfs) use hex escape for magic It's easier to read and more consistent. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/vxfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10ded1a81ab81b10c25a62c681370bfe42f7b022 Author: Thomas Weißschuh Date: Sat Oct 14 12:14:42 2023 +0200 libblkid: (vxfs) add test files The test files have been constructed manually from the prober. While not providing a real test at least they make sure that the existing logic stays stable. Signed-off-by: Thomas Weißschuh tests/expected/blkid/low-probe-vxfs-be | 6 ++++++ tests/expected/blkid/low-probe-vxfs-le | 6 ++++++ tests/ts/blkid/images-fs/vxfs-be.img.xz | Bin 0 -> 128 bytes tests/ts/blkid/images-fs/vxfs-le.img.xz | Bin 0 -> 104 bytes 4 files changed, 12 insertions(+) commit 2adad194ca7a2934217de30a2dff2b2f5b346774 Author: Thomas Weißschuh Date: Fri Oct 13 10:17:16 2023 +0200 libmount: guard against sysapi == NULL Signed-off-by: Thomas Weißschuh libmount/src/hook_mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 369c89e78ece1bb4eb06542ccd11b5f10b78aa79 Author: Karel Zak Date: Fri Oct 13 00:03:15 2023 +0200 lscpu: fix caches separator for --parse= Fixes: https://github.com/util-linux/util-linux/issues/2544 Signed-off-by: Karel Zak sys-utils/lscpu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cff4e5a68b5da8a5016042ceef227c8f1c9a2819 Author: Anatoly Pugachev Date: Thu Oct 12 14:13:02 2023 +0300 Use empty libuser config file. In case of an absence /etc/libuser.conf, use empty file by pointing LIBUSER_CONF to /dev/null. This allows chfn/gecos to pass without error. PS: The "libuser" library is no longer maintained, and it was recommended by the original author to not use it anymore. tests/ts/chfn/gecos | 2 ++ 1 file changed, 2 insertions(+) commit 512c91a64706ae15bbf8d5fc609b9aaa2af15346 Author: Thomas Weißschuh Date: Wed Oct 11 16:35:45 2023 +0200 meson: don't try to build test_ca without libcap-ng Signed-off-by: Thomas Weißschuh meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 07b2450d1eda5ecaaeaac1940b606542f5a738d4 Author: Yuezhang Mo Date: Wed Oct 11 18:42:11 2023 +0800 libblkid: exfat: fix fail to find volume label Commit f98b56326 set the maximum number of iterations to 10000. If the volume label is after the 10000th entry, the volume label will not be found. So this commit sets the maximum number of iterations to correct value 256×1024×1024/32. Fixes: f98b56326 ("libblkid: [exfat] Limit maximum number of iterations in find_label") Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru libblkid/src/superblocks/exfat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 95d33617cf070a803bef2b056ddf7ed75f50170d Author: Thomas Weißschuh Date: Wed Oct 11 07:20:43 2023 +0200 blkpr: store return value of getopt_long in int getopt_long returns an int. Don't try to store it in a char. See #2538. Signed-off-by: Thomas Weißschuh sys-utils/blkpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fa970fb947d90232a0166db3667751a30961e02 Author: Tobias Stoeckmann Date: Tue Oct 10 21:08:41 2023 +0200 sys-utils/lscpu: Use ul_path_scanf where possible Signed-off-by: Tobias Stoeckmann sys-utils/lscpu-virt.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) commit 297fc55bae06aabeda0d1e9549c45a1ac5f3f900 Author: Tobias Stoeckmann Date: Tue Oct 10 21:00:48 2023 +0200 lib/path: Set errno in case of fgets failure Signed-off-by: Tobias Stoeckmann lib/path.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 601686e833bae3a15d6a6ca79b952df923fd552e Author: Tobias Stoeckmann Date: Sun Oct 8 20:22:47 2023 +0200 login: access login.noauth file directly There is no need to scan a directory if we already know the filename we are looking for. While at it, close resources afterwards. Signed-off-by: Tobias Stoeckmann login-utils/login.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit ea55bf64b231726d7e0a1067b6bbb130524185b6 Author: Tobias Stoeckmann Date: Sun Oct 8 20:21:04 2023 +0200 login: use xasprintf It is easier to use xasprintf than performing all its internals explicitly in login's code base. Signed-off-by: Tobias Stoeckmann login-utils/login.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f3fd64111c28de1ecd47f7cd519120ffa531800d Merge: 36cce3dcb 2f0e92b63 Author: Karel Zak Date: Mon Oct 9 13:04:07 2023 +0200 Merge branch 'libmount/errormsg' of https://github.com/t-8ch/util-linux * 'libmount/errormsg' of https://github.com/t-8ch/util-linux: libmount: report all kernel messages for fd-based mount API libmount: add helper to log mount messages as emitted by kernel libmount: change syscall status macros to be functions commit 36cce3dcb8fc1bee7e595f0947cc0b9d8a7ad6af Merge: f2458cf9c d58cd0f7e Author: Karel Zak Date: Mon Oct 9 12:26:37 2023 +0200 Merge branch 'lsfs--sockdiag-RW' of https://github.com/masatake/util-linux * 'lsfs--sockdiag-RW' of https://github.com/masatake/util-linux: lsfd: (man) update the description of ENDPOINTS column of UNIX-Stream sockets tests: (lsfd) extend the mkfds-socketpair case to test ENDPOINTS with SOCK.SHUTDOWN info lsfd: append SOCK.SHUTDOWN value to ENDPOINTS column of UNIX-STREAM sockets tests: (lsfd) add a case for testing SOCK.SHUTDOWN column tests: (test_mkfds::socketpair) add "halfclose" parameter lsfd: don't capitalize the help strings for the columns lsfd: (man) write about SOCK.SHUTDOWN column lsfd: add SOCK.SHUTDOWN column lsfd: call xinfo backend method before calling socket generic method when filling columns tests: (lsfd) add a case for testing ENDPOINTS column of UNIX-STREAM sockets tests: (lsfd::mkfds-socketpair) make a case for testing DGRAM a subtest and add a subtest for STREAM lsfd: (man) document the ENDPOINT column for UNIX socket lsfd: fill ENDPOINTS column of unix socket using UNIX_DIAG_PEER information lsfd: make the sock_xinfo layer be able to prepare an ipc_class for a given socket lsfd: initialize the ipc table before loading lists of unix socket peers via netlink diag commit f2458cf9cd9a576589db2a6c09be802b367bdeb6 Author: Karel Zak Date: Mon Oct 9 12:18:31 2023 +0200 autotools: fix AC_DEFINE_UNQUOTED() use Let's use AC_DEFINE_UNQUOTED() for string-like content, otherwise use a simple AC_DEFINE(). Signed-off-by: Karel Zak configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b53ba174c158d5eb595b86c5fbb83d6fc433075d Author: Karel Zak Date: Mon Oct 9 12:15:20 2023 +0200 autotools: fix librtas check Fixes: https://github.com/util-linux/util-linux/discussions/2527 Signed-off-by: Karel Zak configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d58cd0f7eac2056ec80fdf9fae60887726d77b1f Author: Masatake YAMATO Date: Mon Oct 2 23:56:47 2023 +0900 lsfd: (man) update the description of ENDPOINTS column of UNIX-Stream sockets Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b0dbcec023e7108171c5b6f44556529c82bc1812 Author: Masatake YAMATO Date: Mon Oct 2 21:52:00 2023 +0900 tests: (lsfd) extend the mkfds-socketpair case to test ENDPOINTS with SOCK.SHUTDOWN info Signed-off-by: Masatake YAMATO .../mkfds-socketpair-STREAM-ENDPOINT-halfclose | 3 +++ tests/ts/lsfd/mkfds-socketpair | 23 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit 3f3da329201d3e30ca01de9d0b24132f7f9f36bc Author: Masatake YAMATO Date: Mon Oct 2 23:50:21 2023 +0900 lsfd: append SOCK.SHUTDOWN value to ENDPOINTS column of UNIX-STREAM sockets An example output: # ./lsfd -Q '((PID == 1) || (PID == 1896)) && (TYPE == "UNIX-STREAM") && ((FD == 1) || (FD == 278))' -o+ENDPOINTS COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME ENDPOINTS systemd 1 root 278 rw---m UNIX-STREAM sockfs 9 37012 state=connected path=/run/systemd/journal/stdout 1896,ModemManager,1-w ModemManager 1896 root 1 rw---- UNIX-STREAM sockfs 9 43126 state=connected 1,systemd,278r- 1870458,systemd-journal,68r- Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 12 ++++++++++-- tests/expected/lsfd/mkfds-socketpair-STREAM-ENDPOINT | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit 750ad7ceb138c759f24adff7e823063df24414fe Author: Masatake YAMATO Date: Mon Oct 2 23:35:46 2023 +0900 tests: (lsfd) add a case for testing SOCK.SHUTDOWN column Signed-off-by: Masatake YAMATO .../lsfd/mkfds-socketpair-STREAM-SHUTDOWN-STATE | 3 +++ tests/ts/lsfd/mkfds-socketpair | 23 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit ef46aa41a12bc34480c305f7d30c8ce2e7fe9781 Author: Masatake YAMATO Date: Mon Oct 2 21:44:13 2023 +0900 tests: (test_mkfds::socketpair) add "halfclose" parameter Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit cd30dd6f86bb0f9a82b618490a2853de8b2ad08a Author: Masatake YAMATO Date: Mon Oct 2 23:19:51 2023 +0900 lsfd: don't capitalize the help strings for the columns Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0536fd829ad21d4d66ec03f2ca883125f306c6f9 Author: Masatake YAMATO Date: Mon Oct 2 23:15:59 2023 +0900 lsfd: (man) write about SOCK.SHUTDOWN column Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 426ff07f9a54503c5d8646a1589d4d7a7018d740 Author: Masatake YAMATO Date: Mon Oct 2 23:03:06 2023 +0900 lsfd: add SOCK.SHUTDOWN column An example output: # ./lsfd -p1 -Q '(TYPE == "UNIX-STREAM")' -o+SOCK.SHUTDOWN systemd 1 root 443 rw---m UNIX-STREAM sockfs 9 183103884 state=connected path=/run/systemd/journal/stdout r- systemd 1 root 462 rw---- UNIX-STREAM sockfs 9 11172039 state=listen path=/run/libvirt/libvirt-sock rw Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 33 ++++++++++++++++++++++++++++++++- misc-utils/lsfd-sock.c | 3 +++ misc-utils/lsfd.c | 3 +++ misc-utils/lsfd.h | 1 + 4 files changed, 39 insertions(+), 1 deletion(-) commit f4479119177f7453b46c6a2180d97f88c9cbe4af Author: Masatake YAMATO Date: Mon Oct 2 23:00:41 2023 +0900 lsfd: call xinfo backend method before calling socket generic method when filling columns Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit b3563457dbe009628a61e012a6accf7fcca803d2 Author: Masatake YAMATO Date: Fri Aug 4 01:29:53 2023 +0900 tests: (lsfd) add a case for testing ENDPOINTS column of UNIX-STREAM sockets Signed-off-by: Masatake YAMATO .../expected/lsfd/mkfds-socketpair-STREAM-ENDPOINT | 3 +++ tests/ts/lsfd/mkfds-socketpair | 24 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit 98d1485de9c5fdc81d424e59eb7da47d21405555 Author: Masatake YAMATO Date: Mon Oct 9 15:29:40 2023 +0900 tests: (lsfd::mkfds-socketpair) make a case for testing DGRAM a subtest and add a subtest for STREAM Signed-off-by: Masatake YAMATO .../{mkfds-socketpair => mkfds-socketpair-DGRAM} | 0 tests/expected/lsfd/mkfds-socketpair-STREAM | 3 +++ tests/ts/lsfd/mkfds-socketpair | 22 ++++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit 941e1d555cafdc56d36defc40c0d4ad9a18ed53b Author: Thomas Weißschuh Date: Mon Oct 9 07:34:46 2023 +0200 meson: avoid int operation with non-int `conf` as configuration_data() object can contain any datatype. For `HAVE_FOO` variables this will be a `1` int to generate `#define HAVE_FOO 1` or a `false` bool to generate `#undef HAVE_FOO` in `conf.h`. When retrieving and testing `HAVE_FOO` from `conf` it can be both types. Newer versions of meson are unhappy about comparisions of int with non-int ../meson.build:734: DEPRECATION: Project uses feature that was always broken, and is now deprecated since '1.2.0': int operations with non-int. It is not commutative and only worked because of leaky Python abstractions. WARNING: Broken features used: * 1.2.0: {'int operations with non-int'} As both `int` and `bool` support a `.to_string()` method, we can use that to convert them into a well-known type and compare that. Unfortunately meson does not implement a way to determine the type of a value. A method `int.to_int()` would also have worked but does not exist. This broken feature was actually first recognized in util-linux. See #2312 and https://github.com/mesonbuild/meson/pull/11879. Signed-off-by: Thomas Weißschuh meson.build | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 970f3e5a31cabcd0e9f7df4d9a90721020517a82 Author: Tobias Stoeckmann Date: Sun Oct 8 20:51:07 2023 +0200 lib/path: fix typos Signed-off-by: Tobias Stoeckmann lib/path.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8e58a3f11da4f5ed6c0c149489ff149496d63168 Author: Tobias Stoeckmann Date: Sun Oct 8 20:49:31 2023 +0200 lib/path: remove ul_prefix_fopen The function ul_prefix_fopen does not properly check for paths which are too long. Since the only caller of ul_prefix_fopen can be easily converted to ul_path_fopen, remove the function. Signed-off-by: Tobias Stoeckmann include/path.h | 2 -- lib/path.c | 19 ------------------- sys-utils/lscpu-virt.c | 2 +- 3 files changed, 1 insertion(+), 22 deletions(-) commit 5ae099f1befaedd1995d4e02075f7c8813f1c9df Author: Tobias Stoeckmann Date: Sun Oct 8 20:47:53 2023 +0200 lib/path: set errno in case of error Some programs like lscpu expect errno to be set if ul_path_cpuparse fails. Signed-off-by: Tobias Stoeckmann lib/path.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e192f2d81160c4e4f9a6b21329cf9d6045a405d0 Author: Tobias Stoeckmann Date: Sun Oct 8 20:41:29 2023 +0200 lib/path: fix possible out of boundary access If fgets reads from a file starting with a NUL byte in ul_path_cpuparse, then the check for newline leads to an out of boundary access. Proof of Concept (compile with --enable-asan): 1. Prepare /tmp/poc with required files ``` $ install -d /tmp/poc/sys/devices/system/cpu $ dd if=/dev/zero of=/tmp/poc/sys/devices/system/cpu/possible bs=1 count=1 $ install -D /dev/null /tmp/poc/proc/cpuinfo ``` 2. Run lscpu with sysroot option ``` $ lscpu --sysroot /tmp/poc ================================================================= ==78238==ERROR: AddressSanitizer: heap-buffer-overflow ``` Signed-off-by: Tobias Stoeckmann lib/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f0e92b634ebac2feef1eb873d5e5ade7ebab834 Author: Thomas Weißschuh Date: Thu Oct 5 13:21:23 2023 +0200 libmount: report all kernel messages for fd-based mount API Signed-off-by: Thomas Weißschuh libmount/src/hook_mount.c | 2 ++ 1 file changed, 2 insertions(+) commit 2d5e138e8c28e89fea8e3e960ca863787bb6fe91 Author: Thomas Weißschuh Date: Thu Oct 5 13:19:14 2023 +0200 libmount: add helper to log mount messages as emitted by kernel The kernel helpfully provides feedback about failed operations via the filesystem descriptor. Read that information and expose it via libmounts debug facilities. Signed-off-by: Thomas Weißschuh libmount/src/hook_mount.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 8eb925b14a34d65e5e33861ea4aa1f565fb3d7ca Author: Thomas Weißschuh Date: Thu Oct 5 13:18:15 2023 +0200 libmount: change syscall status macros to be functions Functions are easier to modify and reason about. Signed-off-by: Thomas Weißschuh libmount/src/mountP.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 762898e3fe469991be742216e573609142a0df99 Merge: 6720eb3df 51f9e0937 Author: Karel Zak Date: Wed Oct 4 20:08:06 2023 +0200 Merge branch 'libblkid/align' of https://github.com/t-8ch/util-linux * 'libblkid/align' of https://github.com/t-8ch/util-linux: libblkid: (probe) remove chunking from blkid_probe_get_idmag() libblkid: (probe) read data in chunks swapon: (tests) abort test on failing commands libblkid: reset errno before calling probefuncs libfdisk: reset errno before calling read() commit 51f9e0937ba2666b7fa489768b038cf26da8cc47 Author: Thomas Weißschuh Date: Sun Oct 1 14:24:04 2023 +0200 libblkid: (probe) remove chunking from blkid_probe_get_idmag() blkid_probe_get_buffer is doing the same thing internally now. Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 8a534253bc52f453db21af02299efacd12f40fda Author: Thomas Weißschuh Date: Sat Sep 30 23:59:44 2023 +0200 libblkid: (probe) read data in chunks Signed-off-by: Thomas Weißschuh libblkid/src/blkidP.h | 1 + libblkid/src/probe.c | 39 ++++++++++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) commit 6720eb3dfbd967af96bfda6fc7b8790c742d5cba Merge: 021a9629f 44fa7b032 Author: Karel Zak Date: Wed Oct 4 20:03:02 2023 +0200 Merge branch 'libmount/tab-uaf' of https://github.com/t-8ch/util-linux * 'libmount/tab-uaf' of https://github.com/t-8ch/util-linux: Revert "libmount: (tab) avoid leaking memory allocated in loop" commit 021a9629f6956b2dcd0b292a43c77c29ecd80b5a Merge: 521b81344 7e994f61b Author: Karel Zak Date: Wed Oct 4 19:57:21 2023 +0200 Merge branch 'setpriv/completion' of https://github.com/t-8ch/util-linux * 'setpriv/completion' of https://github.com/t-8ch/util-linux: setpriv: fix group argument completion commit 521b81344f4c3076a39e1aca4de5b1771fe43e90 Merge: be4d05f96 8b1dbe497 Author: Karel Zak Date: Wed Oct 4 19:56:39 2023 +0200 Merge branch 'libfdisk/errno' of https://github.com/t-8ch/util-linux * 'libfdisk/errno' of https://github.com/t-8ch/util-linux: libfdisk: reset errno before calling read() commit be4d05f96279f62a8c72b10d48bb13acc5417d94 Merge: c38162bf2 dc9b6a3c5 Author: Karel Zak Date: Wed Oct 4 19:35:26 2023 +0200 Merge branch 'ci/musl' of https://github.com/t-8ch/util-linux * 'ci/musl' of https://github.com/t-8ch/util-linux: ci: run full testsuite under musl libc build-sys: only build col on glibc lib/timeutils: don't use glibc strptime extension commit 44fa7b032e182fe8a58c699f64c3474ffa5f7abf Author: Thomas Weißschuh Date: Wed Oct 4 17:21:47 2023 +0200 Revert "libmount: (tab) avoid leaking memory allocated in loop" coverity claims that this is now a use-after-free. Let's revert the original change and make the code clearer before trying another fix. This reverts commit d36306a560fd6d747e18ab22fc1279f4a373f43d. Signed-off-by: Thomas Weißschuh libmount/src/tab.c | 1 - 1 file changed, 1 deletion(-) commit 3be5c3b8327a07b7b9b62757b6e535ae20651fe8 Author: Thomas Weißschuh Date: Mon Oct 2 18:17:01 2023 +0200 swapon: (tests) abort test on failing commands Signed-off-by: Thomas Weißschuh tests/ts/swapon/devname | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1a5ad691239a8840ee8c8da003d6cdbe80d0444 Author: Thomas Weißschuh Date: Mon Oct 2 22:24:21 2023 +0200 libblkid: reset errno before calling probefuncs The probers optionally use errno to communicate error details. When a leftover errno is set from libblkid internally this can confuse the probers. Signed-off-by: Thomas Weißschuh libblkid/src/partitions/partitions.c | 1 + libblkid/src/superblocks/superblocks.c | 1 + libblkid/src/topology/topology.c | 1 + 3 files changed, 3 insertions(+) commit 27c7778aeb70047e89a8028d19b5cf001db1a91f Author: Masatake YAMATO Date: Mon Oct 2 21:07:02 2023 +0900 lsfd: (man) document the ENDPOINT column for UNIX socket Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 3 +++ 1 file changed, 3 insertions(+) commit f9771d8d71b1b98f6c30b5c631a2301f0315f440 Author: Masatake YAMATO Date: Fri Aug 4 01:10:58 2023 +0900 lsfd: fill ENDPOINTS column of unix socket using UNIX_DIAG_PEER information An example output: # ./lsfd -Q '((PID == 1) || (PID == 1896)) && (TYPE == "UNIX-STREAM") && ((FD == 1) || (FD == 278))' -o+ENDPOINTS COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME ENDPOINTS systemd 1 root 278 rw---m UNIX-STREAM sockfs 9 37012 state=connected path=/run/systemd/journal/stdout 1896,ModemManager,1 ModemManager 1896 root 1 rw---- UNIX-STREAM sockfs 9 43126 state=connected 1,systemd,278 1870458,systemd-journal,68 Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 103 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) commit 7e994f61bd48734781638ad1412f8640093b06f5 Author: Thomas Weißschuh Date: Mon Oct 2 15:52:33 2023 +0200 setpriv: fix group argument completion Signed-off-by: Thomas Weißschuh bash-completion/setpriv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 046c5d5a2f4b0b8344cf0cad7e05a68a1e313710 Author: Masatake YAMATO Date: Fri Aug 4 00:51:49 2023 +0900 lsfd: make the sock_xinfo layer be able to prepare an ipc_class for a given socket Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock.c | 21 ++++++++++++++++++++- misc-utils/lsfd-sock.h | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) commit b20ab2779027cf872d857252b7d9f4355701a83f Author: Masatake YAMATO Date: Sun Jul 23 16:35:20 2023 +0900 lsfd: initialize the ipc table before loading lists of unix socket peers via netlink diag Loading the lists is done in initialize_classes(). Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a33a11e27268cd354e9ce8c4ffeea31d84cef907 Author: Thomas Weißschuh Date: Mon Oct 2 13:01:47 2023 +0200 libfdisk: reset errno before calling read() The else branch will be executed on short reads. For those errno is not reset so a random left-over errno value may be checked. Signed-off-by: Thomas Weißschuh libfdisk/src/utils.c | 1 + 1 file changed, 1 insertion(+) commit 8b1dbe49727bad9bd009306ab8921d06fd91b38a Author: Thomas Weißschuh Date: Mon Oct 2 13:01:47 2023 +0200 libfdisk: reset errno before calling read() The else branch will be executed on short reads. For those errno is not reset so a random left-over errno value may be checked. Signed-off-by: Thomas Weißschuh libfdisk/src/utils.c | 1 + 1 file changed, 1 insertion(+) commit c38162bf27028a61f5cbea8866faa626f01e60d9 Merge: a9a825270 ee84a3bfa Author: Karel Zak Date: Mon Oct 2 12:42:11 2023 +0200 Merge branch 'blkid/exclusive-opts' of https://github.com/t-8ch/util-linux * 'blkid/exclusive-opts' of https://github.com/t-8ch/util-linux: blkid: fix call to err_exclusive_options commit a9a82527008bf97b2c412ea739d483fc90678c35 Merge: 9504eddee 871ba058b Author: Karel Zak Date: Mon Oct 2 12:41:51 2023 +0200 Merge branch 'https-everywhere' of https://github.com/jwilk-forks/util-linux * 'https-everywhere' of https://github.com/jwilk-forks/util-linux: docs: use HTTPS for GitHub clone URLs commit 9504eddee52f058b09101fa494baf1d36b7db531 Merge: 219fb699a c4dad3d84 Author: Karel Zak Date: Mon Oct 2 12:41:17 2023 +0200 Merge branch 'libblkid/lvm-small-device' of https://github.com/t-8ch/util-linux * 'libblkid/lvm-small-device' of https://github.com/t-8ch/util-linux: libblkid: (lvm2) read complete superblock commit 219fb699a6653386602af60145905be7a94eb8f7 Merge: 7362935d8 849eb9df0 Author: Karel Zak Date: Mon Oct 2 12:40:55 2023 +0200 Merge branch 'libblkid/drbd-simplify' of https://github.com/t-8ch/util-linux * 'libblkid/drbd-simplify' of https://github.com/t-8ch/util-linux: libblkid: (drbd) avoid unaligned accesses include/c.h: add helpers for unaligned structure access libblkid: (drbd) use magics libblkid: (probe) allow superblock offset from end of device libblkid: (cramfs) use magic hint libblkid: (probe) add magic hint libblkid: (drbd) validate size in standard minsz predicate libblkid: (via_raid) validate size in standard minsz predicate libblkid: (silicon_raid) validate size in standard minsz predicate libblkid: (promise_raid) validate size in standard minsz predicate libblkid: (nvidia_raid) validate size in standard minsz predicate libblkid: (lsi_raid) validate size in standard minsz predicate libblkid: (jmicron_raid) validate size in standard minsz predicate libblkid: (isw_raid) validate size in standard minsz predicate libblkid: (highpoint_raid) validate size in standard minsz predicate libblkid: (ddf_raid) validate size in standard minsz predicate libblkid: (adapted_raid) validate size in standard minsz predicate libblkid: (probe) remove duplicate log commit 7362935d868dac799d261b96bab1c7a82af4545f Merge: ac05145d1 ffbec06d3 Author: Karel Zak Date: Mon Oct 2 12:40:38 2023 +0200 Merge branch 'analyzer2' of https://github.com/t-8ch/util-linux * 'analyzer2' of https://github.com/t-8ch/util-linux: libblkid: (probe) handle probe without chain gracefully libsmartcols: (cell) consistently handle NULL argument lib/idcache: always gracefully handle null cache script-playutils: close filestream in case ignore_line() fails lib/colors: correct documentation of colors_add_scheme() treewide: use reallocarray to allocated memory that will be reallocated commit ac05145d1796ec1ff29204b0bc183580aa2daba8 Merge: 5bb2b35c7 d36306a56 Author: Karel Zak Date: Mon Oct 2 12:37:52 2023 +0200 Merge branch 'libmount/tab-leak' of https://github.com/t-8ch/util-linux * 'libmount/tab-leak' of https://github.com/t-8ch/util-linux: libmount: (tab) avoid leaking memory allocated in loop commit 5bb2b35c7eae16116764e2e66006e65ef5976ab4 Merge: ac9e7e756 9c11c43cb Author: Karel Zak Date: Mon Oct 2 12:37:30 2023 +0200 Merge branch 'lsfd--bpf-name#in-flight' of https://github.com/masatake/util-linux * 'lsfd--bpf-name#in-flight' of https://github.com/masatake/util-linux: tests: (lsfd) extend the cases for testing BPF.NAME column lsfd.1.adoc: document BPF.NAME column lsfd: add BPF.NAME column lsfd: add xstrfappend and xstrvfappend lib/strutils: add strfappend and strvfappend tests: (test_mkfds::{bpf-prog,bpf-map}) fix memory leaks tests: (test_mkfds) add missing PARAM_END marker tests: (test_mkfds) use SYS_bpf instead of __NR_bpf tests: (test_mkfds) revise the usage of " __attribute__((__unused__))" tests: (lsfd::mkfds-bpf-map) chmod a+x commit ac9e7e7568097c9927891b6057047c2fd720cd06 Author: Karel Zak Date: Mon Oct 2 11:51:56 2023 +0200 lsblk: improve --tree description Addresses: https://github.com/util-linux/util-linux/issues/2516 Signed-off-by: Karel Zak misc-utils/lsblk.8.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ee84a3bfaf1706269c3a54a546bb057189556e67 Author: Thomas Weißschuh Date: Mon Oct 2 11:39:53 2023 +0200 blkid: fix call to err_exclusive_options err_exclusive_options needs to be passed the long options array, otherwise it will crash. Signed-off-by: Thomas Weißschuh misc-utils/blkid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 871ba058b4f6126e1b0d19b20a37280e93e426bc Author: Jakub Wilk Date: Mon Oct 2 07:22:54 2023 +0200 docs: use HTTPS for GitHub clone URLs GitHub has dropped support for the git:// protocol: https://github.blog/changelog/2022-03-15-removed-unencrypted-git-protocol-and-certain-ssh-keys/ Documentation/howto-contribute.txt | 2 +- Documentation/howto-pull-request.txt | 4 ++-- README | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit d36306a560fd6d747e18ab22fc1279f4a373f43d Author: Thomas Weißschuh Date: Wed Sep 27 20:37:22 2023 +0200 libmount: (tab) avoid leaking memory allocated in loop Signed-off-by: Thomas Weißschuh libmount/src/tab.c | 1 + 1 file changed, 1 insertion(+) commit c4dad3d846bb715dbf0fb177ae3ca196139eb60e Author: Thomas Weißschuh Date: Sun Oct 1 11:48:01 2023 +0200 libblkid: (lvm2) read complete superblock The lvm2_calc_crc() will create a checksum over LVM2_LABEL_SIZE bytes, which all need to be read. Currently this works because the superblock is cached by blkid_probe_get_idmag() which always reads 1024 bytes. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/lvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 849eb9df0a07770a9494ce9e0fdceb6a351be1ac Author: Thomas Weißschuh Date: Sun Oct 1 13:57:43 2023 +0200 libblkid: (drbd) avoid unaligned accesses Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/drbd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 68459714838c8c0c2d34b6d658638f5d59298bc7 Author: Thomas Weißschuh Date: Sun Oct 1 13:57:12 2023 +0200 include/c.h: add helpers for unaligned structure access Signed-off-by: Thomas Weißschuh include/c.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 876c2f283819887ae61afb078717fbc88e76eb27 Author: Thomas Weißschuh Date: Sat Sep 30 23:58:05 2023 +0200 libblkid: (drbd) use magics Reuse more of the standard prober functionality. This also avoids a potential unaligned access when comparing the superblock magic as a number. In case the superblock was already cached by a different loader the return address may have been unaligned leading to undefined behavior. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/drbd.c | 91 +++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 50 deletions(-) commit 2816a817149c792fa836d9ab06b64934aee8ac33 Author: Thomas Weißschuh Date: Sat Sep 30 23:56:46 2023 +0200 libblkid: (probe) allow superblock offset from end of device Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 931b734c07a2b7f2b075366b03cc8e1409433e4f Author: Thomas Weißschuh Date: Sun Oct 1 10:29:48 2023 +0200 libblkid: (cramfs) use magic hint Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/cramfs.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 803d3095df83f1e87372bf7b14f0041394458b0a Author: Thomas Weißschuh Date: Sat Sep 30 23:55:31 2023 +0200 libblkid: (probe) add magic hint This hint can be used by the probing callback to make decision based on the matched magic. This avoids a awkward memcmp() on the magic string. Signed-off-by: Thomas Weißschuh libblkid/src/blkidP.h | 1 + 1 file changed, 1 insertion(+) commit 26c3e02a928493e2f51fd6f34f7bc2b2be282d51 Author: Thomas Weißschuh Date: Sat Sep 30 23:21:33 2023 +0200 libblkid: (drbd) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/drbd.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit fd28e049c2ce9bed9bb34eb03969bf9808aa0a35 Author: Thomas Weißschuh Date: Sun Oct 1 00:08:40 2023 +0200 libblkid: (via_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/via_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 186df56ffb7a9f28c14930cc34ab1bbe2f34ce47 Author: Thomas Weißschuh Date: Sun Oct 1 00:08:31 2023 +0200 libblkid: (silicon_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/silicon_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cb23876a159305c363b2ad962be623e5edbb6130 Author: Thomas Weißschuh Date: Sun Oct 1 00:08:23 2023 +0200 libblkid: (promise_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/promise_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3e899f438ac99495661707986f603eb1aa57ee9e Author: Thomas Weißschuh Date: Sun Oct 1 00:08:12 2023 +0200 libblkid: (nvidia_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/nvidia_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c54586ed6702b848df438c392d74c10c6843654e Author: Thomas Weißschuh Date: Sun Oct 1 00:08:06 2023 +0200 libblkid: (lsi_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/lsi_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 956e40558342f0b33658427c43d5b09b37e581f7 Author: Thomas Weißschuh Date: Sun Oct 1 00:07:59 2023 +0200 libblkid: (jmicron_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/jmicron_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 354c3a65ec05618c1c5f3b300c7d813e05f8a971 Author: Thomas Weißschuh Date: Sun Oct 1 00:07:22 2023 +0200 libblkid: (isw_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/isw_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 864e9cd9c624c61a9d75fd5283d70b9e6f773dc7 Author: Thomas Weißschuh Date: Sun Oct 1 00:07:13 2023 +0200 libblkid: (highpoint_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/highpoint_raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d11af64ede9407fe7f951c9e54b9e288ef492ae2 Author: Thomas Weißschuh Date: Sun Oct 1 00:07:02 2023 +0200 libblkid: (ddf_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/ddf_raid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8ffaea54e139eb0061bc681ba56e10ee7a633e40 Author: Thomas Weißschuh Date: Sun Oct 1 00:06:53 2023 +0200 libblkid: (adapted_raid) validate size in standard minsz predicate Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/adaptec_raid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 744b8d496c0f771f91a97db9f2c68f304a15223f Author: Thomas Weißschuh Date: Sat Sep 30 23:05:21 2023 +0200 libblkid: (probe) remove duplicate log remove_buffer() already emits the same message. Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 2 -- 1 file changed, 2 deletions(-) commit 9c11c43cb38e8c96dc621034036ec0bb544cdf79 Author: Masatake YAMATO Date: Wed Sep 27 01:15:21 2023 +0900 tests: (lsfd) extend the cases for testing BPF.NAME column Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-bpf-map | 2 ++ tests/expected/lsfd/mkfds-bpf-prog | 4 ++-- tests/ts/lsfd/mkfds-bpf-map | 7 ++++--- tests/ts/lsfd/mkfds-bpf-prog | 7 ++++--- 4 files changed, 12 insertions(+), 8 deletions(-) commit da8e5310abf3027c1b5188456ebddc630a7ea2e9 Author: Masatake YAMATO Date: Wed Sep 27 00:51:26 2023 +0900 lsfd.1.adoc: document BPF.NAME column Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bc8083680c0e84cc980f90ce111c83324a8f645c Author: Masatake YAMATO Date: Wed Sep 27 01:12:16 2023 +0900 lsfd: add BPF.NAME column An example output: $ sudo ./lsfd -oCOMMAND,PID,ASSOC,TYPE,BPF.NAME,NAME -Q '(TYPE =~ "bpf-*")' -p 1 COMMAND PID ASSOC TYPE BPF.NAME NAME systemd 1 9 bpf_link anon_inode:bpf_link systemd 1 13 bpf-map cgroup_hash id=391 type=hash-of-maps name=cgroup_hash systemd 1 14 bpf-prog restrict_filesy id=8210 type=lsm name=restrict_filesy systemd 1 28 bpf-prog sd_devices id=8298 type=cgroup_device name=sd_devices systemd 1 29 bpf-prog sd_devices id=8299 type=cgroup_device name=sd_devices systemd 1 30 bpf-prog sd_devices id=8300 type=cgroup_device name=sd_devices ... Using memset was suggested by Thomas Weißschuh . Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.c | 3 ++ misc-utils/lsfd.h | 1 + 3 files changed, 83 insertions(+) commit ae3a6367fda8bd0ecae5ae46d25c85d797e4c678 Author: Masatake YAMATO Date: Sat Sep 30 05:26:48 2023 +0900 lsfd: add xstrfappend and xstrvfappend Signed-off-by: Masatake YAMATO misc-utils/lsfd.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 25a5cff86b73c54d8d0b6128240ecace87d365a2 Author: Masatake YAMATO Date: Sat Sep 30 05:21:40 2023 +0900 lib/strutils: add strfappend and strvfappend Signed-off-by: Masatake YAMATO include/strutils.h | 4 ++++ lib/strutils.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit f5dcdeb7a783e2ec596b638044d4b2d2d0e62f40 Author: Masatake YAMATO Date: Wed Sep 27 01:04:54 2023 +0900 tests: (test_mkfds::{bpf-prog,bpf-map}) fix memory leaks Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 3f8efa6b0acf6b04dbf2adc10060b46a1ed35bed Author: Masatake YAMATO Date: Wed Sep 27 01:01:58 2023 +0900 tests: (test_mkfds) add missing PARAM_END marker Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 1 + 1 file changed, 1 insertion(+) commit 96583e9cb9414c867c0f0cb39beacb9d6031584a Author: Masatake YAMATO Date: Wed Sep 27 01:01:12 2023 +0900 tests: (test_mkfds) use SYS_bpf instead of __NR_bpf Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 27359e4a6c64649b37d26f3addc6c4233cb4c1ca Author: Masatake YAMATO Date: Wed Sep 27 00:58:55 2023 +0900 tests: (test_mkfds) revise the usage of " __attribute__((__unused__))" Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2f1057f5e58c1a0b16b9d779ccd03ea3a761f9da Author: Masatake YAMATO Date: Sat Sep 30 05:28:58 2023 +0900 tests: (lsfd::mkfds-bpf-map) chmod a+x Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-bpf-map | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit ffbec06d3bf6f307364822a178c7c1b7679c65b0 Author: Thomas Weißschuh Date: Thu Sep 28 00:51:42 2023 +0200 libblkid: (probe) handle probe without chain gracefully Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47a54ac9b37ccf2ff830c61da52b062bd76508f4 Author: Thomas Weißschuh Date: Thu Sep 28 08:24:10 2023 +0200 libsmartcols: (cell) consistently handle NULL argument Some functions allow passing NULL, some don't. Even users internal to util-linux are passing NULL parameters to these functions, even for ones where it is not allowed. Unify the API. As there may be external users that rely on the NULL-accepting behavior for some functions use it everywhere. Signed-off-by: Thomas Weißschuh libsmartcols/src/cell.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit bcb40a762cbd98b8098c5ed80aee4576d6f9c31a Author: Thomas Weißschuh Date: Thu Sep 28 00:40:28 2023 +0200 lib/idcache: always gracefully handle null cache The "get" functions already do this and some callers rely on it also for "add" ones. For completeness also handle it in free_idcache(). Signed-off-by: Thomas Weißschuh lib/idcache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d496aea39c429509246a4d99669a0e47ba1cbe84 Author: Thomas Weißschuh Date: Wed Sep 27 23:30:27 2023 +0200 script-playutils: close filestream in case ignore_line() fails Signed-off-by: Thomas Weißschuh term-utils/script-playutils.c | 2 ++ 1 file changed, 2 insertions(+) commit 99d30f02f789ba897723fbdf46d599689c9aa90c Author: Thomas Weißschuh Date: Wed Sep 27 22:04:40 2023 +0200 lib/colors: correct documentation of colors_add_scheme() The function does not take ownership of its arguments and it does not require those arguments to be heap-allocated. In fact there is only one caller and it passed stack-allocated values. Signed-off-by: Thomas Weißschuh lib/colors.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 343b2e4bf9ceccfc34edc914e06dcde6d0d01919 Author: Thomas Weißschuh Date: Wed Sep 27 21:03:08 2023 +0200 treewide: use reallocarray to allocated memory that will be reallocated GCC 13 -fanalyzer expects memory that is passed to reallocarray() to have been allocated with reallocarray() in the first place and not with malloc(). While this requirement seems to contradict the documentation, the usage of reallocarray() is better than the current plain malloc() in any case. Signed-off-by: Thomas Weißschuh login-utils/lslogins.c | 2 +- misc-utils/logger.c | 2 +- text-utils/more.c | 2 +- text-utils/rev.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit dc9b6a3c5c325961f5e3fb453160bc98a0df0513 Author: Thomas Weißschuh Date: Sat Sep 16 12:03:06 2023 +0200 ci: run full testsuite under musl libc Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.sh | 4 ++++ .github/workflows/cibuild.yml | 10 ++++++++++ .github/workflows/openwrt-sdk-env.sh | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) commit 8886d84e25a457702b45194d69a47313f76dc6bc Author: Thomas Weißschuh Date: Wed Sep 27 19:53:55 2023 +0200 build-sys: only build col on glibc col expects an EILSEQ failure of getwchar() to leave the undecoded data in the buffer to be read by a subsequent getchar(). This is not guaranteed by the standard and for example musl libc does not conform to this expectation. As col is deprecated anyways just disable it on non-glibc instead of fixing it. Signed-off-by: Thomas Weißschuh configure.ac | 3 ++- meson.build | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) commit 10e078374d3c44edde56a1c53578bfed1c9da94c Author: Thomas Weißschuh Date: Sat Sep 23 10:24:58 2023 +0200 lib/timeutils: don't use glibc strptime extension strptime("%s") is a glibc extension and for example not available on musl. Reimplement the functionality in a cross-platform way. Signed-off-by: Thomas Weißschuh lib/timeutils.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit d3278188954e1b710ede9541395e0abf3f6b2a14 Merge: 22eabc715 be88b5792 Author: Karel Zak Date: Wed Sep 27 10:35:12 2023 +0200 Merge branch 'libblkid/vxfs-endianness' of https://github.com/t-8ch/util-linux * 'libblkid/vxfs-endianness' of https://github.com/t-8ch/util-linux: libblkid: (vxfs) report endianness commit 22eabc7155b0df451a1f57943e409a5e331dc12c Merge: 0cf52fc4a da91337a8 Author: Karel Zak Date: Wed Sep 27 10:34:47 2023 +0200 Merge branch 'libblkid/bcachefs/label_sub' of https://github.com/t-8ch/util-linux * 'libblkid/bcachefs/label_sub' of https://github.com/t-8ch/util-linux: libblkid: (bcachefs) add support for sub-device labels commit be88b5792736227880a371da970a48b3fa33e1ec Author: Thomas Weißschuh Date: Wed Sep 27 00:49:04 2023 +0200 libblkid: (vxfs) report endianness Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/vxfs.c | 2 ++ 1 file changed, 2 insertions(+) commit da91337a8109beb461c889ffe32701d3cb95aee2 Author: Thomas Weißschuh Date: Tue Sep 26 09:43:35 2023 +0200 libblkid: (bcachefs) add support for sub-device labels Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 31 +++++++++++++++++++++++++++++ tests/expected/blkid/low-probe-bcachefs-2 | 8 +++++--- tests/ts/blkid/images-fs/bcachefs-2.img.xz | Bin 988 -> 1000 bytes 3 files changed, 36 insertions(+), 3 deletions(-) commit 0cf52fc4a03db3c59ad31bde4e9a28b5642086dc Author: Thomas Weißschuh Date: Tue Sep 26 00:27:22 2023 +0200 libblkid: (ntfs) validate that sector_size is a power of two The NTFS prober reads data based off an offset of the sector size. If the sector size is unaligned and the read data is cached then other probers can read unaligned values. Sector sizes for NTFS actually only make sense as power-of-two so validate that and as a sideeffect avoid the unaligned reads. Also add the reproducer from OSS-Fuzz that found this issue. Fixes #2509 Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/ntfs.c | 2 +- tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-62691 | Bin 0 -> 16863 bytes 2 files changed, 1 insertion(+), 1 deletion(-) commit 87f491671efb920ddd1c45c70dc8016f072851bb Merge: 54c8608f7 3f13d1986 Author: Karel Zak Date: Mon Sep 25 12:44:46 2023 +0200 Merge branch 'login-terminal' of https://github.com/stoeckmann/util-linux * 'login-terminal' of https://github.com/stoeckmann/util-linux: login: prevent undefined ioctl and tcsetattr calls login: use correct terminal fd during setup commit 54c8608f7ccd4edc5f8c74ab4485950bbf045b28 Merge: 12087bd7b 7eb08ae15 Author: Karel Zak Date: Mon Sep 25 12:35:48 2023 +0200 Merge branch 'timestamp' of https://github.com/t-8ch/util-linux * 'timestamp' of https://github.com/t-8ch/util-linux: lib/timeutils: (parse_timestamp_reference) report errors on overflow lib/timeutils: print error if timestamp can't be parsed lib/timeutils: test epoch timestamp commit 12087bd7b78ccef13920cea9435859eb1dfa7a29 Merge: 06bc57301 e6fc6ab17 Author: Karel Zak Date: Mon Sep 25 12:34:47 2023 +0200 Merge branch 'ci/cache-openwrt-sdk' of https://github.com/t-8ch/util-linux * 'ci/cache-openwrt-sdk' of https://github.com/t-8ch/util-linux: ci: cache openwrt sdk commit 06bc573014a55a6ce36c5df425ff099743542d8f Merge: f861c1b37 89ffeab87 Author: Karel Zak Date: Mon Sep 25 12:33:29 2023 +0200 Merge branch 'ci/gcc-13' of https://github.com/t-8ch/util-linux * 'ci/gcc-13' of https://github.com/t-8ch/util-linux: ci: also use GCC 13 for sanitizer builds ci: don't combine -Werror and -fsanitize commit f861c1b37dbaae063266fcdb90ba966cb73e73f0 Merge: 661a7c364 3edf231c6 Author: Karel Zak Date: Mon Sep 25 12:32:25 2023 +0200 Merge branch 'analyzer1' of https://github.com/t-8ch/util-linux * 'analyzer1' of https://github.com/t-8ch/util-linux: libsmartcols: handle nameless tables in export format ldattach: don't call exit() from signal handler lslogins: fix realloc() loop allocation size more: avoid out-of-bound access libfdisk: handle allocation failure in fdisk_new_partition lib/env: fix function name remote_entry -> remove_entry libmount: gracefully handle NULL path in mnt_resolve_target() libblkid: avoid memory leak of cachefile path lib/env: avoid underflow of read_all_alloc() return value commit 661a7c364ca75330fbd8b585e5f4efefcc52ed3a Merge: 0dd96cc74 64d6d400f Author: Karel Zak Date: Mon Sep 25 12:30:37 2023 +0200 Merge branch 'realloc' of https://github.com/t-8ch/util-linux * 'realloc' of https://github.com/t-8ch/util-linux: treewide: use (x)reallocarray() when applicable commit 0dd96cc74da79e537eb8d00ec15366c8d0240e4d Merge: 4a872fbe4 a3d65102e Author: Karel Zak Date: Mon Sep 25 12:29:38 2023 +0200 Merge branch 'ci/clang-17' of https://github.com/t-8ch/util-linux * 'ci/clang-17' of https://github.com/t-8ch/util-linux: ci: build with clang 17 commit 4a872fbe46431367cf2886bde579d4780b4d9d1b Merge: faf959488 7096a0cd0 Author: Karel Zak Date: Mon Sep 25 12:28:07 2023 +0200 Merge branch 'login-comment' of https://github.com/stoeckmann/util-linux * 'login-comment' of https://github.com/stoeckmann/util-linux: login: Use pid_t for child_pid login: move comment commit faf959488fb734c9e4ac92ebb86c1533865e999d Merge: f4fed6c36 e3dedb011 Author: Karel Zak Date: Mon Sep 25 12:22:54 2023 +0200 Merge branch 'lsfd--resolve-mqueue-nodev' of https://github.com/masatake/util-linux * 'lsfd--resolve-mqueue-nodev' of https://github.com/masatake/util-linux: lsfd: collect the device number for mqueue fs in the initialization stage tests: (lsfd) show the entry for mqueue in /proc/self/mountinfo commit 7eb08ae15d89d40de159ebbb5462fa06a9787642 Author: Thomas Weißschuh Date: Sun Sep 24 23:43:44 2023 +0200 lib/timeutils: (parse_timestamp_reference) report errors on overflow Instead of silently returning '0' on 'minus'-underflow and silently wrapping on 'plus'-overflow return ERANGE. Signed-off-by: Thomas Weißschuh lib/timeutils.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ea4d607877417abd4d575f989a21d8648f22bb10 Author: Thomas Weißschuh Date: Sun Sep 24 23:32:08 2023 +0200 lib/timeutils: print error if timestamp can't be parsed Signed-off-by: Thomas Weißschuh lib/timeutils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7d31644aecc3a05c2647d5de5721e09a322b2562 Author: Thomas Weißschuh Date: Sun Sep 24 23:14:34 2023 +0200 lib/timeutils: test epoch timestamp Signed-off-by: Thomas Weißschuh lib/timeutils.c | 1 + 1 file changed, 1 insertion(+) commit e6fc6ab177be0830586224e670faa929a1f148e5 Author: Thomas Weißschuh Date: Fri Sep 22 22:03:34 2023 +0200 ci: cache openwrt sdk Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.yml | 7 +++++++ 1 file changed, 7 insertions(+) commit 89ffeab8747e7ea1b906783c9bbcaf887494d252 Author: Thomas Weißschuh Date: Fri Sep 22 20:38:13 2023 +0200 ci: also use GCC 13 for sanitizer builds Now that -Werror is not used anymore with -fsanitize the false-postives are not a problem anymore and we get the better runtime checks of newer sanitizers. Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab37a96d075907ecb857b4d983761db1af102598 Author: Thomas Weißschuh Date: Fri Sep 22 11:19:24 2023 +0200 ci: don't combine -Werror and -fsanitize As explained in [0]: Note that sanitizers tend to increase the rate of false positive warnings, most notably those around -Wmaybe-uninitialized. We recommend against combining -Werror and [the use of] sanitizers. [0] https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Instrumentation-Options.html#index-fsanitize_003dundefined Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3edf231c62da1d2bc7f496992f531d0f06b5fab3 Author: Thomas Weißschuh Date: Fri Sep 22 11:20:36 2023 +0200 libsmartcols: handle nameless tables in export format fputs(NULL) is not allowed. Signed-off-by: Thomas Weißschuh libsmartcols/src/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de13900d71a968e859ab7aece4537dfd87c7185c Author: Thomas Weißschuh Date: Fri Sep 22 20:21:38 2023 +0200 ldattach: don't call exit() from signal handler Instead use _exit(). Signed-off-by: Thomas Weißschuh sys-utils/ldattach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62104e69455c3add88adc360381176f3e83bda28 Author: Thomas Weißschuh Date: Fri Sep 22 20:08:22 2023 +0200 lslogins: fix realloc() loop allocation size If stat() fails the realloc loop would always try to allocate zero bytes. Signed-off-by: Thomas Weißschuh login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecdfc9aa701b4f406c239b6e163a45a5cc5b4a8c Author: Thomas Weißschuh Date: Fri Sep 22 19:53:24 2023 +0200 more: avoid out-of-bound access The realloc() needs to happen before that memory is used. Signed-off-by: Thomas Weißschuh text-utils/more.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit afbff723e3810e38c965be9f3f521eb4369c4393 Author: Thomas Weißschuh Date: Fri Sep 22 19:35:01 2023 +0200 libfdisk: handle allocation failure in fdisk_new_partition Signed-off-by: Thomas Weißschuh libfdisk/src/partition.c | 2 ++ 1 file changed, 2 insertions(+) commit 5e2bc9d62813293037afaf072ae0d9060b20afce Author: Thomas Weißschuh Date: Fri Sep 22 19:34:03 2023 +0200 lib/env: fix function name remote_entry -> remove_entry Signed-off-by: Thomas Weißschuh include/env.h | 2 +- lib/env.c | 4 ++-- text-utils/more.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit aec9d96e7752a570d1ed4472fc5612c01b34800f Author: Thomas Weißschuh Date: Fri Sep 22 11:30:57 2023 +0200 libmount: gracefully handle NULL path in mnt_resolve_target() Signed-off-by: Thomas Weißschuh libmount/src/cache.c | 3 +++ 1 file changed, 3 insertions(+) commit beead87f3b65b1e9149d27779f5aac215a1f8b24 Author: Thomas Weißschuh Date: Fri Sep 22 11:20:04 2023 +0200 libblkid: avoid memory leak of cachefile path Signed-off-by: Thomas Weißschuh libblkid/src/config.c | 1 + 1 file changed, 1 insertion(+) commit 07ef43df33d4b768bc93e0961b905c459d3ece6d Author: Thomas Weißschuh Date: Fri Sep 22 11:19:37 2023 +0200 lib/env: avoid underflow of read_all_alloc() return value read_all_alloc() returns a negative error on failure. When casting this to an unsigned type the failure check "< 1" will not work. Signed-off-by: Thomas Weißschuh lib/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64d6d400f601dd20f65d66539fdecf536e4d52b5 Author: Thomas Weißschuh Date: Fri Sep 22 11:56:42 2023 +0200 treewide: use (x)reallocarray() when applicable reallocarray() prevents overflow of the multiplication. It also avoids issues with operator precedence like in libmount/src/context.c: pids = realloc(cxt->children, sizeof(pid_t) * cxt->nchildren + 1); This only allocated one additional byte, and not enough space for another child. Signed-off-by: Thomas Weißschuh disk-utils/mkfs.cramfs.c | 2 +- lib/buffer.c | 2 +- lib/colors.c | 4 ++-- lib/loopdev.c | 2 +- lib/strv.c | 2 +- libblkid/src/partitions/partitions.c | 4 ++-- libmount/src/cache.c | 2 +- libmount/src/context.c | 2 +- libmount/src/utils.c | 2 +- libsmartcols/src/grouping.c | 2 +- libsmartcols/src/line.c | 2 +- login-utils/lslogins.c | 6 +++--- login-utils/su-common.c | 2 +- misc-utils/findmnt-verify.c | 2 +- misc-utils/findmnt.c | 2 +- misc-utils/getopt.c | 6 +++--- misc-utils/logger.c | 2 +- misc-utils/lsblk-mnt.c | 3 +-- misc-utils/lsfd.c | 6 +++--- sys-utils/irq-common.c | 4 ++-- sys-utils/lscpu-cputype.c | 8 ++++---- sys-utils/lscpu-topology.c | 4 ++-- sys-utils/lsmem.c | 2 +- sys-utils/swapon-common.c | 4 ++-- term-utils/script-playutils.c | 2 +- term-utils/script.c | 4 ++-- text-utils/col.c | 4 ++-- text-utils/column.c | 2 +- text-utils/more.c | 2 +- text-utils/rev.c | 2 +- text-utils/ul.c | 2 +- 31 files changed, 47 insertions(+), 48 deletions(-) commit 3f13d198679437002df2dd0777a3bca879c0061c Author: Tobias Stoeckmann Date: Thu Sep 21 20:25:55 2023 +0200 login: prevent undefined ioctl and tcsetattr calls Do not call tcsetattr if tcgetattr fails, because the content of tt and ttt is undefined in that case. Also do not just warn if ioctl fails, but also avoid calling it again after tty has been re-opened. I've solved this by setting struct variables to values which cannot be valid at this point. If they do have these exact values, then the calls will be prevented. Signed-off-by: Tobias Stoeckmann login-utils/login.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit e361ef380fa2673e1de0f50d1f362b99e42cd0bb Author: Tobias Stoeckmann Date: Thu Sep 21 20:15:46 2023 +0200 login: use correct terminal fd during setup The function get_terminal_name iterates through standard file descriptors until it finds a terminal. This means that it's not guaranteed that STDIN_FILENO (i.e. 0) is actually a terminal. Do not modify permissions on possible files. Instead, retrieve the file descriptor which was used by get_terminal_name as well. Proof of Concept (as root): 1. Create a temporary file with a mode different than TTYPERM. ``` install -m 700 /dev/null /tmp/test ls -l /tmp/test -rwx------ 1 root root 0 Sep 21 20:15 /tmp/test ``` 2. Run login within a terminal with adjusted stdin. ``` login < /tmp/test host login: Hangup ``` 3. Check permissions of input file. ``` ls -l /tmp/test -rw------- 1 root root 0 Sep 21 20:15 /tmp/test ``` Signed-off-by: Tobias Stoeckmann login-utils/login.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a3d65102ecd53ba089a31344ffb4656569a2c1ae Author: Thomas Weißschuh Date: Wed Sep 20 23:31:04 2023 +0200 ci: build with clang 17 Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7096a0cd0631cf57b3075332961ec1b0d1f4a89b Author: Tobias Stoeckmann Date: Tue Sep 19 20:45:40 2023 +0200 login: Use pid_t for child_pid Since child_pid keeps track of a PID, it should be of type pid_t and not of type int. Signed-off-by: Tobias Stoeckmann login-utils/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79af9d7583d630814f7bcb81139993c1371cb277 Author: Tobias Stoeckmann Date: Tue Sep 19 20:42:03 2023 +0200 login: move comment In 0b4d75fae55b4a5ff8f65df8551c56cf1eeb9b08 the variable "timeout" has been moved from global to local scope, but its comment was not. Signed-off-by: Tobias Stoeckmann login-utils/login.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f4fed6c366390dfc4ff04dcdc9215ca490473b2a Author: Masatake YAMATO Date: Wed Jul 19 15:38:55 2023 +0900 test: (lsfd) add a case for testing BPF-MAP.TYPE and BPF-MAP.TYPE.RAW columns Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-bpf-map | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 0dcd1e9bd7e82952322a5880e744ae2bcfc3b2ac Author: Masatake YAMATO Date: Wed Jul 19 15:27:07 2023 +0900 test: (mkfds::bpf-map) new factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit ea9466d469f3573f840d5558129f063d3db80d2e Author: Masatake YAMATO Date: Tue Jul 11 22:12:05 2023 +0900 lsfd: add BPF-MAP.TYPE, BPF-MAP.TYPE.RAW, and BPF-MAP.ID columns Based on these new columns, the NAME column for "bpf-map" is enhanced. An example output: # ./lsfd -p 1 -Q '(TYPE == "bpf-map")' | head COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME systemd 1 root 13 rw---- bpf-map anon_inodefs 15 106 id=305 type=hash-of-maps Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 12 ++++ misc-utils/lsfd.c | 9 +++ misc-utils/lsfd.h | 3 + 4 files changed, 171 insertions(+) commit 8a78278288045b3dd777eb6dc590797f2ae4efa6 Author: Masatake YAMATO Date: Sun Sep 17 06:33:13 2023 +0900 lsfd: (man) add bps(8) and ss(8) to the "SEE ALSO" section Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 2 ++ 1 file changed, 2 insertions(+) commit 1e0ad14b3ac08d855cda6de346a65f9b834e00db Author: Karel Zak Date: Mon Sep 18 13:08:57 2023 +0200 build-sys: fix libmount/src/hooks.c use Reported-by: Samuel Thibault Signed-off-by: Karel Zak libmount/meson.build | 1 - libmount/src/Makemodule.am | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 22c41e99922458379aecb0cdeeefd5304d5c0614 Author: Karel Zak Date: Mon Sep 18 12:59:30 2023 +0200 autotools: fix non-Linux build Signed-off-by: Karel Zak Co-Author: Samuel Thibault configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6e5a35d1aab73008853129e263b01c4245af1d8 Merge: 0b0cdfe90 c5c049f83 Author: Karel Zak Date: Mon Sep 18 12:10:01 2023 +0200 Merge branch 'lsfd--monitor-flag-for-poll-syscall' of https://github.com/masatake/util-linux * 'lsfd--monitor-flag-for-poll-syscall' of https://github.com/masatake/util-linux: tests: (test_mkfds::mkfds-multiplexing) make the output of ts_skip_subtest visible tests: (test_mkfds::mkfds-multiplexing) dump /proc/$pid/syscall for debugging lsfd: (man) write about XMODE.m and classical system calls for multiplexing tests: (lsfd) add a case testing XMODE.m for classical syscalls for multiplexing tests: (test_mkfds) add ppoll multiplexer tests: (test_mkfds) add poll multiplexer tests: (test_mkfds) add pselect6 and select multiplexers tests: (test_mkfds) add a new factory "multiplexing" tests: (test_mkfds) allow to add factory-made fds to the multiplexer as event source tests: (test_mkfds, refactor) make the function for waiting events plugable tests: (test_mkfds) include locale headers first to define _GNU_SOURCE tests: (test_mkfds) use err() when a system call fails lsfd: (comment) fix a typo lsfd: mark XMODE.m on fds monitored by select(2) and pselect6(2) lsfd: mark XMODE.m on fds monitored by poll(2) and ppoll(2) lsfd: cache the result of checking whether "XMODE" column is enabled or not procfs: add a helper function to access /proc/$pid/syscall lsfd: (refactor) make the code for traversing threads reusable commit 0b0cdfe905dd2c7d9380282b833ed19696838a40 Merge: 74818fd88 2681f560d Author: Karel Zak Date: Mon Sep 18 11:23:18 2023 +0200 Merge branch 'kraj/lscpu' of https://github.com/kraj/util-linux * 'kraj/lscpu' of https://github.com/kraj/util-linux: lscpu: Use 4K buffer size instead of BUFSIZ commit e3dedb011e1fe578e921c0c6858e9b3d9b79ec84 Author: Masatake YAMATO Date: Mon Sep 18 15:39:39 2023 +0900 lsfd: collect the device number for mqueue fs in the initialization stage Though lsfd reads device minor numbers for file-systems having "nodev" from /proc/$pid/mountinfo, we observed lsfd failed to resolve the values of SOURCE column for mqueue files on s390 CI/CD env. It seems that /proc/$pid/mountinfo doesn't provide enough information. This change makes lsfd open a mqueue file in lsfd's initialization stage as a new data source for resolving; lsfd can collect an actually-used minor number from the file descriptor with fstat(2). Signed-off-by: Masatake YAMATO meson.build | 7 ++++--- misc-utils/Makemodule.am | 2 +- misc-utils/lsfd-file.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) commit 74818fd88a1f0260798f06ba8edab626415c4a99 Merge: a1aee50df 2a91b213c Author: Karel Zak Date: Mon Sep 18 11:14:38 2023 +0200 Merge branch 'vla-alloca' of https://github.com/t-8ch/util-linux * 'vla-alloca' of https://github.com/t-8ch/util-linux: buildsys: warn on usage of alloca() more: remove usage of alloca() buildsys: warn on usage of VLAs lib/mbsedit: remove usage of VLA lscpu: remove usage of VLA fdisk: remove usage of VLA libfdisk: (dos) remove usage of VLA libblkid: (stratis) remove usage of VLA lib/path: remove usage of VLA commit c28ec017d279bb97d99d349a90fda114886e16a8 Author: Masatake YAMATO Date: Mon Sep 18 08:28:25 2023 +0900 tests: (lsfd) show the entry for mqueue in /proc/self/mountinfo The entry is useful debugging the lsfd and the test case for mqueue. Signed-off-by: Masatake YAMATO tests/ts/lsfd/mkfds-mqueue | 1 + 1 file changed, 1 insertion(+) commit a1aee50df7c7c5f8ea0ecc792f0d31c74d77593d Merge: 92b56d4b9 a76299c1d Author: Karel Zak Date: Mon Sep 18 11:11:33 2023 +0200 Merge branch 'tests/caps' of https://github.com/t-8ch/util-linux * 'tests/caps' of https://github.com/t-8ch/util-linux: tests: fix capability testing commit 92b56d4b96cbf40e185b4a51197c62c6ac05bfa5 Merge: 741fa6621 b36a79254 Author: Karel Zak Date: Mon Sep 18 11:08:51 2023 +0200 Merge branch 'master' of https://github.com/gjioui/util-linux * 'master' of https://github.com/gjioui/util-linux: Add Phytium FTC862 cpu model. fix:#2486 commit 741fa66216725fca844fa6b9385d85a1c20d85f1 Merge: 77b85278f 584e50518 Author: Karel Zak Date: Mon Sep 18 11:08:26 2023 +0200 Merge branch 'PR/scriptreplay-flow' commit 2681f560da427fe8bb2ccf5b49c81f356add46f1 Author: Khem Raj Date: Fri Sep 15 00:18:18 2023 -0700 lscpu: Use 4K buffer size instead of BUFSIZ Some lines in /proc/cpuinfo can be large e.g. flags and can then truncate them in displaying them BUFSIZ can vary quite a bit e.g. glibc/linux systems its 8192 but on musl/linux and OSX its 1024, on mingW it is 256, some tests e.g. x86_64-64cpu-linux6.2.tar.gz has added really long line for cpu flags line which is greater than 1024 characters and hence this test fails on musl because lscpu -s reports truncated string Fixes x86_64-64cpu-linux6.2 tests Signed-off-by: Khem Raj s sys-utils/lscpu-cputype.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a91b213ce932529874c8deb0040f4794dbfe9d2 Author: Thomas Weißschuh Date: Wed Sep 13 06:32:52 2023 +0200 buildsys: warn on usage of alloca() alloca() is susceptible to security issues, ensure it is not introduced. Signed-off-by: Thomas Weißschuh configure.ac | 1 + meson.build | 1 + 2 files changed, 2 insertions(+) commit c988ccdcdb5a51134af51f06371e6dd26a9e271f Author: Thomas Weißschuh Date: Wed Sep 13 00:25:36 2023 +0200 more: remove usage of alloca() alloca() is susceptible to security issues, avoid it. Signed-off-by: Thomas Weißschuh text-utils/more.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a52f9bdd17777c9d1426221fb90803cbc0569d53 Author: Thomas Weißschuh Date: Tue Sep 12 23:49:21 2023 +0200 buildsys: warn on usage of VLAs Variable-length-arrays are susceptible to security issues, ensure none are introduced. Signed-off-by: Thomas Weißschuh configure.ac | 1 + meson.build | 1 + 2 files changed, 2 insertions(+) commit 2f89a8e388b74c3f111a2e3c9d43758138e7c4ab Author: Thomas Weißschuh Date: Wed Sep 13 00:20:02 2023 +0200 lib/mbsedit: remove usage of VLA Variable-length-arrays are susceptible to security issues, avoid them. Signed-off-by: Thomas Weißschuh lib/mbsedit.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit b6f635ef8dc264838bb26733349d6df6595124cb Author: Thomas Weißschuh Date: Wed Sep 13 00:08:59 2023 +0200 lscpu: remove usage of VLA Variable-length-arrays are susceptible to security issues, avoid them. Signed-off-by: Thomas Weißschuh sys-utils/lscpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0e58ad78350a61c88f4b97389a8f83f24ae11d11 Author: Thomas Weißschuh Date: Wed Sep 13 00:09:39 2023 +0200 fdisk: remove usage of VLA Variable-length-arrays are susceptible to security issues, avoid them. Signed-off-by: Thomas Weißschuh disk-utils/fdisk-list.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 7098e911c4a731a9062b75c6a477cd203042860d Author: Thomas Weißschuh Date: Wed Sep 13 00:08:39 2023 +0200 libfdisk: (dos) remove usage of VLA Variable-length-arrays are susceptible to security issues, avoid them. Signed-off-by: Thomas Weißschuh libfdisk/src/dos.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 348257a63c8960a375e0276c4577fdf06678ed86 Author: Thomas Weißschuh Date: Wed Sep 13 00:08:21 2023 +0200 libblkid: (stratis) remove usage of VLA Variable-length-arrays are susceptible to security issues, avoid them. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/stratis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c866bbbe7f2603804687b8dd6fc71a3978f7270e Author: Thomas Weißschuh Date: Wed Sep 13 00:08:05 2023 +0200 lib/path: remove usage of VLA Variable-length-arrays are susceptible to security issues, avoid them. Signed-off-by: Thomas Weißschuh lib/path.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit a76299c1d44202b32ed8c949b47bb8ef5304824d Author: Thomas Weißschuh Date: Tue Sep 12 10:34:37 2023 +0200 tests: fix capability testing The old capability testing logic would incorrectly interpret the following output from getpcaps as cap_wake_alarm being supported: $ getpcaps 0 0: cap_wake_alarm=i Instead of realying on brittle command output parsing at a test helper to detect capabilities. Signed-off-by: Thomas Weißschuh meson.build | 8 ++++++++ tests/commands.sh | 1 + tests/functions.sh | 17 +++-------------- tests/helpers/Makemodule.am | 6 ++++++ tests/helpers/test_cap.c | 33 +++++++++++++++++++++++++++++++++ tests/ts/lsfd/mkfds-timerfd-alarm | 2 +- 6 files changed, 52 insertions(+), 15 deletions(-) commit 77b85278ff625779d86b924903453d9c54280642 Author: Thomas Weißschuh Date: Sun Sep 10 22:46:00 2023 +0200 libblkid: prune unneeded buffers When a new buffer is cached that is a superset of another existing buffer the old buffer can be removed as future requests can be satisfied by the new one. As probe functions can have local references to buffered data, delay the cleanup until the probefunc is finished to avoid accessing freed data. For the bcachefs.img testfile this reduces the final (maximal) cache from 34338 bytes in 54 buffers to 24760 bytes in 40 buffers. Signed-off-by: Thomas Weißschuh libblkid/src/blkidP.h | 3 +++ libblkid/src/partitions/partitions.c | 1 + libblkid/src/probe.c | 37 ++++++++++++++++++++++++++++++++++ libblkid/src/superblocks/superblocks.c | 1 + libblkid/src/topology/topology.c | 5 ++++- 5 files changed, 46 insertions(+), 1 deletion(-) commit 2dc39ee6b7fdd3a2a91cb4d1a7c48a08cf003ffa Author: Thomas Weißschuh Date: Sun Sep 10 22:11:20 2023 +0200 libblkid: add remove_buffer helper Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit b36a79254087107e2ddd9032a131832508ddb7f8 Author: unknown Date: Tue Sep 12 16:11:43 2023 +0800 Add Phytium FTC862 cpu model. fix:#2486 sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit c5c049f8398409f9ebdfc647ce1d69ce147842d0 Author: Masatake YAMATO Date: Tue Aug 15 04:11:50 2023 +0900 tests: (test_mkfds::mkfds-multiplexing) make the output of ts_skip_subtest visible tests/ts/lsfd/mkfds-multiplexing | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 9869c4d375fa38e621aa07094175a4f5659eb046 Author: Masatake YAMATO Date: Thu Aug 3 23:52:15 2023 +0900 tests: (test_mkfds::mkfds-multiplexing) dump /proc/$pid/syscall for debugging tests/ts/lsfd/mkfds-multiplexing | 5 +++++ 1 file changed, 5 insertions(+) commit de6e15d8244bc67c57f68c57fc52fa09d8e0bc3a Author: Masatake YAMATO Date: Sun Jul 30 18:29:42 2023 +0900 lsfd: (man) write about XMODE.m and classical system calls for multiplexing Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 87e79caab658ad7e045f2ecd19c0e0a16f892b6c Author: Masatake YAMATO Date: Sun Jul 30 18:06:19 2023 +0900 tests: (lsfd) add a case testing XMODE.m for classical syscalls for multiplexing Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-multiplexing-poll | 13 +++++ tests/expected/lsfd/mkfds-multiplexing-ppoll | 13 +++++ tests/expected/lsfd/mkfds-multiplexing-pselect6 | 13 +++++ tests/expected/lsfd/mkfds-multiplexing-select | 13 +++++ tests/ts/lsfd/mkfds-multiplexing | 63 +++++++++++++++++++++++++ 5 files changed, 115 insertions(+) commit c89edac5c300a254dd9be09191702b9e5c8c536f Author: Karel Zak Date: Mon Sep 11 20:27:37 2023 +0200 autotools: fix typos Signed-off-by: Karel Zak configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 584e505186c1aa511ea96761a8d108f4fe734f0e Author: Karel Zak Date: Mon Sep 11 15:17:01 2023 +0200 scriptreplay: support ctrl+s and ctrl+g The old scriptreplay supported XON/XOFF flow control. The new implementation uses cfmakeraw() and it disables it by default. Let's enable it by IXON iflag. Fixes: https://github.com/util-linux/util-linux/issues/2480 References: https://github.com/util-linux/util-linux/pull/1101 Signed-off-by: Karel Zak term-utils/scriptreplay.c | 1 + 1 file changed, 1 insertion(+) commit 38ffd1e3519dc3c8e785f26fe9753cf1c11b82de Author: Masatake YAMATO Date: Sun Jul 30 18:03:03 2023 +0900 tests: (test_mkfds) add ppoll multiplexer Signed-off-by: Masatake YAMATO meson.build | 1 + tests/helpers/Makemodule.am | 3 +- tests/helpers/test_mkfds.c | 6 +++ tests/helpers/test_mkfds.h | 5 +++ tests/helpers/test_mkfds_ppoll.c | 79 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 1 deletion(-) commit b2033a32364f90bbc9bf9238ba33a90290da43aa Author: Masatake YAMATO Date: Sun Jul 30 17:56:54 2023 +0900 tests: (test_mkfds) add poll multiplexer meson.build | 1 + tests/helpers/Makemodule.am | 2 +- tests/helpers/test_mkfds.c | 31 ++++++++++-------- tests/helpers/test_mkfds.h | 80 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 99 insertions(+), 15 deletions(-) commit 5e669b5aba7b5075521bc5f8fd875e0e0a110566 Author: Masatake YAMATO Date: Sun Jul 30 12:51:36 2023 +0900 tests: (test_mkfds) add pselect6 and select multiplexers Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 114 +++++++++++++++++++++++++++++++-------------- 1 file changed, 78 insertions(+), 36 deletions(-) commit 7a1fa361430cf17345b8cbc0bfe68b8d5d7f5d59 Author: Masatake YAMATO Date: Sun Jul 30 04:36:30 2023 +0900 tests: (test_mkfds) add a new factory "multiplexing" tests/helpers/test_mkfds.c | 68 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 1309e7dd163541f1f23feca3af2f022f51081468 Author: Masatake YAMATO Date: Sun Jul 30 03:39:29 2023 +0900 tests: (test_mkfds) allow to add factory-made fds to the multiplexer as event source Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) commit 275a645fb5c9911313a38b2cd0b0331be3d6dbb9 Author: Masatake YAMATO Date: Sun Jul 30 02:36:03 2023 +0900 tests: (test_mkfds, refactor) make the function for waiting events plugable Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 52 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit be428dcab78dbceea402c50dc652fdd076ce7963 Author: Masatake YAMATO Date: Sat Jul 29 02:31:52 2023 +0900 tests: (test_mkfds) include locale headers first to define _GNU_SOURCE Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9cc90f6b7dccee565612325030cd04a9626b87b Author: Masatake YAMATO Date: Sat Jul 29 01:21:00 2023 +0900 tests: (test_mkfds) use err() when a system call fails Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7194a5014888842394e612bdc31ce877418c6fa Author: Masatake YAMATO Date: Sat Jul 29 01:17:13 2023 +0900 lsfd: (comment) fix a typo Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 036e58868bb0c94f5dd108e146b0d5d88fd8026a Author: Masatake YAMATO Date: Fri Jul 28 02:43:06 2023 +0900 lsfd: mark XMODE.m on fds monitored by select(2) and pselect6(2) Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit adf10f7dbd290eea5d4295201ddca6a1d1241179 Author: Masatake YAMATO Date: Fri Jul 28 01:57:43 2023 +0900 lsfd: mark XMODE.m on fds monitored by poll(2) and ppoll(2) Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit c3f40eebcc4923a16e6dc961c18b937c21b32af7 Author: Masatake YAMATO Date: Fri Jul 28 01:35:00 2023 +0900 lsfd: cache the result of checking whether "XMODE" column is enabled or not Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 41f2a5088b393553d28033f1787d777ef50087ea Author: Masatake YAMATO Date: Fri Jul 28 00:30:16 2023 +0900 procfs: add a helper function to access /proc/$pid/syscall Signed-off-by: Masatake YAMATO include/procfs.h | 1 + lib/procfs.c | 5 +++++ 2 files changed, 6 insertions(+) commit 174933b433d6a37651171ff8ab32e92c9b234def Author: Masatake YAMATO Date: Fri Jul 28 00:29:49 2023 +0900 lsfd: (refactor) make the code for traversing threads reusable Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 016bea5a65610853e9670e14cf411ffa92046aed Merge: 10b53107b a5882d40d Author: Karel Zak Date: Mon Sep 11 11:07:54 2023 +0200 Merge branch 'lsfd--fix-the-way-to-stop-mkfds-1' of https://github.com/masatake/util-linux * 'lsfd--fix-the-way-to-stop-mkfds-1' of https://github.com/masatake/util-linux: tests: (lsfd::filter-floating-point-nums) use --raw output to make the case more robust tests: (lsfd::column-xmode) do rm -f the file for testing before making it tests: make ts_skip_capability accepts the output of older version of getpcaps tests: (lsfd::mkfds-unix-dgram) don't depend on the number of whitespaces in the output tests: (lsfd) avoid race conditions (part 1) tests: (test_mkfds) monitor stdin by default commit 10b53107b9ab03a96557a375d4e5920abb1cbb12 Merge: 5c87a7c2e 03aecb090 Author: Karel Zak Date: Mon Sep 11 11:00:50 2023 +0200 Merge branch 'gitignore-lsclocks' of https://github.com/bcarnes/util-linux * 'gitignore-lsclocks' of https://github.com/bcarnes/util-linux: add missing lsclocks to .gitignore commit 5c87a7c2e75d5c77f931fb7d06cbb071d76ce10e Merge: 3d54ba90c 26b17f804 Author: Karel Zak Date: Mon Sep 11 09:14:12 2023 +0200 Merge branch 'patch-1' of https://github.com/ThomasKaiser/util-linux * 'patch-1' of https://github.com/ThomasKaiser/util-linux: Revise/add HiSilicon core names commit 3d54ba90c2fc3285307f794184aec9e22d1c57e2 Merge: 92d7a7674 b79dd322f Author: Karel Zak Date: Mon Sep 11 09:12:42 2023 +0200 Merge branch 'waitpid--suppress-message' of https://github.com/masatake/util-linux * 'waitpid--suppress-message' of https://github.com/masatake/util-linux: waitpid: warn of "exited" only when --verbose is given commit 92d7a7674c31abb1de87b988d7d75ffef2df18c2 Merge: 93a1bc6e5 1d9367b81 Author: Karel Zak Date: Mon Sep 11 09:11:41 2023 +0200 Merge branch 'PR/libmount-stat.h' commit 93a1bc6e51c9fdb2e6abb9b28f69c4bffd7cdfd7 Merge: 706af26cc f092076fe Author: Karel Zak Date: Mon Sep 11 09:08:42 2023 +0200 Merge branch 'setpgid' of https://github.com/DaanDeMeyer/util-linux commit 26b17f804ccc67075b9c03c93f4124970d71e467 Author: Thomas Kaiser Date: Fri Sep 8 15:19:34 2023 +0200 Revise/add HiSilicon core names sys-utils/lscpu-arm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 03aecb0901cb9993a80c54f0a8ac82d88a92b38c Author: Brian Carnes Date: Thu Sep 7 17:08:45 2023 -0700 add missing lsclocks to .gitignore .gitignore | 1 + 1 file changed, 1 insertion(+) commit a5882d40dca60c05848d9228b600d078780795f1 Author: Masatake YAMATO Date: Sun Sep 3 04:38:10 2023 +0900 tests: (lsfd::filter-floating-point-nums) use --raw output to make the case more robust Signed-off-by: Masatake YAMATO tests/ts/lsfd/filter-floating-point-nums | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 637646d27c37a27890db586ad18ca84bb08cfd23 Author: Masatake YAMATO Date: Sun Sep 3 04:33:21 2023 +0900 tests: (lsfd::column-xmode) do rm -f the file for testing before making it Signed-off-by: Masatake YAMATO tests/ts/lsfd/column-xmode | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 0bb1e4fbb10444d5ec8a207d1b930383fb1b9c86 Author: Masatake YAMATO Date: Sun Sep 3 04:27:44 2023 +0900 tests: make ts_skip_capability accepts the output of older version of getpcaps In https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=8a2ac848a2065641e20a8b50384b68e8781cc6fc, the default output format of getpcaps command was changed. ts_skip_capability() assumes only the newer format, a format introduced in the commit. Signed-off-by: Masatake YAMATO tests/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c699c6e6925999f936acabaf493e80b85fd14558 Author: Masatake YAMATO Date: Sun Sep 3 02:40:41 2023 +0900 tests: (lsfd::mkfds-unix-dgram) don't depend on the number of whitespaces in the output Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-dgram | 8 ++++---- tests/ts/lsfd/mkfds-unix-dgram | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) commit 0fec4965f6c0f95b56df8ae67a77a1bdc4dda8a1 Author: Masatake YAMATO Date: Fri Sep 1 03:20:20 2023 +0900 tests: (lsfd) avoid race conditions (part 1) For terminating test_mkfds process, the test cases used SIGCONT. test_mkfds used pselect for waiting for the signal. After receiving the signal test_mkfds exited. There is a race condition in this logic. If a test case sends SIGCONT to test_mkfds process before the process calls pselect, the signal may be lost. As the result, test_mkfds keeps waiting forever in pselect. This change replaces the code sending SIGCONT with writing to the pipe connecting to the stdin of test_mkfds. test_mkfds also monitors its stdin in the pselect call. Unlike the signal, the written bytes to the pipe are queued. This change doesn't touch tests/ts/lsfd/option-inet and option-summary test cases. They don't use coproc. So fixing the race condition in the test cases can be much complicated. I will make a dedicated pull request (part 2) for them. Signed-off-by: Masatake YAMATO tests/ts/lsfd/column-ainodeclass | 2 +- tests/ts/lsfd/column-deleted | 4 ++-- tests/ts/lsfd/column-name | 4 ++-- tests/ts/lsfd/column-source-with-root | 2 +- tests/ts/lsfd/column-type | 2 +- tests/ts/lsfd/column-xmode | 22 +++++++++++----------- tests/ts/lsfd/filter-floating-point-nums | 2 +- tests/ts/lsfd/mkfds-bpf-prog | 2 +- tests/ts/lsfd/mkfds-cdev-tun | 2 +- tests/ts/lsfd/mkfds-directory | 2 +- tests/ts/lsfd/mkfds-eventfd | 2 +- tests/ts/lsfd/mkfds-eventpoll | 2 +- tests/ts/lsfd/mkfds-inotify | 2 +- tests/ts/lsfd/mkfds-mapped-packet-socket | 2 +- tests/ts/lsfd/mkfds-mqueue | 2 +- tests/ts/lsfd/mkfds-netlink-groups | 2 +- tests/ts/lsfd/mkfds-netlink-protocol | 2 +- tests/ts/lsfd/mkfds-netns | 2 +- tests/ts/lsfd/mkfds-pidfd | 2 +- tests/ts/lsfd/mkfds-ping | 4 ++-- 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-signalfd | 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-timerfd | 6 +++--- tests/ts/lsfd/mkfds-timerfd-alarm | 2 +- tests/ts/lsfd/mkfds-udp | 8 ++++---- tests/ts/lsfd/mkfds-udp6 | 8 ++++---- 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/mkfds-unix-stream-requiring-sockdiag | 2 +- tests/ts/lsfd/option-pid | 2 +- 40 files changed, 66 insertions(+), 66 deletions(-) commit 618a88b51e8fd3489033517db9987a6231a8f1fe Author: Masatake YAMATO Date: Fri Sep 1 00:56:06 2023 +0900 tests: (test_mkfds) monitor stdin by default After making file descriptors as specified in arguments, test_mkfds waits for an event with pselect. When test_mkfds gets the event, it exits. The original code monitored stdin when the test_mkfds process ran in the foreground. However, monitoring stdin is useful even when it runs in the background. ts/lsfd/mkfds-* test cases run test_mkfds as a co-process. So the test cases can terminate their test_mkfds processes with echo command if the processes monitor stdin. This change also adds -X/--dont-monitor-stdin option. As the name shows, with the option, test_mkfds doesn't monitor stdin as before. Some test cases run test_mkfds directly. In such a case, tests/functions.sh may connect stdin of test_mkfds to /dev/null. /dev/null is always ready to be read. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 16 ++++++++++------ tests/ts/lsfd/option-inet | 10 +++++----- tests/ts/lsfd/option-summary | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-) commit b79dd322f5c1a37fe8b4495f7a248f406e87c598 Author: Masatake YAMATO Date: Fri Sep 1 03:34:40 2023 +0900 waitpid: warn of "exited" only when --verbose is given Signed-off-by: Masatake YAMATO misc-utils/waitpid.c | 3 ++- tests/ts/misc/waitpid | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 706af26ccd7684cdc545bd39d0049c7dda961afd Merge: ae0c8061f 2b22ec965 Author: Karel Zak Date: Thu Aug 31 10:51:59 2023 +0200 Merge branch 'libblkid/protection' of https://github.com/t-8ch/util-linux * 'libblkid/protection' of https://github.com/t-8ch/util-linux: libblkid: protect shared buffers against modifications libblkid: (vfat) avoid modifying shared buffer libblkid: (jmicron_raid) use checksum APIs libblkid: (jmicron_raid) avoid modifying shared buffer libblkid: (zonefs) avoid modifying shared buffer commit ae0c8061f552c166fb800f48bff94f24b845782a Merge: 36c52fd14 cdc690634 Author: Karel Zak Date: Thu Aug 31 10:41:32 2023 +0200 Merge branch 'PR/losetup-json' of github.com:karelzak/util-linux-work * 'PR/losetup-json' of github.com:karelzak/util-linux-work: losetup: make --output-all more usable losetup: add MAJ a MIN for device and backing-file losetup: fix JSON MAJ:MIN commit 1d9367b81b2e8fda287c082794b4ebad58e30ea3 Author: Karel Zak Date: Thu Aug 31 10:30:55 2023 +0200 libmount: make.stx_mnt_id use more robust Signed-off-by: Karel Zak libmount/src/hook_mount.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit e82d189797156d2ba57db84a8783fbe792ea53d1 Author: Karel Zak Date: Thu Aug 31 10:26:37 2023 +0200 libmount: report statx in features list Let's make statx() support visible in "mount -V" output. Signed-off-by: Karel Zak libmount/src/version.c | 3 +++ 1 file changed, 3 insertions(+) commit 7d679f29aee9f56b07bd792e07b5b4e1ca2f3fa7 Author: Karel Zak Date: Wed Aug 23 11:50:37 2023 +0200 libmount: fix statx() includes Using sys/stat.h and linux/stat is too tricky.h together. It seems better to rely on libc and use sys/stat.h only. Users affected by old libc must update to use recent util-linux. Fixes: https://github.com/util-linux/util-linux/issues/2448 Signed-off-by: Karel Zak configure.ac | 5 ++--- include/fileutils.h | 4 ++-- libmount/src/hook_mount.c | 2 +- libmount/src/utils.c | 2 +- meson.build | 5 ++--- 5 files changed, 8 insertions(+), 10 deletions(-) commit f092076fecc7ada2911df1b34f75091573ac08a8 Author: Daan De Meyer Date: Sun Aug 20 11:42:51 2023 +0200 Add new setpgid utility This program allows running a command in a new process group and optionally makes the new process group the foreground process group of the ctty. This is useful when running programs through wrappers programs (think bubblewrap, ...) and wanting to make sure that SIGINT is only sent to the innermost process. This is possible by putting the innermost process in a new process group and making that process group the foreground process group of the controlling terminal. By adding a separate utility to util-linux, we can apply this to any program even if the program itself doesn't implement this functionality. bash-completion/Makemodule.am | 3 + bash-completion/setpgid | 23 ++++++ configure.ac | 3 + meson.build | 14 ++++ sys-utils/Makemodule.am | 7 ++ sys-utils/meson.build | 4 + sys-utils/setpgid.1.adoc | 45 +++++++++++ sys-utils/setpgid.c | 91 ++++++++++++++++++++++ tests/commands.sh | 1 + tests/expected/build-sys/config-all | 1 + tests/expected/build-sys/config-all-devel | 1 + tests/expected/build-sys/config-all-non-nls | 1 + tests/expected/build-sys/config-audit | 1 + tests/expected/build-sys/config-chfnsh-libuser | 1 + tests/expected/build-sys/config-chfnsh-no-password | 1 + tests/expected/build-sys/config-chfnsh-pam | 1 + tests/expected/build-sys/config-core | 1 + tests/expected/build-sys/config-cryptsetup | 1 + tests/expected/build-sys/config-devel | 1 + tests/expected/build-sys/config-devel-new-mount | 1 + tests/expected/build-sys/config-devel-non-asan | 1 + tests/expected/build-sys/config-devel-non-docs | 1 + tests/expected/build-sys/config-non-libblkid | 1 + tests/expected/build-sys/config-non-libmount | 1 + tests/expected/build-sys/config-non-libs | 1 + tests/expected/build-sys/config-non-libsmartcols | 1 + tests/expected/build-sys/config-non-libuuid | 1 + tests/expected/build-sys/config-non-nls | 1 + tests/expected/build-sys/config-selinux | 1 + tests/expected/build-sys/config-slang | 1 + tests/expected/build-sys/config-static | 1 + tests/expected/misc/setpgid | 2 + tests/ts/misc/setpgid | 33 ++++++++ 33 files changed, 248 insertions(+) commit 2b22ec9650642d98908a4ab4f3b3158bb946a1a0 Author: Thomas Weißschuh Date: Tue Aug 29 12:06:54 2023 +0200 libblkid: protect shared buffers against modifications The cached buffers are shared between multiple probers. To avoid (potentially security-sensitive) interdependencies between probers make let the kernel enforce the write-protection. Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 235c03e7fdc685630ed12ae58d1c7a52727b3d93 Author: Thomas Weißschuh Date: Tue Aug 29 12:44:48 2023 +0200 libblkid: (vfat) avoid modifying shared buffer Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/vfat.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 272457b71bed808c39fad3ec390ad43118d28899 Author: Thomas Weißschuh Date: Tue Aug 29 12:31:35 2023 +0200 libblkid: (jmicron_raid) use checksum APIs Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/jmicron_raid.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b20bdf9ad6e8ac7650fac8ad70e68035ec4bed62 Author: Thomas Weißschuh Date: Tue Aug 29 12:29:31 2023 +0200 libblkid: (jmicron_raid) avoid modifying shared buffer Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/jmicron_raid.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) commit a244fe816101babb08ed3533b6aa04ce62ba30ef Author: Thomas Weißschuh Date: Tue Aug 29 12:22:28 2023 +0200 libblkid: (zonefs) avoid modifying shared buffer Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/zonefs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit cdc690634bfdf90267932a9d0d91a1c0cc2620f6 Author: Karel Zak Date: Mon Aug 28 16:58:13 2023 +0200 losetup: make --output-all more usable The other tools (e.g. lsblk) can use --output-all with --list or --json. Let's make it usable also with losetup. Signed-off-by: Karel Zak sys-utils/losetup.c | 1 + 1 file changed, 1 insertion(+) commit 36c52fd14b83e6f7eff9a565c426a1e21812403b Merge: f7e23ebc2 283876640 Author: Karel Zak Date: Mon Aug 28 14:03:47 2023 +0200 Merge branch 'PR/uuidgen-count' of github.com:karelzak/util-linux-work * 'PR/uuidgen-count' of github.com:karelzak/util-linux-work: uuidgen: mark some options mutually exclusive uuidgen: add option --count commit 422f54c0a03c63377bb912a3a22e4464d91b165c Author: Karel Zak Date: Mon Aug 28 13:53:40 2023 +0200 losetup: add MAJ a MIN for device and backing-file Addresses: https://github.com/util-linux/util-linux/issues/2460 Signed-off-by: Karel Zak sys-utils/losetup.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 7 deletions(-) commit 7d5caac42e30ea93c1782fea0b0598656c658f68 Author: Karel Zak Date: Mon Aug 28 13:21:33 2023 +0200 losetup: fix JSON MAJ:MIN Fixes: https://github.com/util-linux/util-linux/issues/2460 Signed-off-by: Karel Zak sys-utils/losetup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f7e23ebc2e03a7dbe1a82615b40a6fd4aabb5494 Merge: 6be0dd6a6 ded21daf6 Author: Karel Zak Date: Mon Aug 28 11:39:12 2023 +0200 Merge branch 'lslogins/man-shell' of https://github.com/t-8ch/util-linux * 'lslogins/man-shell' of https://github.com/t-8ch/util-linux: lslogins: (man) fix -y option formatting commit 6be0dd6a62d79b454aa404fafe064a99bad8790a Merge: 04694ad65 d9d53b89e Author: Karel Zak Date: Mon Aug 28 11:38:43 2023 +0200 Merge branch 'fincore/alignment' of https://github.com/t-8ch/util-linux * 'fincore/alignment' of https://github.com/t-8ch/util-linux: fincore: fix alignment of column listing in --help commit 28387664019c17cf69324e4f29711018422c4e07 Author: Karel Zak Date: Wed Aug 23 11:36:45 2023 +0200 uuidgen: mark some options mutually exclusive * types cannot be mixed (--time, --random, --md5 and --sha1) * --count makes sense only for --time and --random * --name and --namespace makes sense only for --md5 and --sha1 Signed-off-by: Karel Zak misc-utils/uuidgen.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 06d3a851888923a44219ca0967c3050d6b25924c Author: Karel Zak Date: Wed Aug 23 11:21:22 2023 +0200 uuidgen: add option --count This is mostly for testing purpose or performance tuning. The new option allows generate multiple UUIDs using the enhanced capability of the libuuid to cache time-based UUIDs. $ uuidgen --time --count 3 638b9432-4196-11ee-bb1f-7824af891670 638b94be-4196-11ee-bb1f-7824af891670 638b94fa-4196-11ee-bb1f-7824af891670 Fixes: https://github.com/util-linux/util-linux/issues/2449 Signed-off-by: Karel Zak bash-completion/uuidgen | 5 +++ meson.build | 3 +- misc-utils/Makemodule.am | 2 +- misc-utils/uuidgen.1.adoc | 3 ++ misc-utils/uuidgen.c | 94 ++++++++++++++++++++++++++--------------------- 5 files changed, 63 insertions(+), 44 deletions(-) commit ded21daf60e34a4070bdfb841c61fbe9a1dfc6d6 Author: Thomas Weißschuh Date: Mon Aug 28 09:30:59 2023 +0200 lslogins: (man) fix -y option formatting Fixes #2461 Signed-off-by: Thomas Weißschuh login-utils/lslogins.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9d53b89e1639f853d6c339e1bf5cddf5d843df6 Author: Thomas Weißschuh Date: Mon Aug 28 09:28:53 2023 +0200 fincore: fix alignment of column listing in --help Signed-off-by: Thomas Weißschuh misc-utils/fincore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04694ad6520b472858ab2c11350f3a8a46a4b9e1 Author: Thomas Weißschuh Date: Mon Aug 28 09:01:49 2023 +0200 include: add DragonFlyBSD GPT partition types Fixes #2462 Signed-off-by: Thomas Weißschuh include/pt-gpt-partnames.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit befe455f59de8c7bc66b85ed52aae8cbc95325fa Author: Thomas Weißschuh Date: Wed Aug 23 11:58:33 2023 +0200 libblkid: (bcachefs) fix size validation Avoid signed shift out-of-bounds. Also mark the constants explitly as unsigned instead of casting. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 17873d38fc97913c0a31d4bd08cfbfe45c4de5be Author: Karel Zak Date: Wed Aug 23 11:53:45 2023 +0200 libblkid: (bcachefs) fix compiler warning [-Werror=sign-compare] Addresses: https://github.com/util-linux/util-linux/pull/2427 Signed-off-by: Karel Zak libblkid/src/superblocks/bcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a3d2c811bd474b355f94cd58e0d22a44d2042f2 Author: Karel Zak Date: Wed Aug 23 10:12:46 2023 +0200 bash-completion: add -T to last Signed-off-by: Karel Zak bash-completion/last | 1 + 1 file changed, 1 insertion(+) commit 23f0eca29adeff40d161c2c3a20f14e8083dfadf Merge: fff830177 7f04a3061 Author: Karel Zak Date: Wed Aug 23 10:11:11 2023 +0200 Merge branch 'master' of https://github.com/tragdate/util-linux * 'master' of https://github.com/tragdate/util-linux: last(1): Document -T option for tab-separated output last: Add -T option for tab-separated output commit fff83017763d60c672db96c58bc06c2263faba26 Merge: fd177e03d a703d051d Author: Karel Zak Date: Wed Aug 23 10:08:39 2023 +0200 Merge branch 'udf' of https://github.com/pali/util-linux * 'udf' of https://github.com/pali/util-linux: Fix detection of UDF filesystem commit fd177e03d573e8f1b2cef7c2a02080490c2729d2 Merge: 4c2aea4ca 657279109 Author: Karel Zak Date: Wed Aug 23 10:07:53 2023 +0200 Merge branch 'uclampset-updates' of https://github.com/qais-yousef/util-linux * 'uclampset-updates' of https://github.com/qais-yousef/util-linux: uclampset: Remove validation logic uclampset: doc: Add a reference to latest kernel documentation Update my email address commit 4c2aea4cadbc1185b2edf923f94e07eb4a142428 Merge: 2b99ee252 48d573797 Author: Karel Zak Date: Wed Aug 23 10:06:18 2023 +0200 Merge branch 'master' of https://github.com/breavyn/util-linux * 'master' of https://github.com/breavyn/util-linux: libblkid: (bcachefs) fix not detecting large superblocks commit 7f04a30616374e7b68f6079bd3d9ae08f2d9b01b Author: Trag Date <101431599+tragdate@users.noreply.github.com> Date: Wed Aug 23 04:44:27 2023 +0300 last(1): Document -T option for tab-separated output This commit updates the last(1) man page to include the new -T option, which allows for tab-separated output. This addition to the documentation ensures users are aware of this new functionality and can utilize it to enhance their awk parsing. Signed-off-by: Cristian Zmole login-utils/last.1.adoc | 3 +++ 1 file changed, 3 insertions(+) commit 5d7df6b782cbd8c7852867a5dc9ff8cd69c23c0a Author: Trag Date <101431599+tragdate@users.noreply.github.com> Date: Wed Aug 23 04:43:04 2023 +0300 last: Add -T option for tab-separated output This commit introduces a -T option to the last command, allowing for tab-separated output. This change significantly improves the usability of last in conjunction with awk, enabling more efficient and intuitive parsing of command output. Signed-off-by: Cristian Zmole login-utils/last.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit a703d051d183bc3271fedf9510c40a79efc9ec05 Author: Pali Rohár Date: Tue Aug 22 21:21:37 2023 +0200 Fix detection of UDF filesystem OSTA UDF standard is "profile" of the ISO/IEC 13346 and ECMA-167 standard. Fix UDF detection and check for "*OSTA UDF Compliant" domain id which distinguish UDF from all other ISO/IEC 13346 and ECMA-167 filesystems. libblkid/src/superblocks/udf.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 657279109a503e754c426d8f72f7a61aad3d8281 Author: Qais Yousef Date: Sat Aug 19 18:32:41 2023 +0100 uclampset: Remove validation logic While experimenting with a potential extension to uclamp; I realized I had to modify uclampset to be able to use this extension, which is not scalable. Since the syscall will do checks anyway, drop the validation logic and let the kernel do its work without duplication that can potentially get stale. Use more magic value for NOT_SET define. We do have uclamp_set_set flag to verify if the value is valid anyway, so this is extra paranoia. Signed-off-by: Qais Yousef schedutils/uclampset.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 27b1269e43850ce17edc4c5d2301c6bb64a98ca5 Author: Qais Yousef Date: Sat Aug 19 18:28:53 2023 +0100 uclampset: doc: Add a reference to latest kernel documentation Kernel has gained a documentation for uclamp feature. Add a reference to it to help users to find out and learn more about it. Signed-off-by: Qais Yousef schedutils/uclampset.1.adoc | 4 ++++ 1 file changed, 4 insertions(+) commit 4a4eecf3b0a5d9a04deb4d66c3e294e6219eead3 Author: Qais Yousef Date: Sat Aug 19 18:26:42 2023 +0100 Update my email address My email address at arm is no longer active. Switch to my personal one. Done via git grep -l 'qais.yousef@arm.com' | xargs sed -i 's/qais.yousef@arm.com/qyousef@layalina.io/g' Signed-off-by: Qais Yousef AUTHORS | 4 ++-- po-man/cs.po | 4 ++-- po-man/de.po | 6 +++--- po-man/es.po | 6 +++--- po-man/fr.po | 6 +++--- po-man/pt_BR.po | 4 ++-- po-man/sr.po | 6 +++--- po-man/uk.po | 6 +++--- po-man/util-linux-man.pot | 4 ++-- schedutils/uclampset.1.adoc | 4 ++-- 10 files changed, 25 insertions(+), 25 deletions(-) commit 2b99ee2526ae61be761b0e31c50e106dbec5e9e4 Author: Filipe Manana Date: Thu Aug 17 10:20:13 2023 +0100 libmount: Fix regression when mounting with atime A regression was introduced in v2.39 that causes mounting with the atime option to fail: $ mkfs.ext4 -F /dev/sdi $ mount -o atime /dev/sdi /mnt/sdi mount: /mnt/sdi: not mount point or bad option. dmesg(1) may have more information after failed mount system call. The failure comes from the mount_setattr(2) call returning -EINVAL. This is because we pass an invalid value for the attr_clr argument. From a strace capture we have: mount_setattr(4, "", AT_EMPTY_PATH, {attr_set=0, attr_clr=MOUNT_ATTR_NOATIME, propagation=0 /* MS_??? */, userns_fd=0}, 32) = -1 EINVAL (Invalid argument) We can't pass MOUNT_ATTR_NOATIME to mount_setattr(2) through the attr_clr argument because all atime options are exclusive, so in order to set atime one has to pass MOUNT_ATTR__ATIME to attr_clr and leave attr_set as MOUNT_ATTR_RELATIME (which is defined as a value of 0). This can be read from the man page for mount_setattr(2) and also from the kernel source: $ cat fs/namespace.c static int build_mount_kattr(const struct mount_attr *attr, size_t usize, struct mount_kattr *kattr, unsigned int flags) { (...) /* * Since the MOUNT_ATTR_ values are an enum, not a bitmap, * users wanting to transition to a different atime setting cannot * simply specify the atime setting in @attr_set, but must also * specify MOUNT_ATTR__ATIME in the @attr_clr field. * So ensure that MOUNT_ATTR__ATIME can't be partially set in * @attr_clr and that @attr_set can't have any atime bits set if * MOUNT_ATTR__ATIME isn't set in @attr_clr. */ if (attr->attr_clr & MOUNT_ATTR__ATIME) { if ((attr->attr_clr & MOUNT_ATTR__ATIME) != MOUNT_ATTR__ATIME) return -EINVAL; /* * Clear all previous time settings as they are mutually * exclusive. */ kattr->attr_clr |= MNT_RELATIME | MNT_NOATIME; switch (attr->attr_set & MOUNT_ATTR__ATIME) { case MOUNT_ATTR_RELATIME: kattr->attr_set |= MNT_RELATIME; break; case MOUNT_ATTR_NOATIME: kattr->attr_set |= MNT_NOATIME; break; case MOUNT_ATTR_STRICTATIME: break; default: return -EINVAL; } (...) So fix this by setting attr_clr MOUNT_ATTR__ATIME if we want to clear any atime related option. Signed-off-by: Filipe Manana libmount/src/optlist.c | 13 ++++++++++++- tests/expected/libmount/context-mount-flags | 3 +++ tests/ts/libmount/context | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) commit 71abc103429d22c76e577ac19af060328475453b Author: Karel Zak Date: Wed Aug 16 09:34:19 2023 +0200 term-utils: fix indentation References: 87fcd95ac5ad18e471b17f448daa55b2ce2fac6a References: 5c62c27001467f3ef0baaa66ae4e3bb80a0298a6 Signed-off-by: Karel Zak term-utils/wall.c | 47 ++++++++++++++++++------------------ term-utils/write.c | 70 +++++++++++++++++++++++++++--------------------------- 2 files changed, 59 insertions(+), 58 deletions(-) commit 8032ccb61223c2108c010a43cebaa542b82a4dff Merge: 9fa993866 5c62c2700 Author: Karel Zak Date: Wed Aug 16 09:29:50 2023 +0200 Merge branch 'logind' of https://github.com/thkukuk/util-linux * 'logind' of https://github.com/thkukuk/util-linux: write: query logind for list of users with tty (#2088) agetty: use sd_get_sessions() for number of users (#2088) wall: query logind for list of users with tty (#2088) commit 9fa99386680e45de67ca29470f4061024498e3bf Merge: 7a46ab61e 1078c4ae9 Author: Karel Zak Date: Wed Aug 16 09:23:01 2023 +0200 Merge branch 'enosys/ioctl' of https://github.com/t-8ch/util-linux * 'enosys/ioctl' of https://github.com/t-8ch/util-linux: enosys: avoid warnings when no aliases are found enosys: don't validate that numbers are found from headers enosys: add support for ioctl blocking enosys: store blocked syscalls in list instead of array enosys: build BPF dynamically enosys: list syscall numbers commit 7a46ab61e6df68794156f01f246fdba2428e8b0e Merge: ac1a7d33d 65b1f3dee Author: Karel Zak Date: Wed Aug 16 09:00:21 2023 +0200 Merge branch 'libblkid/limit-buffer' of https://github.com/t-8ch/util-linux * 'libblkid/limit-buffer' of https://github.com/t-8ch/util-linux: libblkid: limit read buffer size commit ac1a7d33d01b967aa24ffc95f172ee13daa803d3 Merge: 49b7940d3 ced1142d6 Author: Karel Zak Date: Wed Aug 16 08:57:37 2023 +0200 Merge branch 'PR/losetup-mode-cleanup' commit 49b7940d3b558baec167b04766a8fd3a38c8020c Merge: 3119a8060 a3c05171c Author: Karel Zak Date: Wed Aug 16 08:56:38 2023 +0200 Merge branch 'feat-riscv64' of https://github.com/michalbiesek/util-linux * 'feat-riscv64' of https://github.com/michalbiesek/util-linux: setarch: add riscv64/riscv32 support commit 65b1f3deed1e737fd4f3c80815200c38f2409fdc Author: Thomas Weißschuh Date: Tue Aug 15 21:25:44 2023 +0200 libblkid: limit read buffer size Many probers read data from disk bounded by some field from the probed disk itself. The probers should validate the read length before using. Add a fallback that kicks in when the proper does not check the length epxlicitly. See #2427 Signed-off-by: Thomas Weißschuh libblkid/src/probe.c | 5 +++++ 1 file changed, 5 insertions(+) commit ced1142d6f25a19ebaac7afbc1376a786059924c Author: Karel Zak Date: Tue Aug 15 12:32:49 2023 +0200 losetup: cleanup device node modes The current code follows ro/rw mode not only set mode of the new device, but also to open the device node for ioctls. Linux kernel does not care and it seems O_RDONLY is good enough for all cases (ioctls). Unfortunately, udevd is sensitive as it monitors devices by inotify and IN_CLOSE_WRITE event is expected to apply udev rules for the device. Changes: * remove LOOPDEV_FL_{RDONLY,RDWR} private flags, it's too complex and unnecessary * use mode_t for open() modes (rater than int) * re-open only if O_RDWR requested otherwise default to O_RDONLY * make sure O_RDWR is used on device setup Fixes: https://github.com/util-linux/util-linux/issues/2434 Signed-off-by: Karel Zak include/loopdev.h | 6 ++--- lib/loopdev.c | 80 ++++++++++++++++++++++++++++++++----------------------- 2 files changed, 49 insertions(+), 37 deletions(-) commit 3119a8060102ed7dd04d4a782932494c386f72a6 Author: Masatake YAMATO Date: Tue Aug 15 20:51:23 2023 +0900 github: check apt-cache in more robust way (v2) The original change (86d5c4dbf6e62c52fe9295f4e55eb629d8e26cfb) didn't consider "set -e" at the beginning of the script. Signed-off-by: Masatake YAMATO .github/workflows/cibuild-setup-ubuntu.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c40293ed9db8c1b2e1941bfa52de5a5a369586cf Author: Karel Zak Date: Tue Aug 15 13:12:16 2023 +0200 Revert "tools/all_syscalls: use sh and replace awk with grep & sed" This reverts commit a01065546d9613ffc9835398f56756f08a0193be. tools/all_syscalls | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8e7f8b4da2c81d9abb903fd39a7cb4edd09b087a Author: Karel Zak Date: Tue Aug 15 12:49:20 2023 +0200 Revert "tools/all_syscalls: use pipefail" Our CI don't like it. See also old http://github.com/util-linux/util-linux/commit/fffe5f7c72121c054645c60c0bb49f653bb7142e This reverts commit d53a1529bd79077a8e7232651f99f20890283c0c. tools/all_syscalls | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2756f00407d3bc7dca3f5be0a0d101ef97e8eb5e Author: Karel Zak Date: Tue Aug 15 11:33:31 2023 +0200 setarch: add PER_LINUX_FDPIC fallback Fixes: https://github.com/util-linux/util-linux/issues/2436 Signed-off-by: Karel Zak sys-utils/setarch.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3ff2652ec5e0df5758dfde384e97b429cb4bdc9f Merge: 86d5c4dbf 2cae85991 Author: Karel Zak Date: Tue Aug 15 11:05:20 2023 +0200 Merge branch 'PR/libblkid-fix-topology-64vs32' of github.com:karelzak/util-linux-work * 'PR/libblkid-fix-topology-64vs32' of github.com:karelzak/util-linux-work: libblkid: fix topology chain types mismatch commit 86d5c4dbf6e62c52fe9295f4e55eb629d8e26cfb Author: Karel Zak Date: Tue Aug 15 11:02:43 2023 +0200 github: check apt-cache in more robust way Reported-by: Masatake YAMATO Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a3c05171c8a26fa74ad9f815b59a8453c9f83ffd Author: Michal Biesek Date: Mon Aug 14 02:37:45 2023 +0200 setarch: add riscv64/riscv32 support Signed-off-by: Michal Biesek sys-utils/setarch.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c0cac93ec2206c29d23f7d980f6983f0ed8be3c8 Merge: b1f633c8b d53a1529b Author: Karel Zak Date: Mon Aug 14 13:09:51 2023 +0200 Merge branch 'master' of https://github.com/apprehensions/util-linux * 'master' of https://github.com/apprehensions/util-linux: tools/all_syscalls: use pipefail meson: run tests if with option program-tests meson: use meson features instead of bash tools/all_syscalls: use sh and replace awk with grep & sed commit 2cae85991d7bab115b2da011de116870a6e68b00 Author: Karel Zak Date: Mon Aug 14 12:31:48 2023 +0200 libblkid: fix topology chain types mismatch Reported-by: https://github.com/util-linux/util-linux/pull/2430 References: https://github.com/util-linux/util-linux/commit/3ab9e699a8d90f55e0447516b7e05a8686180467 Signed-off-by: Karel Zak libblkid/src/topology/topology.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit b1f633c8be2c7ec5db36ba1734c7ea6c8d14eb1b Merge: 8a52d18d6 013bf9e3d Author: Karel Zak Date: Mon Aug 14 12:02:47 2023 +0200 Merge branch 'verity' of https://github.com/bluca/util-linux * 'verity' of https://github.com/bluca/util-linux: verity: modernize example in manpage verity: use -verity as the device mapper name instead of libmnt_ commit 8a52d18d6e3d3413bef5c528a4369e295b5447b1 Merge: ebbb108c5 9a47974c7 Author: Karel Zak Date: Mon Aug 14 11:48:19 2023 +0200 Merge branch 'fincore/noheader' of https://github.com/t-8ch/util-linux * 'fincore/noheader' of https://github.com/t-8ch/util-linux: fincore: (tests) adapt alternative testcases to new header format commit 013bf9e3d0080a977dad5f4ce5fbfc77d46049f4 Author: Luca Boccassi Date: Fri Aug 11 00:19:16 2023 +0100 verity: modernize example in manpage These days it's no longer necessary to create the verity hash device with dd, and to transcribe the roothash by hand. Update the example, also using the file extensions that are used by systemd for verity autodiscovery (e.g.: RootImage=img.raw will automatically use img.verity and img.roothash from the same directory, if present). Signed-off-by: Luca Boccassi sys-utils/mount.8.adoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 001a489143bde8835477fc1c32d5cde1c2c09b9d Author: Luca Boccassi Date: Fri Aug 11 00:18:22 2023 +0100 verity: use -verity as the device mapper name instead of libmnt_ If the roothash is the same among two volumes, then the images are guaranteed to be equivalent. The filename of the image on the other hand does not imply that the images are equivalent. In systemd we open verity devices as '-verity', so that we know for sure we can reuse them. Do the same here, so that we are a bit more confident that images can be reused before the safety check, and also so that we can take advantage of the kernel refcounting together with images used by systemd, as setting up verity is expensive. Signed-off-by: Luca Boccassi libmount/src/hook_veritydev.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit ebbb108c5d1cb7c6a28671f2973fb706a35eacae Author: Karel Zak Date: Thu Aug 10 11:13:47 2023 +0200 eject: (tests) don't write mount hint to terminal References: 4b9e3937966f7ddf90e6013c87f73c260963b0ea Signed-off-by: Karel Zak tests/ts/eject/umount | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 48d573797797650d96456979797c0155d58f61cb Author: Colin Gillespie Date: Wed Aug 9 18:28:07 2023 +1000 libblkid: (bcachefs) fix not detecting large superblocks Probing does not detect bcachefs filesystems with a superblock larger than 4KiB. Bcachefs superblocks grow in size and can become much larger than this. Increase the superblock maximum size limit to 1MiB. Validate the superblock isn't larger than the maximum size defined in the superblocks layout section. libblkid/src/superblocks/bcache.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 123fe3336fe109200e4c6c645ac8c9202c38b3f6 Author: Karel Zak Date: Wed Aug 9 13:12:34 2023 +0200 uuidd: enable cont-clock in service file Signed-off-by: Karel Zak misc-utils/uuidd.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c81dea6346e1804a07f8280dc059de4f934b36c8 Author: Karel Zak Date: Wed Aug 9 12:56:42 2023 +0200 uuidd: improve man page for -cont-clock Signed-off-by: Karel Zak misc-utils/uuidd.8.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1d4456dd81a64a73685df9e5f1232d566818e453 Author: John David Anglin Date: Mon Aug 7 15:37:17 2023 +0000 enosys: fix build on hppa The following patch fixes the definition of SECCOMP_ARCH_NATIVE on hppa. Signed-off-by: John David Anglin include/audit-arch.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 2d7549b79f2b32f33cec3a5b518cddfe9a63506b Author: Karel Zak Date: Wed Aug 9 11:26:28 2023 +0200 zramctl: add hint about supported algorithms It seems the current list of the algorithms is confusing for end-users, because it's inaccurate in many cases. Let's explain why the list cannot be "perfect". Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2203324 Signed-off-by: Karel Zak sys-utils/zramctl.8.adoc | 2 ++ sys-utils/zramctl.c | 1 + 2 files changed, 3 insertions(+) commit 9a47974c723747b0179593f51595742368aec225 Author: Thomas Weißschuh Date: Tue Aug 8 22:07:43 2023 +0200 fincore: (tests) adapt alternative testcases to new header format For #2380 the testcases for 4k pages were adapted to the new output format, but the other testcases were missed. Signed-off-by: Thomas Weißschuh tests/expected/fincore/count.65536 | 32 ++++++++++++++++---------------- tests/expected/fincore/count.nosize | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) commit d53a1529bd79077a8e7232651f99f20890283c0c Author: sewn Date: Tue Aug 8 11:50:10 2023 +0300 tools/all_syscalls: use pipefail tools/all_syscalls | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b8bed37a1493b913bf5bda938487ae0c06c11ce7 Author: Thomas Weißschuh Date: Sat Aug 5 08:57:28 2023 +0200 meson: properly handle gettext non-existence Commit e91a49c9747f ("meson: don't build po if no gettext") tried to add the possibility to build util-linux without gettext. Unfortunately by default the call to find_program() would abort the build if the program is not found. Avoid aborting the build. Signed-off-by: Thomas Weißschuh po/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f592cc2164c3db3c76a2898975ceb58d09f0cbb Author: Karel Zak Date: Thu Aug 3 13:46:32 2023 +0200 lsclocks: remove unused code Signed-off-by: Karel Zak misc-utils/lsclocks.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 2f82c248d45521194b75e6ea9cd4f2c488662d2c Author: Karel Zak Date: Thu Aug 3 13:39:32 2023 +0200 meson: check for HAVE_STRUCT_STATX_STX_MNT_ID References: c0136ac0c98b18208508fbcfac31a843e0bb8a37 Signed-off-by: Karel Zak meson.build | 4 ++++ 1 file changed, 4 insertions(+) commit 1554b29732140292656f3c120a23c257e5c049ad Merge: 7f8206f8d 8bcf89d38 Author: Karel Zak Date: Thu Aug 3 13:35:09 2023 +0200 Merge branch 'meson/check-mount' of https://github.com/t-8ch/util-linux * 'meson/check-mount' of https://github.com/t-8ch/util-linux: meson: add check for struct statx meson: add check for linux/mount.h commit 7f8206f8de922a285fbef2716d5b7e832a59bf1f Author: Karel Zak Date: Thu Aug 3 13:06:30 2023 +0200 libmount: improve EPERM interpretation In some cases mount(2)/open_tree(2) returns EPERM for root user. In this case libmount reports it as "mount point is not a directory". It does not makes sense for bind mount where target could be a regular file. This patch is not ideal, the error handler is generic, but semantic for new mount API and mount(2) is different. For example now it checks for regular file, but the new API supports bind over symlinks, so proper fix will require lstat() and S_ISLNK(), etc. We need to move error messages to hook_mount.c and mount_mount_legacy.c to make it more specific. Fixes: https://github.com/util-linux/util-linux/issues/2413 Signed-off-by: Karel Zak libmount/src/context_mount.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c0136ac0c98b18208508fbcfac31a843e0bb8a37 Author: Karel Zak Date: Thu Aug 3 12:39:19 2023 +0200 libmount: ifdef statx() call In this case the statx() is use to get mount ID. It's optional and not required. Let's #ifdef the statx() call and also check for stx_mnt_id struct member. Fixes: https://github.com/util-linux/util-linux/issues/2415 Signed-off-by: Karel Zak configure.ac | 5 ++++- libmount/src/hook_mount.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 8bcf89d38493b68b723778864ea2a11cee885ede Author: Thomas Weißschuh Date: Thu Aug 3 12:22:29 2023 +0200 meson: add check for struct statx meson variant of commit 1fc3471dfb8b ("libmount: check for struct statx"). Signed-off-by: Thomas Weißschuh meson.build | 3 +++ 1 file changed, 3 insertions(+) commit 241e4a48d9ece9c324e665daace4a7e4be317314 Author: Thomas Weißschuh Date: Thu Aug 3 12:18:41 2023 +0200 meson: add check for linux/mount.h meson variant of commit 5502e73d8f82 ("libmount: check for linux/mount.h"). Signed-off-by: Thomas Weißschuh meson.build | 1 + 1 file changed, 1 insertion(+) commit 8d2f94552ba080c58e695f6dbf6706aface7ea5f Merge: 42fe41dc1 7d3713a6d Author: Karel Zak Date: Thu Aug 3 12:11:06 2023 +0200 Merge branch 'bug911336' of https://github.com/floppym/util-linux * 'bug911336' of https://github.com/floppym/util-linux: wall: do not error for ttys that do not exist commit 42fe41dc1e82ad758bdb70ed424de317aba59b70 Merge: 75e2d170f 68981c212 Author: Karel Zak Date: Thu Aug 3 12:09:29 2023 +0200 Merge branch 'highsierra' of https://github.com/pali/util-linux * 'highsierra' of https://github.com/pali/util-linux: libblkid: iso9660: Implement full High Sierra CDROM format support libblkid: iso9660: Define all fields in iso_volume_descriptor according to ECMA-119 4th edition spec commit 75e2d170f71c1e83715979f18709ae1fcdfb22f0 Merge: 198c2039c 22822b882 Author: Karel Zak Date: Thu Aug 3 12:08:43 2023 +0200 Merge branch 'mkfds--INET-alter-the-ports' of https://github.com/masatake/util-linux * 'mkfds--INET-alter-the-ports' of https://github.com/masatake/util-linux: tests: (lsfd::mkfds-*) alter the L4 ports for avoiding the conflict with option-inet test case commit 198c2039c6dc6b0cc2d9d6e653cb552815d7c600 Merge: 2bc964d05 418f5adbe Author: Karel Zak Date: Thu Aug 3 12:07:55 2023 +0200 Merge branch 'tests--TESTS_COMPONENTS' of https://github.com/masatake/util-linux * 'tests--TESTS_COMPONENTS' of https://github.com/masatake/util-linux: tests,autotools: add TESTS_COMPONENTS macro for specfying test components from make cmdline commit 2bc964d052d2f24388b3da2926b8c9eef163fc18 Merge: ee146a0c2 cf4deef00 Author: Karel Zak Date: Thu Aug 3 12:07:33 2023 +0200 Merge branch 'lsfds--dont-run-unix-stream-test-on-qemu-user' of https://github.com/masatake/util-linux * 'lsfds--dont-run-unix-stream-test-on-qemu-user' of https://github.com/masatake/util-linux: tests: (lsfd) don't run the unix-stream testcase including newlines in the path on qemu-user lsfd: (refactor) unify the invocations of sysfs_get_byteorder() commit ee146a0c2ea9fff7b892f3e7bce5cd0d47b7a36f Merge: 7f45939f2 edba74df1 Author: Karel Zak Date: Thu Aug 3 12:06:24 2023 +0200 Merge branch 'lsclocks/rtc' of https://github.com/t-8ch/util-linux * 'lsclocks/rtc' of https://github.com/t-8ch/util-linux: lsclocks: add support for RTC lsclocks: factor out path based clocks commit 7f45939f24d640ec742b857888e29a2bf2bf1fd5 Author: Markus Mayer Date: Tue Aug 1 13:08:24 2023 -0700 include: define pidfd syscalls if needed If the kernel headers are too old to provide the pidfd syscall numbers, let's define them ourselves. This can be helpful while cross-compiling. The runtime environment may provide a kernel that is new enough to handle the calls, even if the toolchain doesn't. Signed-off-by: Markus Mayer include/pidfd-utils.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 1fc3471dfb8b3dc53af47115d0579cc6188f51d8 Author: Markus Mayer Date: Tue Aug 1 12:59:27 2023 -0700 libmount: check for struct statx Let's ensure struct statx exists before we try to use it. Checking for the existence of linux/stat.h is not sufficient. This is because [uapi/]linux/stat.h has existed since Linux 3.7, however struct statx was only introduced with Linux 4.11. The problem arises if one happens ot be using kernel headers from within the aforementioned range, such as Linux 4.9. CC libmount/src/la-utils.lo In file included from libmount/src/utils.c:31: ./include/fileutils.h:100:33: warning: declaration of 'struct statx' will not be visible outside of this function [-Wvisibility] unsigned int mask, struct statx *stx) ^ libmount/src/utils.c:117:16: error: variable has incomplete type 'struct statx' struct statx stx = { 0 }; ^ libmount/src/utils.c:117:10: note: forward declaration of 'struct statx' struct statx stx = { 0 }; ^ libmount/src/utils.c:125:5: error: use of undeclared identifier 'STATX_TYPE' STATX_TYPE ^ libmount/src/utils.c:126:8: error: use of undeclared identifier 'STATX_MODE' | STATX_MODE ^ libmount/src/utils.c:127:8: error: use of undeclared identifier 'STATX_INO' | STATX_INO, ^ 1 warning and 4 errors generated. make[4]: *** [Makefile:11269: libmount/src/la-utils.lo] Error 1 Checking for the presence of struct statx explicitly avoids this problem. Signed-off-by: Markus Mayer configure.ac | 1 + include/fileutils.h | 2 +- libmount/src/utils.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 5502e73d8f82af92975b7dec2d9641dc79170670 Author: Markus Mayer Date: Tue Aug 1 12:59:26 2023 -0700 libmount: check for linux/mount.h Check that linux/mount.h is present before using features that rely on it. It is necessary to check for the presence of linux/mount.h explicitly. Simply relying on the presence of several syscalls (e.g. SYS_move_mount, SYS_open_tree) does not work reliably, at least not in a cross-compiling environment. The syscall definitions are provided by the C library. Meanwhile, linux/mount.h is provided by the kernel. This opens the possibility for discrepancies. A problem arises if the C library (e.g. musl-1.2.3) defines all "mount fd API" syscalls (and HAVE_MOUNTFD_API becomes true), but the kernel headers are old enough to not provide linux/mount.h. The resulting error looks as follows. This example is using an LLVM-13 cross-compiler from x86_64 to aarch64 with musl-1.2.3 as the C library. CC libmount/src/la-hooks.lo In file included from libmount/src/hooks.c:30: ./include/mount-api-utils.h:11:10: fatal error: 'linux/mount.h' file not found ^~~~~~~~~~~~~~~ 1 error generated. make[4]: *** [Makefile:11185: libmount/src/la-hooks.lo] Error 1 To prevent this condition, we add a check to configure that will test for the presence of linux/mount.h in addition to testing for the mount fd API. Only if both conditions are met can we actually use the mount fd API. Signed-off-by: Markus Mayer configure.ac | 8 ++++++++ include/mount-api-utils.h | 4 ++-- libmount/src/hook_idmap.c | 4 ++-- libmount/src/hooks.c | 2 +- libmount/src/version.c | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) commit 63c15ba865aed3eca14f64494822f4ab7c2dcf30 Merge: de20db1d3 91c2cbdf3 Author: Karel Zak Date: Thu Aug 3 12:01:49 2023 +0200 Merge branch 'mount/statx-enosys' of https://github.com/t-8ch/util-linux * 'mount/statx-enosys' of https://github.com/t-8ch/util-linux: libmount: (utils) fix statx fallback commit de20db1d32e43aaf632695df28b4a1e184530191 Merge: 1b2d81873 b42e4e235 Author: Karel Zak Date: Thu Aug 3 12:00:43 2023 +0200 Merge branch 'PR/libmount-fake' of github.com:karelzak/util-linux-work * 'PR/libmount-fake' of github.com:karelzak/util-linux-work: libmount: cleanup --fake mode commit 1b2d8187360157b00b47f52522fc039d82e34e6b Author: Karel Zak Date: Thu Aug 3 11:43:28 2023 +0200 libmount: don't canonicalize symlinks for bind operation The new kernel mount API can bind over symlink by default. Unfortunately, libmount always canonicalizes all paths (due to backward compatibility, search in mountinfo, search in fstab, etc.). Possible workaround is -c, --no-canonicalize but it disable all paths canonicalization, tags to paths conversions etc. This patch disables the canonicalization only for the target path (if symlink) on bind operation. Fixes: https://github.com/util-linux/util-linux/issues/2370 Signed-off-by: Karel Zak libmount/src/context_mount.c | 6 +++++- sys-utils/mount.8.adoc | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 91c2cbdf3a04f2f3f4c4bb0d2a6053874bfa11ea Author: Thomas Weißschuh Date: Thu Aug 3 07:13:28 2023 +0200 libmount: (utils) fix statx fallback If the systemcall is not available ENOSYS is returned. Under glibc the statx implementation also has its own fallback logic. As AT_STATX_DONT_SYNC can't be implemented correctly in that fallback logic the wrapper will return EINVAL in case the emulation is needed and AT_STATX_DONT_SYNC is set. So also use our own fallback in that case. Fixes: #2409 Signed-off-by: Thomas Weißschuh libmount/src/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d3713a6d541be0bac0bb78cc8fea1620583fd08 Author: Mike Gilbert Date: Sat Jul 29 17:32:57 2023 -0400 wall: do not error for ttys that do not exist Some wayland display managers (GDM) put strings like "seat0" in the ut_line field of utmp entries. These are not valid tty devices. Avoid writing a confusing error message for ttys that do not exist. Bug: https://bugs.gentoo.org/911336 Signed-off-by: Mike Gilbert term-utils/ttymsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edba74df1d20c8b99bb79670f4baf90b9e1e1328 Author: Thomas Weißschuh Date: Tue Jul 11 21:01:05 2023 +0200 lsclocks: add support for RTC Signed-off-by: Thomas Weißschuh bash-completion/lsclocks | 6 ++ misc-utils/lsclocks.1.adoc | 7 ++ misc-utils/lsclocks.c | 162 +++++++++++++++++++++++++++++++-------- tests/expected/misc/lsclocks-rtc | 1 + tests/ts/misc/lsclocks | 16 +++- 5 files changed, 160 insertions(+), 32 deletions(-) commit 782c6564c07a2e02c4e793ebec02bbb52b463747 Author: Thomas Weißschuh Date: Tue Jul 11 20:33:41 2023 +0200 lsclocks: factor out path based clocks They will also be used by the RTC implementation. Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a6dd313bf2f5bc901ddc65262807075587ecb895 Author: Karel Zak Date: Wed Aug 2 12:57:37 2023 +0200 column: fix -l The original implementation is complicated and broken. It's possible to calculate the rest of the string (for the last column) from the current position rather than calculate it continuously. Use the last wcstok() result also means that it will work as expected independently on "greedy" mode (skips repeating separators. # printf 'a b c d\n1 2 3 4\n' | ./column -t -o '|' -l3 a|b|c d 1|2|3 4 (see space between 'a' and 'b' on input) References: 8ac75e31de0ece74515e98e0b22e54cc0a9808bd Fixes: https://github.com/util-linux/util-linux/issues/1763 Signed-off-by: Karel Zak text-utils/column.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 68981c212098791ac35d2fdbdfcc4cc398d0156b Author: Pali Rohár Date: Tue Aug 1 23:09:52 2023 +0200 libblkid: iso9660: Implement full High Sierra CDROM format support Specification of High Sierra CDROM format was lost for a longer time, but now was found again. So this change improves parsing High Sierra CDROM images and implements everything which is already supported for ISO9660. High Sierra and ISO9660 are very similar and there are only few differences in headers. Most visible is that High Sierra has additional 8 bytes at beginning of each descriptor with Volume Descriptor LBN value, it has more locations of path table occurrences in Volume descriptor, has shorten copyright and abstract file ids, bibliographic file id is missing, standard version is 0 and it does not have timezone offset field in date structure. Thus positions of some fields are different between High Sierra and ISO9960. Code in iso9660.c is adjusted to handle both formats, instead implementing two very similar parsers. CDROM image of Microsoft Programmers Library 1.0 (MSPL10) from 1988, which is in High Sierra format, was before this change parsed as: ID_FS_BLOCK_SIZE=2048 ID_FS_VERSION=High\x20Sierra ID_FS_LABEL=MS_PL_VERSION_100 ID_FS_LABEL_ENC=MS_PL_VERSION_100 ID_FS_TYPE=iso9660 ID_FS_USAGE=filesystem And after this change as: ID_FS_FSBLOCKSIZE=2048 ID_FS_BLOCK_SIZE=2048 ID_FS_FSSIZE=542998528 ID_FS_PUBLISHER_ID=MICROSOFTCORPORATION16011NE36THWAYREDMONDWA98073 ID_FS_DATA_PREPARER_ID=MERIDIAN_DATA_CD_PUBLISHER ID_FS_APPLICATION_ID=PL ID_FS_UUID=1988-07-12-00-37-37-00 ID_FS_UUID_ENC=1988-07-12-00-37-37-00 ID_FS_VERSION=High\x20Sierra ID_FS_LABEL=MS_PL_VERSION_100 ID_FS_LABEL_ENC=MS_PL_VERSION_100 ID_FS_TYPE=iso9660 ID_FS_USAGE=filesystem Scan of original hardcopy High Sierra specification: https://www.os2museum.com/files/docs/cdrom/CDROM_Working_Paper-1986.pdf HTML version of High Sierra specification: https://www.os2museum.com/files/docs/cdrom/hsg_wp.html Archived hardcopy of High Sierra specification: https://archive.org/details/cdrom-working-paper-1986 Story behind Looking for High Sierra: https://www.os2museum.com/wp/looking-for-high-sierra/ libblkid/src/superblocks/iso9660.c | 196 ++++++++++++++++++++++--------------- 1 file changed, 118 insertions(+), 78 deletions(-) commit b2544a81e71b4e4b20db25014ad0be54ee363cdc Author: Pali Rohár Date: Tue Aug 1 22:17:10 2023 +0200 libblkid: iso9660: Define all fields in iso_volume_descriptor according to ECMA-119 4th edition spec libblkid/src/superblocks/iso9660.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 418f5adbee2cabcdf4c6ef34eac7cb92317975f4 Author: Masatake YAMATO Date: Wed Aug 2 02:12:02 2023 +0900 tests,autotools: add TESTS_COMPONENTS macro for specfying test components from make cmdline An example cmdline: $ make check TESTS_COMPONENTS=lsfd Signed-off-by: Masatake YAMATO tests/Makemodule.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 22822b88210d76b58b8fbc17a28d6c0dfa7dcb00 Author: Masatake YAMATO Date: Wed Aug 2 01:50:38 2023 +0900 tests: (lsfd::mkfds-*) alter the L4 ports for avoiding the conflict with option-inet test case Close #2397 The conflict appears in parallel execution. This change just mitigates the original issue. An ideal solution is that finding unused ports if bind(2) is failed. Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-tcp | 6 +++--- tests/expected/lsfd/mkfds-tcp6 | 6 +++--- tests/expected/lsfd/mkfds-udp | 20 ++++++++++---------- tests/expected/lsfd/mkfds-udp6 | 20 ++++++++++---------- tests/ts/lsfd/mkfds-tcp | 4 ++-- tests/ts/lsfd/mkfds-tcp6 | 4 ++-- tests/ts/lsfd/mkfds-udp | 16 ++++++++-------- tests/ts/lsfd/mkfds-udp6 | 16 ++++++++-------- 8 files changed, 46 insertions(+), 46 deletions(-) commit cf4deef005d919af1cd2cef5b634a78acefff3fb Author: Masatake YAMATO Date: Wed Aug 2 01:06:40 2023 +0900 tests: (lsfd) don't run the unix-stream testcase including newlines in the path on qemu-user Close #2402. The communication code for retrieving unix socket information doesn't consider the byteorder now. Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-stream | 8 ---- .../lsfd/mkfds-unix-stream-requiring-sockdiag | 8 ++++ tests/ts/lsfd/mkfds-unix-stream | 13 ----- tests/ts/lsfd/mkfds-unix-stream-requiring-sockdiag | 56 ++++++++++++++++++++++ 4 files changed, 64 insertions(+), 21 deletions(-) commit 891b24b7dadc16fec6d05a06c2e0413cb01dab6d Author: Masatake YAMATO Date: Wed Aug 2 00:53:46 2023 +0900 lsfd: (refactor) unify the invocations of sysfs_get_byteorder() Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 96 ++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 43 deletions(-) commit 6112ade968cbe8728ca25fccdafdb1f9599424db Author: Jeremy Linton Date: Wed Jul 26 15:54:20 2023 -0500 lscpu: Even more Arm part numbers (early 2023) There have been further MIDR/part numbers published on https://developer.arm.com, they include: Cortex-X4, Cortex-A520, Cortex-A720, Cortex-M85, Cortex-M55 and Cortex-R52+. Signed-off-by: Jeremy Linton sys-utils/lscpu-arm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b42e4e2350a26b13a6165b78990e8814535ceb80 Author: Karel Zak Date: Tue Aug 1 14:49:48 2023 +0200 libmount: cleanup --fake mode It was originally designed to play nasty games with /etc/mtab (mount when /etc is read-only and update later when it's write-able). The --fake is completely useless with the new API due to complexity where we cannot skip any step, because the next stuff depends on it. So, it makes more sense skip all functionality where libmount does anything significant. This commit add --fake check to hooks logic to skip all hooks as the hooks are place where libmount implements mount related invasive operations (create mountpoint, namespaces, create superblock, move, mount, etc.). Frankly, --fake without mtab is useless. Fixes: https://github.com/util-linux/util-linux/issues/2395 Signed-off-by: Karel Zak libmount/src/context_mount.c | 5 +++++ libmount/src/hook_mount.c | 7 ------- libmount/src/hook_mount_legacy.c | 18 ------------------ libmount/src/hooks.c | 12 ++++++++++-- sys-utils/mount.8.adoc | 6 +++++- 5 files changed, 20 insertions(+), 28 deletions(-) commit e3a1b5e6d0db08acaf3fbd72d5680c945d68f10d Merge: df0c1e7dc eaa387088 Author: Karel Zak Date: Tue Aug 1 10:43:59 2023 +0200 Merge branch 'lsfd--fix-2399-use-fifo-in-test-cases' of https://github.com/masatake/util-linux * 'lsfd--fix-2399-use-fifo-in-test-cases' of https://github.com/masatake/util-linux: tests: (lsfd::option-inet) get child-processes' pids via fifo commit df0c1e7dc981277eab60f1cfcdf1af61bfe946f3 Merge: dc3f05fc3 c214cbebd Author: Karel Zak Date: Tue Aug 1 10:42:06 2023 +0200 Merge branch 'cachestat' of https://github.com/t-8ch/util-linux * 'cachestat' of https://github.com/t-8ch/util-linux: fincore: report data from cachestat() fincore: refactor output formatting fincore: add --output-all commit c214cbebdf978a2a574f20e7ead9a50575a60df6 Author: Thomas Weißschuh Date: Mon Jul 31 18:00:11 2023 +0200 fincore: report data from cachestat() The cachestat() syscall was introduced in Linux 6.5 and reports data that complements that from mincore(). Signed-off-by: Thomas Weißschuh configure.ac | 1 + meson.build | 1 + misc-utils/fincore.1.adoc | 1 + misc-utils/fincore.c | 214 +++++++++++++++++++++++++++++++++++----------- 4 files changed, 168 insertions(+), 49 deletions(-) commit e5530e33bfb71a9c98b0ca20dbe0c16e316b6b66 Author: Thomas Weißschuh Date: Mon Jul 31 18:00:08 2023 +0200 fincore: refactor output formatting This will make the upcoming addition of cachestat() columns nicer. Signed-off-by: Thomas Weißschuh misc-utils/fincore.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 1f583cb99b3593bf7375b824ab61f43fef154eb9 Author: Thomas Weißschuh Date: Mon Jul 31 18:00:05 2023 +0200 fincore: add --output-all Signed-off-by: Thomas Weißschuh bash-completion/fincore | 1 + misc-utils/fincore.1.adoc | 3 +++ misc-utils/fincore.c | 9 +++++++++ 3 files changed, 13 insertions(+) commit dc3f05fc3fca398cf0db50ac3e3871e99aedd3ae Author: Thomas Weißschuh Date: Mon Jul 31 17:49:11 2023 +0200 lsclocks: add support for cpu clocks Signed-off-by: Thomas Weißschuh bash-completion/lsclocks | 5 ++++ misc-utils/lsclocks.1.adoc | 4 +++ misc-utils/lsclocks.c | 54 +++++++++++++++++++++++++++++++++++++--- tests/expected/misc/lsclocks-cpu | 1 + tests/ts/misc/lsclocks | 6 +++++ 5 files changed, 67 insertions(+), 3 deletions(-) commit a5cded296945736c197f1651a30815ccc81d3873 Author: Thomas Weißschuh Date: Mon Jul 31 17:49:07 2023 +0200 lsclocks: improve dynamic clocks docs and completion Signed-off-by: Thomas Weißschuh bash-completion/lsclocks | 6 ++++++ misc-utils/lsclocks.1.adoc | 1 + 2 files changed, 7 insertions(+) commit db5fffd5b1e414037d76a08ed57dd9c7b2c6d5b5 Author: Thomas Weißschuh Date: Mon Jul 31 17:49:04 2023 +0200 lsclocks: don't fail without dynamic clocks Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eaa3870880aaa8d3d6b1aa8ea6bb19a717708b8e Author: Masatake YAMATO Date: Mon Jul 31 20:32:18 2023 +0900 tests: (lsfd::option-inet) get child-processes' pids via fifo Close #2399. The original code assumes the background processes prepare sockets enough fast. #2399 showed the assumption was wrong; lsfd reported half-cooked sockets. To avoid the timing issue, the test case with this change uses a fifo to receive pids from the child test_mkfds processes. test_mkfds reports its pid after cooking the sockets. When the option-inet script recives the pid, we can expect the sockets are ready. Note: bash's coproc cannot be used here; it supports only one co-process at once. Analysed-by: Alexander Kanavin Signed-off-by: Masatake YAMATO tests/ts/lsfd/option-inet | 60 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 14 deletions(-) commit 1a9a6a642cea1510020220676c8c9a1714aa2ae7 Merge: 989f8ea2a dc8464208 Author: Karel Zak Date: Mon Jul 31 12:44:17 2023 +0200 Merge branch 'fincore-test' of https://github.com/zeha/util-linux * 'fincore-test' of https://github.com/zeha/util-linux: fincore: (tests) fix double log output commit 989f8ea2a9bcabb23cc891c05666d29fa358b2fa Author: Karel Zak Date: Mon Jul 31 12:41:39 2023 +0200 chrt: (man) add note about --sched-period lower limit References: https://github.com/util-linux/util-linux/pull/2393 Signed-off-by: Karel Zak schedutils/chrt.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 368dbfdc0c65b031a3711df144c6a0becd9100a6 Merge: 3d1041bc5 303f4bb85 Author: Karel Zak Date: Mon Jul 31 12:31:35 2023 +0200 Merge branch 'chrt/fixes' of https://github.com/t-8ch/util-linux * 'chrt/fixes' of https://github.com/t-8ch/util-linux: ci: (codeql) ignore cpp/uncontrolled-process-operation chrt: allow option separator chrt: (tests) don't mark tests as known failed chrt: (tests) increase deadline test parameters commit 3d1041bc50910857b7a45e0c6bcc7ef056a2564e Merge: 34104995e 402453e13 Author: Karel Zak Date: Mon Jul 31 12:29:01 2023 +0200 Merge branch 'lsfd--handle-newline-in-unix-socket-path' of https://github.com/masatake/util-linux * 'lsfd--handle-newline-in-unix-socket-path' of https://github.com/masatake/util-linux: lsfd: (test) add a case for testing a unix socket including newline characters in its path name lsfd: re-fill unix socket paths with sockdiag netlink interface lsfd: add comment listing functions names importing via #include lsfd: include common headers in lsfd.h lsfd: include system header files first lsfd: fix a misleading parameter name lsfd: add const modifier commit 34104995e251f2eb7a2fa3da0d96eb8d20b0f876 Merge: 343c50d93 7dea67d3b Author: Karel Zak Date: Mon Jul 31 12:13:24 2023 +0200 Merge branch 'lsfd--bpf-prog' of https://github.com/masatake/util-linux * 'lsfd--bpf-prog' of https://github.com/masatake/util-linux: test: (lsfd) add a case for testing BPF-PROG.TYPE and BPF-PROG.TYPE.RAW columns test: (mkfds::bpf-prog) new factory lsfd: add BPF-PROG.TYPE, BPF-PROG.TYPE.RAW, and BPF-PROG.ID columns commit 343c50d93bcf8ab57fb6bb4980b58aeb032fd409 Merge: a11ee32a7 9d0b73a64 Author: Karel Zak Date: Mon Jul 31 12:10:26 2023 +0200 Merge branch 'last-reboot-crash-reporting' of https://github.com/troyrollo/util-linux * 'last-reboot-crash-reporting' of https://github.com/troyrollo/util-linux: login-utils: Report crashes on reboot lines insted of overlapping uptimes commit a11ee32a747b83c976d3e2a31683b44e1d58f83f Merge: db8f78151 5a02eb13e Author: Karel Zak Date: Mon Jul 31 11:48:37 2023 +0200 Merge branch 'fincore-block' of https://github.com/dancerj/util-linux * 'fincore-block' of https://github.com/dancerj/util-linux: iterate according to review comments. Support device files. commit dc8464208c573e8b4509d423eb33d5a9020ae0a9 Author: Chris Hofstaedtler Date: Tue Jul 18 23:34:51 2023 +0200 fincore: (tests) fix double log output The fincore tests call ts_log_both inside an output redirection of both stdout and stderr, leading to the ts_log_both output ending up twice in both stdout and stderr. Call ts_log_both before setting up the output redirection. Signed-off-by: Chris Hofstaedtler tests/ts/fincore/count | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba30b89c8d73b7d0d9df734945d6b89b91634fe3 Author: sewn Date: Sat Jul 29 07:15:50 2023 +0300 meson: run tests if with option program-tests libmount/meson.build | 32 +++++------ meson.build | 146 ++++++++++++++++++++++++++++++++++----------------- meson_options.txt | 4 ++ 3 files changed, 118 insertions(+), 64 deletions(-) commit 922d025ad0641ba039f69c7fc4b64c7a4fee8365 Author: sewn Date: Sat Jul 29 05:50:41 2023 +0300 meson: use meson features instead of bash meson.build | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit a01065546d9613ffc9835398f56756f08a0193be Author: sewn Date: Sat Jul 29 05:19:53 2023 +0300 tools/all_syscalls: use sh and replace awk with grep & sed using sh removes the bash dependencies, for those who don't have bash on their system, and replaced the GNU awk with a portable grep and sed. tools/all_syscalls | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 303f4bb85efe82448b8e1d32390b6403241232c8 Author: Thomas Weißschuh Date: Thu Jul 27 07:21:02 2023 +0200 ci: (codeql) ignore cpp/uncontrolled-process-operation In the context of util-linux these are mostly false positives. Signed-off-by: Thomas Weißschuh .github/workflows/codeql.yml | 2 ++ 1 file changed, 2 insertions(+) commit 4a85aad1219dadc9fc87e20ac105c917ffd9089c Author: Thomas Weißschuh Date: Wed Jul 26 16:33:09 2023 +0200 chrt: allow option separator Allow the option separator "--". It works in other, similar tools like nice and ionice. Example: chrt 1 -- id Signed-off-by: Thomas Weißschuh schedutils/chrt.c | 2 ++ 1 file changed, 2 insertions(+) commit ad40d48cb767993248b20aea26dd6c0dfbccb462 Author: Thomas Weißschuh Date: Wed Jul 26 16:33:05 2023 +0200 chrt: (tests) don't mark tests as known failed The broken CI platform is not used anymore. Signed-off-by: Thomas Weißschuh tests/ts/schedutils/chrt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d01bfee17a099e3befe9d1f76ccda2409f0f44ba Author: Thomas Weißschuh Date: Wed Jul 26 16:32:59 2023 +0200 chrt: (tests) increase deadline test parameters Since kernel commit b4098bfc5efb ("sched/deadline: Impose global limits on sched_attr::sched_period") the value for dl_period has a lower bound of 100us. Adjust the test parameters so the test can work on newer kernels. Signed-off-by: Thomas Weißschuh tests/expected/schedutils/chrt-deadline | 6 +++--- tests/ts/schedutils/chrt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 402453e13dd8c50c7f495a127685504473bc05c9 Author: Masatake YAMATO Date: Sun Jul 23 14:43:36 2023 +0900 lsfd: (test) add a case for testing a unix socket including newline characters in its path name Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-unix-stream | 8 ++++++++ tests/ts/lsfd/mkfds-unix-stream | 13 +++++++++++++ 2 files changed, 21 insertions(+) commit 5468bb453c244531d7fa8424569bdb5b35267ea3 Author: Masatake YAMATO Date: Sat Jul 22 04:02:38 2023 +0900 lsfd: re-fill unix socket paths with sockdiag netlink interface This commit is mostly based on Thomas Weißschuh's work, https://github.com/t-8ch/util-linux/commit/06030390a5e6a16cc4b914bbf5fcedd3b6d83608. Unlike the original work, this commit keeps /proc related code. Unlike /proc interface, the sockdiag information source doesn't provide enough information for filling struct unix_xinfo::st member. So this commit uses /proc interface for filling the most of all unix_xinfo members as before. On the other hande, as discussed in https://github.com/util-linux/util-linux/pull/2067, the /proc interface in unreliable if a unix path name includes newline characters. This commit uses the sockdiag interface to compensate for the weakness of the /proc interface. misc-utils/lsfd-sock-xinfo.c | 143 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 2 deletions(-) commit 1078c4ae93562934a8625a6d314d17a7af370910 Author: Thomas Weißschuh Date: Sun Jul 23 22:05:48 2023 +0200 enosys: avoid warnings when no aliases are found Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit fca2b2a023869dff65f5258b713956d4d3d53306 Author: Thomas Weißschuh Date: Sun Jul 23 21:16:53 2023 +0200 enosys: don't validate that numbers are found from headers Users can specify plain numbers so it's fine to not have any aliases. Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 2 -- 1 file changed, 2 deletions(-) commit 65bf3c73f1b813135c47c778dd5e396d62151c35 Author: Thomas Weißschuh Date: Mon Jun 26 20:25:18 2023 +0200 enosys: add support for ioctl blocking Ioctls are blocked with ENOTTY. Signed-off-by: Thomas Weißschuh bash-completion/enosys | 8 ++++++ misc-utils/enosys.1.adoc | 6 ++++ misc-utils/enosys.c | 60 ++++++++++++++++++++++++++++++++++++---- tests/expected/misc/enosys-ioctl | 5 ++++ tests/helpers/test_enosys.c | 4 +++ tests/ts/misc/enosys | 12 ++++++++ 6 files changed, 89 insertions(+), 6 deletions(-) commit 358e3e43866913e2cb6e530f4d2530c9f4426549 Author: Thomas Weißschuh Date: Mon Jun 26 20:25:18 2023 +0200 enosys: store blocked syscalls in list instead of array Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 3085fabe7a6cbf819167d353a4ce5be0fe93358a Author: Thomas Weißschuh Date: Mon May 22 10:13:47 2023 +0200 enosys: build BPF dynamically Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 73 +++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) commit e9e52c7941364c08c1196b4cfc9c7f3bcc8db953 Author: Thomas Weißschuh Date: Tue Jun 27 12:59:02 2023 +0200 enosys: list syscall numbers Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb3126e19180d050ca044d00e7ba3abad85ca1d8 Author: Masatake YAMATO Date: Thu Jul 20 06:11:55 2023 +0900 lsfd: add comment listing functions names importing via #include Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1680455be287b1a6b5aa6a0157ad8eb057f7cf28 Author: Masatake YAMATO Date: Thu Jul 20 06:06:27 2023 +0900 lsfd: include common headers in lsfd.h Signed-off-by: Masatake YAMATO misc-utils/lsfd-bdev.c | 4 ---- misc-utils/lsfd-cdev.c | 4 ---- misc-utils/lsfd-fifo.c | 4 ---- misc-utils/lsfd-file.c | 3 --- misc-utils/lsfd-sock-xinfo.c | 3 --- misc-utils/lsfd-sock.c | 4 ---- misc-utils/lsfd-unkn.c | 4 ---- misc-utils/lsfd.c | 4 ---- misc-utils/lsfd.h | 3 +++ 9 files changed, 3 insertions(+), 30 deletions(-) commit ef4fb7fa26ac1df23b03f666748e9650e67326d6 Author: Masatake YAMATO Date: Thu Jul 20 06:34:30 2023 +0900 lsfd: include system header files first Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b8bcca6747ee5182779be4ac79f8e7dd7a4787c0 Author: Masatake YAMATO Date: Thu Jul 20 22:00:54 2023 +0900 lsfd: fix a misleading parameter name Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 4 ++-- misc-utils/lsfd-sock.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 86242cb0529bd5b5b2ecbd38ed4455bc43f9fb95 Author: Thomas Weißschuh Date: Fri Apr 14 12:48:59 2023 +0200 lsfd: add const modifier (The log is edited by @masatake.) misc-utils/lsfd-sock-xinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db8f78151c075d25792b6b77b500c1c52a374fe0 Author: Karel Zak Date: Thu Mar 16 13:41:36 2023 +0100 losetup: add --loop-ref and REF column The lo_file_name is nowhere used (kernel uses backing file descriptor, no path) and it was used to store limited info about the backing file path (64 bytes only!). For backward compatibility, we still fill lo_file_name with the path, but it's nowhere in the userspace used as the complete backing file path in sysfs. This commit introduces a new option to overwrite the default path in lo_file_name. The idea is to use the reference string by udevd in /dev/loop/by-ref to address loop devices independently on paths. Addresses: https://github.com/util-linux/util-linux/issues/2106 Suggested-by: Lennart Poettering Signed-off-by: Karel Zak include/loopdev.h | 4 +++- lib/loopdev.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- sys-utils/losetup.8.adoc | 5 ++++- sys-utils/losetup.c | 23 +++++++++++++++++++---- 4 files changed, 71 insertions(+), 8 deletions(-) commit 54e4a6b145fd6ef943d93e16de748283e687855d Author: Karel Zak Date: Thu Jul 20 12:34:14 2023 +0200 libmount: use some MS_* flags as superblock flags The old mount(2) API usually utilizes MS_* flags to set up the VFS node. However, there are some exceptions like "sync" (MS_SYNCHRONOUS), where the flag is used (by kernel) for the superblock instead. The new API addresses this issue, ensuring that these options are used for fsconfig(). This commit introduces MNT_SUPERBLOCK to identify these options in the libmount options Linux map, and it enforces the new mount code to utilize these options for fsconfig(FSCONFIG_SET_FLAG). Reported-by: Abbink Esger Signed-off-by: Karel Zak libmount/src/hook_mount.c | 11 +++++++++-- libmount/src/libmount.h.in | 1 + libmount/src/optmap.c | 14 +++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) commit 7dea67d3bdcf55a0cbcab14ab70bafc21005e7ee Author: Masatake YAMATO Date: Wed Jul 19 15:38:55 2023 +0900 test: (lsfd) add a case for testing BPF-PROG.TYPE and BPF-PROG.TYPE.RAW columns Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-bpf-prog | 2 ++ tests/ts/lsfd/mkfds-bpf-prog | 48 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit e04ac17fa2d0efcbfe8951d2e267fc7b3c1e6054 Author: Masatake YAMATO Date: Wed Jul 19 15:27:07 2023 +0900 test: (mkfds::bpf-prog) new factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit ec2c77da7a6593ef9647156a241dbaecec0245ba Author: Masatake YAMATO Date: Tue Jul 11 22:12:05 2023 +0900 lsfd: add BPF-PROG.TYPE, BPF-PROG.TYPE.RAW, and BPF-PROG.ID columns Based on these new columsn, the NAME column for "bpf-prog" is enhanced. An example output: # ./lsfd -p 1 -Q '(TYPE == "bpf-prog")' | head COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME systemd 1 root 14 rw--- bpf-prog anon_inodefs 15 106 id=1008 type=lsm systemd 1 root 26 rw--- bpf-prog anon_inodefs 15 106 id=2073 type=cgroup_device systemd 1 root 27 rw--- bpf-prog anon_inodefs 15 106 id=2074 type=cgroup_skb systemd 1 root 28 rw--- bpf-prog anon_inodefs 15 106 id=2075 type=cgroup_skb systemd 1 root 30 rw--- bpf-prog anon_inodefs 15 106 id=2076 type=cgroup_device systemd 1 root 31 rw--- bpf-prog anon_inodefs 15 106 id=2077 type=cgroup_device systemd 1 root 32 rw--- bpf-prog anon_inodefs 15 106 id=2078 type=cgroup_device systemd 1 root 33 rw--- bpf-prog anon_inodefs 15 106 id=2079 type=cgroup_skb systemd 1 root 34 rw--- bpf-prog anon_inodefs 15 106 id=2080 type=cgroup_skb Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 151 +++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 14 ++++- misc-utils/lsfd.c | 9 +++ misc-utils/lsfd.h | 3 + 4 files changed, 176 insertions(+), 1 deletion(-) commit 9d0b73a648888ffb1a57f2014ac27a23edd3a95c Author: Troy Rollo Date: Wed Jul 19 11:04:56 2023 +1000 login-utils: Report crashes on reboot lines insted of overlapping uptimes login-utils/last.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 91ea8ff5cf43568cccba41da573bd9a462f17a84 Merge: 15f0cc7e4 58a8c9284 Author: Karel Zak Date: Tue Jul 18 10:13:09 2023 +0200 Merge branch 'libsmartcols/noheading-width' of https://github.com/t-8ch/util-linux * 'libsmartcols/noheading-width' of https://github.com/t-8ch/util-linux: libsmartcols: don't include hidden headers in column width calculation lsfd: avoid passing NULL to qsort() column: fix memory leak commit 15f0cc7e484f914c940bc2a3b1a5e7713849a010 Merge: f226d0877 9420ca34d Author: Karel Zak Date: Tue Jul 18 10:05:03 2023 +0200 Merge branch 'wip/rishi/libmount-handle-failure-to-apply-flags-as-part-of-mount' of https://github.com/debarshiray/util-linux * 'wip/rishi/libmount-handle-failure-to-apply-flags-as-part-of-mount' of https://github.com/debarshiray/util-linux: libmount: handle failure to apply flags as part of a mount operation commit f226d0877d25b0599b6c086526c14dbb711de071 Merge: 5c8654e7f 9d1714a38 Author: Karel Zak Date: Tue Jul 18 10:03:35 2023 +0200 Merge branch 'lsfd--revise-help-message' of https://github.com/masatake/util-linux * 'lsfd--revise-help-message' of https://github.com/masatake/util-linux: lsfd: show default columns in the help message lsfd: update the help message for XMODE column lsfd: introduce -H, --list-columns option for making help messages short lsfd: (man) fix the form for the optional argument of --inet option lsfd: rearrange the aligment of the help messages lsfd: use the specified output stream for printing help messages commit 5c8654e7f3051d7b25abc7e38a7908fc44ad9bca Merge: 8af3a9cf4 7bc7ccb6b Author: Karel Zak Date: Tue Jul 18 10:02:52 2023 +0200 Merge branch 'ci/codeql-path-injection' of https://github.com/t-8ch/util-linux * 'ci/codeql-path-injection' of https://github.com/t-8ch/util-linux: ci: disable cpp/path-injection rule commit 8af3a9cf4e61dd5a66e71bd9432601373b7cbfde Merge: f9e61fea1 93ba79617 Author: Karel Zak Date: Tue Jul 18 10:02:06 2023 +0200 Merge branch 'raidrevert' of https://github.com/Vogtinator/util-linux * 'raidrevert' of https://github.com/Vogtinator/util-linux: Revert "libblkid: try LUKS2 first when probing" commit f9e61fea1c3c3d2ee218594ef473ba6d640b5e42 Merge: bac5aa9d8 6fcb27e71 Author: Karel Zak Date: Tue Jul 18 10:01:02 2023 +0200 Merge branch 'lsclocks/dynamic-clock' of https://github.com/t-8ch/util-linux * 'lsclocks/dynamic-clock' of https://github.com/t-8ch/util-linux: lsclocks: automatically discover dynamic clocks lsclocks: add support for dynamic clocks lsclocks: split out data function lsclocks: add COL_TYPE commit bac5aa9d832466cef0c36351d7fc635f84a65a65 Merge: 85d15200e 8beea162c Author: Karel Zak Date: Tue Jul 18 09:59:38 2023 +0200 Merge branch 'libblkid/bcachefs-major-minor' of https://github.com/t-8ch/util-linux * 'libblkid/bcachefs-major-minor' of https://github.com/t-8ch/util-linux: libblkid: (bcachefs) adapt to major.minor version commit 58a8c9284d625347db86970af90a88f5d6c9f7cd Author: Thomas Weißschuh Date: Mon Jul 17 21:26:45 2023 +0200 libsmartcols: don't include hidden headers in column width calculation Fixes #2380 Signed-off-by: Thomas Weißschuh libsmartcols/src/calculate.c | 5 +- tests/expected/column/table-noheaders | 6 ++ tests/expected/fincore/count.4096 | 32 ++++----- tests/expected/lsfd/column-ainodeclass-inotify | 2 +- tests/expected/lsfd/column-ainodeclass-pidfd | 2 +- .../expected/lsfd/column-deleted-make-regular-file | 2 +- tests/expected/lsfd/column-deleted-ro-regular-file | 2 +- 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-source-namespace-ASSOC | 14 ++-- .../lsfd/column-source-with-root-SysVIPC-shmem | 2 +- 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/expected/lsfd/column-xmode-MODE-r-bit | 2 +- tests/expected/lsfd/column-xmode-MODE-w-bit | 2 +- tests/expected/lsfd/column-xmode-MODE-x-bit | 2 +- tests/expected/lsfd/filter-floating-point-nums | 8 +-- tests/expected/lsfd/mkfds-cdev-tun | 2 +- tests/expected/lsfd/mkfds-directory | 2 +- tests/expected/lsfd/mkfds-eventfd | 4 +- tests/expected/lsfd/mkfds-eventpoll | 4 +- tests/expected/lsfd/mkfds-mapped-packet-socket | 8 +-- tests/expected/lsfd/mkfds-mqueue | 4 +- tests/expected/lsfd/mkfds-netlink-groups | 2 +- tests/expected/lsfd/mkfds-netlink-protocol | 2 +- tests/expected/lsfd/mkfds-netns | 2 +- tests/expected/lsfd/mkfds-pidfd | 2 +- tests/expected/lsfd/mkfds-ping-ping | 4 +- tests/expected/lsfd/mkfds-ping-ping6 | 4 +- tests/expected/lsfd/mkfds-pipe-no-fork | 4 +- tests/expected/lsfd/mkfds-raw | 2 +- tests/expected/lsfd/mkfds-raw6 | 2 +- tests/expected/lsfd/mkfds-ro-block-device | 2 +- tests/expected/lsfd/mkfds-ro-regular-file | 2 +- tests/expected/lsfd/mkfds-rw-character-device | 2 +- tests/expected/lsfd/mkfds-signalfd | 2 +- tests/expected/lsfd/mkfds-socketpair | 4 +- tests/expected/lsfd/mkfds-symlink | 2 +- tests/expected/lsfd/mkfds-tcp | 6 +- tests/expected/lsfd/mkfds-tcp6 | 6 +- tests/expected/lsfd/mkfds-timerfd-alarm | 16 ++--- .../lsfd/mkfds-timerfd-boottime-interval-only | 8 +-- .../lsfd/mkfds-timerfd-monotonic-remaining-only | 6 +- .../mkfds-timerfd-realtime-remaining-and-interval | 6 +- tests/expected/lsfd/mkfds-udp | 24 +++---- tests/expected/lsfd/mkfds-udp6 | 24 +++---- tests/expected/lsfd/mkfds-unix-dgram | 8 +-- tests/expected/lsfd/mkfds-unix-in-netns-dgram | 4 +- tests/expected/lsfd/mkfds-unix-in-netns-seqpacket | 4 +- tests/expected/lsfd/mkfds-unix-in-netns-stream | 4 +- tests/expected/lsfd/mkfds-unix-stream | 48 ++++++------- tests/expected/lsfd/option-inet | 80 +++++++++++----------- tests/expected/lsfd/option-summary | 6 +- tests/ts/column/table | 7 ++ 57 files changed, 214 insertions(+), 200 deletions(-) commit baef265925b2745d0ff8cfd5c8f77de89b0b87fb Author: Thomas Weißschuh Date: Mon Jul 17 22:46:04 2023 +0200 lsfd: avoid passing NULL to qsort() Signed-off-by: Thomas Weißschuh misc-utils/lsfd-unkn.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit aad8a6079a5cfcf27344a2efdba61017049a927d Author: Thomas Weißschuh Date: Mon Jul 17 21:07:18 2023 +0200 column: fix memory leak Signed-off-by: Thomas Weißschuh text-utils/column.c | 2 ++ 1 file changed, 2 insertions(+) commit 85d15200e840d4fd150801e635ee5c1b7da84737 Author: Karel Zak Date: Mon Jul 17 14:15:33 2023 +0200 swapon: (man) fix --priority description It's not true anymore that Linux uses -1 as the default. I could be also another negative number (default is -2 for the first swap since kernel commit a2468cc9bfdff6139f59ca896671e5819ff5f94a). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2188894 Signed-off-by: Karel Zak sys-utils/swapon.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d1714a38d179e146e4d7d8dbb346f24237070c4 Author: Masatake YAMATO Date: Thu Jul 13 00:30:34 2023 +0900 lsfd: show default columns in the help message Signed-off-by: Masatake YAMATO include/c.h | 1 + misc-utils/lsfd.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit 9420ca34dc8b6f0fda1129493b5a043e4e37a638 Author: Debarshi Ray Date: Thu Jul 13 11:07:27 2023 +0200 libmount: handle failure to apply flags as part of a mount operation If a mount operation with extra flags runs into an EPERM when applying the flags, then mnt_context_get_mount_excode() returns 'Unknown error 5005' and MNT_EX_FAIL. Here's an example: Create a mount point on the host with 'nodev,nosuid,noexec': $ dd if=/dev/zero of=/var/tmp/loopfile bs=40960 count=1024 $ sudo losetup --find /var/tmp/loopfile $ sudo mkfs.ext4 /dev/loop0 $ sudo mkdir /mnt/a $ sudo mount -o nosuid,nodev,noexec /dev/loop0 /mnt/a Check the mount options to be sure: $ findmnt --output OPTIONS,PROPAGATION /mnt/a OPTIONS PROPAGATION rw,nosuid,nodev,noexec,relatime,seclabel shared Enter a mount and user namespace: $ podman run \ --interactive \ --privileged \ --rm \ --tty \ --volume /:/run/host:rslave \ registry.fedoraproject.org/fedora:38 \ /bin/bash Try to bind mount the mount point from the host inside the namespace with some extra flags: # mkdir ~/b # mount --bind -o ro /run/host/mnt/a ~/b mount: /root/b: filesystem was mounted, but any subsequent operation failed: Unknown error 5005. # echo $? 32 It will be better to show something more human-readable than 'Unknown error 5005'. Secondly, an exit code of 32 means 'mount failure', which isn't quite correct here. The mount operation is split into two mount(2) calls, where the first one uses MS_BIND to create the bind mount, and the second uses MS_REMOUNT | MS_BIND | MS_RDONLY to apply the 'ro' flag. Here, the first mount(2) does succeed: # findmnt --output OPTIONS,PROPAGATION ~/b OPTIONS PROPAGATION rw,nosuid,nodev,noexec,relatime,seclabel private,slave It's only the application of the 'ro' flag with the second mount(2) that fails with an EPERM. Hence, an exit code of 1 that means 'incorrect invocation or permissions' seems more appropriate. Signed-off-by: Debarshi Ray libmount/src/context_mount.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7bc7ccb6b2df46e2cb6aea73fa718b41c666c250 Author: Thomas Weißschuh Date: Wed Jul 12 17:16:16 2023 +0200 ci: disable cpp/path-injection rule This rule fires for file operations on user-specified paths. As this behavior is the very core of many util-linux utilities it is a false positive. Signed-off-by: Thomas Weißschuh .github/workflows/codeql.yml | 4 ++++ 1 file changed, 4 insertions(+) commit 6b3efddf529baf7766e5aeeb1432d446c5022db2 Author: Masatake YAMATO Date: Thu Jul 13 00:16:08 2023 +0900 lsfd: update the help message for XMODE column Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0cdf606b61a4dea385f59b382d5ff8d8b81b986 Author: Masatake YAMATO Date: Thu Jul 13 00:14:10 2023 +0900 lsfd: introduce -H, --list-columns option for making help messages short Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 3 +++ misc-utils/lsfd.c | 32 +++++++++++++++++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) commit d0fe6e42fc18f11367e5ee6275c2619f9f61e892 Author: Masatake YAMATO Date: Thu Jul 13 00:02:12 2023 +0900 lsfd: (man) fix the form for the optional argument of --inet option Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5f0412990a03f84a924cd3db91272986ad94625 Author: Masatake YAMATO Date: Thu Jul 13 00:01:25 2023 +0900 lsfd: rearrange the aligment of the help messages Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 4916d45ebfdbacbf77f6db928c0095734b2c8415 Author: Masatake YAMATO Date: Wed Jul 12 23:53:54 2023 +0900 lsfd: use the specified output stream for printing help messages Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6fcb27e7193e9b9292ee7bfb2d67af67e6018408 Author: Thomas Weißschuh Date: Tue Jul 11 13:36:19 2023 +0200 lsclocks: automatically discover dynamic clocks Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.1.adoc | 3 +++ misc-utils/lsclocks.c | 62 +++++++++++++++++++++++++++++++++++----------- tests/ts/misc/lsclocks | 4 +-- 3 files changed, 52 insertions(+), 17 deletions(-) commit c4620c6a040cd5ef17fc955c2352035c54a762dd Author: Thomas Weißschuh Date: Fri Jun 30 13:32:18 2023 +0200 lsclocks: add support for dynamic clocks Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.1.adoc | 3 ++ misc-utils/lsclocks.c | 97 +++++++++++++++++++++++++++++------- tests/expected/misc/lsclocks-dynamic | 1 + tests/ts/misc/lsclocks | 10 ++++ 4 files changed, 93 insertions(+), 18 deletions(-) commit c31251eff35610187ba865cd451136d6008afa7f Author: Thomas Weißschuh Date: Fri Jun 30 13:16:42 2023 +0200 lsclocks: split out data function Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.c | 170 ++++++++++++++++++++++++++------------------------ 1 file changed, 88 insertions(+), 82 deletions(-) commit ac9ee302d3649b19abb87bae12da0c7d14712e3b Author: Thomas Weißschuh Date: Tue Jul 11 13:16:00 2023 +0200 lsclocks: add COL_TYPE Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.1.adoc | 3 +++ misc-utils/lsclocks.c | 42 ++++++++++++++++++++++++++++---------- tests/expected/misc/lsclocks-basic | 20 +++++++++--------- tests/ts/misc/lsclocks | 2 +- 4 files changed, 45 insertions(+), 22 deletions(-) commit 93ba7961779789217a1f814ce3110ff8c040c8c3 Author: Fabian Vogt Date: Wed Jul 12 15:48:27 2023 +0200 Revert "libblkid: try LUKS2 first when probing" mdadm superblocks before 1.1 are placed at the end of the device, which means that the data contained inside the array starts at offset 0. For LUKS inside MD, blkid falsely detects this as plain LUKS instead of a linux_raid_member. This causes e.g. dracut to not assemble the array during boot and system startup fails. This reverts commit b8889c0a214aeb3dd47bf1ab280fe5534b64d2aa. libblkid/src/superblocks/superblocks.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0fc338b0360a2479cc4144aba481aae1aa240c3c Merge: 7ceb54062 ed59648ce Author: Karel Zak Date: Wed Jul 12 10:05:06 2023 +0200 Merge branch 'lsclocks/ns-offset' of https://github.com/t-8ch/util-linux * 'lsclocks/ns-offset' of https://github.com/t-8ch/util-linux: lsclocks: add NS_OFFSET column commit 7ceb540628611210efe1606c8f83cd9f48d0f83f Author: Karel Zak Date: Wed Jul 12 09:56:17 2023 +0200 nsenter: fix possible NULL dereferece [coverity scan] Signed-off-by: Karel Zak sys-utils/nsenter.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8beea162ce1c2f5a7565044b68434efbb96f0697 Author: Thomas Weißschuh Date: Sun Jul 9 20:03:57 2023 +0200 libblkid: (bcachefs) adapt to major.minor version The version superblock field has been split into a major and minor version part in the upstream code. Adapt libblkid to it. Link: https://lore.kernel.org/linux-bcachefs/20230709171551.2349961-11-kent.overstreet@linux.dev/ Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 9 ++++++++- tests/expected/blkid/low-probe-bcachefs | 2 +- tests/expected/blkid/low-probe-bcachefs-2 | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) commit 29c08a0eb165aef72a4134cead51b40c7846daf9 Merge: 652ecf682 c6cdefd73 Author: Karel Zak Date: Tue Jul 11 12:05:37 2023 +0200 Merge branch 'python312' of https://github.com/t-8ch/util-linux * 'python312' of https://github.com/t-8ch/util-linux: libmount: (python): work around python 3.12 bug build-sys: add AX_COMPARE_VERSION commit 652ecf682c6016db9a16f2974c2b26e668eeb34c Merge: d8253226f 25729a387 Author: Karel Zak Date: Tue Jul 11 12:01:00 2023 +0200 Merge branch 'lsfd--multiplexed-flag-of-XMODE-column' of https://github.com/masatake/util-linux * 'lsfd--multiplexed-flag-of-XMODE-column' of https://github.com/masatake/util-linux: tests: (lsfd) add a case testing 'm' flag in XMODE column lsfd: add 'm' flag representing "multiplexed by epoll_wait(2)" to XMODE column lsfd: (man) fix the broken page output for the description of NAME column commit d8253226fe83b42130d1e04d836bf91b31ff5479 Author: Karel Zak Date: Tue Jul 11 11:49:06 2023 +0200 dmesg: cleanup function names The function read_buffer() also prints data when reads from kmesg. The name is pretty confusing for readers. Let's rename it. Signed-off-by: Karel Zak sys-utils/dmesg.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0619aa8fda39e40776dd2a73346bd7cc5ab4a33f Author: Karel Zak Date: Tue Jul 11 11:40:39 2023 +0200 dmesg: Delete redundant pager setup The pager is necessary only for SYSLOG_ACTION_READ* actions (print kernel messages). Let's remove redundant global initialization. Based on patch from Dragan Simic. Signed-off-by: Karel Zak sys-utils/dmesg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c10ad975895372122f72c8d9da089b6ea69f778b Author: Dragan Simic Date: Tue Jul 4 11:14:30 2023 +0200 lib/pager: Apply pager-specific fixes only when needed Currently defined output filter quirk fixes and environment variable tweaks apply to less(1) only, so let's don't apply them when the pager is actually configured to something else. While there, rename the less(1)-specific callback function to make clear what it applies to, and to make adding any posible additional pager-specific callback functions a bit easier. Signed-off-by: Dragan Simic lib/pager.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 082b1f713e306208ec0d410eab3e7f906ec3d0e6 Author: Dragan Simic Date: Tue Jul 4 11:14:28 2023 +0200 lib/pager: Allow PAGER commands with options It's quite common to have options in the commands specified in the PAGER environment variable, to customize the behavior of the configured output filter. For example, someone might want to include the "-X" option when less(1) is configured as the output filter, or might want to specifically not include it, depending on the personal preferences. For example, man(1), git(1) and bat(1) already allow and properly handle the presence of any options in the configured output filter commands, which assures that it's fine to do the same in util-linux. Here's also a quotation from the description of the man(1) utility that describes the PAGER environment variable, as found in The Single UNIX Specification, version 4: PAGER Determine an output filtering command for writing the output to a terminal. Any string acceptable as a command_string operand to the sh -c command shall be valid. When standard output is a terminal device, the reference page output shall be piped through the command. If the PAGER variable is null or not set, the command shall be either more or another paginator utility documented in the system documentation. This quotation just confirms, rather formally, that allowing options in the output filter commands is a perfectly valid thing to do. While there, perform a couple of minor cleanups as well, to make the formatting of the code a tiny bit more consistent, and to slightly improve one of the logged debug messages. Signed-off-by: Dragan Simic lib/pager.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 25729a387749fecdfaf6ef85783b7143b132db10 Author: Masatake YAMATO Date: Tue Jul 11 00:03:31 2023 +0900 tests: (lsfd) add a case testing 'm' flag in XMODE column Signed-off-by: Masatake YAMATO tests/expected/lsfd/column-xmode-XMODE-D-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-L-bit-flock-ex | 2 +- tests/expected/lsfd/column-xmode-XMODE-L-bit-lease-w | 2 +- tests/expected/lsfd/column-xmode-XMODE-L-bit-ofd--w | 2 +- tests/expected/lsfd/column-xmode-XMODE-L-bit-ofd-rw | 2 +- tests/expected/lsfd/column-xmode-XMODE-L-bit-posix--w | 2 +- tests/expected/lsfd/column-xmode-XMODE-L-bit-posix-rw | 2 +- tests/expected/lsfd/column-xmode-XMODE-l-bit-flock-sh | 2 +- tests/expected/lsfd/column-xmode-XMODE-l-bit-lease-r | 2 +- tests/expected/lsfd/column-xmode-XMODE-l-bit-ofd-r- | 2 +- tests/expected/lsfd/column-xmode-XMODE-l-bit-posix-r- | 2 +- tests/expected/lsfd/column-xmode-XMODE-m-bit | 3 +++ tests/expected/lsfd/column-xmode-XMODE-r-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-w-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-x-bit | 2 +- tests/ts/lsfd/column-xmode | 15 +++++++++++++++ 16 files changed, 32 insertions(+), 14 deletions(-) commit da9013142193231fadf430a118969453bedc0658 Author: Masatake YAMATO Date: Mon Jul 10 23:49:41 2023 +0900 lsfd: add 'm' flag representing "multiplexed by epoll_wait(2)" to XMODE column An example output: $ ./lsfd -p 3101482 -Q '(FD > 2)' COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME test_mkfds 3101482 yamato 3 rw---- eventpoll anon_inodefs 15 106 tfds=4,5 test_mkfds 3101482 yamato 4 r----m CHR mem:8 23 8 /dev/random test_mkfds 3101482 yamato 5 -w---m CHR mem:8 23 8 /dev/random The fd 4 and 5 is multiplexed by 3, an evetpoll fd. Therefore 'm' flags in XMODE column for fd 4 and 5 are set. Just one character but 'm' may help users to understand the "IO structure" of a process. Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 3 ++- misc-utils/lsfd-unkn.c | 28 +++++++++++++++++++++++++++- misc-utils/lsfd.1.adoc | 4 ++++ misc-utils/lsfd.c | 21 +++++++++++++++++++++ misc-utils/lsfd.h | 7 +++++++ 5 files changed, 61 insertions(+), 2 deletions(-) commit b8ea758b0c86ef28ffbca90b30d470f3da540fb8 Author: Masatake YAMATO Date: Mon Jul 10 23:51:01 2023 +0900 lsfd: (man) fix the broken page output for the description of NAME column Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 5a02eb13ee8c80dc753cbe65f0ccc0c72d2e696e Author: Junichi Uekawa Date: Mon Jul 10 21:14:56 2023 +0900 iterate according to review comments. misc-utils/fincore.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit ed59648ce07a51aee2933592e0ee464e77818d8a Author: Thomas Weißschuh Date: Fri Jun 30 22:23:55 2023 +0200 lsclocks: add NS_OFFSET column Signed-off-by: Thomas Weißschuh include/pathnames.h | 1 + misc-utils/lsclocks.1.adoc | 3 +++ misc-utils/lsclocks.c | 48 ++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 2 deletions(-) commit c67a2b842d7a6479114caf8f90965c045d491ac2 Author: Karel Zak Date: Mon Jul 10 13:38:11 2023 +0200 nsenter: add missing free() Addresses: https://github.com/util-linux/util-linux/pull/2320 Signed-off-by: Karel Zak sys-utils/nsenter.c | 3 +++ 1 file changed, 3 insertions(+) commit 68048f7203385723f312ee14a1e239bd646b9acc Merge: ab3bf9ebd b40650b71 Author: Karel Zak Date: Mon Jul 10 13:35:16 2023 +0200 Merge branch 'master' of https://github.com/u2386/util-linux * 'master' of https://github.com/u2386/util-linux: nsenter: add option `-c` to join the cgroup of target process commit c6cdefd733d0911e9a042e621d4f6ca55cb44505 Author: Thomas Weißschuh Date: Sun Jul 9 10:18:15 2023 +0200 libmount: (python): work around python 3.12 bug Python 3.12 introduced a -Wredundant-decls warning. Work around it by not breaking the build. See https://github.com/python/cpython/issues/106560 Closes: #2366 Signed-off-by: Thomas Weißschuh configure.ac | 10 ++++++++-- libmount/python/meson.build | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) commit b4bd5885271ac2be0a08fe44132ebe457b00d996 Author: Thomas Weißschuh Date: Mon Jul 10 13:23:22 2023 +0200 build-sys: add AX_COMPARE_VERSION It will be used to check the found python version. Signed-off-by: Thomas Weißschuh m4/ax_compare_version.m4 | 177 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) commit ab3bf9ebdf142343afbcfc8c0c90bfbc031d124a Merge: 02c3c16fd a551f3dd2 Author: Karel Zak Date: Mon Jul 10 12:33:21 2023 +0200 Merge branch 'lsfd--lock-flags-in-XMODE-column' of https://github.com/masatake/util-linux * 'lsfd--lock-flags-in-XMODE-column' of https://github.com/masatake/util-linux: test: (lsfd): add a case for l and L flags in XMODE column test: (mkfds::ro-regular-file) add a parameter for a read lease test: (mkfds::make-regular-file) add a parameter for file locking lsfd: add flags, [-lL], representing file lock/lease states to XMODE column test: (mkfds::make-regular-file) add a parameter for making the new file readable test: (mkfds::make-regular-file) add a parameter for writing some bytes test: (mkfds::make-regular-file) make 'fd' local variable reusable test: (mkfds::make-regular-file) delete the created file when an error occurs test: (lsfd::column-xmode): add mising "wait" invocation commit 02c3c16fd890a4e5646bc78860c6a523171d2aae Merge: 07e54e998 f9c9bb158 Author: Karel Zak Date: Mon Jul 10 11:54:48 2023 +0200 Merge branch 'lsclocks/relative-time' of https://github.com/t-8ch/util-linux * 'lsclocks/relative-time' of https://github.com/t-8ch/util-linux: lsclocks: add column RESOL for clock resolution lsclocks: rename column RESOLUTION to RESOL_RAW lsclocks: add relative time timeutils: add strtimespec_relative lib/timeutils: (tests) add test for formatting lib/timeutils: (tests) move to struct timespec lsclocks: trim default columns lsclocks: add --output-all commit 07e54e998d3bf00970efe6c1c7c4e9633ff2e66c Merge: d8dc64337 ffe18a964 Author: Karel Zak Date: Mon Jul 10 11:52:12 2023 +0200 Merge branch 'prlimit' of https://github.com/jwilk-forks/util-linux * 'prlimit' of https://github.com/jwilk-forks/util-linux: prlimit: (man) fix formatting commit d8dc64337600b0d9e3cd40940560d6bb0d70383f Merge: 689c03b41 89295e10e Author: Karel Zak Date: Mon Jul 10 11:40:23 2023 +0200 Merge branch 'lslocks' of https://github.com/jwilk-forks/util-linux * 'lslocks' of https://github.com/jwilk-forks/util-linux: lslocks: don't attempt to open /proc/-1/fd/ commit ab0a751700ff6f3e31366d62d996ec49b53ab9dd Author: Junichi Uekawa Date: Thu Jul 6 17:40:38 2023 +0900 Support device files. Device files do not give file size with st.st_size field, they return 0. Instead use blkdev_get_size to call the ioctls for block devices. misc-utils/fincore.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit a551f3dd26c05b1510d106bc2a9f08cde8e8c500 Author: Masatake YAMATO Date: Wed Jul 5 13:47:35 2023 +0900 test: (lsfd): add a case for l and L flags in XMODE column Signed-off-by: Masatake YAMATO .../lsfd/column-xmode-XMODE-L-bit-flock-ex | 2 + .../expected/lsfd/column-xmode-XMODE-L-bit-lease-w | 2 + .../expected/lsfd/column-xmode-XMODE-L-bit-ofd--w | 2 + .../expected/lsfd/column-xmode-XMODE-L-bit-ofd-rw | 2 + .../lsfd/column-xmode-XMODE-L-bit-posix--w | 2 + .../lsfd/column-xmode-XMODE-L-bit-posix-rw | 2 + .../lsfd/column-xmode-XMODE-l-bit-flock-sh | 2 + .../expected/lsfd/column-xmode-XMODE-l-bit-lease-r | 2 + .../expected/lsfd/column-xmode-XMODE-l-bit-ofd-r- | 2 + .../lsfd/column-xmode-XMODE-l-bit-posix-r- | 2 + tests/ts/lsfd/column-xmode | 43 ++++++++++++++++++++++ 11 files changed, 63 insertions(+) commit d612cd2369a1a04160b4e9aa94951a5b5698abde Author: Masatake YAMATO Date: Wed Jul 5 11:20:52 2023 +0900 test: (mkfds::ro-regular-file) add a parameter for a read lease Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 3e451d006ff356adfa129d6ce4544da13ccb1058 Author: Masatake YAMATO Date: Wed Jul 5 01:58:24 2023 +0900 test: (mkfds::make-regular-file) add a parameter for file locking Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 239 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 238 insertions(+), 1 deletion(-) commit 9e381503c035d7916f02156eda07001714574052 Author: Masatake YAMATO Date: Wed Jul 5 11:48:33 2023 +0900 lsfd: add flags, [-lL], representing file lock/lease states to XMODE column The flags hide the details of locking: methods for locking (including lease), mandatory or advisory, and ranges. The flags can be used only for distinguishing three states: not locked, read (or shared) locked, or write (or exclusive) locked. An example output: # ./lsfd -Q '(XMODE =~ "....[lL]")' COMMAND PID USER ASSOC XMODE TYPE SOURCE MNTID INODE NAME abrtd 1854 root 7 rw--L REG tmpfs 27 3093 /run/abrt/abrtd.pid ... qemu-system-x86 2846033 qemu 11 rw--l REG dm-2 1313 5146111 /var/lib/libvirt/images/acn.qcow2 Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 50 +++++++++++++++++++++++++++- misc-utils/lsfd.1.adoc | 11 ++++-- misc-utils/lsfd.h | 4 +++ tests/expected/lsfd/column-xmode-XMODE-D-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-r-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-w-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-x-bit | 2 +- 7 files changed, 66 insertions(+), 7 deletions(-) commit dab72f18b6fed638f62ba48d16373820808fb0a9 Author: Masatake YAMATO Date: Wed Jul 5 01:56:37 2023 +0900 test: (mkfds::make-regular-file) add a parameter for making the new file readable Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 55db70793f2a065b7ad47a2403b2d261dc2725da Author: Masatake YAMATO Date: Wed Jul 5 01:54:54 2023 +0900 test: (mkfds::make-regular-file) add a parameter for writing some bytes Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 4597add151ffb4c5d300fa3a8595021de13d5641 Author: Masatake YAMATO Date: Tue Jul 4 23:55:22 2023 +0900 test: (mkfds::make-regular-file) make 'fd' local variable reusable Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 1 + 1 file changed, 1 insertion(+) commit 2cc0f8a538e05b8ffa65c4db45ca03a4cc45a069 Author: Masatake YAMATO Date: Wed Jul 5 12:38:12 2023 +0900 test: (mkfds::make-regular-file) delete the created file when an error occurs Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 1 + 1 file changed, 1 insertion(+) commit 594591db9b671cb6c693c0bd5b7fbe1fd0874e42 Author: Masatake YAMATO Date: Wed Jul 5 13:18:56 2023 +0900 test: (lsfd::column-xmode): add mising "wait" invocation Signed-off-by: Masatake YAMATO tests/ts/lsfd/column-xmode | 1 + 1 file changed, 1 insertion(+) commit f9c9bb1587d8a50d864c035757dcb85fbd0ed319 Author: Thomas Weißschuh Date: Mon Jul 3 18:02:31 2023 +0200 lsclocks: add column RESOL for clock resolution Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.1.adoc | 3 +++ misc-utils/lsclocks.c | 23 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) commit 36ebc72aa87c1eddccd3e38307a93aca9fbeb6af Author: Thomas Weißschuh Date: Mon Jul 3 17:58:29 2023 +0200 lsclocks: rename column RESOLUTION to RESOL_RAW The new name is shorter and opens the path for a human readable version. Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.1.adoc | 2 +- misc-utils/lsclocks.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 0c7cba92b30dd1da104844667623531dc94dd3f2 Author: Thomas Weißschuh Date: Fri Jun 30 14:58:42 2023 +0200 lsclocks: add relative time Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.1.adoc | 3 +++ misc-utils/lsclocks.c | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit 00ddcaf19c60471b9390a12f65a56c5c0f6877cf Author: Thomas Weißschuh Date: Tue Jul 4 09:45:55 2023 +0200 timeutils: add strtimespec_relative Signed-off-by: Thomas Weißschuh include/timeutils.h | 1 + lib/timeutils.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/ts/lib/timeutils | 4 ++ 3 files changed, 114 insertions(+) commit 5c20665ad9153021f962a458cad11cb64a638f98 Author: Thomas Weißschuh Date: Tue Jul 4 13:57:44 2023 +0200 lib/timeutils: (tests) add test for formatting Signed-off-by: Thomas Weißschuh lib/timeutils.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- tests/ts/lib/timeutils | 6 ++++-- 2 files changed, 47 insertions(+), 4 deletions(-) commit 6ebca9f1f3a61650786f4745fce3a0a8849d42ed Author: Thomas Weißschuh Date: Tue Jul 4 09:44:42 2023 +0200 lib/timeutils: (tests) move to struct timespec Signed-off-by: Thomas Weißschuh lib/timeutils.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 2664e3a4fecf5cdbb8d19e19525e454ce5c29e54 Author: Thomas Weißschuh Date: Mon Jul 3 17:55:45 2023 +0200 lsclocks: trim default columns Signed-off-by: Thomas Weißschuh misc-utils/lsclocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9f59d21caad63434ac860cc55a3652825be07366 Author: Thomas Weißschuh Date: Mon Jul 3 17:55:40 2023 +0200 lsclocks: add --output-all Signed-off-by: Thomas Weißschuh bash-completion/lsclocks | 4 ++++ misc-utils/lsclocks.1.adoc | 3 +++ misc-utils/lsclocks.c | 12 ++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) commit ffe18a96487004169cffe76774f5bcdfbabecac2 Author: Jakub Wilk Date: Mon Jul 3 15:03:15 2023 +0200 prlimit: (man) fix formatting sys-utils/prlimit.1.adoc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 689c03b416061c2d09a73d0ce8b0946ce9982336 Merge: 6462dbe2e d191a7bef Author: Karel Zak Date: Mon Jul 3 12:52:38 2023 +0200 Merge branch 'enosys/locale' of https://github.com/t-8ch/util-linux commit 6462dbe2ef9cabd51c3b81128f65cb62b0da2aff Merge: 96de80b65 e9ddea791 Author: Karel Zak Date: Mon Jul 3 12:47:08 2023 +0200 Merge branch 'clock' of https://github.com/t-8ch/util-linux * 'clock' of https://github.com/t-8ch/util-linux: lsclocks: new util to interact with system clocks lib/timeutils: implement timespec formatting lib/timeutils: implement nanosecond formatting lib/timeutils: constify some arguments utmpdump: validate subsecond granularity commit 96de80b659383057542d4e0125f464dab4784d56 Merge: 3e2e4c32e 30ac13fa2 Author: Karel Zak Date: Mon Jul 3 12:41:04 2023 +0200 Merge branch 'lsfd--xmode' of https://github.com/masatake/util-linux * 'lsfd--xmode' of https://github.com/masatake/util-linux: lsfd: add 'D' flag for representing deleted files to XMODE column lsfd: introduce XMODE column, extensible variant of MODE test: (lsfd) add a subcase for testing NAME column for a deleted file test: (lsfd) add a case for testing DELETED column test: (mkfds) add "make-regular-file" factory commit 3e2e4c32e8a8169c8f0ad09d55c4fad4e100fd45 Merge: c8e36ed4d 0cac072b6 Author: Karel Zak Date: Mon Jul 3 12:38:48 2023 +0200 Merge branch 'lsfd--misc-tun' of https://github.com/masatake/util-linux * 'lsfd--misc-tun' of https://github.com/masatake/util-linux: tests: (lsfd) add a case testing TUN.IFACE column tests: (mkfds) add a factor for opening tun device lsfd: add TUN.IFFACE, a column for interfaces behind tun devices lsfd: (refactor) move miscdev specific code to cdev_misc_ops lsfd: (refactor) make the way to handle character devices extensible lsfd: (refactor) introduce a content data type for char devices commit c8e36ed4db8f0cbf89ca898cd389c2a8de27ce63 Merge: 452801e4f 214e668c8 Author: Karel Zak Date: Mon Jul 3 12:36:07 2023 +0200 Merge branch 'patch-1' of https://github.com/diizzyy/util-linux * 'patch-1' of https://github.com/diizzyy/util-linux: include/bitops.h: Remove bswap* compatibility hack for FreeBSD commit 452801e4f62be58b47463d63d94c3608bf1f91c3 Merge: 5098291b2 46fe78989 Author: Karel Zak Date: Mon Jul 3 12:32:42 2023 +0200 Merge branch 'wip/rishi/libmount-src-hook-mount-move_setattr-typo' of https://github.com/debarshiray/util-linux * 'wip/rishi/libmount-src-hook-mount-move_setattr-typo' of https://github.com/debarshiray/util-linux: libmount: fix typo commit 5098291b2c90caad5ff0bd1ee2df5f21152dd68b Merge: 85c9a0af0 5a17b1b62 Author: Karel Zak Date: Mon Jul 3 12:30:43 2023 +0200 Merge branch 'wip/rishi/libmount-src-libmount.h-MNT_ERR_APPLYFLAGS-docs' of https://github.com/debarshiray/util-linux * 'wip/rishi/libmount-src-libmount.h-MNT_ERR_APPLYFLAGS-docs' of https://github.com/debarshiray/util-linux: libmount: update documentation for MNT_ERR_APPLYFLAGS commit 85c9a0af07310a989686ad0062828310be64e52f Merge: a753fb652 95e853892 Author: Karel Zak Date: Mon Jul 3 12:28:54 2023 +0200 Merge branch 'unshare/negative-time-offset' of https://github.com/t-8ch/util-linux * 'unshare/negative-time-offset' of https://github.com/t-8ch/util-linux: unshare: allow negative time offsets commit 89295e10e6086e1a500faadabafca0bb8d07ea6c Author: Jakub Wilk Date: Mon Jul 3 12:18:51 2023 +0200 lslocks: don't attempt to open /proc/-1/fd/ Signed-off-by: Jakub Wilk misc-utils/lslocks.c | 4 ++++ 1 file changed, 4 insertions(+) commit 95e853892fbd02bb4e782af347c98bbe07ca990b Author: Thomas Weißschuh Date: Fri Jun 30 22:36:06 2023 +0200 unshare: allow negative time offsets Signed-off-by: Thomas Weißschuh sys-utils/unshare.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e9ddea79127ebe697dce7cdbc3f042c216b4449a Author: Thomas Weißschuh Date: Sun Jun 25 16:44:10 2023 +0200 lsclocks: new util to interact with system clocks Usecases: * Compare current monotonic time to timestamps reported by systemd * Validate time namespace operations * Inspect clock resolutions Signed-off-by: Thomas Weißschuh bash-completion/Makemodule.am | 3 + bash-completion/lsclocks | 48 +++++ configure.ac | 3 + meson.build | 13 ++ misc-utils/Makemodule.am | 8 + misc-utils/lsclocks.1.adoc | 81 ++++++++ misc-utils/lsclocks.c | 366 +++++++++++++++++++++++++++++++++++++ misc-utils/meson.build | 4 + tests/commands.sh | 1 + tests/expected/misc/lsclocks-basic | 10 + tests/expected/misc/lsclocks-time | 1 + tests/ts/misc/lsclocks | 42 +++++ 12 files changed, 580 insertions(+) commit a753fb6520e4e7b860e1bbd108bda1fba3c5c1b6 Author: Jakub Wilk Date: Thu Jun 29 20:11:41 2023 +0200 prlimit: reject trailing junk in limits without ":" Before: $ prlimit --verbose --core=1x New CORE limit for pid 42: <1:1> After: $ prlimit --verbose --core=1x prlimit: failed to parse CORE limit Signed-off-by: Jakub Wilk sys-utils/prlimit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a17b1b626d49914afd4869090c1890859515360 Author: Debarshi Ray Date: Thu Jun 29 13:04:41 2023 +0200 libmount: update documentation for MNT_ERR_APPLYFLAGS The implementation using the new FD based mount kernel API (ie., fsconfig/fsopen) uses MNT_ERR_APPLYFLAGS for failed mount_setattr(2) calls, which involves more mount attributes (eg., MOUNT_ATTR_RDONLY, MOUNT_ATTR_NOSUID, etc.) in addition to the MS_PROPAGATION flags (eg., MS_SHARED, MS_UNBINDABLE, etc.). Note that mount_setattr(2) is part of the new FD based mount kernel API, and is not used by the classic mount(2) based version. Fallout from 987d844cdbc0f91ca81de3c1e5d0628a60eb458f Signed-off-by: Debarshi Ray libmount/src/libmount.h.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 46fe78989d6982d857f3246313adbeadb19ed4cf Author: Debarshi Ray Date: Thu Jun 29 12:21:07 2023 +0200 libmount: fix typo Similar to e80f8e46127e45907db25b4ffd58c699fdf4c35f and fallout from 6753e6f6912658e836966a6316df956e1af5fcae Signed-off-by: Debarshi Ray libmount/src/hook_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b40650b71a742c188d0986a1162a5730ecb95510 Author: u2386 Date: Sun Jun 11 16:16:57 2023 +0000 nsenter: add option `-c` to join the cgroup of target process This commit adds support for the -c or --join-cgroup option in nsenter, allowing a new process to join the cgroup of target process. Example: Setup the target process: $ podman run --rm -d docker.io/golang sleep 10000 51a89deb6baf6d $ podman inspect --format '{{ .State.Pid }}' 51a89deb6baf6d6 216054 Enter the cgroup namespace of target process without option -c: $ sudo ./nsenter -C -U -t 216054 sh -c "cat /proc/self/cgroup" 0::/../../../../session-899.scope Enter the cgroup namespace of target process with option -c: $ sudo ./nsenter -c -C -U -t 216054 sh -c "cat /proc/self/cgroup" 0::/ Reviewed-by: Karel Zak Reviewed-by: Thomas Weißschuh Signed-off-by: u2386 bash-completion/nsenter | 1 + include/pathnames.h | 2 ++ sys-utils/nsenter.1.adoc | 3 +++ sys-utils/nsenter.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 70 insertions(+), 2 deletions(-) commit b9abaae31272d984d16a28edb0bcd42e2fd81f5d Author: Thomas Weißschuh Date: Tue Jun 27 08:57:09 2023 +0200 lib/timeutils: implement timespec formatting Signed-off-by: Thomas Weißschuh include/timeutils.h | 1 + lib/timeutils.c | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) commit 136f4874f417c6e115f1c8feddffb938c446512a Author: Thomas Weißschuh Date: Tue Jun 27 08:53:56 2023 +0200 lib/timeutils: implement nanosecond formatting Signed-off-by: Thomas Weißschuh include/timeutils.h | 6 ++++-- lib/timeutils.c | 24 +++++++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) commit 971244fdc7c108d5c2810411c704288764ad609a Author: Thomas Weißschuh Date: Tue Jun 27 12:41:06 2023 +0200 lib/timeutils: constify some arguments Signed-off-by: Thomas Weißschuh include/timeutils.h | 4 ++-- lib/timeutils.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit a8d0195462f81456f10bc593bcfa69c23d0928ca Author: Thomas Weißschuh Date: Wed Jun 28 07:21:38 2023 +0200 utmpdump: validate subsecond granularity tv_usec is only valid in the range [0, 999999]. If the file contains garbage data replace interpret it as "0" instead. Signed-off-by: Thomas Weißschuh login-utils/utmpdump.c | 2 +- tests/expected/utmp/utmpdump-subsecond | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2b48beb44ebdf18c7784d06ebc77b50200125521 Author: Karel Zak Date: Wed Jun 28 12:41:08 2023 +0200 include/crc64: add missing license header Signed-off-by: Karel Zak include/crc64.h | 4 ++++ 1 file changed, 4 insertions(+) commit 32c7870520178a5cd23c750fe1ad65209804d2af Author: Karel Zak Date: Wed Jun 28 10:19:34 2023 +0200 nsenter: avoid NULL pointer dereference [coverity scan] Signed-off-by: Karel Zak sys-utils/nsenter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d191a7bef8805e074b6cd972ff1d20a9b8dbf69a Author: Thomas Weißschuh Date: Tue Jun 27 11:24:21 2023 +0200 enosys: enable locale handling Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 4 ++++ 1 file changed, 4 insertions(+) commit 65c4be5fc219977c90fa65648fa9f23e4f1b12f4 Merge: b1fc5d61f 618dd71be Author: Karel Zak Date: Tue Jun 27 10:29:59 2023 +0200 Merge branch 'cal' of https://github.com/jwilk-forks/util-linux * 'cal' of https://github.com/jwilk-forks/util-linux: cal: fix long option name for -c cal: fix error message for bad -c argument commit 0cac072b646c97d37bbebf8b54c6ade479fdda3c Author: Masatake YAMATO Date: Tue Jun 27 01:16:45 2023 +0900 tests: (lsfd) add a case testing TUN.IFACE column Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-cdev-tun | 4 +++ tests/ts/lsfd/mkfds-cdev-tun | 65 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit 618dd71be446c8ea570a0f60c569289b82ebd909 Author: Jakub Wilk Date: Mon Jun 26 21:02:13 2023 +0200 cal: fix long option name for -c misc-utils/cal.c | 2 +- tests/ts/cal/column | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0fb52dabba7b2d5b68638b8bc9c1463c8ec1255f Author: Jakub Wilk Date: Mon Jun 26 20:58:21 2023 +0200 cal: fix error message for bad -c argument misc-utils/cal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1fc5d61f016c7e6b7c98e8095970859cfe0e725 Author: Jakub Wilk Date: Mon Jun 26 20:00:43 2023 +0200 lib/strutils: fix typo lib/strutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 214e668c84d16d15cd6df73e5c276214b113a00e Author: Daniel Engberg Date: Mon Jun 26 19:22:16 2023 +0200 include/bitops.h: Remove bswap* compatibility hack for FreeBSD This is no longer needed on supported versions of FreeBSD and causes build failures include/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 369007a5b71271212ac542fc2e4c94095cca0b23 Author: Masatake YAMATO Date: Tue Jun 27 01:15:04 2023 +0900 tests: (mkfds) add a factor for opening tun device Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 7cbec02a4768a9e2e49a0cf0c6e3c85e8bff9c14 Author: Masatake YAMATO Date: Mon Jun 26 02:41:33 2023 +0900 lsfd: add TUN.IFFACE, a column for interfaces behind tun devices An example output: # ./lsfd -Q '(SOURCE == "misc:tun")' -o+TUN.IFACE COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME TUN.IFACE qemu-system-x86 2846033 qemu 48 rw- CHR misc:tun 23 306 iface=vnet89 vnet89 qemu-system-x86 2865022 qemu 56 rw- CHR misc:tun 23 306 iface=vnet103 vnet103 openvpn 3113730 nm-openvpn 7 rw- CHR misc:tun 588 306 iface=tun0 tun0 qemu-system-x86 3608136 qemu 36 rw- CHR misc:tun 23 306 iface=vnet104 vnet104 qemu-system-x86 3608136 qemu 39 rw- CHR misc:tun 23 306 iface=vnet105 vnet105 qemu-system-x86 3608238 qemu 40 rw- CHR misc:tun 23 306 iface=vnet106 vnet106 qemu-system-x86 3608238 qemu 43 rw- CHR misc:tun 23 306 iface=vnet107 vnet107 qemu-system-x86 3608338 qemu 54 rw- CHR misc:tun 23 306 iface=vnet108 vnet108 qemu-system-x86 3608338 qemu 60 rw- CHR misc:tun 23 306 iface=vnet109 vnet109 Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 6 ++++ misc-utils/lsfd.c | 3 ++ misc-utils/lsfd.h | 1 + 4 files changed, 85 insertions(+) commit fb978312aaa61f8fd4407cb008516881ac95a7ad Author: Masatake YAMATO Date: Mon Jun 26 01:52:27 2023 +0900 lsfd: (refactor) move miscdev specific code to cdev_misc_ops Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 103 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 31 deletions(-) commit 8aa5b7c9d0110e888aba3e898dbb6b93e1e71c25 Author: Masatake YAMATO Date: Mon Jun 26 01:10:57 2023 +0900 lsfd: (refactor) make the way to handle character devices extensible Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 2 deletions(-) commit 1225e6d0fb58aac9180cbc877ba10d425f41ae1c Author: Masatake YAMATO Date: Sun Jun 25 19:00:39 2023 +0900 lsfd: (refactor) introduce a content data type for char devices Signed-off-by: Masatake YAMATO misc-utils/lsfd-cdev.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit fb062800bebc802e973fd54e5de91352596df504 Merge: b0d4d0937 01a6d803b Author: Karel Zak Date: Mon Jun 26 14:04:52 2023 +0200 Merge branch 'nsenter-add-parent-ns-option' of https://github.com/igo95862/util-linux * 'nsenter-add-parent-ns-option' of https://github.com/igo95862/util-linux: Add `--user-parent` option to nsenter commit b0d4d093796c3a3776b155e4ec7e2aa7cb09677d Author: Karel Zak Date: Mon Jun 26 13:25:11 2023 +0200 cfdisk: fix menu behavior after writing changes Florian wrote: after a successful write, cfdisk remains on the "Write" cursor and furthermore when navigating to "Quit" will continue to show "...without writing changes", despite there were writes. This patch addresses that. Based on patch from Florian Zimmermann Signed-off-by: Karel Zak disk-utils/cfdisk.c | 4 ++++ 1 file changed, 4 insertions(+) commit fa6ac102dc1bca83d75af423a2be3e377d60432e Author: Edward Chron Date: Thu Jun 22 18:31:31 2023 -0700 dmesg: -r LOG_MAKEPRI needs fac << 3 Submission to Project: util-linux Open Incident: #2325 at github.com/util-linux/util-linux/issues/2325 Component: util-linux/sys-utils File: dmesg.c Code level patch applied against: 2.39 - latest code pulled from git.github.com:util-linux/util-linux.git BUG: The facility field passed to macro from /usr/include/sys/syslog.h LOG_MAKEPRI(fac, pri) by dmesg -r needs to have fac argument shifted 3 bit to the left to return a valid raw valid. The lower 3 bits for a raw value are used by the loglevel priority (pri) field, so the facility bits can only occupy the bits above the bits used to hold the pri field value. The dmesg -r command produces the incorrect output for the raw value for the or'ed combination of the facility | loglevel priority that gets produced by the LOG_MAKEPRI macro. That macro is defined as: #define LOG_MAKEPRI(fac, pri) ((fac) | (pri)) which is defined in the current glibc code in /usr/include/sys/syslog.h and is used only in the dmesg -r (raw output option) command to form the raw value for facility or'ed with loglevel priority and displayed as: <#>[#######.######] ... where the # in <#> contains the output from the LOG_MAKEPRI macro. The lower 3 bits are reserved for the loglevel priority 0-7 and the bits above that are for the facility value, so the facility index should be shifted to the left three bits and or'ed with the loglevel priority. In the glibc file: /usr/include/sys/syslog.h the macro LOG_MAKEPRI is defined as: #define LOG_MAKEPRI(fac, pri) ((fac) | (pri) and returns the wrong facility and loglevel priority values, ideally it should be defined as: #define LOG_MAKEPRI(fac, pri) ((fac << 3) | (pri)) to return the correct raw value. We checked with glibc developement and the LOG_MAKEPRI macro is correct as is and can't be changed as it used by *BSD as is so the solution for dmesg -r is to shift the facility index left by 3 bits as input to the LOG_MAKEPRI macro. That is what glibc development recommended. (For reference, see glibc bugzilla Bug 30563) We can front end the LOG_MAKEPRI macro with a macro that shifts the facility by the needed 3 bits which we've added to dmesg.c: #define LOG_RAW_FAC_PRI(fac, pri) LOG_MAKEPRI((fac << 3), (pri)) This has been tested and works correctly to produce the correct raw mode value for Facility or'ed together with Loglevel priority. You can verify that this fix works correctly. We can test by adding several records to /dev/kmsg like this: echo "<14> Test Message Facility 8 Loglevel 6" >> /dev/kmsg echo "<15> Test Message Facility 8 Loglevel 7" >> /dev/kmsg echo "<30> Test Message Facility 24 Loglevel 6" >> /dev/kmsg echo "<31> Test Message Facility 24 Loglevel 7" >> /dev/kmsg these commands add 4 records to the dmesg buffer. Then when we print the records by cat'ing /dev/kmsg or using the dmesg command several ways: -bash-4.2# cat /dev/kmsg | grep "Test Message Facility" 14,1114,495317239,-; Test Message Facility 8 Loglevel 6 15,1115,503340779,-; Test Message Facility 8 Loglevel 7 30,1116,643374764,-; Test Message Facility 24 Loglevel 6 31,1117,657165117,-; Test Message Facility 24 Loglevel 7 -bash-4.2# dmesg -x | grep "Test Message Facility" user :info : [ 495.317239] Test Message Facility 8 Loglevel 6 user :debug : [ 503.340779] Test Message Facility 8 Loglevel 7 daemon:info : [ 643.374764] Test Message Facility 24 Loglevel 6 daemon:debug : [ 657.165117] Test Message Facility 24 Loglevel 7 -bash-4.2# dmesg -S -x | grep "Test Message Facility" user :info : [ 495.317239] Test Message Facility 8 Loglevel 6 user :debug : [ 503.340779] Test Message Facility 8 Loglevel 7 daemon:info : [ 643.374764] Test Message Facility 24 Loglevel 6 daemon:debug : [ 657.165117] Test Message Facility 24 Loglevel 7 -bash-4.2# dmesg -S -r | grep "Test Message Facility" <14>[ 495.317239] Test Message Facility 8 Loglevel 6 <15>[ 503.340779] Test Message Facility 8 Loglevel 7 <30>[ 643.374764] Test Message Facility 24 Loglevel 6 <31>[ 657.165117] Test Message Facility 24 Loglevel 7 All the above methods agree in their output as expected. However, running dmesg -r does not agree. dmesg -r erronously produces: ---------------------------- -bash-4.2# dmesg -r | grep "Test Message Facility" <7>[ 495.317239] Test Message Facility 8 Loglevel 6 <7>[ 503.340779] Test Message Facility 8 Loglevel 7 <7>[ 643.374764] Test Message Facility 24 Loglevel 6 <7>[ 657.165117] Test Message Facility 24 Loglevel 7 However, if we run the dmesg -r command using the new front end macro LOG_RAW_FAC_PRI(fac, pri) we do get the correct output: Here is the corrected dmesg -r output: ------------------------------------- -bash-4.2# dmesg -r | grep "Test Message Facility" <14>[ 495.317239] Test Message Facility 8 Loglevel 6 <15>[ 503.340779] Test Message Facility 8 Loglevel 7 <30>[ 643.374764] Test Message Facility 24 Loglevel 6 <31>[ 657.165117] Test Message Facility 24 Loglevel 7 shifting the facility index value by 3 bits in the LOG_RAW_FAC_PRI macro provides the correct ouput as shown. All the other commands produce the same output so now they are all in agreement. Signed-off-by: Ivan Delalande Signed-off-by: Edward Chron sys-utils/dmesg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 08b35072b97d7a83988a5a5d5406efd0a109060b Author: Karel Zak Date: Mon Jun 26 12:46:15 2023 +0200 build-sys: don't call pkg-config --static if unnecessary Addresses: https://github.com/util-linux/util-linux/issues/2327 Signed-off-by: Karel Zak m4/ul.m4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3a4d70419c97f64f60c0eda4720e64d17b3b0714 Author: Karel Zak Date: Mon Jun 26 11:56:23 2023 +0200 logger: initialize socket credentials contol union Addresses: https://github.com/util-linux/util-linux/issues/2336 Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0904cff4a5f4d4275c70d437f7596c2a3a10076e Merge: ceb13fa9e 2da020032 Author: Karel Zak Date: Mon Jun 26 11:50:02 2023 +0200 Merge branch 'unshare/time-msg' of https://github.com/t-8ch/util-linux * 'unshare/time-msg' of https://github.com/t-8ch/util-linux: unshare: fix error message for unexpected time offsets commit ceb13fa9e877a88066903ed66b934989960bbb48 Merge: 55b0cc710 dc1d0f8dd Author: Karel Zak Date: Mon Jun 26 11:49:43 2023 +0200 Merge branch 'test/builddir-pwd' of https://github.com/t-8ch/util-linux * 'test/builddir-pwd' of https://github.com/t-8ch/util-linux: tests: (run.sh) detect builddir from working directory commit 55b0cc710695ffa75dcfdcd1cb73fc7019224d8d Merge: 69e7e599c af9fc22d0 Author: Karel Zak Date: Mon Jun 26 11:49:20 2023 +0200 Merge branch 'losetup-errormsg' of https://github.com/t-8ch/util-linux * 'losetup-errormsg' of https://github.com/t-8ch/util-linux: losetup: deduplicate find_unused() logic lib/loopdev: consistently return error values from loopcxt_find_unused() lib/loopdev: document function return values commit 69e7e599c00e3475f031f46cfe604bf89e39fb2c Merge: c0ac6d590 4bcc2ed30 Author: Karel Zak Date: Mon Jun 26 11:48:43 2023 +0200 Merge branch 'hardlink' of https://github.com/jwilk-forks/util-linux * 'hardlink' of https://github.com/jwilk-forks/util-linux: hardlink: (man) add missing comma commit c0ac6d590a0dea04901f9bfece08c36fa01d431c Merge: c985e0742 253c991da Author: Karel Zak Date: Mon Jun 26 11:48:24 2023 +0200 Merge branch 'lsfd--fix-separators-for-json-output-cleanup' of https://github.com/masatake/util-linux * 'lsfd--fix-separators-for-json-output-cleanup' of https://github.com/masatake/util-linux: lsfd: fix specifying wrong JSON typs when building the help message tests: (lsfd) add a case for verifying ENDPOINTS column output in JSON mode commit c985e0742ecccbdf91277374d09878b908a68a68 Merge: ae62db725 cd8f11b7c Author: Karel Zak Date: Mon Jun 26 11:45:50 2023 +0200 Merge branch 'PR/libmount-optstr-sync' of github.com:karelzak/util-linux-work * 'PR/libmount-optstr-sync' of github.com:karelzak/util-linux-work: libmount: add sample to test fs and context relation libmount: fix sync options between context and fs structs commit 2da02003274d7961030b815588c24ac15458e371 Author: Thomas Weißschuh Date: Sun Jun 25 13:28:19 2023 +0200 unshare: fix error message for unexpected time offsets Signed-off-by: Thomas Weißschuh sys-utils/unshare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af9fc22d03bde1a223c4a5e469c5c33c15837e67 Author: Thomas Weißschuh Date: Sun Jun 25 09:59:05 2023 +0200 losetup: deduplicate find_unused() logic Signed-off-by: Thomas Weißschuh sys-utils/losetup.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 3c5402640d547781faa2d5675ba6c3327ab1b926 Author: Thomas Weißschuh Date: Sun Jun 25 09:59:26 2023 +0200 lib/loopdev: consistently return error values from loopcxt_find_unused() Signed-off-by: Thomas Weißschuh lib/loopdev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit af5efcd810ae92740ac15bbba8dfb334e1440ece Author: Thomas Weißschuh Date: Sun Jun 25 09:58:43 2023 +0200 lib/loopdev: document function return values Signed-off-by: Thomas Weißschuh lib/loopdev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit dc1d0f8dd1a1f5aa6123f0d5f067143cff93e189 Author: Thomas Weißschuh Date: Wed Jun 21 14:26:05 2023 +0200 tests: (run.sh) detect builddir from working directory This makes it easier to run test.sh from the build directory as everything will work without any parameters irrespective of the build directories name. Signed-off-by: Thomas Weißschuh tests/run.sh | 2 ++ 1 file changed, 2 insertions(+) commit 4bcc2ed30d110f996db3a545196a93551896c496 Author: Jakub Wilk Date: Sat Jun 24 09:24:29 2023 +0200 hardlink: (man) add missing comma misc-utils/hardlink.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01a6d803b5980c6409c42b5f269441fd1a9d935c Author: igo95862 Date: Sun Mar 26 21:04:11 2023 +0600 Add `--user-parent` option to nsenter When this option is used nsenter will fetch the parent user namespace from any namespace file descriptors available. It can be combined with existing `--user` option in which case the parent user namespace will be fetched from the user namespace and replace it. The usecase of this option is when a user namespace that owns the other type namespaces we want to switch to is not actually bound to any process. Without using ioctl it is impossible to acquire namespace file descriptor. For example, bubblewrap `bwrap` command creates unbinded user namespace when `--dev` option is used. bash-completion/nsenter | 1 + sys-utils/nsenter.1.adoc | 8 ++++++++ sys-utils/nsenter.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 58 insertions(+), 1 deletion(-) commit 253c991da1a7d5b4f6a6ae1d209ed6ec11227456 Author: Masatake YAMATO Date: Fri Jun 23 01:10:04 2023 +0900 lsfd: fix specifying wrong JSON typs when building the help message Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee72ea94c579b77a9055ff40385e91245aa9ce40 Author: Masatake YAMATO Date: Fri Jun 23 00:45:23 2023 +0900 tests: (lsfd) add a case for verifying ENDPOINTS column output in JSON mode Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-pipe-no-fork | 2 ++ tests/ts/lsfd/mkfds-pipe-no-fork | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit ae62db725024363a0c45e839b6559a41984acf54 Merge: 6a28c2f90 14fee76fc Author: Karel Zak Date: Thu Jun 22 14:26:09 2023 +0200 Merge branch 'lsfd--fix-separators-for-json-output' of https://github.com/masatake/util-linux * 'lsfd--fix-separators-for-json-output' of https://github.com/masatake/util-linux: lsfd.1.adoc: fix a typo lsfd: use ARRAY_STRING and ARRAY_NUMBER json types in some columns lsfd: use \n as the separator in INOTIFY.INODES and INOTIFY.INODES.RAW columns lsfd: use \n as the separator in EVENTPOLL.TFDS column lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types commit 6a28c2f90aa425f7884f3c67906d4ff0ab61db2a Merge: 711116093 b0d003023 Author: Karel Zak Date: Thu Jun 22 14:19:07 2023 +0200 Merge branch 'coverage-tweaks' of https://github.com/mrc0mmand/util-linux * 'coverage-tweaks' of https://github.com/mrc0mmand/util-linux: ci: collect coverage on _exit() as well ci: hide coverage-related stuff begind --enable-coverage ci: tweak build dir's ACL when collecting coverage ci: fix indentation commit 71111609342e3fd7d9f7a7468734a4e9749ceaa9 Merge: ab7fe95ad 2235cf919 Author: Karel Zak Date: Thu Jun 22 14:15:46 2023 +0200 Merge branch 'cancel-jobs-on-push' of https://github.com/mrc0mmand/util-linux * 'cancel-jobs-on-push' of https://github.com/mrc0mmand/util-linux: ci: cancel running jobs on push commit cd8f11b7cb37a05c46b121ca45b0717ca95d2197 Author: Karel Zak Date: Thu Jun 22 14:00:46 2023 +0200 libmount: add sample to test fs and context relation Reerences: https://github.com/util-linux/util-linux/issues/2326 Signed-off-by: Karel Zak libmount/Makemodule.am | 1 + libmount/samples/Makemodule.am | 12 +++++++++ libmount/samples/overwrite.c | 58 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) commit 7b37d5b5667103beac16f7ae3cca5feaf00a21b0 Author: Karel Zak Date: Thu Jun 22 13:11:57 2023 +0200 libmount: fix sync options between context and fs structs Since v2.39 libmount prefers "struct libmnt_optlist" to keep mount options rather than the original "struct libmnt_fs". This is problem if the "fs" struct is defined and maintained outside the context. The library has already a way how to sync "fs" and "optlist", but this needs to be improved and used more widely. Changes: * force "fs" from context to always read options from "optlist" * copy options from "fs" to "optlist" in mnt_context_set_fs() * internally redirect mnt_fs_* API for options to "optlist" if optlist defined * add simple test to make sure options from different sources are always merged together Addresses: https://github.com/util-linux/util-linux/issues/2326 Signed-off-by: Karel Zak libmount/src/context.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++-- libmount/src/fs.c | 23 +++++++++++--- 2 files changed, 97 insertions(+), 8 deletions(-) commit 2235cf919ab32486c25d6e38f78e4e6ee082a1f3 Author: Frantisek Sumsal Date: Thu Jun 22 12:33:12 2023 +0200 ci: cancel running jobs on push Let's cancel already running GH Actions jobs when a PR is (force) pushed to conserve resources and make the CI runs faster thanks to the freed up queue. .github/workflows/cibuild.yml | 28 +++++++++++++++++++++++++++- .github/workflows/cifuzz.yml | 3 +++ 2 files changed, 30 insertions(+), 1 deletion(-) commit b0d003023cabecd45402a4d8e2529940ec778735 Author: Frantisek Sumsal Date: Tue Jun 20 23:01:35 2023 +0200 ci: collect coverage on _exit() as well _exit() skips the gcov hooks, so we lose all coverage collected up to that point. Let's work around this by intercepting _exit() with our wrapper that calls __gcov_dump() just before _exit(). Makefile.am | 5 +++++ include/Makemodule.am | 1 + include/coverage.h | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+) commit b4b8f8c293507cbe86dbe55c9c955e511279d673 Author: Frantisek Sumsal Date: Tue Jun 20 23:00:28 2023 +0200 ci: hide coverage-related stuff begind --enable-coverage .github/workflows/cibuild.sh | 4 +--- Makefile.am | 2 +- configure.ac | 14 +++++++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) commit f5b49efe42c0928dc292efe24946cccad86d711e Author: Frantisek Sumsal Date: Tue Jun 20 16:25:07 2023 +0200 ci: tweak build dir's ACL when collecting coverage So gcov can create necessary directories/.gcda files even with dropped privileges. .github/workflows/cibuild.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ab7fe95ad7495adac41a4d79f4771c1b4cbe1fc0 Author: Rasmus Villemoes Date: Wed Jun 21 22:18:23 2023 +0200 hwclock: add --vl-read, --vl-clear documentation and bash-completion Signed-off-by: Rasmus Villemoes bash-completion/hwclock | 2 ++ sys-utils/hwclock.8.adoc | 5 +++++ 2 files changed, 7 insertions(+) commit 76cf1753f4a107fb9c7edf0ad2c57059934b9df7 Author: Rasmus Villemoes Date: Tue Jun 13 12:14:28 2023 +0200 hwclock: add support for RTC_VL_READ/RTC_VL_CLR ioctls Implement a way for userspace to query the status of the backup battery, if supported by the hardware and driver. The RTC_VL_* bits are a somewhat recent addition (3431ca4837bf, but really only from b0efe0281234) to the uapi header, so provide our own definition if the build host's header doesn't. Signed-off-by: Rasmus Villemoes sys-utils/hwclock-rtc.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ sys-utils/hwclock.c | 35 ++++++++++++++++++++ sys-utils/hwclock.h | 5 +++ 3 files changed, 126 insertions(+) commit 14fee76fc17d778e4d4c2752c68a95ce85b049ab Author: Masatake YAMATO Date: Thu Jun 22 15:07:49 2023 +0900 lsfd.1.adoc: fix a typo Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42497e7d92280770ca048ff5bb8bf81a431dab13 Author: Masatake YAMATO Date: Thu Jun 22 14:42:34 2023 +0900 lsfd: use ARRAY_STRING and ARRAY_NUMBER json types in some columns Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 10 ++++++---- tests/expected/lsfd/mkfds-eventpoll | 13 +++++++++++++ tests/expected/lsfd/mkfds-inotify | 2 ++ tests/ts/lsfd/mkfds-eventpoll | 2 ++ tests/ts/lsfd/mkfds-inotify | 20 ++++++++++++++++++++ 5 files changed, 43 insertions(+), 4 deletions(-) commit c34f86326d2fb10bd42102eb5963d60d2e76e1f2 Author: Masatake YAMATO Date: Mon Jun 19 06:40:50 2023 +0900 lsfd: use \n as the separator in INOTIFY.INODES and INOTIFY.INODES.RAW columns Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 9 +++++---- tests/expected/lsfd/mkfds-inotify | 2 +- tests/ts/lsfd/mkfds-inotify | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) commit 92e0e017d80954cfc82fdac0ad6c68060a9eff0c Author: Masatake YAMATO Date: Mon Jun 19 06:25:37 2023 +0900 lsfd: use \n as the separator in EVENTPOLL.TFDS column Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 9 +++++---- tests/expected/lsfd/mkfds-eventpoll | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) commit de7e11495bfe7a0233f7862cdcafbd585ee1b767 Author: Masatake YAMATO Date: Thu Jun 22 11:28:47 2023 +0900 lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types We will have operators for array types in the future. Till having them, we treat the types as STRING. So we can use string operators for the column having types. Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 4 ++++ 1 file changed, 4 insertions(+) commit 30ac13fa20e7433f290b76b1e5f384eac0b6a86d Author: Masatake YAMATO Date: Sun Jun 11 16:36:03 2023 +0900 lsfd: add 'D' flag for representing deleted files to XMODE column Now NAME column doesn't print "(deleted)" markers at the end of file name. Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 33 ++++++++++++++++++++++++++-- misc-utils/lsfd.1.adoc | 25 +++++++++++++++++---- tests/expected/lsfd/column-xmode-XMODE-D-bit | 2 ++ tests/expected/lsfd/column-xmode-XMODE-r-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-w-bit | 2 +- tests/expected/lsfd/column-xmode-XMODE-x-bit | 2 +- tests/ts/lsfd/column-xmode | 12 ++++++++++ 7 files changed, 69 insertions(+), 9 deletions(-) commit 92c00d7215bab642dc90f069a50161ee27219a89 Author: Masatake YAMATO Date: Fri Jun 9 21:35:55 2023 +0900 lsfd: introduce XMODE column, extensible variant of MODE The original MODE column comes from three letters (rwx) may not be enough for representing various aspects of file descriptors and memory mappings. We want to add more items in the future. However, the description of MODE in lsfd(1) doesn't wrote about its extensibility. Adding more letters to the column can break compatibility in someone's use case. This change introduces XMODE column. Unlike MODE, XMODE is declared as an extensible column in lsfd(1). Currently, it shows the same items as the MODE column does. Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 12 +++ misc-utils/lsfd.1.adoc | 7 ++ misc-utils/lsfd.c | 7 +- misc-utils/lsfd.h | 1 + tests/expected/lsfd/column-xmode-MODE-r-bit | 2 + tests/expected/lsfd/column-xmode-MODE-w-bit | 2 + tests/expected/lsfd/column-xmode-MODE-x-bit | 2 + tests/expected/lsfd/column-xmode-XMODE-r-bit | 2 + tests/expected/lsfd/column-xmode-XMODE-w-bit | 2 + tests/expected/lsfd/column-xmode-XMODE-x-bit | 2 + tests/ts/lsfd/column-xmode | 118 +++++++++++++++++++++++++++ 11 files changed, 155 insertions(+), 2 deletions(-) commit cb233a3e03a113245aeb83147974485bff8fabf4 Author: Masatake YAMATO Date: Sun Jun 18 23:40:01 2023 +0900 test: (lsfd) add a subcase for testing NAME column for a deleted file Signed-off-by: Masatake YAMATO tests/expected/lsfd/column-name-deleted-file | 2 ++ tests/ts/lsfd/column-name | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit 9ac2c69dbd2bb37867877e4deff68c069d084302 Author: Masatake YAMATO Date: Sun Jun 18 18:08:47 2023 +0900 test: (lsfd) add a case for testing DELETED column Signed-off-by: Masatake YAMATO .../expected/lsfd/column-deleted-make-regular-file | 2 + tests/expected/lsfd/column-deleted-ro-regular-file | 2 + tests/ts/lsfd/column-deleted | 61 ++++++++++++++++++++++ 3 files changed, 65 insertions(+) commit 251319838d81e0325fdf87e43570dcba9fa29dde Author: Masatake YAMATO Date: Sun Jun 18 17:47:49 2023 +0900 test: (mkfds) add "make-regular-file" factory With "delete" boolean parameter, you can delete the file just after making it. Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 60c81b3272d03959dfee465f1ecaf40ba3e70cb3 Author: Karel Zak Date: Wed Jun 21 10:57:37 2023 +0200 sfdisk: add hint about duplicate UUIDs when use dump Signed-off-by: Karel Zak disk-utils/sfdisk.8.adoc | 2 ++ 1 file changed, 2 insertions(+) commit 4d344934501cbcdf87c3532c5bf845290dbcc71e Author: Frantisek Sumsal Date: Tue Jun 20 16:19:42 2023 +0200 ci: fix indentation .github/workflows/cibuild.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 33e347832e77e821c62cfbc48eccff178f9ea6b5 Author: Karel Zak Date: Tue Jun 20 13:15:45 2023 +0200 lib: remove pager.c from libcommon The libcommon is a binary archive to keep compilation and maintenance simple. The library is not linked as shared or so. The unused symbols are removed from binaries (for example, by "make install-strip"). But it isn't evident for license analyzers (and some humans) that the library uses GPL and non-GPL stuff simultaneously. Let's avoid doubts and keep pager.c (with GPL license) out of the archive Signed-off-by: Karel Zak disk-utils/Makemodule.am | 4 +++- disk-utils/meson.build | 3 ++- lib/Makemodule.am | 1 - lib/meson.build | 2 +- sys-utils/Makemodule.am | 2 +- sys-utils/meson.build | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) commit 79feaa6022453d3c62ddf8396d4b6475344a46a3 Author: Karel Zak Date: Tue Jun 20 12:52:35 2023 +0200 lib/ include/: cleanup licence headers This patch does not change any license of the affected files. Changes: * add missing SPDX-License-Identifier lines for LGPL * copy missing license lines from code (lib/) to header files (include/) * use the same comment formatting Signed-off-by: Karel Zak include/colors.h | 2 ++ include/cpuset.h | 2 ++ include/env.h | 4 ++++ include/mbsalign.h | 28 ++++++++++++---------------- include/timeutils.h | 37 ++++++++++++++----------------------- lib/colors.c | 2 ++ lib/cpuset.c | 2 ++ lib/mbsalign.c | 31 +++++++++++++------------------ lib/mbsedit.c | 2 ++ lib/path.c | 11 ++++++----- lib/procfs.c | 2 +- lib/sysfs.c | 2 +- lib/timeutils.c | 34 ++++++++++++++-------------------- lib/xxhash.c | 2 ++ 14 files changed, 77 insertions(+), 84 deletions(-) commit 278f76ae88807eec5c202d44cd3ecdb8b201347b Author: Karel Zak Date: Tue Jun 20 12:49:26 2023 +0200 lib/color-names: fix licence header The header file and code uses a different license. Let's use (public domain) license from code also for the header file. Signed-off-by: Karel Zak include/color-names.h | 6 +++--- lib/color-names.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7293d66314b4cb89a9fe5b6f1fe4e564c26e3c11 Author: Todd Zullinger Date: Sun Jun 18 17:29:11 2023 -0400 sys-utils: fix SELinux context example in mount.8 In the description of the context option, the example which shows how to properly quote is displayed incorrectly on terminals > 80 columns. This leaves a seemingly needless '\' in the command, e.g.: mount -t tmpfs none /mnt -o \ 'context="system_u:...' The intent is to display the command properly on terminals <= 80 columns. Use a literal block to ensure the code is displayed consistently, regardless of the terminal width. Connect the blockquote to the previous indented items in the context option description to ensure it is properly indented. Signed-off-by: Todd Zullinger sys-utils/mount.8.adoc | 3 +++ 1 file changed, 3 insertions(+) commit d7f1fc1839dba85adc10ba7cc9a46da57c946491 Author: Karel Zak Date: Mon Jun 19 14:59:15 2023 +0200 tests: add omitted files Sorry, forgot in the previous commit ... Signed-off-by: Karel Zak tests/expected/mount/special-user | 1 + tests/expected/mount/special-username | 1 + 2 files changed, 2 insertions(+) commit b11005d90ffc2c91154e8bf664160ab7f398330e Author: Karel Zak Date: Mon Jun 19 13:45:06 2023 +0200 tests: add user and user=name mount test Signed-off-by: Karel Zak tests/ts/mount/special | 8 ++++++++ 1 file changed, 8 insertions(+) commit a96b486d17775bb7f79d834ee22769dfea0ba6cd Author: Karel Zak Date: Mon Jun 19 13:29:42 2023 +0200 libmount: always ignore user= The library (on mount) cares about "user", but has to ignore "user=name". It works as expected, but only for non-root users. We need to ignore it also root to be compatible with /sbin/mount.cifs where some people still use "user=" (rather than "username="). References: fe0b1e793c9017edba72768e2e0b4c769c204604 Addresses: https://github.com/util-linux/util-linux/issues/2315 Signed-off-by: Karel Zak libmount/src/context_mount.c | 32 ++++++++++++++++---------------- sys-utils/mount.8.adoc | 2 ++ 2 files changed, 18 insertions(+), 16 deletions(-) commit 640e93f48040e72b06f038159c54ffa3bbc86e0c Merge: cd256c9f2 17bc58e01 Author: Karel Zak Date: Sat Jun 17 11:56:48 2023 +0200 Merge pull request #2317 from eworm-de/meson-langinfo meson: check for _NL_TIME_WEEK_1STDAY in langinfo.h commit cd256c9f22c8eb6d0f713e6095c212cf10afe4fa Merge: 44806f659 123ba32ae Author: Karel Zak Date: Sat Jun 17 11:52:11 2023 +0200 Merge pull request #2318 from mariobl/patch-11 [man] Fix typo in irqtop.1.adoc commit 123ba32ae7ca67005ddf57cc8b8abd318db817c4 Author: Mario Blättermann Date: Fri Jun 16 16:31:47 2023 +0200 [man] Fix typo in irqtop.1.adoc sys-utils/irqtop.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17bc58e018d21456aa8dc2d25619ca1fda6848d5 Author: Christian Hesse Date: Fri Jun 16 11:52:10 2023 +0200 meson: check for _NL_TIME_WEEK_1STDAY in langinfo.h ... which is required for `cal`. Fixes GH-2316 meson.build | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 44806f659f083f770eee2cdf8102326ed3639b22 Merge: b9040ac26 ed3fd21fe Author: Karel Zak Date: Wed Jun 14 09:54:25 2023 +0200 Merge branch 'ci/gcc-13' of https://github.com/t-8ch/util-linux * 'ci/gcc-13' of https://github.com/t-8ch/util-linux: ci: use clang 16 ci: build with GCC 13/11 commit b9040ac2672fc609e425330849f23b8b7f35813b Merge: 07e7d1c78 157a46967 Author: Karel Zak Date: Wed Jun 14 09:53:04 2023 +0200 Merge branch 'lsfd--inotify' of https://github.com/masatake/util-linux * 'lsfd--inotify' of https://github.com/masatake/util-linux: lsfd: use xstrdup instead of xasprintf(...\"%s\" tests: (lsfd) add a case for testing INOTIFY.INODES.RAW column tests: (mkfds) add / and /etc/fstab as the monitoring targets to inotify lsfd: fill NAME column of inotify files with the information about their monitoring targets lsdf: make the code for filling SOURCE, PARTITION, and MAJMIN reusable commit 07e7d1c7811598c85a43b694fa40d7c97aa04f54 Merge: 88ad4e746 334939a19 Author: Karel Zak Date: Wed Jun 14 09:51:12 2023 +0200 Merge branch 'meson-more-conditions' of https://github.com/keszybz/util-linux * 'meson-more-conditions' of https://github.com/keszybz/util-linux: meson: conditionalize waitpid meson: add conditionalization for test progs meson: implement HAVE_PTY commit 334939a19d72febc0ce6f2913a9692123db79058 Author: Zbigniew Jędrzejewski-Szmek Date: Tue Jun 13 10:15:39 2023 +0200 meson: conditionalize waitpid I *think* this mirros what configure.ac does, except that the configuration option is not implemented. meson.build | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit d6418774aba595c44fa6c68dd2da55cb6f7642dd Author: Zbigniew Jędrzejewski-Szmek Date: Tue Jun 13 10:01:52 2023 +0200 meson: add conditionalization for test progs This just mirrors what the autotools setup is doing. meson.build | 84 ++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 44 insertions(+), 40 deletions(-) commit 444753601c4c367ca395359ea74fe5c7b86ce56d Author: Zbigniew Jędrzejewski-Szmek Date: Tue Jun 13 09:55:22 2023 +0200 meson: implement HAVE_PTY This conditional was never implemented in the meson config. Under autotools, it is guarded by availability of headers and an option. I didn't implement the option here. Fixes #2310. '!= false' is used because 'x == 1' is rejected by meson if 'x' is false. OTOH, 'x != false' seems to work if 'x' is 1. meson.build | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 157a469671968bcae0445ba0042c364e55cf8da9 Author: Masatake YAMATO Date: Tue Jun 13 19:21:33 2023 +0900 lsfd: use xstrdup instead of xasprintf(...\"%s\" Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b58fb5f4593c5078e4d01068aaeec02641fe605 Author: Masatake YAMATO Date: Fri Jun 9 19:03:48 2023 +0900 tests: (lsfd) add a case for testing INOTIFY.INODES.RAW column Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-inotify | 2 ++ tests/ts/lsfd/mkfds-inotify | 53 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit 5e0e9730cadf1261074f67a0b80917ee9e1757e8 Author: Masatake YAMATO Date: Fri Jun 9 19:02:25 2023 +0900 tests: (mkfds) add / and /etc/fstab as the monitoring targets to inotify Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c1a26ac8f13eb1a485699fa2fd910d952bbf8369 Author: Masatake YAMATO Date: Fri Jun 9 14:55:05 2023 +0900 lsfd: fill NAME column of inotify files with the information about their monitoring targets # ./lsfd -p 1 -Q '(TYPE == "inotify") and (FD > 7)' COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME systemd 1 root 11 r-- inotify anon_inodefs 15 1060 inodes=116@dm-0 systemd 1 root 13 r-- inotify anon_inodefs 15 1060 inodes=299@tmpfs systemd 1 root 19 r-- inotify anon_inodefs 15 1060 inodes=41@tmpfs,2@tmpfs,1@tmpfs,96@dm-0 systemd 1 root 21 r-- inotify anon_inodefs 15 1060 inodes=41@tmpfs,2@tmpfs,1@tmpfs,96@dm-0 In addition, INOTIFY.INODES and INOTIFY.INODES.RAW column are added. Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 12 +++++ misc-utils/lsfd.c | 6 +++ misc-utils/lsfd.h | 2 + 4 files changed, 163 insertions(+) commit c032850e8f5723cda66025015ec82770b2937869 Author: Masatake YAMATO Date: Fri Jun 9 14:52:18 2023 +0900 lsdf: make the code for filling SOURCE, PARTITION, and MAJMIN reusable Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 64 ++++++++++++++++++++++++++++++++++++-------------- misc-utils/lsfd.h | 15 ++++++++++++ 2 files changed, 61 insertions(+), 18 deletions(-) commit 88ad4e74628fe0a2fb9403a5f1b70d201ecb3e53 Author: Thomas Weißschuh Date: Tue Jun 13 08:27:48 2023 +0200 libmount: (tests) add helper for option list splitting Signed-off-by: Thomas Weißschuh libmount/src/optlist.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 565eebbc455f151216d3dc2d7d795d1654b08e6d Author: Thomas Weißschuh Date: Tue Jun 13 08:19:55 2023 +0200 meson: build test_mount_optlist Signed-off-by: Thomas Weißschuh libmount/meson.build | 1 + 1 file changed, 1 insertion(+) commit b5fc1d120e6b2db9b1dcd198d73ab4616741d9f9 Author: Enze Li Date: Fri Jun 9 09:37:04 2023 +0800 build-sys: add enosys and syscalls.h to gitignore After compiling enosys, the syscalls.h file and the executable enosys are generated, let's add these two files to the .gitignore file. Signed-off-by: Enze Li .gitignore | 2 ++ 1 file changed, 2 insertions(+) commit c9fbfd99ad9f93fe9d4e69d9165f9bb19b71f3ed Author: Enze Li Date: Fri Jun 9 09:37:03 2023 +0800 build-sys: rearrange gitignore in alphabetical order Signed-off-by: Enze Li .gitignore | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 793e8d2ab81324d0a712132b26ee16c08575101b Author: Karel Zak Date: Mon Jun 12 12:33:01 2023 +0200 cfdisk: add hint about labels for bootable flag Addresses: https://github.com/util-linux/util-linux/discussions/2220 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1c8a51701df132d7f216ca64398082391752b6fe Merge: 48554a416 69e98d12a Author: Karel Zak Date: Mon Jun 12 12:22:02 2023 +0200 Merge branch 'libmount/loop-rw' of https://github.com/t-8ch/util-linux * 'libmount/loop-rw' of https://github.com/t-8ch/util-linux: libmount: (optlist) correctly detect ro status commit 48554a41658b4ce34fa5e1d633ec7c9e4d0d4c3c Merge: 6182debc2 765b4a147 Author: Karel Zak Date: Mon Jun 12 12:18:50 2023 +0200 Merge branch 'lsfd--refactor' of https://github.com/masatake/util-linux * 'lsfd--refactor' of https://github.com/masatake/util-linux: timeutils: add an inline funciton, is_timespecset() lsfd: use scols_table_get_column_by_name commit 6182debc208d72963f8b32291398334d6ca33b50 Merge: ed41386a0 cee78467b Author: Karel Zak Date: Mon Jun 12 12:16:27 2023 +0200 Merge branch 'setuid' of https://github.com/eworm-de/util-linux * 'setuid' of https://github.com/eworm-de/util-linux: meson: install write setgid meson: install wall setgid meson: install umount setuid meson: install mount setuid meson: install newgrp setuid meson: install su setuid meson: install chsh setuid meson: install chfn setuid commit ed41386a03e87bbb1da1f83abac0e9bc176fc984 Merge: 39032646f 6591ddf6b Author: Karel Zak Date: Mon Jun 12 12:15:41 2023 +0200 Merge branch 'lsfd--signalfd' of https://github.com/masatake/util-linux * 'lsfd--signalfd' of https://github.com/masatake/util-linux: tests: (lsfd) add a case for testing signalfd related columns tests: (mkfds) add a factory to make a signalfd lsfd.1.adoc: update for signalfds lsfd: print the masks specified in signalfds commit 69e98d12a904c1abfde943f3358b0395b5859e79 Author: Thomas Weißschuh Date: Sun Jun 11 11:49:54 2023 +0200 libmount: (optlist) correctly detect ro status Fixes #2305 Signed-off-by: Thomas Weißschuh libmount/src/optlist.c | 2 +- tests/expected/libmount/loop-explicit-rw | 2 ++ tests/ts/libmount/loop | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) commit 765b4a147b023725bc3e2dda2075e1dcb4eb655f Author: Masatake YAMATO Date: Sun Jun 11 00:31:46 2023 +0900 timeutils: add an inline funciton, is_timespecset() Close #2300. Signed-off-by: Masatake YAMATO include/timeutils.h | 6 ++++++ misc-utils/lsfd-unkn.c | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 0cc8e82a49ce5610c3860a25f7e762b7937252e3 Author: Masatake YAMATO Date: Sat Jun 10 01:47:16 2023 +0900 lsfd: use scols_table_get_column_by_name Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit cee78467bea45f7a4f890f0c65bd59441bd42697 Author: Christian Hesse Date: Fri Jun 9 15:04:00 2023 +0200 meson: install write setgid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit 07641fd93c4829696c1e2101642fee32ad998025 Author: Christian Hesse Date: Fri Jun 9 15:02:57 2023 +0200 meson: install wall setgid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit 1cb3c90ca5de6ffb43f8a40605118a8d84a0c6f3 Author: Christian Hesse Date: Fri Jun 9 14:09:02 2023 +0200 meson: install umount setuid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit 8f49b3693d6f1db36d5ecb7328965686362deaa3 Author: Christian Hesse Date: Fri Jun 9 14:09:02 2023 +0200 meson: install mount setuid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit cb3dee5a14da552a935680584d2fc5c37cb3a913 Author: Christian Hesse Date: Fri Jun 9 14:09:02 2023 +0200 meson: install newgrp setuid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit fb8c224eae4e28502e05770d35c8e3b8509a9b69 Author: Christian Hesse Date: Fri Jun 9 14:09:02 2023 +0200 meson: install su setuid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit a13574b1de21d7fd9a0ad63790a7452c369e46e5 Author: Christian Hesse Date: Fri Jun 9 14:09:02 2023 +0200 meson: install chsh setuid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit 60d457f52991e6f6472171035974ce7a3ae621f3 Author: Christian Hesse Date: Fri Jun 9 14:09:02 2023 +0200 meson: install chfn setuid ... as this requires elevated privileges. meson.build | 1 + 1 file changed, 1 insertion(+) commit 39032646fe0f572949024fa23a5b322c5dd9a5bf Merge: 97d60d669 fd6b4d94f Author: Karel Zak Date: Fri Jun 9 11:50:23 2023 +0200 Merge branch 'PR/libmount-force-mount2' of github.com:karelzak/util-linux-work * 'PR/libmount-force-mount2' of github.com:karelzak/util-linux-work: libmount: introduce LIBMOUNT_FORCE_MOUNT2={always,never,auto} commit 6591ddf6b0a3ee86b252277e83355a1b6a94a528 Author: Masatake YAMATO Date: Wed Jun 7 08:01:40 2023 +0900 tests: (lsfd) add a case for testing signalfd related columns Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-signalfd | 2 ++ tests/ts/lsfd/mkfds-signalfd | 64 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 4012622ab4ec9282ebfff0bac077d30c03629066 Author: Masatake YAMATO Date: Wed Jun 7 07:55:09 2023 +0900 tests: (mkfds) add a factory to make a signalfd Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 52 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit 82e8be5a3d4984dbda90fb3765d4eb4768eb5aa4 Author: Masatake YAMATO Date: Wed Jun 7 07:40:45 2023 +0900 lsfd.1.adoc: update for signalfds Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 6 ++++++ 1 file changed, 6 insertions(+) commit b22d1e541ab5ecf126126bf686a390d8aefeb3f2 Author: Masatake YAMATO Date: Wed Jun 7 07:30:06 2023 +0900 lsfd: print the masks specified in signalfds An example output: # ./lsfd -p "$(pidof systemd-journald)" -Q '(TYPE == "signalfd")' COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME systemd-journal 2382709 root 238 rw- signalfd anon_inodefs 15 1060 mask=USR1,USR2 systemd-journal 2382709 root 239 rw- signalfd anon_inodefs 15 1060 mask=INT,TERM systemd-journal 2382709 root 240 rw- signalfd anon_inodefs 15 1060 mask=35 Using signum_to_signame is suggested by Karel Zak . Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.c | 3 ++ misc-utils/lsfd.h | 1 + 3 files changed, 103 insertions(+) commit fd6b4d94ff013dc7ed680d4e864610da5b9751f1 Author: Karel Zak Date: Mon Jun 5 13:21:11 2023 +0200 libmount: introduce LIBMOUNT_FORCE_MOUNT2={always,never,auto} Let's introduce a stable workaround for use cases where new kernel API is not ready to use. The patch does not use "goto enosys" to exit as nothing in the hookset is initialized yet. Addresses: https://github.com/util-linux/util-linux/issues/1992 Addresses: https://github.com/util-linux/util-linux/issues/2283 Signed-off-by: Karel Zak libmount/src/hook_mount.c | 54 +++++++++++++++++++++++++++++++++++------------ sys-utils/mount.8.adoc | 3 +++ 2 files changed, 43 insertions(+), 14 deletions(-) commit 97d60d66996307e7db69d9ab0178efbcf35d1d7f Merge: 0dbf5504d 71b01d2a3 Author: Karel Zak Date: Tue Jun 6 10:47:35 2023 +0200 Merge branch 'pr/libmount-5.12.0' of github.com:karelzak/util-linux-work * 'pr/libmount-5.12.0' of github.com:karelzak/util-linux-work: libmount: use mount(2) for remount on Linux < 5.14 commit 0dbf5504dc902b562d9ca3fc64ac29f8666f6804 Merge: 00f254a8f 2beb17a64 Author: Karel Zak Date: Tue Jun 6 10:46:19 2023 +0200 Merge branch 'lsfd--misc-fix' of https://github.com/masatake/util-linux * 'lsfd--misc-fix' of https://github.com/masatake/util-linux: lsfd: assign a class to the file in new_file() lsfd: don't check the value returned from new_file() commit 00f254a8f084d3dcd59d1b3ea0b68642090ecf6a Merge: 7db2e6373 7816bcb9d Author: Karel Zak Date: Tue Jun 6 10:45:17 2023 +0200 Merge branch 'lsfd--timerfd' of https://github.com/masatake/util-linux * 'lsfd--timerfd' of https://github.com/masatake/util-linux: tests: (lsfd/filter) add a case for comparing floating point numbers tests: (lsfd) add a case for testing timerfd related columns tests: add ts_skip_capability tests: (mkfds) add a factory to make a timerfd lsfd.1.adoc: write about timerfd lsfd: print the detail of the timer associated with a timerfd lsfd: (filter) accept floating point numbers in expressions lsfd: (filter) support floating point number used in columns lsfd: (filter) reduce duplicated code in macro definitions lsfd: (filter) improve error message lsfd.1.adoc: revise type names for columns lsfd.1.adoc: fix typos lsfd: adjust coding style lsfd: fix a sentence in comment commit 71b01d2a3760f36a1e81d422237f661fd07a72ad Author: Karel Zak Date: Mon Jun 5 12:59:41 2023 +0200 libmount: use mount(2) for remount on Linux < 5.14 It seems mount_setattr() is supported on Linux < 5.14, but it's without MOUNT_ATTR_NOSYMFOLLOW. That's problem for remount where we reset all VFS flags. The most simple (but not elegant) is to check for kernel version and fallback to mount(2) on remount. Addresses: https://github.com/util-linux/util-linux/issues/2283 Signed-off-by: Karel Zak libmount/src/hook_mount.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7db2e6373b3d2a9098405a73681d80e38bcd58e5 Merge: b7dd45f6c 16d8b1e2a Author: Karel Zak Date: Mon Jun 5 11:46:11 2023 +0200 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 b7dd45f6c827642dbdf452895d5319575e4176b1 Merge: 57cd868ed 9bd807486 Author: Karel Zak Date: Mon Jun 5 11:45:37 2023 +0200 Merge branch 'libblkid/bcache-csum' of https://github.com/t-8ch/util-linux * 'libblkid/bcache-csum' of https://github.com/t-8ch/util-linux: libblkid: (bcache) report block size libblkid: (bcache) report version libblkid: (bcache) report label libblkid: (bcache) also calculate checksum over journal buckets libblkid: (bcache) extend superblock definition commit 57cd868ed19fd2987822d23691145b5f754b1851 Merge: 3a14fb35b 6f052eaa1 Author: Karel Zak Date: Mon Jun 5 11:44:30 2023 +0200 Merge branch 'fixes' of https://github.com/t-8ch/util-linux * 'fixes' of https://github.com/t-8ch/util-linux: libmount (python) : simplify struct initialization lsfd-filter: constify filter logic misc: constify some fields commit 2beb17a6417cab1d4ebc9cb885938536be4e9cc7 Author: Masatake YAMATO Date: Mon Jun 5 06:39:26 2023 +0900 lsfd: assign a class to the file in new_file() Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 783807a511082c753069c7c3c55565e7f15cc6d5 Author: Masatake YAMATO Date: Mon Jun 5 06:31:30 2023 +0900 lsfd: don't check the value returned from new_file() The funciton newver returns NULL. Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 6 ------ 1 file changed, 6 deletions(-) commit 16d8b1e2a62f81ac368438a730d5e57cd2778f55 Author: Milan Broz Date: Sun Jun 4 19:15:55 2023 +0200 libblkid: jfs - avoid undefined shift Fix previous commit 04a0717b0b0faa1a8078dc6fad05183b8bada395 to avoid undefined shift if value is exactly 32. libblkid/src/superblocks/jfs.c:46:39: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int' Reproducer found with OSS-Fuzz (issue 59284) running over cryptsetup project (blkid is used in header init). Signed-off-by: Milan Broz libblkid/src/superblocks/jfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7816bcb9daa8d2e216ff7b27327775062dd11075 Author: Masatake YAMATO Date: Sun Jun 4 12:00:39 2023 +0900 tests: (lsfd/filter) add a case for comparing floating point numbers Signed-off-by: Masatake YAMATO ...{option-filter-broken-exp => filter-broken-exp} | 0 tests/expected/lsfd/filter-floating-point-nums | 15 ++++ ...{option-filter-broken-exp => filter-broken-exp} | 0 tests/ts/lsfd/filter-floating-point-nums | 87 ++++++++++++++++++++++ 4 files changed, 102 insertions(+) commit ed59afeefb42af27d956ca96e05df890d07ff364 Author: Masatake YAMATO Date: Sat Jun 3 13:11:00 2023 +0900 tests: (lsfd) add a case for testing timerfd related columns Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-timerfd | 0 tests/expected/lsfd/mkfds-timerfd-alarm | 16 +++ .../lsfd/mkfds-timerfd-boottime-interval-only | 8 ++ .../lsfd/mkfds-timerfd-monotonic-remaining-only | 8 ++ .../mkfds-timerfd-realtime-remaining-and-interval | 8 ++ tests/ts/lsfd/mkfds-timerfd | 109 +++++++++++++++++++++ tests/ts/lsfd/mkfds-timerfd-alarm | 56 +++++++++++ 7 files changed, 205 insertions(+) commit 63feafbae8f0fa898e439846d8ba88a19497b0e1 Author: Masatake YAMATO Date: Sun Jun 4 16:55:00 2023 +0900 tests: add ts_skip_capability Signed-off-by: Masatake YAMATO tests/functions.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit baadd080d3765ac657ca981fe171a43e335cc35c Author: Masatake YAMATO Date: Sat Jun 3 08:40:18 2023 +0900 tests: (mkfds) add a factory to make a timerfd Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 140 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) commit 50f73920c5db276d8073a1746ac01ceadb27dc19 Author: Masatake YAMATO Date: Sat Jun 3 09:36:57 2023 +0900 lsfd.1.adoc: write about timerfd Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 188b7d64bb60071ef9c221d10c69c9fe8a1bdc11 Author: Masatake YAMATO Date: Sat Jun 3 08:42:27 2023 +0900 lsfd: print the detail of the timer associated with a timerfd An example output: # ./lsfd -p 1 -Q '(TYPE == "timerfd")' -oCOMMAND,PID,ASSOC,TYPE,INODE,NAME COMMAND PID ASSOC TYPE INODE NAME systemd 1 22 timerfd 1060 clockid=monotonic remaining=4625.661834645 systemd 1 25 timerfd 1060 clockid=realtime remaining=398.164618943 systemd 1 112 timerfd 1060 clockid=realtime remaining=7537606384.202715161 Added three new columns, TIMERFD.{CLOCKID,TIMERFD.REMAINING,INTERVAL}. The filter engine works well with them. An example listing timerfd files expiring within 1.2 seconds. # ./lsfd -Q '(TIMERFD.REMAINING > 0.0) && (TIMERFD.REMAINING < 1.2)' COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME Xorg 17069 jet 26 rw- timerfd anon_inodefs 15 1060 clockid=monotonic remaining=0.061075544 systemd-oomd 2382701 systemd-oom 8 rw- timerfd anon_inodefs 15 1060 clockid=monotonic remaining=0.178126915 Using SCOLS_JSON_NUMBER as the data type for TIMERFD.REMAINING and TIMERFD.INTERVAL columns is suggested by Thomas Weißschuh . Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.c | 9 +++ misc-utils/lsfd.h | 3 + 3 files changed, 179 insertions(+) commit 1fa185647115cd58717196011673b81e7ffad935 Author: Masatake YAMATO Date: Sun Jun 4 06:18:45 2023 +0900 lsfd: (filter) accept floating point numbers in expressions Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 81 +++++++++++++++++++++++++++++++++++++++++------- misc-utils/lsfd.1.adoc | 8 +++-- 2 files changed, 76 insertions(+), 13 deletions(-) commit 564d954a863490075d86f6d0f5c542408bc8b7d5 Author: Masatake YAMATO Date: Sat Jun 3 18:42:40 2023 +0900 lsfd: (filter) support floating point number used in columns Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 64 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 11 deletions(-) commit 520f03a241074d2a08d05830c88d105c1964eaeb Author: Masatake YAMATO Date: Sat Jun 3 18:34:53 2023 +0900 lsfd: (filter) reduce duplicated code in macro definitions Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 70b1623ca672e203c9a4ded216af129c118aad42 Author: Masatake YAMATO Date: Sun Jun 4 05:44:38 2023 +0900 lsfd: (filter) improve error message Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 0dc26444be5f2f11d172922e92a73c9ad4810caa Author: Masatake YAMATO Date: Sun Jun 4 07:39:32 2023 +0900 lsfd.1.adoc: revise type names for columns Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0a0c726e77b36d8a4e88ac6f984e39709662a5f6 Author: Masatake YAMATO Date: Sat Jun 3 08:27:05 2023 +0900 lsfd.1.adoc: fix typos Signed-off-by: Masatake YAMATO misc-utils/lsfd.1.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dd458e6585980e6325199c8296fe2c3d1eecdff8 Author: Masatake YAMATO Date: Mon May 29 21:59:04 2023 +0900 lsfd: adjust coding style Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 326e4be47997f523a103ed11189ca35b9c1741b2 Author: Masatake YAMATO Date: Sun Jun 4 03:42:38 2023 +0900 lsfd: fix a sentence in comment Signed-off-by: Masatake YAMATO misc-utils/lsfd-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bd80748620a75a34a4788535f89be37dbdeaab3 Author: Thomas Weißschuh Date: Sat Jun 3 13:49:18 2023 +0200 libblkid: (bcache) report block size Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 3 +++ tests/expected/blkid/low-probe-bcache-B | 1 + tests/expected/blkid/low-probe-bcache-C | 1 + tests/expected/blkid/low-probe-bcache-journal | 1 + 4 files changed, 6 insertions(+) commit 1b2efad216d3ca4421f51259daeb777f5c919d66 Author: Thomas Weißschuh Date: Sat Jun 3 11:15:13 2023 +0200 libblkid: (bcache) report version Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 4 ++++ tests/expected/blkid/low-probe-bcache-B | 1 + tests/expected/blkid/low-probe-bcache-C | 1 + tests/expected/blkid/low-probe-bcache-journal | 1 + 4 files changed, 7 insertions(+) commit 11d0724f789726fb6344ffb025e1754b7dcaa0c4 Author: Thomas Weißschuh Date: Sat Jun 3 10:50:26 2023 +0200 libblkid: (bcache) report label Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 3 +++ tests/expected/blkid/low-probe-bcache-journal | 2 ++ 2 files changed, 5 insertions(+) commit 7140635881f620172e90814b5a5043f250963ce0 Author: Thomas Weißschuh Date: Sat Jun 3 13:13:52 2023 +0200 libblkid: (bcache) also calculate checksum over journal buckets Fixes #2291 Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 18 +++++++++++++----- tests/expected/blkid/low-probe-bcache-journal | 4 ++++ tests/ts/blkid/images-fs/bcache-journal.img.xz | Bin 0 -> 2320 bytes 3 files changed, 17 insertions(+), 5 deletions(-) commit d2f4b5c83b7376941e35b064200b8bf3d66ca499 Author: Thomas Weißschuh Date: Sat Jun 3 13:13:37 2023 +0200 libblkid: (bcache) extend superblock definition We will need it for the correct checksum calculation. Signed-off-by: Thomas Weißschuh libblkid/src/superblocks/bcache.c | 42 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit 6f052eaa1e8e83eb97e0a800f3e9585f587ecd5e Author: Thomas Weißschuh Date: Mon May 29 09:23:37 2023 +0200 libmount (python) : simplify struct initialization Signed-off-by: Thomas Weißschuh libmount/python/context.c | 48 +++++++++++------------------------------------ libmount/python/fs.c | 48 +++++++++++------------------------------------ libmount/python/tab.c | 48 +++++++++++------------------------------------ 3 files changed, 33 insertions(+), 111 deletions(-) commit 9b6ad16fd9a66665fd7043131e848500c6bffd95 Author: Thomas Weißschuh Date: Sat Jun 3 10:22:46 2023 +0200 lsfd-filter: constify filter logic Signed-off-by: Thomas Weißschuh misc-utils/lsfd-filter.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 37b2b3fa46d8c4264d3cdb6faff05f852b59ce8e Author: Thomas Weißschuh Date: Mon May 29 09:23:53 2023 +0200 misc: constify some fields Signed-off-by: Thomas Weißschuh disk-utils/partx.c | 14 +++++++------- libblkid/src/topology/sysfs.c | 2 +- libfdisk/src/bsd.c | 2 +- login-utils/lslogins.c | 2 +- misc-utils/fincore.c | 4 ++-- misc-utils/findmnt.c | 2 +- misc-utils/lsblk.c | 8 ++++---- misc-utils/lslocks.c | 12 ++++++------ sys-utils/losetup.c | 8 ++++---- sys-utils/lsipc.c | 2 +- sys-utils/prlimit.c | 14 +++++++------- sys-utils/swapon.c | 14 +++++++------- sys-utils/wdctl.c | 14 +++++++------- 13 files changed, 49 insertions(+), 49 deletions(-) commit ed3fd21fe26f092cbdf6563f9ed6f1e38a5d63b4 Author: Thomas Weißschuh Date: Thu Jun 1 15:10:38 2023 +0200 ci: use clang 16 Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a14fb35bec78674068fd234a839bb3588163fa5 Author: Thomas Weißschuh Date: Fri Jun 2 22:53:40 2023 +0200 tests: fix subtests containing spaces in their name Previously these tests would silently fail to compare $TS_OUTPUT / $TS_ERRLOG. Signed-off-by: Thomas Weißschuh tests/functions.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 45552ef2604f6eaf72697e82504e3f355c083168 Author: Thomas Weißschuh Date: Mon May 29 11:23:47 2023 +0200 ci: build with GCC 13/11 Newer releases of GCC 13 have reigned in the false positives, so use it for CI now. The sanitizer builds are sticking to GCC 11 for now. Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 90b12595bbe3357fdbccf5eec6c3885e53bc614e Author: Thomas Weißschuh Date: Wed May 31 08:09:39 2023 +0200 ci: build on old distro This should help to catch build breaks Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit edc4e5253390bcd34f4ac7f1b75bd2eca4494b7f Author: Thomas Weißschuh Date: Wed May 31 10:26:50 2023 +0200 ci: mark source directory as safe Signed-off-by: Thomas Weißschuh .github/workflows/cibuild.sh | 1 + 1 file changed, 1 insertion(+) commit b660e0c4df74b3e3d202768229390f610cba18c9 Author: Thomas Weißschuh Date: Wed May 31 10:15:11 2023 +0200 ci: prevent prompts during installation Signed-off-by: Thomas Weißschuh .github/workflows/cibuild-setup-ubuntu.sh | 2 ++ 1 file changed, 2 insertions(+) commit d53284bb1e40f19ac065e52ff9df97d2caf60259 Author: Thomas Weißschuh Date: Wed May 31 17:31:01 2023 +0200 tests: skip broken tests on docker Signed-off-by: Thomas Weißschuh tests/ts/hwclock/show | 1 + tests/ts/lsfd/column-source-with-root | 1 + tests/ts/lsfd/mkfds-mapped-packet-socket | 1 + tests/ts/lsfd/mkfds-netns | 1 + tests/ts/lsfd/mkfds-raw6 | 1 + tests/ts/lsfd/mkfds-ro-block-device | 1 + tests/ts/lsfd/mkfds-tcp6 | 1 + tests/ts/lsfd/mkfds-udp6 | 1 + tests/ts/lsfd/option-inet | 1 + tests/ts/mount/fstab-bind | 1 + tests/ts/mount/fstab-broken | 1 + tests/ts/mount/fstab-none | 1 + tests/ts/mount/move | 1 + 13 files changed, 13 insertions(+) commit 023e77d26a12aa632266e2a967e944bcbf9c8a12 Author: Thomas Weißschuh Date: Wed May 31 17:27:38 2023 +0200 tests: add ts_skip_docker Signed-off-by: Thomas Weißschuh tests/functions.sh | 4 ++++ tests/ts/misc/setarch | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit a5b093698a21372831a293383fb369eba10f8bc9 Author: Thomas Weißschuh Date: Wed May 31 17:12:12 2023 +0200 tools: (asciidoctor) explicitly require extensions module This is needed for older versions of asciidoctor. Signed-off-by: Thomas Weißschuh configure.ac | 5 +++-- tools/asciidoctor-includetracker.rb | 2 ++ tools/asciidoctor-unicodeconverter.rb | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) commit 25a70dcb2e901ae1e3d9d980743b31bb51e5379b Author: Thomas Weißschuh Date: Wed May 31 16:56:31 2023 +0200 build-sys: only pass --failure-level if supported Signed-off-by: Thomas Weißschuh Makefile.am | 5 ++++- configure.ac | 10 ++++++++++ po-man/Makefile.am | 5 ++++- 3 files changed, 18 insertions(+), 2 deletions(-) commit 58c16c844273795f49d6b3af96f54e84ed13d56a Author: Thomas Weißschuh Date: Wed May 31 16:11:09 2023 +0200 build-sys: fix typo in waitpid check Signed-off-by: Thomas Weißschuh configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d975467d8f781d98c03bbaec8481b0e9f543cfed Author: Thomas Weißschuh Date: Wed May 31 17:25:22 2023 +0200 lsfd: (tests) fix typo Signed-off-by: Thomas Weißschuh tests/ts/lsfd/column-name | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae20b7fb4c8f80948482dcd35b36b1200fd0d2ea Author: Thomas Weißschuh Date: Wed May 31 12:54:57 2023 +0200 blockdev: properly check for BLKGETZONESZ ioctl Signed-off-by: Thomas Weißschuh disk-utils/blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 754c030f29c891f46721120842aebd6b0ae38de7 Author: Thomas Weißschuh Date: Wed May 31 12:47:03 2023 +0200 blkzone: don't take address of struct blk_zone Older versions of GCC do not know the warning so they warn about the unknown ignored warning. As struct blk_zone is only 64 bytes anyway just copy it. Signed-off-by: Thomas Weißschuh sys-utils/blkzone.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 5c62c27001467f3ef0baaa66ae4e3bb80a0298a6 Author: Thorsten Kukuk Date: Wed May 31 09:00:09 2023 +0200 write: query logind for list of users with tty (#2088) term-utils/Makemodule.am | 4 ++ term-utils/write.c | 130 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 123 insertions(+), 11 deletions(-) commit e915e6baeba3cbce154336a4f1f24a8be93e85ae Author: Thorsten Kukuk Date: Wed May 31 08:57:01 2023 +0200 agetty: use sd_get_sessions() for number of users (#2088) term-utils/Makemodule.am | 4 ++++ term-utils/agetty.c | 28 ++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) commit 99e7f7101ab4b49438e28a7942e4562476bf8e41 Merge: edbd9ee56 84a8f5edb Author: Karel Zak Date: Wed May 31 11:03:07 2023 +0200 Merge branch 'pr/termtype' commit edbd9ee5628c96281d98df251096a3297bb82690 Merge: 142738e86 565eae0cf Author: Karel Zak Date: Wed May 31 09:35:05 2023 +0200 Merge branch 'patch-1' of https://github.com/theHenMan/util-linux * 'patch-1' of https://github.com/theHenMan/util-linux: Update fsck.8.adoc commit 142738e861f95199784592b96fad5ef8100a2057 Merge: 423bf01e7 9ff6f9d9a Author: Karel Zak Date: Wed May 31 09:30:31 2023 +0200 Merge branch 'enosys/compat' of https://github.com/t-8ch/util-linux * 'enosys/compat' of https://github.com/t-8ch/util-linux: test_enosys: fix build on old kernels commit 423bf01e7e9e2469088fd57fe5716cf2763463ca Merge: ddf41df9e efb18899d Author: Karel Zak Date: Wed May 31 09:28:33 2023 +0200 Merge branch 'patch-1' of https://github.com/nt8r/util-linux * 'patch-1' of https://github.com/nt8r/util-linux: dmesg: make kmsg read() buffer big enough for kernel commit ddf41df9e905954e9c58297e9f8d7f1b6b6dabdc Merge: 96c8ff27a 9bd0ed6fb Author: Karel Zak Date: Wed May 31 09:21:11 2023 +0200 Merge branch 'patch-2' of https://github.com/ThomasKaiser/util-linux * 'patch-2' of https://github.com/ThomasKaiser/util-linux: Fix Blizzard-M2-Max Add recent Apple ARM cores commit 84a8f5edb2b8eeb62273caf7da4ef85a6cfc3e20 Author: Karel Zak Date: Wed May 31 09:18:06 2023 +0200 ttyutils: improve get_terminal_default_type() code Signed-off-by: Karel Zak lib/ttyutils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 87fcd95ac5ad18e471b17f448daa55b2ce2fac6a Author: Thorsten Kukuk Date: Wed May 31 08:55:33 2023 +0200 wall: query logind for list of users with tty (#2088) configure.ac | 1 + meson.build | 9 ++++++++- term-utils/Makemodule.am | 4 ++++ term-utils/wall.c | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) commit 565eae0cf4f96e60881888e79cd6c66a19c5209c Author: Hennie Botha <42469385+theHenMan@users.noreply.github.com> Date: Wed May 31 08:45:25 2023 +0200 Update fsck.8.adoc Typo disk-utils/fsck.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff6f9d9ab2509f3a6fedb5bd9d575662dd47280 Author: Thomas Weißschuh Date: Tue May 30 20:01:49 2023 +0200 test_enosys: fix build on old kernels Fixes #2277 Signed-off-by: Thomas Weißschuh tests/functions.sh | 6 ++++++ tests/ts/misc/enosys | 5 +---- tests/ts/mount/fallback | 4 +--- 3 files changed, 8 insertions(+), 7 deletions(-) commit efb18899d23d8bbfa56f871c0d1fd44ac6bb838e Author: anteater <65555601+nt8r@users.noreply.github.com> Date: Mon May 29 20:59:11 2023 +0000 dmesg: make kmsg read() buffer big enough for kernel otherwise, if the kernel log has an item longer than 1024B, our read() gives EINVAL and we stop reading kmsg sys-utils/dmesg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0c7df652e24be85e49aa5931b27ba6d1382557a8 Author: Karel Zak Date: Mon May 29 15:11:48 2023 +0200 sulogin: use get_terminal_default_type() Let's reuse the way how agetty initializes $TERM. Signed-off-by: Karel Zak login-utils/sulogin.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 4869b259d68f65ea88df625ce8df9c0177d55a01 Author: Karel Zak Date: Mon May 29 15:11:13 2023 +0200 agetty: use get_terminal_default_type() Signed-off-by: Karel Zak term-utils/agetty.c | 61 ++++------------------------------------------------- 1 file changed, 4 insertions(+), 57 deletions(-) commit cba97be9fb9e5376c338c19de7d8267f055813e7 Author: Karel Zak Date: Mon May 29 15:10:24 2023 +0200 lib/ttyutils: add get_terminal_default_type() Based on code from agetty. Signed-off-by: Karel Zak include/ttyutils.h | 1 + lib/ttyutils.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 76 insertions(+), 5 deletions(-) commit 96c8ff27a4779f00955c1c264d43991f0ab77eba Merge: ac2fc8b44 2ed019053 Author: Karel Zak Date: Mon May 29 14:56:52 2023 +0200 Merge branch 'next' commit 9bd0ed6fbaa93c5ffacd3ad0444d22aa2a3736e2 Author: ThomasKaiser Date: Mon May 29 14:47:50 2023 +0200 Fix Blizzard-M2-Max sys-utils/lscpu-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e97637ec6fb01738933154e874a3daab5ffd06a0 Author: ThomasKaiser Date: Mon May 29 14:42:18 2023 +0200 Add recent Apple ARM cores sys-utils/lscpu-arm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ac2fc8b44275f1ba345c16d16607e5db2ef713e8 Merge: f271f09bd 36d4e61c6 Author: Karel Zak Date: Mon May 29 11:29:19 2023 +0200 Merge branch 'mount/ntfs-segfault' of https://github.com/t-8ch/util-linux * 'mount/ntfs-segfault' of https://github.com/t-8ch/util-linux: mount: (tests) test mount helper with multiple filesystems libmount: (tests) split helper tests commit f271f09bd6ab87042edcee6497b8b5eec836da10 Author: Masatake YAMATO Date: Sun May 28 12:28:13 2023 +0900 tests: (lsfd) add a case for testing EVENTPOLL.TFDS column Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-eventpoll | 2 ++ tests/ts/lsfd/mkfds-eventpoll | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit bf416aeca35a71adc2f2551d1b938a0ded230a2f Author: Masatake YAMATO Date: Sun May 28 03:20:37 2023 +0900 tests: (mkfds) add a factory to make an eventpoll fd Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 101 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) commit c2e2dd6008766945d5daf35f76bbef7c7edf4492 Author: Masatake YAMATO Date: Sun May 28 02:49:00 2023 +0900 lsfd: print file descriptors targeted by eventpoll files Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 6 +++ misc-utils/lsfd.c | 15 ++++--- misc-utils/lsfd.h | 7 +-- 4 files changed, 137 insertions(+), 9 deletions(-) commit 3062a58f0ba5fdebc0e06ece63f4ce5b676fcda0 Author: Masatake YAMATO Date: Sun May 28 12:34:21 2023 +0900 add the "x" wrapper for reallocarray(3) Signed-off-by: Masatake YAMATO include/xalloc.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 36d4e61c65b8978fadf71eef6d54d4f312c8af83 Author: Thomas Weißschuh Date: Thu May 25 07:22:34 2023 +0200 mount: (tests) test mount helper with multiple filesystems See #2267 Signed-off-by: Thomas Weißschuh tests/expected/mount/special-multi-types | 1 + tests/ts/mount/special | 4 ++++ 2 files changed, 5 insertions(+) commit 63d4806055caefc6942caae20ddf6dcb0197e99d Author: Thomas Weißschuh Date: Thu May 25 07:19:03 2023 +0200 libmount: (tests) split helper tests This splits the test introduced in commit 06e05eb0f785 ("libmount: don't pass option "defaults" to helper") into its own subtest. We will have more subtests. Signed-off-by: Thomas Weißschuh tests/expected/mount/special-basic | 1 + tests/expected/mount/{special => special-options} | 0 tests/ts/mount/special | 7 +++++++ 3 files changed, 8 insertions(+) commit f94a7760ed7ce81389a6059f020238981627a70d Author: Karel Zak Date: Thu May 25 11:48:24 2023 +0200 libmount: don't call hooks after mount. helper In case more filesystems are specified (or when libmount follows /{etc,proc}/filesystems) then the library may try to use and initialize the new API because for some filesystems, we need exec(/sbin/mount.) and for another fsopen(). The hooks that use the API have to smart and detect that the mount operation was done in external /sbin/mount. helper. And in this case, the new API file descriptors must be ignored. The exception is propagation flags, mount(8) can set the flags after exec(/sbin/mount.), for example, "mount -t ntfs --make-private". Fixes: https://github.com/util-linux/util-linux/issues/2267 Signed-off-by: Karel Zak libmount/src/context_mount.c | 2 ++ libmount/src/hook_mount.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) commit 12c616b02913ed22e919b3fcce7f1961f78dc60f Merge: 27675c5c6 c345a4002 Author: Karel Zak Date: Wed May 24 11:41:59 2023 +0200 Merge branch 'enosys/arch-check' of https://github.com/t-8ch/util-linux * 'enosys/arch-check' of https://github.com/t-8ch/util-linux: enosys: add support for loongarch enosys: only build if AUDIT_ARCH_NATIVE is defined meson: require 0.57 enosys: split audit arch detection into dedicated header enosys: add support for sparc commit 27675c5c62ed7cefdb6535f56dc1317f4541bee4 Merge: 9d48efbbe 24a10f06e Author: Karel Zak Date: Wed May 24 11:41:42 2023 +0200 Merge branch 'lsfd--sysvipc-shmem' of https://github.com/masatake/util-linux * 'lsfd--sysvipc-shmem' of https://github.com/masatake/util-linux: tests: (lsfd) add a case for testing SOURCE column for SysV shmem mappings tests: (mkfds) add a factory to make SysV shmem lsfd: add tmpfs as source of sysvipc to the the nodev_table lsfd: initialize pagesize in an earlier stage lsfd: add "nsfs" to the nodev_table to fill SOURCE column for nsfs files lsfd: add a helper function for adding a nodev to the nodev_table lsfd: add a whitespace lsfd: write more about nsfs in comment commit 24a10f06e91d7ae0c065eef258a5773dac9d8aa6 Author: Masatake YAMATO Date: Wed Apr 12 09:17:02 2023 +0900 tests: (lsfd) add a case for testing SOURCE column for SysV shmem mappings Signed-off-by: Masatake YAMATO .../lsfd/column-source-with-root-SysVIPC-shmem | 2 + tests/ts/lsfd/column-source-with-root | 43 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit c3f8cba1d4bc9970b8768e38520487bbef6a0a8f Author: Masatake YAMATO Date: Wed Apr 12 09:14:49 2023 +0900 tests: (mkfds) add a factory to make SysV shmem Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit de9ec7ee36f1fadd3f9c6a6800bd04dc9ff13324 Author: Masatake YAMATO Date: Wed Mar 22 01:15:37 2023 +0900 lsfd: add tmpfs as source of sysvipc to the the nodev_table Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit c1cb27357c2c970e518d37418a5961fff9e48ee8 Author: Masatake YAMATO Date: Wed Mar 22 01:03:22 2023 +0900 lsfd: initialize pagesize in an earlier stage Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 916b44a59a6d9cc2128ac378106da63b1c544ef7 Author: Masatake YAMATO Date: Wed Mar 22 01:22:18 2023 +0900 lsfd: add "nsfs" to the nodev_table to fill SOURCE column for nsfs files Signed-off-by: Masatake YAMATO misc-utils/lsfd-sock-xinfo.c | 4 ++ tests/expected/lsfd/column-source-namespace-ASSOC | 7 ++++ tests/ts/lsfd/column-source | 51 +++++++++++++++++++++++ 3 files changed, 62 insertions(+) commit d5ca01c0f40ac94a3995d0d63e05cf0d5ef82a8f Author: Masatake YAMATO Date: Tue Mar 21 02:19:11 2023 +0900 lsfd: add a helper function for adding a nodev to the nodev_table Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 16 +++++++++------- misc-utils/lsfd.h | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) commit ccd4e14285175237807fb86846c3b5d32cdf8d0b Author: Masatake YAMATO Date: Wed Mar 22 01:09:26 2023 +0900 lsfd: add a whitespace Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d28914938538b887f1a3e9b6c4d85277af462b1a Author: Masatake YAMATO Date: Wed May 24 00:49:24 2023 +0900 lsfd: write more about nsfs in comment Signed-off-by: Masatake YAMATO misc-utils/lsfd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c345a4002b56083469e320de76ae695006a2cf49 Author: Thomas Weißschuh Date: Tue May 23 16:34:47 2023 +0200 enosys: add support for loongarch Signed-off-by: Thomas Weißschuh include/audit-arch.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 3e0bbb1222139df70a01c31c5036a9569df4e0b4 Author: Thomas Weißschuh Date: Mon May 22 17:58:17 2023 +0200 enosys: only build if AUDIT_ARCH_NATIVE is defined Signed-off-by: Thomas Weißschuh configure.ac | 9 +++++++++ meson.build | 25 ++++++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) commit e2cd74462ea28928121535ff7dd1a13c28a79624 Author: Thomas Weißschuh Date: Tue May 23 16:32:23 2023 +0200 meson: require 0.57 It is needed for fs.read() Signed-off-by: Thomas Weißschuh libmount/meson.build | 2 +- meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 29e3f73784f6415ff1de21462390d8d0d3e5b3d7 Author: Thomas Weißschuh Date: Mon May 22 17:25:15 2023 +0200 enosys: split audit arch detection into dedicated header Signed-off-by: Thomas Weißschuh include/Makemodule.am | 1 + include/audit-arch.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/enosys.c | 49 +------------------------------------------ 3 files changed, 60 insertions(+), 48 deletions(-) commit fc5018e8011d2fadb720253b3932454ca3baa152 Author: Thomas Weißschuh Date: Mon May 22 17:21:26 2023 +0200 enosys: add support for sparc Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9d48efbbe75d2f95be202a8345dba61b0831d1db Author: Thomas Weißschuh Date: Tue May 23 14:27:25 2023 +0200 lsfd: (tests) don't run mqueue test on byteorder mismatch Signed-off-by: Thomas Weißschuh tests/ts/lsfd/mkfds-mqueue | 1 + 1 file changed, 1 insertion(+) commit ffdd75cceedafac3ba7a80b86e1b103c383b260e Author: Thomas Weißschuh Date: Mon May 22 18:24:47 2023 +0200 waitpid: only build when pidfd_open is available Fixes #2256 [kzak@redhat.com: - fix UL_BUILD_INIT() use] Signed-off-by: Thomas Weißschuh Signed-off-by: Karel Zak configure.ac | 1 + meson.build | 1 + 2 files changed, 2 insertions(+) commit fb889bab8bd1168bf8a5f1a51ba5c8200d2e19c9 Merge: c733db611 f6fb7fa71 Author: Karel Zak Date: Tue May 23 12:18:00 2023 +0200 Merge branch 'meson' of https://github.com/eworm-de/util-linux * 'meson' of https://github.com/eworm-de/util-linux: meson: install symlink for vigr man page meson: include bash-completion for write meson: include bash-completion for newgrp commit c733db61140fd51445aa6654274342c468373bc6 Merge: 3429accb6 d6850a761 Author: Karel Zak Date: Tue May 23 12:17:18 2023 +0200 Merge branch 'lsfd--mqueue' of https://github.com/masatake/util-linux * 'lsfd--mqueue' of https://github.com/masatake/util-linux: tests: (lsfd) add cases for POSIX Mqueue tests: (mkfds) add mqueue factory lsfd: fill ENDPOINTS column of POSIX Mqueue lsfd: add a new type "mqueue", a type for POSIX Mqueue commit 3429accb62ea1c2e9d587f1022f28c824c106594 Merge: 54e94f866 51a97767d Author: Karel Zak Date: Tue May 23 12:16:31 2023 +0200 Merge branch 'agetty/fileutils' of https://github.com/t-8ch/util-linux * 'agetty/fileutils' of https://github.com/t-8ch/util-linux: agetty: include fileutils.h commit f6fb7fa71390e7b6eeae75dcb66c6523c46fa22f Author: Christian Hesse Date: Mon May 22 16:11:18 2023 +0200 meson: install symlink for vigr man page meson.build | 3 +++ 1 file changed, 3 insertions(+) commit e1cd4002c8d1811cccffdcc521fe1581f2749c16 Author: Christian Hesse Date: Mon May 22 15:57:35 2023 +0200 meson: include bash-completion for write meson.build | 1 + 1 file changed, 1 insertion(+) commit f265b43296f12fc8f03999d091212442ffe457d3 Author: Christian Hesse Date: Mon May 22 15:56:28 2023 +0200 meson: include bash-completion for newgrp meson.build | 1 + 1 file changed, 1 insertion(+) commit 54e94f86694b7d25c313d4cec3c6438044d52c00 Author: Karel Zak Date: Tue May 23 12:13:02 2023 +0200 libmount: cleanup enosys returns from mount hoop Signed-off-by: Karel Zak libmount/src/hook_mount.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 99550bf5aa6d8d0193c2e253e5fb182f048d0c95 Merge: 9105d3cdd 1bd85b646 Author: Karel Zak Date: Tue May 23 12:06:36 2023 +0200 Merge branch 'libmount/mount_setattr' of https://github.com/t-8ch/util-linux * 'libmount/mount_setattr' of https://github.com/t-8ch/util-linux: libmount: check for availability of mount_setattr commit 9105d3cdd819a499f5029d1009952acf6f51b7d9 Author: Karel Zak Date: Tue May 23 11:34:19 2023 +0200 fstab: add hint about systemd reload Signed-off-by: Karel Zak sys-utils/fstab.5.adoc | 2 ++ 1 file changed, 2 insertions(+) commit a5eba5046da6893e360b2e3e1193d1583d25e12c Author: Karel Zak Date: Tue May 23 10:47:18 2023 +0200 mount: improve code readability Static analyzers (e.g., Coverity) have a hard time understanding why 'optarg' is tested for NULL, and later in another place, code assumes that it's non-NULL. For idmapping, the optarg is required. Signed-off-by: Karel Zak sys-utils/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5e0e06cc2ff05f01a3fcf799a5f2c2fe6fb217f Author: Karel Zak Date: Tue May 23 10:43:59 2023 +0200 login: fix memory leak [coverity scan] Let's use ul_path_read_buffer() to avoid memory allocation. Signed-off-by: Karel Zak login-utils/login.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit fe0b1e793c9017edba72768e2e0b4c769c204604 Author: Karel Zak Date: Mon May 22 17:26:55 2023 +0200 libmount: don't call mount. helper with usernames This is v2.39 regression. The "user" mount option is internally converted to "user=", but this should not be exported to the mount helpers. The mount helper accepts the only if specified in mount options (cifs uses user=). The real username as generated by libmount is not relevant in this case. Signed-off-by: Karel Zak libmount/src/context_mount.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 51a97767db9f1f66c2dadcbc68de8f192692ea82 Author: Thomas Weißschuh Date: Mon May 22 17:11:17 2023 +0200 agetty: include fileutils.h It is needed to access xreaddir() Signed-off-by: Thomas Weißschuh term-utils/agetty.c | 1 + 1 file changed, 1 insertion(+) commit d6850a761176a3f8f5adec01f10e6a807608f66b Author: Masatake YAMATO Date: Sun Mar 12 00:53:57 2023 +0900 tests: (lsfd) add cases for POSIX Mqueue Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-mqueue | 8 ++++ tests/ts/lsfd/mkfds-mqueue | 81 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit 330555c481b2f81195b76867b1415482cbe7bb8b Author: Masatake YAMATO Date: Sun Mar 12 00:24:02 2023 +0900 tests: (mkfds) add mqueue factory Signed-off-by: Masatake YAMATO configure.ac | 3 + meson.build | 5 +- tests/helpers/Makemodule.am | 1 + tests/helpers/test_mkfds.c | 194 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 202 insertions(+), 1 deletion(-) commit 29bcb60ee65f9c94cbcac3822778e4b3c894388f Author: Masatake YAMATO Date: Tue Mar 7 01:32:01 2023 +0900 lsfd: fill ENDPOINTS column of POSIX Mqueue Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++- misc-utils/lsfd.1.adoc | 1 + 2 files changed, 86 insertions(+), 1 deletion(-) commit e2d6f5e30e34fe54c9a54eb6f1d9d01b6723068a Author: Karel Zak Date: Mon May 22 15:40:38 2023 +0200 tests: add optlist tests Signed-off-by: Karel Zak tests/commands.sh | 1 + tests/expected/libmount/optlist-append | 5 ++ tests/expected/libmount/optlist-append-empty-value | 4 ++ tests/expected/libmount/optlist-append-value | 4 ++ tests/expected/libmount/optlist-get | 4 ++ tests/expected/libmount/optlist-get-flg-linux | 1 + tests/expected/libmount/optlist-get-flg-user | 1 + tests/expected/libmount/optlist-get-str | 4 ++ tests/expected/libmount/optlist-get-str-linux | 5 ++ tests/expected/libmount/optlist-get-str-user | 5 ++ tests/expected/libmount/optlist-get-value | 4 ++ tests/expected/libmount/optlist-prepend | 4 ++ .../expected/libmount/optlist-prepend-empty-value | 4 ++ tests/expected/libmount/optlist-prepend-list | 6 ++ tests/expected/libmount/optlist-prepend-value | 4 ++ tests/expected/libmount/optlist-remove | 12 ++++ tests/expected/libmount/optlist-remove-empty-value | 12 ++++ tests/expected/libmount/optlist-remove-quoted | 12 ++++ tests/expected/libmount/optlist-remove-value | 12 ++++ tests/expected/libmount/optlist-set | 4 ++ tests/expected/libmount/optlist-set-empty | 1 + tests/expected/libmount/optlist-set-large | 1 + tests/expected/libmount/optlist-set-new | 1 + tests/expected/libmount/optlist-set-new-empty | 1 + tests/expected/libmount/optlist-set-new-end | 1 + tests/expected/libmount/optlist-set-new-end-empty | 1 + tests/expected/libmount/optlist-set-remove | 1 + tests/expected/libmount/optlist-set-small | 1 + tests/expected/libmount/optstr-prepend-list | 1 + tests/ts/libmount/optlist | 67 ++++++++++++++++++++++ tests/ts/libmount/optstr | 8 ++- 31 files changed, 190 insertions(+), 2 deletions(-) commit ad0569880f7753a38cf222ff33d2dda5bdc61e56 Author: Masatake YAMATO Date: Mon Mar 6 04:05:03 2023 +0900 lsfd: add a new type "mqueue", a type for POSIX Mqueue Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 35 +++++++++++++++++++++++++++++++++++ misc-utils/lsfd.c | 3 +++ misc-utils/lsfd.h | 8 +++++++- 3 files changed, 45 insertions(+), 1 deletion(-) commit c0267687fd7b41b00d523d1985182d7eb574effd Author: Karel Zak Date: Mon May 22 15:00:25 2023 +0200 libmount: fix options prepend/insert and merging * the order of the new options should not be changed (for example prepend "a,b,c" to list with "d" has to generate "a,b,c,d", not "c,b,a,d") * make sure that options map is defined when merging options Fixes: https://github.com/util-linux/util-linux/issues/2238 Signed-off-by: Karel Zak libmount/src/optlist.c | 5 +++++ 1 file changed, 5 insertions(+) commit 096800a0df9d98c9ab6f0fe0dbe221e0ea7d26d2 Merge: 59dc32356 1bf9c6915 Author: Karel Zak Date: Mon May 22 13:42:48 2023 +0200 Merge branch 'agetty-creds' of https://github.com/DaanDeMeyer/util-linux * 'agetty-creds' of https://github.com/DaanDeMeyer/util-linux: Document new systemd credentials support for agetty and login login: Initialize noauth from login.noauth credential agetty: Load autologin user from agetty.autologin credential commit 59dc323560851c5c128361026e4189640f70e612 Merge: 518026915 a61bbb370 Author: Karel Zak Date: Mon May 22 13:36:37 2023 +0200 Merge branch 'map-users' of https://github.com/arachsys-prs/util-linux * 'map-users' of https://github.com/arachsys-prs/util-linux: mount: add --map-users and --map-groups convenience options commit 518026915baf63b0b6f911d2e2d97e2569fbff01 Merge: f1cd43964 5f7c4093e Author: Karel Zak Date: Mon May 22 13:32:53 2023 +0200 Merge branch 'ci/openwrt' of https://github.com/t-8ch/util-linux * 'ci/openwrt' of https://github.com/t-8ch/util-linux: ci: add OpenWrt SDK based CI jobs enosys: provide a nicer build message for syscalls.h generation libsmartcols: (samples): fix format truncation warning test_uuidd: make pthread_t formatting more robust mkfs.minix: handle 64bit time on 32bit system enosys: add support for MIPS, PowerPC and ARC enosys: include sys/syscall.h commit f1cd43964d28b8c0bccd4ff65bc8f81005a6fabc Merge: c8ecfe1e3 ced82526a Author: Karel Zak Date: Mon May 22 13:10:31 2023 +0200 Merge branch 'enosys/speculation' of https://github.com/t-8ch/util-linux commit c8ecfe1e3942599120e4ec8b87ea8655ea12a1e9 Merge: 004519300 1808882ad Author: Karel Zak Date: Mon May 22 13:09:28 2023 +0200 Merge branch 'enosys/mips' of https://github.com/t-8ch/util-linux * 'enosys/mips' of https://github.com/t-8ch/util-linux: enosys: add support for MIPS, PowerPC and ARC commit 00451930057837fbfbfc11dc624778f869410be9 Merge: 3dae5ca16 c0f31b79f Author: Karel Zak Date: Mon May 22 13:06:44 2023 +0200 Merge branch 'fadvise/big-page' of https://github.com/t-8ch/util-linux * 'fadvise/big-page' of https://github.com/t-8ch/util-linux: fadvise: (test) test with 64k blocks fadvise: (test) don't compare fincore page counts fadvise: (tests) factor out calls to "fincore" fadvise: (test) dynamically calculate expected test values commit 3dae5ca16a687e448ede92edd8423513e1f354ce Merge: e20944db4 47035719f Author: Karel Zak Date: Mon May 22 13:04:08 2023 +0200 Merge branch 'test--fix-process-leak' of https://github.com/masatake/util-linux * 'test--fix-process-leak' of https://github.com/masatake/util-linux: lsfd: (tests) fix process leak commit e20944db447c9ba1c9ad5806abb58ec6d8ef2236 Merge: b39f5764b 6c1bd545c Author: Karel Zak Date: Mon May 22 13:01:58 2023 +0200 Merge branch 'enosys/include' of https://github.com/t-8ch/util-linux * 'enosys/include' of https://github.com/t-8ch/util-linux: enosys: include sys/syscall.h commit b39f5764b9c4514d8a33984edb5c72f6fad81b53 Merge: 392d864b7 7eba8f98b Author: Karel Zak Date: Mon May 22 13:00:04 2023 +0200 Merge branch 'libblkid/const' of https://github.com/t-8ch/util-linux * 'libblkid/const' of https://github.com/t-8ch/util-linux: libblkid: constify cached disk data commit 392d864b75d7b64678cab20c74ce0dba28b374e5 Author: Karel Zak Date: Mon May 22 12:45:06 2023 +0200 lib/shells: remove space after function name Cats and ponies die when they see a space after a function name ... Signed-off-by: Karel Zak lib/shells.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f644f33089bc63f1d4ab1d6fcb910660c8ab273f Author: Karel Zak Date: Mon May 22 12:43:53 2023 +0200 lib/shells: initialize free-able variables Signed-off-by: Karel Zak lib/shells.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8128908d32002ada2e38aa304f5e535daeb4e2fa Merge: ccd06765c b83e58a55 Author: Karel Zak Date: Mon May 22 12:42:13 2023 +0200 Merge branch 'econf' of https://github.com/stoeckmann/util-linux * 'econf' of https://github.com/stoeckmann/util-linux: lib/shells: Plug econf memory leak commit ccd06765cee5f33114662dfb7955984a141922c2 Merge: cc665f33f babcf0896 Author: Karel Zak Date: Mon May 22 12:39:59 2023 +0200 Merge branch 'lsfd--eventfd' of https://github.com/masatake/util-linux * 'lsfd--eventfd' of https://github.com/masatake/util-linux: test_mkfds: avoid "ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’" tests: (lsfd) add cases for eventfd tests: (mkfds) add eventfd factory tests: (mkfds) provide the way to declare the number of extra printing values tests: (mkfds) print a whitespace only when the running factory has "report" method lsfd: fill ENDPOINTS column for eventfd lsfd: add a helper macro, foreach_endpoint lsfd: add a helper function, init_endpoint lsfd: add a helper function, add_endpoint lsfd: add a helper function, new_ipc lsfd: add a back pointer as a member of anon_eventfd_data lsfd: move a local variable to a narrower scope lsfd: add EVENTFD.ID column lsfd: delete redundant parentheses surrounding return value ldfd: delete unnecessary ';' lsfd: choose anon_ops declarative way commit cc665f33f47345fe5df50d998f1d857c53463ac0 Merge: 8a5308278 42de8aba2 Author: Karel Zak Date: Mon May 22 12:36:45 2023 +0200 Merge branch 'hexdump-one-byte-hex' of https://github.com/tpwo/util-linux * 'hexdump-one-byte-hex' of https://github.com/tpwo/util-linux: hexdump: add new format-strings test case hexdump: add '--one-byte-hex' format option commit 8a53082787f2c4bdce253a4af0896929e7373710 Merge: 06e05eb0f c0d75916b Author: Karel Zak Date: Mon May 22 12:32:07 2023 +0200 Merge branch 'allow-disabling-waitpid' of https://github.com/mrc0mmand/util-linux * 'allow-disabling-waitpid' of https://github.com/mrc0mmand/util-linux: build-sys: add --disable-waitpid commit ced82526a1a88177d6a4d9ab2a05eda9e3aff468 Author: Thomas Weißschuh Date: Mon May 22 09:56:06 2023 +0200 enosys: allow CPU speculation enosys is not a security tool so we can allow the CPU to speculate. Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 1bd85b64632280d6bf0e86b4ff29da8b19321c5f Author: Thomas Weißschuh Date: Sat May 20 06:38:20 2023 +0200 libmount: check for availability of mount_setattr If mount_setattr is not available but needed fall back to the legacy mount API. Fixes #2247 Signed-off-by: Thomas Weißschuh libmount/src/hook_mount.c | 23 +++++++++++++++++++++-- tests/expected/mount/fallback-mount_setattr | 1 + tests/ts/mount/fallback | 16 ++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) commit 47035719fc356bb50f8304a1ae78a3361135be4b Author: Masatake YAMATO Date: Sat May 20 00:29:39 2023 +0900 lsfd: (tests) fix process leak Unifying multiple invocations of kill command and wait command into two is suggested by Thomas Weißschuh . Addresses: https://lore.kernel.org/util-linux/652d32c5-4b33-ce3a-3de7-9ebc064bbdcb@gmail.com/ Reported-by: Bruce Dubbs Tested-by: Bruce Dubbs Signed-off-by: Masatake YAMATO tests/ts/lsfd/option-inet | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c0f31b79f5d1c665cdc057fb32f4d161d28aa5b2 Author: Thomas Weißschuh Date: Sun May 21 21:45:10 2023 +0200 fadvise: (test) test with 64k blocks This will allow the tests to also pass on systems with 64k pagesizes. Closes #2249 Signed-off-by: Thomas Weißschuh tests/expected/fadvise/drop | 26 +++++++++++++------------- tests/ts/fadvise/drop | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) commit 33980996d0b429fc59c40f8352633c0a21a0f96a Author: Thomas Weißschuh Date: Sun May 21 21:44:20 2023 +0200 fadvise: (test) don't compare fincore page counts These depend on the machines pagesize and are therefore not a good comparision. Signed-off-by: Thomas Weißschuh tests/expected/fadvise/drop | 20 ++++++++++---------- tests/ts/fadvise/drop | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) commit e5009e773fc801eca887dd43b721cd1b1aa327be Author: Thomas Weißschuh Date: Sun May 21 21:43:38 2023 +0200 fadvise: (tests) factor out calls to "fincore" This will make it easier to pass argument later. Signed-off-by: Thomas Weißschuh tests/ts/fadvise/drop | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 8b36444f447949c3ab477f2c43b45a94c30ee7bf Author: Thomas Weißschuh Date: Sun May 21 21:42:14 2023 +0200 fadvise: (test) dynamically calculate expected test values Signed-off-by: Thomas Weißschuh tests/ts/fadvise/drop | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 06e05eb0f78566b68c44328c37d7c28d8655e9df Author: Thomas Weißschuh Date: Sun May 21 19:58:47 2023 +0200 libmount: don't pass option "defaults" to helper "defaults" is only a pseudo-option that expands to other options. It should not be passed to helpers. Reported-by: Quentin Rameau Closes: https://lore.kernel.org/util-linux/20230521181814.0b0f2d38.quinq@fifth.space/ Signed-off-by: Thomas Weißschuh libmount/src/optmap.c | 2 +- tests/expected/mount/special | 2 +- tests/ts/mount/special | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5f7c4093e2ff5fc79e70036d9db9b24e7c54c8c3 Author: Thomas Weißschuh Date: Fri May 19 11:38:18 2023 +0200 ci: add OpenWrt SDK based CI jobs This allows testing some more exotic architectures and libcs. Signed-off-by: Thomas Weißschuh .github/workflows/cibuild-setup-ubuntu.sh | 4 ++- .github/workflows/cibuild.sh | 4 +++ .github/workflows/cibuild.yml | 48 +++++++++++++++++++++++++++++++ .github/workflows/openwrt-sdk-env.sh | 17 +++++++++++ 4 files changed, 72 insertions(+), 1 deletion(-) commit 9b1cf2bc69e7400825c735d8551694a6313cc274 Author: Thomas Weißschuh Date: Fri May 19 16:29:23 2023 +0200 enosys: provide a nicer build message for syscalls.h generation Signed-off-by: Thomas Weißschuh misc-utils/Makemodule.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d36705f402989156bb7eede7ecf3d64ddcfd20a6 Author: Thomas Weißschuh Date: Fri May 19 17:34:00 2023 +0200 libsmartcols: (samples): fix format truncation warning As this is only an example and the needed memory is not much just hardcode a large enough number. The previously computed value was wrong anyways. libsmartcols/samples/continuous.c: In function 'main': libsmartcols/samples/continuous.c:110:61: error: '%3d' directive output may be truncated writing between 3 and 11 bytes into a region of size between 0 and 7 [-Werror=format-truncation=] 110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff, | ^~~ libsmartcols/samples/continuous.c:110:25: note: 'snprintf' output between 11 and 333 bytes into a destination of size 12 110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 111 | done ? 100 : (int)(diff / (TIME_PERIOD / 100.0))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libsmartcols/samples/continuous.c:110:61: error: '%3d' directive output may be truncated writing 3 bytes into a region of size between 0 and 7 [-Werror=format-truncation=] 110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff, | ^~~ libsmartcols/samples/continuous.c:110:25: note: 'snprintf' output between 11 and 325 bytes into a destination of size 12 110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 111 | done ? 100 : (int)(diff / (TIME_PERIOD / 100.0))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Thomas Weißschuh libsmartcols/samples/continuous.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf652a72780452f67e39c584f3cd83c891cd0e33 Author: Thomas Weißschuh Date: Fri May 19 16:47:48 2023 +0200 test_uuidd: make pthread_t formatting more robust On musl pthread_t is a pointer. To avoid compiler warnings on 32bit systems add a cast through intptr_t. Signed-off-by: Thomas Weißschuh misc-utils/test_uuidd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c24960236868c267b8cee674283a4e87f51c54e6 Author: Thomas Weißschuh Date: Fri May 19 16:47:22 2023 +0200 mkfs.minix: handle 64bit time on 32bit system Signed-off-by: Thomas Weißschuh disk-utils/mkfs.minix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c9d03e0643ae5881f6f788f22af2a5f5d5fc207 Author: Thomas Weißschuh Date: Wed May 17 17:00:31 2023 +0200 enosys: add support for MIPS, PowerPC and ARC Co-developed-by: Hauke Mertens Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 43d4d1cc1debb3f485ae8c2234fd1361e8cb7fd7 Author: Thomas Weißschuh Date: Fri May 19 10:51:25 2023 +0200 enosys: include sys/syscall.h Otherwise there is no guarantee that all syscall numbers detected by tools/all_syscalls are actually available to enosys.c. Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 1 + 1 file changed, 1 insertion(+) commit 6c1bd545cb40ee35abbc1812a982a08413a8c05f Author: Thomas Weißschuh Date: Fri May 19 10:51:25 2023 +0200 enosys: include sys/syscall.h Otherwise there is no guarantee that all syscall numbers detected by tools/all_syscalls are actually available to enosys.c. Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 1 + 1 file changed, 1 insertion(+) commit 1808882ad3670c0010c049a1160a68e16137b949 Author: Thomas Weißschuh Date: Wed May 17 17:00:31 2023 +0200 enosys: add support for MIPS, PowerPC and ARC Co-developed-by: Hauke Mertens Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7eba8f98bdc3ed9c0ef1c8527aa61e1a3656449c Author: Thomas Weißschuh Date: Thu May 18 22:37:10 2023 +0200 libblkid: constify cached disk data The data returned from blkid_probe_get_buffer() and friends may or may not be cached between different calls. If one copy is modified this may not be visible in other copies. This issue can be avoided by making any modification illegal. See also #2165 Signed-off-by: Thomas Weißschuh include/pt-mbr.h | 6 +++--- libblkid/src/blkidP.h | 6 +++--- libblkid/src/partitions/bsd.c | 2 +- libblkid/src/partitions/dos.c | 14 +++++++------- libblkid/src/partitions/gpt.c | 6 +++--- libblkid/src/partitions/mac.c | 2 +- libblkid/src/partitions/minix.c | 4 ++-- libblkid/src/partitions/ultrix.c | 6 +++--- libblkid/src/probe.c | 8 ++++---- libblkid/src/superblocks/bcache.c | 14 +++++++------- libblkid/src/superblocks/befs.c | 6 +++--- libblkid/src/superblocks/cramfs.c | 7 ++++--- libblkid/src/superblocks/ddf_raid.c | 2 +- libblkid/src/superblocks/erofs.c | 2 +- libblkid/src/superblocks/exfat.c | 4 ++-- libblkid/src/superblocks/f2fs.c | 4 ++-- libblkid/src/superblocks/hfs.c | 14 +++++++------- libblkid/src/superblocks/iso9660.c | 2 +- libblkid/src/superblocks/linux_raid.c | 7 +++---- libblkid/src/superblocks/lvm.c | 2 +- libblkid/src/superblocks/minix.c | 2 +- libblkid/src/superblocks/ntfs.c | 6 +++--- libblkid/src/superblocks/ocfs.c | 2 +- libblkid/src/superblocks/romfs.c | 2 +- libblkid/src/superblocks/stratis.c | 4 ++-- libblkid/src/superblocks/swap.c | 2 +- libblkid/src/superblocks/vfat.c | 2 +- libblkid/src/superblocks/vmfs.c | 2 +- libblkid/src/superblocks/xfs.c | 4 ++-- libblkid/src/superblocks/zfs.c | 28 ++++++++++++++-------------- libfdisk/src/dos.c | 2 +- 31 files changed, 87 insertions(+), 87 deletions(-) commit babcf0896c64e4c947fb5fe23e9b1b3b59a912e7 Author: Masatake YAMATO Date: Fri May 19 00:14:21 2023 +0900 test_mkfds: avoid "ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’" Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 821efb4f6fcd3a7e2a8b54c466307a04a2675522 Author: Masatake YAMATO Date: Sat Mar 11 14:42:59 2023 +0900 tests: (lsfd) add cases for eventfd Signed-off-by: Masatake YAMATO tests/expected/lsfd/mkfds-eventfd | 12 +++++ tests/ts/lsfd/mkfds-eventfd | 104 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) commit 5ba67aeabd081185c7746132c4960f6c607f3539 Author: Masatake YAMATO Date: Mon Mar 6 03:04:13 2023 +0900 tests: (mkfds) add eventfd factory Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 137 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) commit 26406d1a72e2df26ef66b56c0e373f45b7d7a279 Author: Masatake YAMATO Date: Wed Mar 8 21:51:08 2023 +0900 tests: (mkfds) provide the way to declare the number of extra printing values Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 90317e2a12d33ac73d69bbd9e7a56815de88572f Author: Masatake YAMATO Date: Tue Mar 7 23:09:32 2023 +0900 tests: (mkfds) print a whitespace only when the running factory has "report" method Signed-off-by: Masatake YAMATO tests/helpers/test_mkfds.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d4fea4d089f4ae2e9cb6e73987dfff2269a86b2e Author: Masatake YAMATO Date: Sat Mar 4 14:38:57 2023 +0900 lsfd: fill ENDPOINTS column for eventfd An example output: $ ./lsfd -Q '(TYPE == "eventfd") and (ENDPOINTS =~ ".+") ' -o+ENDPOINTS COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME ENDPOINTS pipewire 17251 jet 40 rw- eventfd anon_inodefs 15 1060 id=818 17255,pipewire-pulse,26 pipewire 17251 jet 52 rw- eventfd anon_inodefs 15 1060 id=695 17255,pipewire-pulse,30 17255,pipewire-pulse,37 17255,pipewire-pulse,49 pipewire 17251 jet 54 rw- eventfd anon_inodefs 15 1060 id=845 17255,pipewire-pulse,31 pipewire 17251 jet 61 rw- eventfd anon_inodefs 15 1060 id=212 17255,pipewire-pulse,45 pipewire 17251 jet 62 rw- eventfd anon_inodefs 15 1060 id=224 17255,pipewire-pulse,46 pipewire-pulse 17255 jet 26 rw- eventfd anon_inodefs 15 1060 id=818 17251,pipewire,40 pipewire-pulse 17255 jet 30 rw- eventfd anon_inodefs 15 1060 id=695 17251,pipewire,52 17255,pipewire-pulse,37 17255,pipewire-pulse,49 pipewire-pulse 17255 jet 31 rw- eventfd anon_inodefs 15 1060 id=845 17251,pipewire,54 pipewire-pulse 17255 jet 37 rw- eventfd anon_inodefs 15 1060 id=695 17251,pipewire,52 17255,pipewire-pulse,30 17255,pipewire-pulse,49 pipewire-pulse 17255 jet 45 rw- eventfd anon_inodefs 15 1060 id=212 17251,pipewire,61 pipewire-pulse 17255 jet 46 rw- eventfd anon_inodefs 15 1060 id=224 17251,pipewire,62 pipewire-pulse 17255 jet 49 rw- eventfd anon_inodefs 15 1060 id=695 17251,pipewire,52 17255,pipewire-pulse,30 17255,pipewire-pulse,37 Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++- misc-utils/lsfd.1.adoc | 13 ++++--- 2 files changed, 108 insertions(+), 7 deletions(-) commit e62d5873342820f307353178cd976b37f03b215c Author: Masatake YAMATO Date: Sat Mar 4 14:51:33 2023 +0900 lsfd: add a helper macro, foreach_endpoint Signed-off-by: Masatake YAMATO misc-utils/lsfd-fifo.c | 2 +- misc-utils/lsfd.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit f9263edc9b3fa3212aaa1d547db44e03400819cd Author: Masatake YAMATO Date: Sat Mar 4 14:25:20 2023 +0900 lsfd: add a helper function, init_endpoint Signed-off-by: Masatake YAMATO misc-utils/lsfd-fifo.c | 2 +- misc-utils/lsfd.c | 5 +++++ misc-utils/lsfd.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 1c2ab17ecd59031ebd6489f4f7a3578db634b117 Author: Masatake YAMATO Date: Sat Mar 4 14:16:44 2023 +0900 lsfd: add a helper function, add_endpoint Signed-off-by: Masatake YAMATO misc-utils/lsfd-fifo.c | 3 +-- misc-utils/lsfd.c | 6 ++++++ misc-utils/lsfd.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) commit 79ec864eaa70bf49687183fb17daeae543ceaa1b Author: Masatake YAMATO Date: Sat Mar 4 13:37:20 2023 +0900 lsfd: add a helper function, new_ipc Signed-off-by: Masatake YAMATO misc-utils/lsfd-fifo.c | 6 ++---- misc-utils/lsfd.c | 9 +++++++++ misc-utils/lsfd.h | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) commit e283500c05759f1b9a9c133820c3379006896a39 Author: Masatake YAMATO Date: Sat Mar 4 03:21:33 2023 +0900 lsfd: add a back pointer as a member of anon_eventfd_data Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 2 ++ 1 file changed, 2 insertions(+) commit 55c857ae098d93599124d2839081a531119f5ff6 Author: Masatake YAMATO Date: Sat Mar 4 03:17:58 2023 +0900 lsfd: move a local variable to a narrower scope Signed-off-by: Masatake YAMATO misc-utils/lsfd-fifo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c2ca9c973d5ee15cd7e21e1ef484569e2829e75 Author: Masatake YAMATO Date: Sat Mar 4 02:28:04 2023 +0900 lsfd: add EVENTFD.ID column The files under of /proc/$pid/fdinfo/* provide IDs for eventfd files. With this change, lsfd extacts the IDs. All eventfd files share the same inode. So the IDs are useful to distinguish two different envetfds. An example output: $ ./lsfd -Q '(TYPE == "eventfd")' -o+EVENTFD.ID | head COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME EVENTFD.ID gnome-session-b 17113 jet 3 rw- eventfd anon_inodefs 15 1060 id=43 43 gnome-session-b 17113 jet 4 rw- eventfd anon_inodefs 15 1060 id=44 44 gnome-session-b 17113 jet 6 rw- eventfd anon_inodefs 15 1060 id=158 158 gnome-session-b 17113 jet 8 rw- eventfd anon_inodefs 15 1060 id=167 167 at-spi-bus-laun 17160 jet 3 rw- eventfd anon_inodefs 15 1060 id=341 341 at-spi-bus-laun 17160 jet 4 rw- eventfd anon_inodefs 15 1060 id=342 342 at-spi-bus-laun 17160 jet 5 rw- eventfd anon_inodefs 15 1060 id=343 343 at-spi-bus-laun 17160 jet 9 rw- eventfd anon_inodefs 15 1060 id=344 344 gvfsd 17169 jet 3 rw- eventfd anon_inodefs 15 1060 id=369 369 Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsfd.1.adoc | 6 ++++ misc-utils/lsfd.c | 3 ++ misc-utils/lsfd.h | 1 + 4 files changed, 84 insertions(+) commit 4a3d70fed367b98d3c176531702bd2ecef904937 Author: Masatake YAMATO Date: Fri Mar 10 15:10:11 2023 +0900 lsfd: delete redundant parentheses surrounding return value Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e83b1fc6fa3f2efb26a82a47503096d9362fb35 Author: Masatake YAMATO Date: Sat Mar 4 02:09:12 2023 +0900 ldfd: delete unnecessary ';' Signed-off-by: Masatake YAMATO misc-utils/lsfd-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 007e405b1e75e1dfbb69c43df8cefb9d3c2f9272 Author: Masatake YAMATO Date: Sat Mar 4 00:28:37 2023 +0900 lsfd: choose anon_ops declarative way Signed-off-by: Masatake YAMATO misc-utils/lsfd-unkn.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit c0d75916b64351133e63e62c6fed7156fe043629 Author: Frantisek Sumsal Date: Thu May 18 18:56:15 2023 +0200 build-sys: add --disable-waitpid The new pidfd stuff waitpid uses is not compatible with older kernel headers, but the rest of the util-linux is still perfectly fine, so allow disabling just the waitpid utility to make the builds happy again. configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b83e58a55ce4ac0f2e9b613f53eccde4bce09ff7 Author: Tobias Stoeckmann Date: Thu May 18 17:48:46 2023 +0200 lib/shells: Plug econf memory leak You can see the memory leak with address sanitizer if util-linux is compiled with `--with-vendordir=/usr/etc`. How to reproduce: 1. Prepare a custom shell file as root ``` mkdir -p /etc/shells.d echo /bin/myshell > /etc/shells.d/custom ``` 2. Run chsh as regular user ``` chsh ``` Signed-off-by: Tobias Stoeckmann lib/shells.c | 1 + 1 file changed, 1 insertion(+) commit 01a0a556018694bfaf6b01a5a40f8d0d10641a1f Author: Karel Zak Date: Thu May 18 10:26:02 2023 +0200 lib/caputils: fix integer handling issues [coverity scan] Signed-off-by: Karel Zak lib/caputils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03a8f430c53a4bd6f8ac7d633efdb7216c3a6185 Author: наб Date: Mon May 15 01:19:58 2023 +0200 mesg.1 cleanups/updates First hunk: grammar. Second hunk: (a) mentioning BSD ptys and not UNIX98 ones is odd, (b) mentioning /only/ ptys is odder still. Third hunk: mesg is found in the UNIX Programmer's Manual; it takes its modern form in V7 (it's unclear to me why V6 specifically is mentioned, since it's still default-invert + always-report-"was X"). term-utils/mesg.1.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a82df27f5d900c5e905fa2d6bb55751cfdff7c9a Merge: d3edf0f8d 5b175fa9f Author: Karel Zak Date: Wed May 17 13:43:40 2023 +0200 Merge branch 'nsenter-keep-caps' of https://github.com/dgibson/util-linux * 'nsenter-keep-caps' of https://github.com/dgibson/util-linux: Add --keep-caps option to nsenter, similar to the one in unshare unshare: Move implementation of --keep-caps option to library function commit d3edf0f8de6de4ad3ff7e1d62bd6b271a576538e Merge: bd2ebbd4e 91ea38e91 Author: Karel Zak Date: Wed May 17 13:42:01 2023 +0200 Merge branch 'libmount/syscall' commit bd2ebbd4eadd29efac994037c0e85e8ddad13248 Merge: 372e026e0 afb669afe Author: Karel Zak Date: Wed May 17 13:34:34 2023 +0200 Merge branch 'enosys' of https://github.com/t-8ch/util-linux * 'enosys' of https://github.com/t-8ch/util-linux: enosys: properly block execve syscall enosys: don't require end-of-options marker enosys: find syscalls at build time enosys: remove long jumps from BPF enosys: add --list enosys: validate syscall architecture enosys: add manpage enosys: add bash completion enosys: make messages useful for users enosys: translate messages enosys: add common arguments enosys: add test enosys: fix native arch for s390x enosys: syscall numbers are "long" enosys: mark variable static enosys: remove unneeded inline variable declaration enosys: improve checks for EXIT_NOTSUPP enosys: move from tests/helpers/test_enosys.c c.h: make err_nonsys available commit 372e026e09382dae5385718567ecd97ad0637ece Merge: 976157c82 84ec6f99f Author: Karel Zak Date: Wed May 17 13:27:55 2023 +0200 Merge branch 'mkswap/offset' of https://github.com/t-8ch/util-linux * 'mkswap/offset' of https://github.com/t-8ch/util-linux: mkswap: implement --offset mkswap: (tests) don't overwrite logfiles mkswap: (tests) validate existence of truncate command commit 976157c821d81080b707315dfa17bbff87e9f5ca Merge: 747fe9946 4832fd9f3 Author: Karel Zak Date: Wed May 17 13:26:34 2023 +0200 Merge branch 'blockdev/zonesz' of https://github.com/t-8ch/util-linux * 'blockdev/zonesz' of https://github.com/t-8ch/util-linux: blockdev: add support for BLKGETZONESZ commit 747fe9946ad844ddb6a6f6509980c2161857bc2d Merge: 2dccaae42 8b70b9e32 Author: Karel Zak Date: Wed May 17 13:25:25 2023 +0200 Merge branch 'mount/tests/fstab' of https://github.com/t-8ch/util-linux * 'mount/tests/fstab' of https://github.com/t-8ch/util-linux: mount: (tests) reuse well-known per-test fstab location tests: (functions.sh) use per-test fstab file mount: (tests) explicitly use test fstab location tests: (functions.sh) create variable for test fstab location commit afb669afededdc2865bc132b41a4d70b8c2ee840 Author: Thomas Weißschuh Date: Tue May 16 23:18:58 2023 +0200 enosys: properly block execve syscall Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 30 ++++++++++++++++++++++++------ tests/expected/misc/enosys-exec | 1 + tests/helpers/test_enosys.c | 7 +++++++ tests/ts/misc/enosys | 9 +++++++++ 4 files changed, 41 insertions(+), 6 deletions(-) commit 4b1538c754803c7583ecaefb6d18e84485a670e2 Author: Thomas Weißschuh Date: Sun May 14 21:35:58 2023 +0200 enosys: don't require end-of-options marker Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 2 +- tests/ts/misc/enosys | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 69e542bd2d750b9ffa007767b2ea3b1c88028df5 Author: Thomas Weißschuh Date: Fri May 5 00:39:40 2023 +0200 enosys: find syscalls at build time Signed-off-by: Thomas Weißschuh .github/workflows/cibuild-setup-ubuntu.sh | 1 + meson.build | 8 +++++++- misc-utils/Makemodule.am | 9 +++++++++ misc-utils/enosys.c | 8 ++++---- tools/Makemodule.am | 4 +++- tools/all_syscalls | 15 +++++++++++++++ 6 files changed, 39 insertions(+), 6 deletions(-) commit 5e248716e6ac7c08f24d5cc0856a13a94395faca Author: Thomas Weißschuh Date: Fri May 5 00:38:11 2023 +0200 enosys: remove long jumps from BPF BPF encodes the jump distance in a uint8_t. To avoid overflows of this value reorganize the generated bytecode to work without long jumps. Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 7f104027e2a0929e71fa1307dcfe94f5217799a5 Author: Thomas Weißschuh Date: Fri Apr 28 13:42:11 2023 +0200 enosys: add --list bash-completion/enosys | 4 ++++ misc-utils/enosys.1.adoc | 3 +++ misc-utils/enosys.c | 8 +++++++- 3 files changed, 14 insertions(+), 1 deletion(-) commit 9e8fb1f5ed6d9ab122c71391f48044850ced8cbe Author: Thomas Weißschuh Date: Thu Apr 27 23:48:31 2023 +0200 enosys: validate syscall architecture Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ae03abcf56766c1b45762d17558e59788d252bcc Author: Thomas Weißschuh Date: Thu May 4 20:31:32 2023 +0200 enosys: add manpage Signed-off-by: Thomas Weißschuh meson.build | 1 + misc-utils/Makemodule.am | 2 ++ misc-utils/enosys.1.adoc | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) commit ac5267423d3ca26e315d690900e443ff541d23a8 Author: Thomas Weißschuh Date: Thu May 4 20:15:04 2023 +0200 enosys: add bash completion Signed-off-by: Thomas Weißschuh bash-completion/Makemodule.am | 3 +++ bash-completion/enosys | 33 +++++++++++++++++++++++++++++++++ meson.build | 1 + 3 files changed, 37 insertions(+) commit a3fdbe0c4fc9a35f0eadf19a9008b0721098a345 Author: Thomas Weißschuh Date: Fri Apr 28 09:57:57 2023 +0200 enosys: make messages useful for users Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 13d1cbced27c05e1e4a0623a263796af22b1fa34 Author: Thomas Weißschuh Date: Fri Apr 28 09:56:31 2023 +0200 enosys: translate messages Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 344ba205c17889fbed44eb90fc878429efc597f1 Author: Thomas Weißschuh Date: Thu May 4 20:23:30 2023 +0200 enosys: add common arguments Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 4290056351ed4cc3fc3b77cc862749fa578c3769 Author: Thomas Weißschuh Date: Fri Apr 28 00:04:19 2023 +0200 enosys: add test Signed-off-by: Thomas Weißschuh meson.build | 6 ++++++ misc-utils/enosys.c | 1 + tests/commands.sh | 1 + tests/expected/misc/enosys-basic | 4 ++++ tests/helpers/Makemodule.am | 3 +++ tests/helpers/test_enosys.c | 43 ++++++++++++++++++++++++++++++++++++++++ tests/ts/misc/enosys | 40 +++++++++++++++++++++++++++++++++++++ 7 files changed, 98 insertions(+) commit 113356e95d2c9b05a26125c2a134ad75081611af Author: Thomas Weißschuh Date: Sun May 7 10:59:46 2023 +0200 enosys: fix native arch for s390x s390 also defines __s390__ so we first have to check for __s390x__. Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58fe26362c4e88395e857b741cd7a56135503e6b Author: Thomas Weißschuh Date: Fri Apr 28 16:45:58 2023 +0200 enosys: syscall numbers are "long" Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 165fbfd46eeac9437d73b926504de61f6b10d191 Author: Thomas Weißschuh Date: Fri Apr 28 00:04:35 2023 +0200 enosys: mark variable static Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7626054ca874296d2adff46db3279a50ad2460ad Author: Thomas Weißschuh Date: Thu May 11 12:23:01 2023 +0200 enosys: remove unneeded inline variable declaration Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit f080b635a15803829be2daca4863a2c63ee771b1 Author: Thomas Weißschuh Date: Thu May 11 12:48:33 2023 +0200 enosys: improve checks for EXIT_NOTSUPP Signed-off-by: Thomas Weißschuh misc-utils/enosys.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit cba52cc194c6e80581cbd2ff9ba0916700970b13 Author: Thomas Weißschuh Date: Thu Apr 27 23:40:28 2023 +0200 enosys: move from tests/helpers/test_enosys.c configure.ac | 4 ++++ meson.build | 17 +++++++++++------ misc-utils/Makemodule.am | 7 +++++++ tests/helpers/test_enosys.c => misc-utils/enosys.c | 0 tests/commands.sh | 2 +- tests/helpers/Makemodule.am | 3 --- tests/ts/mount/fallback | 12 ++++++------ 7 files changed, 29 insertions(+), 16 deletions(-) commit bb2b071f54aa3a6bc5d713ba0c20178b9a291a6f Author: Thomas Weißschuh Date: Thu May 11 12:42:27 2023 +0200 c.h: make err_nonsys available Signed-off-by: Thomas Weißschuh include/c.h | 3 +++ misc-utils/waitpid.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) commit 42de8aba286a1a1e11625e77d82187528792638d Author: Tomasz Wojdat Date: Tue May 16 21:43:54 2023 +0200 hexdump: add new format-strings test case Signed-off-by: Tomasz Wojdat tests/expected/hexdump/format-strings-1b_hex | 41 ++++++++++++++++++++++++++++ tests/ts/hexdump/format-strings | 4 +++ 2 files changed, 45 insertions(+) commit bbf5bf8a881f17d5ed9ac6c92a1793163ce47f7e Author: Tomasz Wojdat Date: Tue May 16 20:10:13 2023 +0200 hexdump: add '--one-byte-hex' format option Signed-off-by: Tomasz Wojdat bash-completion/hexdump | 1 + text-utils/hexdump.1.adoc | 3 +++ text-utils/hexdump.c | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) commit 8b70b9e32aaa4d3bf37cf6498a0d0751d119e480 Author: Thomas Weißschuh Date: Sat Apr 22 17:50:03 2023 +0200 mount: (tests) reuse well-known per-test fstab location Signed-off-by: Thomas Weißschuh tests/ts/mount/fstab-all | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 6aa8d17b6b53b86a46c5da68c02a893113130496 Author: Thomas Weißschuh Date: Sat Apr 22 17:20:45 2023 +0200 tests: (functions.sh) use per-test fstab file Signed-off-by: Thomas Weißschuh tests/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1580bd760519a2cf052f023057846e54de47484 Author: Thomas Weißschuh Date: Sat Apr 22 17:34:28 2023 +0200 mount: (tests) explicitly use test fstab location Signed-off-by: Thomas Weißschuh tests/ts/mount/fslists | 2 +- tests/ts/mount/fstab-bind | 2 +- tests/ts/mount/fstab-broken | 4 ++-- tests/ts/mount/fstab-btrfs | 8 ++++---- tests/ts/mount/fstab-devname | 4 ++-- tests/ts/mount/fstab-devname2label | 2 +- tests/ts/mount/fstab-devname2uuid | 2 +- tests/ts/mount/fstab-label | 6 +++--- tests/ts/mount/fstab-label2devname | 4 ++-- tests/ts/mount/fstab-label2uuid | 4 ++-- tests/ts/mount/fstab-loop | 4 ++-- tests/ts/mount/fstab-none | 2 +- tests/ts/mount/fstab-symlink | 2 +- tests/ts/mount/fstab-uuid | 6 +++--- tests/ts/mount/fstab-uuid2devname | 4 ++-- tests/ts/mount/fstab-uuid2label | 4 ++-- 16 files changed, 30 insertions(+), 30 deletions(-) commit ed3d33faff17fb702a3acfca2f9f24e69f4920de Author: Thomas Weißschuh Date: Sat Apr 22 17:48:58 2023 +0200 tests: (functions.sh) create variable for test fstab location Signed-off-by: Thomas Weißschuh tests/functions.sh | 13 +++++++------ tests/ts/mount/fstab-broken | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) commit 84ec6f99f7927e5dc05a20f133b21f5870923ff1 Author: Thomas Weißschuh Date: Fri Apr 28 20:42:01 2023 +0200 mkswap: implement --offset Addresses #2166 Signed-off-by: Thomas Weißschuh bash-completion/mkswap | 6 +++++- disk-utils/mkswap.8.adoc | 3 +++ disk-utils/mkswap.c | 18 ++++++++++++++++-- tests/ts/mkswap/mkswap | 24 ++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) commit b0826e8c98dc57eceacdb7e9784315a1ff41a21d Author: Thomas Weißschuh Date: Fri Apr 28 20:32:00 2023 +0200 mkswap: (tests) don't overwrite logfiles Signed-off-by: Thomas Weißschuh tests/ts/mkswap/mkswap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d996ff1dc600a9bf9da735c88c70d659a8aae382 Author: Thomas Weißschuh Date: Fri Apr 28 20:31:43 2023 +0200 mkswap: (tests) validate existence of truncate command Signed-off-by: Thomas Weißschuh tests/ts/mkswap/mkswap | 1 + 1 file changed, 1 insertion(+) commit 4832fd9f36fbb7a12771b8e8df1e749ff14cc462 Author: Thomas Weißschuh Date: Wed Apr 26 08:53:28 2023 +0200 blockdev: add support for BLKGETZONESZ Signed-off-by: Thomas Weißschuh bash-completion/blockdev | 1 + disk-utils/blockdev.8.adoc | 3 +++ disk-utils/blockdev.c | 11 +++++++++++ 3 files changed, 15 insertions(+) commit 91ea38e91d6f1b37edc3114e02a4984a54918426 Author: Karel Zak Date: Tue Apr 25 12:48:18 2023 +0200 libmount: report failed syscall name Signed-off-by: Karel Zak libmount/src/context_mount.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit a61bbb370941c9d0590cd05e72d5823039de2321 Author: Chris Webb Date: Mon Apr 24 15:37:45 2023 +0100 mount: add --map-users and --map-groups convenience options Allow an X-mount.idmap option to be specified either from an existing userns with --map-users=/proc/PID/ns/user or incrementally with a series of --map-users=INNER:OUTER:COUNT and --map-groups=INNER:OUTER:COUNT options which compose into a single X-mount.idmap mount option. Apart from distinguishing absolute namespace paths from literal mappings, defer validation to libmount when it parses X-mount.idmap. Signed-off-by: Chris Webb sys-utils/mount.8.adoc | 6 ++++++ sys-utils/mount.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 1bf9c6915e73f44c536b21c592c403de84460125 Author: Daan De Meyer Date: Sun Apr 16 15:05:15 2023 +0200 Document new systemd credentials support for agetty and login login-utils/login.1.adoc | 8 ++++++++ term-utils/agetty.8.adoc | 8 ++++++++ 2 files changed, 16 insertions(+) commit 2ed0190535a98f5058b268c1502df0c134f2c441 Merge: 575d71fde 89779c1ef Author: Karel Zak Date: Fri Apr 14 09:47:16 2023 +0200 Merge branch 'flock/test/fd' of https://github.com/t-8ch/util-linux into next * 'flock/test/fd' of https://github.com/t-8ch/util-linux: flock: (tests) add test for fd-based locking commit 575d71fde1cd17c177d767aae061b64ca294831e Author: Karel Zak Date: Thu Apr 13 12:29:55 2023 +0200 nsenter: (man) add --keep-caps Signed-off-by: Karel Zak bash-completion/nsenter | 1 + sys-utils/nsenter.1.adoc | 3 +++ 2 files changed, 4 insertions(+) commit d4b1d901c55ef387b6ca311316bd67d83aeacbb7 Merge: ad6d9fd50 5b175fa9f Author: Karel Zak Date: Thu Apr 13 12:25:01 2023 +0200 Merge branch 'nsenter-keep-caps' of https://github.com/dgibson/util-linux into next * 'nsenter-keep-caps' of https://github.com/dgibson/util-linux: Add --keep-caps option to nsenter, similar to the one in unshare unshare: Move implementation of --keep-caps option to library function commit 12252002ada4482c46ae4363c0a87c5c8ea62e8c Author: Daan De Meyer Date: Sun Mar 19 18:36:42 2023 +0100 login: Initialize noauth from login.noauth credential Let's check if we've been passed credentials by systemd and if so, try to determine whether we need to auth the user to login from the login.noauth credential. login-utils/login.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit bcebab29a7b42b6c7f37549d7d65536dfd2c5424 Author: Daan De Meyer Date: Sun Mar 12 22:08:30 2023 +0100 agetty: Load autologin user from agetty.autologin credential Let's check if we've been passed credentials by systemd and if so, try to read the user to autologin from the agetty.autologin credential. Partially fixes #2012 term-utils/agetty.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) commit ad6d9fd50c12df567fc6ffe1a90d6775736a7695 Author: Karel Zak Date: Wed Apr 12 15:07:45 2023 +0200 cfdisk: ask y/n before wipe Addresses: https://github.com/util-linux/util-linux/issues/2160 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 17 ++++++++++++----- libfdisk/src/wipe.c | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) commit 5b175fa9f03062a11618983199f38578b6e11217 Author: David Gibson Date: Wed Mar 29 13:51:10 2023 +1100 Add --keep-caps option to nsenter, similar to the one in unshare When entering a user namespace at the kernel level, whether with clone(2), unshare(2) or setns(2), a process always gains full capabilities in the new userns. unshare(1) allows using that from the shell with the --keep-caps option, which transfers that full permitted capability set to the ambient set so it's available to the spawned shell or other process. nsenter(1) currently has no equivalent option, despite the fact that setns(2) grants capabilities in just the same way. This patch adds a --keep-caps to nsenter(1) that works just like the one in unshare(1). Signed-off-by: David Gibson sys-utils/Makemodule.am | 3 ++- sys-utils/nsenter.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) commit acb72212eb41ca862b8bc29b0106a46a83297fcb Author: David Gibson Date: Wed Mar 29 13:36:15 2023 +1100 unshare: Move implementation of --keep-caps option to library function unshare.c open codes some logic to copy the permitted capability set to the ambient set in order to implement the --keep-caps option. Move this logic to lib/caputils.c so that we can reuse it in nsenter. Signed-off-by: David Gibson include/caputils.h | 2 ++ lib/caputils.c | 38 ++++++++++++++++++++++++++++++++++++++ sys-utils/unshare.c | 38 ++------------------------------------ 3 files changed, 42 insertions(+), 36 deletions(-)