Changes between v2.37 and v2.37.2 -------------------------------------------- commit f59c8fd38dfee24b93ed54a6984f879499c34ec7 Author: Karel Zak Date: Mon Aug 16 15:23:50 2021 +0200 build-sys: release++ (v2.37.2) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 9ffaa85be1b25a387dd7fdfa612dca3e7a0d4b3f Author: Karel Zak Date: Mon Aug 16 15:22:37 2021 +0200 docs: update v2.37.2-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.37.2-ReleaseNotes | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit a2ec89ca4bf625b5b8463b25948cb3224ec1e0bd Author: Karel Zak Date: Mon Aug 16 15:16:38 2021 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 4 ++++ 1 file changed, 4 insertions(+) commit c10d72868e121ec96a1285325c6d4a154b73493e Author: Karel Zak Date: Mon Aug 16 15:15:36 2021 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 308 +++--- po/cs.po | 311 +++--- po/da.po | 311 +++--- po/de.po | 311 +++--- po/es.po | 311 +++--- po/et.po | 312 +++--- po/eu.po | 311 +++--- po/fi.po | 311 +++--- po/fr.po | 311 +++--- po/gl.po | 311 +++--- po/hr.po | 311 +++--- po/hu.po | 311 +++--- po/id.po | 311 +++--- po/it.po | 313 +++--- po/ja.po | 311 +++--- po/nl.po | 311 +++--- po/pl.po | 3191 +++++++++++++++++++++++++++-------------------------- po/pt.po | 311 +++--- po/pt_BR.po | 311 +++--- po/ru.po | 311 +++--- po/sl.po | 308 +++--- po/sv.po | 311 +++--- po/tr.po | 311 +++--- po/uk.po | 311 +++--- po/util-linux.pot | 313 +++--- po/vi.po | 311 +++--- po/zh_CN.po | 311 +++--- po/zh_TW.po | 311 +++--- 28 files changed, 5882 insertions(+), 5705 deletions(-) commit 1a59c9fa1527f614e3d53ac7316c8b68ca373e40 Author: Jose Riha Date: Mon Aug 16 15:06:14 2021 +0200 po: add sk.po (from translationproject.org) po/sk.po | 20799 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 20799 insertions(+) commit ede5254afa0a6cbbc3ea96a7cc9bca3ca5220368 Author: Jakub Bogusz Date: Mon Aug 16 15:06:14 2021 +0200 po: update pl.po (from translationproject.org) po/pl.po | 3132 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 1547 insertions(+), 1585 deletions(-) commit d0aeb4d2c0e622c269e54245c5b7c3a57568e914 Author: Karel Zak Date: Wed Aug 11 16:18:29 2021 +0200 mount.8: don't consider additional mounts as experimental This is bug, we have "EXPERIMENTAL" flag in the man page since v2.23. Signed-off-by: Karel Zak sys-utils/mount.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75882dea1ab76173fad1128b9777a834824f8dd4 Author: panchenbo Date: Wed Aug 11 19:33:31 2021 +0800 lscpu:Add Phytium FT-2000+ & S2500 support sys-utils/lscpu-arm.c | 2 ++ 1 file changed, 2 insertions(+) commit 6dde514b2a88b6e12fa25eb660cb145f48d9d31e Author: panchenbo Date: Wed Aug 11 13:00:08 2021 +0800 lscpu:Add Phytium aarch64 cpupart sys-utils/lscpu-arm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 19238be16d23c39468e2bcb21731a285700a6b69 Author: Karel Zak Date: Tue Aug 10 10:12:26 2021 +0200 docs: fix info about LIBSMARTCOLS_DEBUG_PADDING Signed-off-by: Karel Zak disk-utils/fdisk.8.adoc | 2 +- libsmartcols/src/table.c | 2 +- misc-utils/findmnt.8.adoc | 2 +- misc-utils/lsblk.8.adoc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit a5c6ab54e64d974a8331c2132af53cd37a1e39e6 Author: Karel Zak Date: Mon Aug 9 09:52:46 2021 +0200 lscpu: fix compilation against librtas Fixes: https://github.com/karelzak/util-linux/issues/1406 Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 4 ++++ 1 file changed, 4 insertions(+) commit f6dd7b20cdcb5b6a8aae4877024026f1eefaea73 Author: Karel Zak Date: Mon Aug 9 09:45:21 2021 +0200 prlimit: fix compiler warning [-Wmaybe-uninitialized] sys-utils/prlimit.c:467:16: warning: 'hard' may be used uninitialized in this function [-Wmaybe-uninitialized] lim->rlim_max = hard; ~~~~~~~~~~~~~~^~~~~~ sys-utils/prlimit.c:456:15: note: 'hard' was declared here rlim_t soft, hard; ^~~~ sys-utils/prlimit.c:466:16: warning: 'soft' may be used uninitialized in this function [-Wmaybe-uninitialized] lim->rlim_cur = soft; ~~~~~~~~~~~~~~^~~~~~ sys-utils/prlimit.c:456:9: note: 'soft' was declared here rlim_t soft, hard; ^~~~ References: https://github.com/karelzak/util-linux/issues/1406 Signed-off-by: Karel Zak sys-utils/prlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebd4749115cc12cf91ce1958bd030d70c8b1994e Author: Karel Zak Date: Fri Jul 30 14:35:25 2021 +0200 lscpu: fix NULL dereference Fixes: https://github.com/karelzak/util-linux/issues/1401 Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 2 +- sys-utils/lscpu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 692167ff5e8c96b4de5673036f72e9be55a38bdd Author: Érico Nogueira Date: Tue Jul 27 23:58:26 2021 -0300 lib/pwdutils: use assert to check correct usage. Since these functions are only used internally, we can make sure they are being used correctly, and assert() helps in catching remaining issues. Usage of each changed function has been reviewed: For xgetpwnam: - chsh(1) only calls it if a username has been set - login(1) only calls it if username has been set and is not empty - su(1) always initializes new_user to "root" - unshare(1) calls get_user with optarg, so always set as well For xgetgrnam: - unshare(1) calls get_group with optarg For xgetpwuid: - chsh(1) passes a stack allocated struct for struct passwd Signed-off-by: Érico Nogueira lib/pwdutils.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8ab700b933caf18cb4547ea01bdcb1387a1145a1 Author: Érico Nogueira Date: Tue Jul 27 23:54:42 2021 -0300 logger: use xgetlogin from pwdutils. It defined its own xgetlogin, which queried geteuid() instead of getuid(), with a fallback to "" when lookup fails. This has been the case since the function was introduced in 019b97024fde3f07eaf541eef990762483369a11, so geteuid() has always been used. Since using geteuid for identification isn't consistent with the rest of util-linux, switching to xgetlogin(), which uses getuid(), should be correct. Signed-off-by: Érico Nogueira misc-utils/Makemodule.am | 2 +- misc-utils/logger.c | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) commit 5cc21d91fc8c67b1e727e8ba0cb81d0846c2e17b Author: Érico Nogueira Date: Tue Jul 27 23:51:34 2021 -0300 wall: use xgetlogin. getlogin(3) shouldn't be used for identification here. This also removes the bug where a missing entry for getuid() in passwd database wouldn't print a warning, because whom would be set to "???". For consistency, switch to "" when pw look up fails. Signed-off-by: Érico Nogueira term-utils/wall.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bca77acb03cad888441e697082472f632a0941d5 Author: Érico Nogueira Date: Tue Jul 27 23:41:30 2021 -0300 lib/pwdutils: don't use getlogin(3). Per the man page, it shouldn't be used for security purposes. This is an issue especially on musl, where getlogin is implemented as getenv("LOGNAME"). Since xgetlogin is being used as user identity in su(1), to set PAM_RUSER, we simply switch to always using getpwuid(getuid()). Signed-off-by: Érico Nogueira lib/pwdutils.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3c466f7c353beb3076a2be8fb2931b9951430128 Author: Karel Zak Date: Thu Jul 29 21:28:00 2021 +0200 sulogin: fix getpasswd() Fixes: https://github.com/karelzak/util-linux/issues/1400 Signed-off-by: Karel Zak login-utils/sulogin.c | 1 + 1 file changed, 1 insertion(+) commit 54cb0dd60ca3768fffe70d62400936bf387389bc Author: Karel Zak Date: Thu Jul 29 20:37:32 2021 +0200 libmount: don't use setgroups at all() It's probably good idea to call setgroups() to cleanup groups, but it introduces a regression as some mount helpers depend on supplementary groups like "network" etc. Fixes: https://github.com/karelzak/util-linux/issues/1398 Signed-off-by: Karel Zak include/c.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4763080701ceba4fb1af162bbe03a9192ee3c1df Author: Karel Zak Date: Thu Jul 29 11:50:48 2021 +0200 libmount: fix setgroups() use * keep process in single supplementary group, which is the real group ID for the process * make sure we have rights to call setgroups(), requires group permissions Fixes: https://github.com/karelzak/util-linux/issues/1398 Signed-off-by: Karel Zak include/c.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4f2406545c86d27194046f40b0c05903d2c754d0 Author: Karel Zak Date: Wed Jul 28 11:05:36 2021 +0200 losetup: use LOOP_CONFIGURE in a more robust way 32-bit userspace returns ENOTTY: ioctl(4, LOOP_CONFIGURE, {fd=3, block_size=0, info={lo_offset=0, lo_number=0, lo_flags=LO_FLAGS_AUTOCLEAR, lo_file_name="/usr/install/iso/systemrescue-8.04-amd64.iso", ...}}) = -1 ENOTTY (Inappropriate ioctl for device) 64-bit userspace returns EINVAL: ioctl(4, LOOP_CONFIGURE, {fd=3, block_size=0, info={lo_offset=0, lo_number=0, lo_flags=LO_FLAGS_AUTOCLEAR, lo_file_name="/usr/src/PACKAGES/systemrescue-8.04-amd64.iso", ...}}) = -1 EINVAL (Invalid argument) The correct return value for an unknown ioctl is ENOTTY, but we need to support already released kernels, so let's support both errnos. Reported-by: Krzysztof Olędzki Signed-off-by: Karel Zak lib/loopdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31bb5886639df1e3307ffa11255dea2fa3e1bd63 Author: Karel Zak Date: Tue Jul 27 12:51:43 2021 +0200 blockdev: use snprintf() rather than sprintf() Signed-off-by: Karel Zak disk-utils/blockdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 86d5de52d43501711586054e7b601fbc57403085 Author: Karel Zak Date: Tue Jul 27 11:58:31 2021 +0200 sys-utils/ipcutils: be careful when call calloc() for uint64 nmembs Fix: https://github.com/karelzak/util-linux/issues/1395 Signed-off-by: Karel Zak sys-utils/ipcutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d761e8325fbba5cb144984854f2c6e1d44282c7 Author: Karel Zak Date: Tue Jul 27 11:40:32 2021 +0200 libfdisk: (dos) support partition and MBR overlap Let's support this crazy use-case in expert menu, because it's normal for removable FAT disks, etc. Signed-off-by: Karel Zak libfdisk/src/dos.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 6e8af4695e7e37eae392caec9ce42801ecc196de Author: Karel Zak Date: Tue Jul 27 11:10:53 2021 +0200 libfdisk: (dos) don't ignore MBR+FAT use-case Since libblkid commit 751eca28fcfa1e325770904d7181b22e48c72b29 it does not ignore FAT on whole-disks, so now libfdisk sees collision between FAT and MBR. It's fine to report the collision to users, but we should not ignore the MBR. Signed-off-by: Karel Zak libfdisk/src/dos.c | 6 ------ 1 file changed, 6 deletions(-) commit b5a4d57a5c9cca7dae3463a0dba3e194d2affde9 Author: Thomas Abraham Date: Thu Jul 22 15:43:13 2021 -0400 blockdev: allow for larger values for start sector commit 9147d2ad8a ("blockdev: Don't fail on missing start sector") limits the size of the start sector to 10 digits. Multi-terrabyte devices can have partitions with a start sector larger than 10 digits, which will cause an sprintf() to abort due to overflowing the buffer. It causes: # blockdev --report /dev/sda4 RO RA SSZ BSZ StartSec Size Device *** buffer overflow detected ***: terminated Aborted (core dumped) disk-utils/blockdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bb894a44936097e38cb86301d69da83cf5a15e70 Author: Christian Finnberg Date: Thu Jul 22 19:03:54 2021 +0300 Fix typo po/es.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb954f765845b0346679a25383da9a5d9a063e84 Author: Karel Zak Date: Thu Jul 22 15:59:15 2021 +0200 build-sys: release++ (v2.37.1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 7169c012237f0b0d9310f3a09f9df3b3699091e1 Author: Karel Zak Date: Thu Jul 22 15:56:53 2021 +0200 docs: update v2.37.1-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.37.1-ReleaseNotes | 181 ++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) commit 6bf2c99b2e2cf3ffedeb7a20ede86114dfb43d35 Author: Karel Zak Date: Thu Jul 22 15:55:04 2021 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit debce7468dec6c2130477759e41f349f179e3b7c Author: Karel Zak Date: Thu Jul 22 15:52:06 2021 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 3049 +++++++++++++++++++++++++-------------------------- po/cs.po | 3080 ++++++++++++++++++++++++++-------------------------- po/da.po | 3070 ++++++++++++++++++++++++++-------------------------- po/de.po | 3080 ++++++++++++++++++++++++++-------------------------- po/es.po | 3130 +++++++++++++++++++++++++++-------------------------- po/et.po | 3049 +++++++++++++++++++++++++-------------------------- po/eu.po | 3043 +++++++++++++++++++++++++-------------------------- po/fi.po | 3049 +++++++++++++++++++++++++-------------------------- po/fr.po | 3080 ++++++++++++++++++++++++++-------------------------- po/gl.po | 3043 +++++++++++++++++++++++++-------------------------- po/hr.po | 3080 ++++++++++++++++++++++++++-------------------------- po/hu.po | 3049 +++++++++++++++++++++++++-------------------------- po/id.po | 3050 +++++++++++++++++++++++++-------------------------- po/it.po | 3045 +++++++++++++++++++++++++-------------------------- po/ja.po | 3076 ++++++++++++++++++++++++++-------------------------- po/nl.po | 3067 +++++++++++++++++++++++++-------------------------- po/pl.po | 3080 ++++++++++++++++++++++++++-------------------------- po/pt.po | 3080 ++++++++++++++++++++++++++-------------------------- po/pt_BR.po | 3130 +++++++++++++++++++++++++++-------------------------- po/ru.po | 3066 +++++++++++++++++++++++++-------------------------- po/sl.po | 3049 +++++++++++++++++++++++++-------------------------- po/sv.po | 3077 ++++++++++++++++++++++++++-------------------------- po/tr.po | 3067 +++++++++++++++++++++++++-------------------------- po/uk.po | 3080 ++++++++++++++++++++++++++-------------------------- po/util-linux.pot | 3036 +++++++++++++++++++++++++-------------------------- po/vi.po | 3068 +++++++++++++++++++++++++-------------------------- po/zh_CN.po | 3070 ++++++++++++++++++++++++++-------------------------- po/zh_TW.po | 3050 +++++++++++++++++++++++++-------------------------- 28 files changed, 43420 insertions(+), 42473 deletions(-) commit 2349d4c090779327cddfa4ea2dbf0bd90550410e Author: Мирослав Николић Date: Thu Jul 22 15:46:26 2021 +0200 po: update sr.po (from translationproject.org) po/sr.po | 6280 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 3454 insertions(+), 2826 deletions(-) commit e5694e94b506235fd8644ae9bd4dbeea77fa617e Author: Rafael Fontenelle Date: Thu Jul 22 15:46:26 2021 +0200 po: update pt_BR.po (from translationproject.org) po/pt_BR.po | 808 +++++++++++++++++++++++++----------------------------------- 1 file changed, 336 insertions(+), 472 deletions(-) commit 5ba2c4317cfb2d66fb6480d5d6d11fbc3d8a086b Author: Antonio Ceballos Roa Date: Thu Jul 22 15:46:26 2021 +0200 po: update es.po (from translationproject.org) po/es.po | 786 ++++++++++++++++++++++++++------------------------------------- 1 file changed, 325 insertions(+), 461 deletions(-) commit 4fcd20534f0c19971b0b1aab6e452f11e50213bf Author: Karel Zak Date: Thu Jul 22 11:34:11 2021 +0200 lslogins: fix memory leak [asan] Signed-off-by: Karel Zak login-utils/lslogins.c | 1 + 1 file changed, 1 insertion(+) commit d1a5e99e8af30f462ac722d02f7b31b84369075c Author: Karel Zak Date: Thu Jul 22 11:30:22 2021 +0200 lslogins: ask for supplementary groups only once [asan] Signed-off-by: Karel Zak login-utils/lslogins.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f6261700621d66fb252e3e01756190d8772dd1a8 Author: Karel Zak Date: Thu Jul 22 11:03:54 2021 +0200 lslogins: use sd_journal_get_data() in proper way man sd_journal_get_data: The returned data is in a read-only memory map and is only valid until the next invocation of sd_journal_get_data(). It means that use data after 3x sd_journal_get_data() is really bad idea. It also seems better to not assume the fields are zero terminated as journal API works with void* and size_t to address the data. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1984704 Signed-off-by: Karel Zak login-utils/lslogins.c | 59 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 24 deletions(-) commit a3d73c246fb57b110c16cf55cf44a41b41046c4d Author: Karel Zak Date: Thu Jul 15 12:51:39 2021 +0200 login: add callback for close_range() Let's make it more robust for old kernels where is no close_range() or in cases when it's unsuccessful. Reported-by: Florian Weimer Signed-off-by: Karel Zak include/fileutils.h | 2 -- lib/fileutils.c | 8 +++----- login-utils/login.c | 5 ++--- 3 files changed, 5 insertions(+), 10 deletions(-) commit 650fca1a060c85917277904c427a71ac91794a8d Author: Karel Zak Date: Thu Jul 15 12:24:07 2021 +0200 lslogins: consolidate and optimize utmp files use * the original read_utmp() code is from GPLv3+, but lslogins is GPLv2+ (see https://github.com/karelzak/util-linux/commit/a6bf40ee77a85f5108208dc764b5d023a07998f5#commitcomment-53407151) * remove redundant parse_btmp() and parse_wtmp() as it does not provide anything * reduce realloc() calls, allocate all in one step Signed-off-by: Karel Zak login-utils/lslogins.c | 79 ++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 41 deletions(-) commit 22a2bce04238595cc5449f8c756242f9f71ddada Author: Karel Zak Date: Wed Jul 14 17:51:07 2021 +0200 hardlink: remove pcre2posix.h support It's deprecated for years. Let's rely on old good libc regex.h for now. Signed-off-by: Karel Zak configure.ac | 8 -------- meson.build | 6 ------ misc-utils/Makemodule.am | 4 ---- misc-utils/hardlink.c | 9 +-------- 4 files changed, 1 insertion(+), 26 deletions(-) commit 937fe5d9c59f52a2557f683c1f764b4cb5b170c4 Author: Karel Zak Date: Wed Jul 14 17:25:57 2021 +0200 login: fix close_range() use This new syscall comes with three arguments (see kernel commit 278a5fbaed89dacd04e9d052f4594ffd0e0585de). Not sure why util-linux assume only two. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1981729 Signed-off-by: Karel Zak include/fileutils.h | 4 ++-- lib/fileutils.c | 2 +- login-utils/login.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 1bb08cfc0120efdce1b91db9cda24aa68c33651b Author: Karel Zak Date: Wed Jul 14 16:18:20 2021 +0200 tests: update sfdisk reorder test References: commit f05a5bb2c2e62d3753f8c9262b9f6cbf469e5b0 Signed-off-by: Karel Zak tests/expected/sfdisk/gpt-reorder | 1 + 1 file changed, 1 insertion(+) commit 4bea4821abf6b559fa824310a6d6823d1c9a03a5 Author: Karel Zak Date: Wed Jul 14 16:13:21 2021 +0200 tests: skip if scsi_debug model file is not accessible * do not print grep(1) info message * use ts_skip rather than ts_die when scsi_debug is useless Fixes: https://github.com/karelzak/util-linux/issues/1376 Signed-off-by: Karel Zak tests/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 18492b47b7b6bb065240e8353b5dea69368e05fd Author: Pali Rohár Date: Tue Jul 13 00:40:00 2021 +0200 fdisk: move reorder diag messages to fdisk_reorder_partitions() The function fdisk_reorder_partitions() is also used in sfdisk and cfdisk and these commands assume info/warn messages from the library. So move all messages from fdisk to fdisk_reorder_partitions(). Signed-off-by: Pali Rohár disk-utils/fdisk-menu.c | 11 ----------- libfdisk/src/label.c | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 12 deletions(-) commit db4d80fcefae8ca8c67f3a64efe4562b23bd5a37 Author: Luca Boccassi Date: Sun Jul 11 18:14:40 2021 +0100 verity: fix verity.roothashsig only working as last parameter Parsing of verity.roothashsig did not take into consideration that other options might follow, and used the whole string as a file path. But mnt_optstr_get_option just returns a pointer in the mount option string, it doesn't extract it, so it would have other subsequent options too. The length parameter has to be used. Signed-off-by: Luca Boccassi libmount/src/context_veritydev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d5012591611192195cd9af360f9e43e5037d081a Author: Pali Rohár Date: Tue Jul 6 15:35:25 2021 +0200 fdisk: do not print error message when partition reordering is not needed Option 'f' currently prints following RED error message: Nothing to do. Ordering is correct already. Failed to fix partitions order. This change removes RED error message when ordering is already correct. Signed-off-by: Pali Rohár disk-utils/fdisk-menu.c | 11 +++++++++-- libfdisk/src/dos.c | 4 +--- libfdisk/src/gpt.c | 4 +--- 3 files changed, 11 insertions(+), 8 deletions(-) commit ee3d6b0d4a61c3dbf68929db1b2e8ceda872fb58 Author: Pali Rohár Date: Mon Jul 5 15:10:51 2021 +0200 libblkid: vfat: Fix reading FAT32 boot label FAT32 can be formatted with boot sign 0x28 to indicate that only serial id is present or with boot sign 0x29 which indicates that both boot label and serial id is present. Signed-off-by: Pali Rohár libblkid/src/superblocks/vfat.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9c3b9269d904116e8aabe6e84943d9f01a16ba90 Author: Pali Rohár Date: Mon Jul 5 15:09:12 2021 +0200 libblkid: vfat: Fix reading FAT16 boot label and serial id Older FAT16 variants do not have to contain boot label or serial id. Boot sign 0x28 indicates that only serial id is present and boot sign 0x29 indicates that both boot label and serial id is present. Other boot sign values (e.g. zero) indicates older FAT16 variant without boot label and boot sign. Signed-off-by: Pali Rohár libblkid/src/superblocks/vfat.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 6a7194ea236590ae2cc02b0bf92b8fe6a7848c7e Author: Luca Boccassi Date: Sat Jul 3 12:15:53 2021 +0100 mount: fix roothash signature extension in manpage The PKCS7 RFC recommends to use .p7s for detached signatures file extensions, so use that in the example. https://datatracker.ietf.org/doc/html/rfc5751#section-3.2.1 sys-utils/mount.8.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71b98c36d4ed4f8ad7ff1c1e6070b168fc0d6e0e Author: Luca Boccassi Date: Fri Jul 2 19:44:59 2021 +0100 meson: fix dlopen support for cryptsetup dlopen is treated as a dependency, but that's not quite right, it should be an alternative way to link to libcryptsetup. Search for it only if cryptsetup is not disabled, and if the cryptsetup-dlopen is explicitly set to enabled. If it is, do not link to libcryptsetup. Add cryptsetup support status to the meson summary. libmount/meson.build | 2 +- meson.build | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) commit 8da7e26cbc224edd1cab22b7b5aebc6df5f0216e Author: Luca Boccassi Date: Fri Jul 2 19:11:58 2021 +0100 meson: fix crypt_activate_by_signed_key detection It should set HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY, rather than HAVE_CRYPTSETUP which enables the verity features, as it needs to detect the availability of the crypt_activate_by_signed_key API meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 375afc17f4a6a0c752fa1072391bfe2846acf829 Author: Luca Boccassi Date: Fri Jul 2 18:09:03 2021 +0100 build-sys: display cryptsetup status after ./configure Signed-off-by: Luca Boccassi configure.ac | 1 + 1 file changed, 1 insertion(+) commit 19dd7a1e302177900b0597359b5301ec833a1e9b Author: Karel Zak Date: Fri Jul 2 13:12:13 2021 +0200 lscpu: don't use DMI if executed with --sysroot Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit be39647ac4758d350fa9b5aa7c91856591cce4ce Author: Ross Burton Date: Thu Jul 1 20:44:31 2021 +0100 test/eject: guard asan LD_PRELOAD with use-system-commands check This test tries to add asan to LD_PRELOAD because the just-built eject will call the host /bin/umount, and apparently asan doesn't like this. However, if ldd isn't present, this fails as the path to asan is the error message saying that ldd isn't present. As the asan workaround is only needed when executing the binaries that have just been built and not the system binaries, only use it if the test is on the built binaries. Closes #1373. Signed-off-by: Ross Burton tests/ts/eject/umount | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 9ada40d3cc382555caae2d45c4a58502d3e7a554 Author: Karel Zak Date: Thu Jul 1 17:06:34 2021 +0200 fstrim: clean return code on --quiet-unsupported This feature is already supported for -a and -A. Let's support it also when FS specified on command line. Addresses: https://github.com/systemd/mkosi/pull/721 Signed-off-by: Karel Zak sys-utils/fstrim.8.adoc | 2 +- sys-utils/fstrim.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 5ca73c6eef204ff39858099dd787eb84f75bfdb3 Author: Karel Zak Date: Wed Jun 30 12:25:18 2021 +0200 lsblk: normalize space in SERIAL and MODEL These strings come from HW and udev does not modify it. It seems good idea to clean up it before we print it. Fixes: https://github.com/karelzak/util-linux/issues/1368 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6269a5fc0de7733d41073f9c473a200ac68fb7a1 Author: Ross Burton Date: Wed Jun 30 11:25:01 2021 +0100 tests: mark ul/ul as a known failure As with ul/basic, this test produces different output when ran under different terminals, which isn't very useful. Set TS_KNOWN_FAIL so that these problems don't cause the test to fail. Signed-off-by: Ross Burton tests/ts/ul/ul | 3 +++ 1 file changed, 3 insertions(+) commit 89379c88db5f5563dd4f4f58dcd5a7ae5eb74ffe Author: Ross Burton Date: Tue Jun 29 18:10:40 2021 +0100 tests: check correct log file for errors in blkdiscard test When checking if the discard ioctl is supported, look in stderr not stdout as that is where the error appears. Signed-off-by: Ross Burton tests/ts/blkdiscard/offsets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0be381be442e67346f0007b04af904ab01720c8f Author: Ross Burton Date: Tue Jun 29 16:34:20 2021 +0100 tests: don't hardcode /bin/kill in the kill tests If the 'kill' test is executed with --use-system-commands, it calls /bin/kill to avoid the shell's own kill command being invoked. However, this doesn't work if the kill we want to test isn't in fact in /bin. Instead, use $(which kill) to find a kill on the PATH and call that directly. Signed-off-by: Ross Burton tests/ts/kill/all_processes | 2 +- tests/ts/kill/name_to_number | 2 +- tests/ts/kill/options | 2 +- tests/ts/kill/print_pid | 2 +- tests/ts/kill/queue | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 54da548e021b4682d99d3b66e3c3e386af5816cf Author: Karel Zak Date: Fri Jun 25 12:58:51 2021 +0200 cfdisk: optimize mountpoint detection for PARTUUID Don't check fstab (and udev symplinks) for new UUIDs. Fixes: https://github.com/karelzak/util-linux/issues/1331 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 2db4c7f0b377c98c402a49cc60aa174f3fa8b853 Author: Karel Zak Date: Fri Jun 25 11:05:21 2021 +0200 hexdump: do not use atoi() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak text-utils/hexdump-parse.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 45f40a1ed88c216af224bb97369f336cb51536b3 Author: Karel Zak Date: Fri Jun 25 10:24:35 2021 +0200 pg: do not use atoi() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak text-utils/pg.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 28941d202a883fbbaca8dac85172a0e82dbe5099 Author: Karel Zak Date: Thu Jun 24 16:42:53 2021 +0200 misc: improve string to number conversions Signed-off-by: Karel Zak disk-utils/fsck.c | 5 ++--- sys-utils/eject.c | 6 +++--- sys-utils/lscpu-cputype.c | 4 ++-- text-utils/pg.c | 15 +++++++-------- 4 files changed, 14 insertions(+), 16 deletions(-) commit 97b7dcf32e0da8565615972904623a3ca630eb12 Author: Karel Zak Date: Thu Jun 24 16:36:58 2021 +0200 include/strutils: consolidate string to number conversion Signed-off-by: Karel Zak include/strutils.h | 23 ++++--- lib/strutils.c | 171 ++++++++++++++++++++++++----------------------------- 2 files changed, 90 insertions(+), 104 deletions(-) commit cd969e8908ddd59accc5f84f19dcac20c82645d8 Author: Karel Zak Date: Wed Jun 23 11:37:31 2021 +0200 more: fix null-pointer dereference The command allows executing arbitrary shell commands while viewing a file by entering '!' followed by the command. Entering a command that contains a '%', '!', or '\' causes a segmentation violation. The same more(1) function has a problem when not file is specified (cat /etc/passwd | more) on command line. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1975153 Signed-off-by: Karel Zak text-utils/more.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c0617de5a4a888325d7ae9efe12a69fe46579549 Author: Karel Zak Date: Tue Jun 22 17:26:11 2021 +0200 agetty: do not use atol() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak term-utils/agetty.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cb75cf88b83d015553712284a4d24995a3e875b4 Author: Karel Zak Date: Tue Jun 22 17:06:46 2021 +0200 lscpu: do not use atoi() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 20 ++++++++++++++++++-- sys-utils/lscpu-topology.c | 7 ++++++- 2 files changed, 24 insertions(+), 3 deletions(-) commit 9ee95fa26acc939ef7ba1e5158dc61d33164e6aa Author: Karel Zak Date: Tue Jun 22 16:50:46 2021 +0200 utmpdump: do not use atoi() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak login-utils/utmpdump.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 878307e96099b0b4373635bf4e4a519c8c9da162 Author: Karel Zak Date: Tue Jun 22 16:16:38 2021 +0200 swapon: do not use atoi() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak sys-utils/swapon.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit e4aad0a9c4e536f326005606204816abc1405063 Author: Karel Zak Date: Tue Jun 22 15:19:22 2021 +0200 ipcs: do not use atoi() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak sys-utils/ipcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0ea3e2f0edeee6ee7d34f7287537df3e18051f3f Author: Karel Zak Date: Tue Jun 22 15:15:46 2021 +0200 eject: do not use atoi() * remove unnecessary strtok() use * remove atoi use() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak sys-utils/eject.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ee021a5f9e22521ac51a9d370b3b99f06ab8ab64 Author: Karel Zak Date: Tue Jun 22 14:42:56 2021 +0200 fsck: do not use atoi() Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak disk-utils/fsck.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a9768580a49403a6ed4fcbc0403936073e301cdb Author: Karel Zak Date: Tue Jun 22 14:20:42 2021 +0200 include/strutils: cleanup strto..() functions * add ul_strtos64() and ul_strtou64() * add simple test Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak include/strutils.h | 3 + lib/strutils.c | 174 +++++++++++++++++++++++++++++++---------------------- 2 files changed, 105 insertions(+), 72 deletions(-) commit cbfbbc44c4262c1f588c69e53f6dde5424e3273b Author: Karel Zak Date: Tue Jun 22 12:32:58 2021 +0200 blockdev: improve arguments parsing (remove atoi) old version: # blockdev --setfra 4x096 /dev/sdc new version: # blockdev --setfra 4x096 /dev/sdc blockdev: failed to parse command argument: '4x096' Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak disk-utils/blockdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 22cecf786fe19ad2e246d06e46cf5b830c53c8e2 Author: Karel Zak Date: Tue Jun 22 11:50:06 2021 +0200 cfdisk: do not use atoi() It's unnecessary to use atoi in this case. Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit aeba558136d2082fd01939905bbb4d323f54c34c Author: Karel Zak Date: Mon Jun 21 15:37:48 2021 +0200 readprofile: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak sys-utils/Makemodule.am | 1 + sys-utils/readprofile.c | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) commit 9411b6ccf8a2455b0a00ac27c1d0e46c2c6b4a3a Author: Karel Zak Date: Mon Jun 21 15:34:06 2021 +0200 wipefs: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak misc-utils/wipefs.c | 3 +++ 1 file changed, 3 insertions(+) commit c357816caa5a8dd7876020394635f5dcba859e4f Author: Karel Zak Date: Mon Jun 21 15:33:36 2021 +0200 lslocks: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak misc-utils/lslocks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7a50f117a4e5a0d435f93d4093f10666544c7e63 Author: Karel Zak Date: Mon Jun 21 15:32:51 2021 +0200 kill: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak misc-utils/kill.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21ef212a586bb4c4d243d53d49ad2233064919ff Author: Karel Zak Date: Mon Jun 21 15:31:43 2021 +0200 lslogins: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak login-utils/lslogins.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b2db509d13482da329527dffced1218962aef9d6 Author: Karel Zak Date: Mon Jun 21 15:29:43 2021 +0200 fsck: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak disk-utils/fsck.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8803c8d4ab28e50bd17ed1f9399a8a2321102987 Author: Karel Zak Date: Mon Jun 21 15:29:33 2021 +0200 lsmem: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak sys-utils/chmem.c | 9 ++++++++- sys-utils/lsmem.c | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) commit 096487c61657515bcf126978ed9a958c5595f791 Author: Karel Zak Date: Mon Jun 21 15:00:40 2021 +0200 lscpu: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak sys-utils/lscpu-virt.c | 3 +++ 1 file changed, 3 insertions(+) commit 8335261c3db1ee56ec67ddddd940d47e217302f9 Author: Karel Zak Date: Mon Jun 21 15:00:40 2021 +0200 hwclock: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak sys-utils/hwclock-rtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b6cd420e03263cc15c1a344b095432823f58f443 Author: Karel Zak Date: Mon Jun 21 15:00:40 2021 +0200 ipcs: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak sys-utils/ipcmk.c | 7 ++++++- sys-utils/ipcrm.c | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 62aa386c4f1480953644de912569e4a429707ef5 Author: Karel Zak Date: Mon Jun 21 15:00:40 2021 +0200 libuuid: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak libuuid/src/parse.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 072959386259d6db5f1a1323d86ad72a1227b282 Author: Karel Zak Date: Mon Jun 21 15:00:40 2021 +0200 libmount: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak libmount/python/pylibmount.c | 3 +++ libmount/src/context_veritydev.c | 3 ++- libmount/src/tab_parse.c | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit 736b6ab7fd08e73121f60c3c12a39f7a863ce81e Author: Karel Zak Date: Mon Jun 21 15:00:40 2021 +0200 libblkid: check errno after strto..() Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak libblkid/src/partitions/partitions.c | 3 ++- libblkid/src/probe.c | 4 ++++ libblkid/src/read.c | 17 +++++++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) commit 864578ded7fee28aaa2a18881b9328f3920abdf3 Author: Thiébaud Weksteen Date: Mon Jun 21 14:15:16 2021 +0200 mount.8.adoc: Remove context options exclusion The exclusivity between the {fscontext, defcontext} and context options was removed in kernel 2.6.25[1]. No specific verification on these options is done in mount(8)[2]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9180a57a9ab2d5525faf8815a332364ee9e89b7 [2] https://github.com/karelzak/util-linux/blob/master/libmount/src/context_mount.c#L202 sys-utils/mount.8.adoc | 2 -- 1 file changed, 2 deletions(-) commit b0f8d63e6314140a6e51c2cbe5bc143e6e53ab1b Author: Karel Zak Date: Mon Jun 21 12:39:33 2021 +0200 fsck.cramfs: use open+fstat rather than stat+open Fixes: https://github.com/karelzak/util-linux/issues/1353 Signed-off-by: Karel Zak disk-utils/fsck.cramfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 86328e78ea03f0c96d571b48fa79df014dfb40e9 Author: Karel Zak Date: Mon Jun 21 12:25:31 2021 +0200 include/c: add drop_permissions(), consolidate UID/GID reset Fixes: https://github.com/karelzak/util-linux/issues/1354 Signed-off-by: Karel Zak include/c.h | 24 ++++++++++++++++++++++++ lib/canonicalize.c | 3 +-- libblkid/src/topology/dm.c | 5 +---- libblkid/src/topology/lvm.c | 5 +---- libmount/src/context_mount.c | 5 +---- libmount/src/context_umount.c | 5 +---- sys-utils/eject.c | 8 ++------ sys-utils/mount.c | 9 ++------- sys-utils/swapon.c | 9 ++------- sys-utils/umount.c | 9 ++------- text-utils/more.c | 9 +++------ 11 files changed, 40 insertions(+), 51 deletions(-) commit 155b79d38e778d6fac1753b61834fa6e7843a904 Author: Karel Zak Date: Fri Jun 18 17:57:13 2021 +0200 dmesg: remove condition [lgtm scan] Signed-off-by: Karel Zak sys-utils/dmesg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b342240e843fce1ccbed7366fb9de7e8a9146080 Author: Karel Zak Date: Fri Jun 18 17:37:38 2021 +0200 tools: report and use LDFLAGS in tools/config-gen Signed-off-by: Karel Zak tools/config-gen | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a000aad7a646307f5a12d69c366b582ba0658071 Author: Karel Zak Date: Fri Jun 18 17:21:13 2021 +0200 build-sys: use $LIBS rather than LDFLAGS Fixes: https://github.com/karelzak/util-linux/pull/1349 Signed-off-by: Karel Zak configure.ac | 8 ++++---- m4/ul.m4 | 29 +++++++++++------------------ 2 files changed, 15 insertions(+), 22 deletions(-) commit ab26415a03019a790e436041cf718fd837ff37f1 Author: Karel Zak Date: Fri Jun 18 17:02:38 2021 +0200 lib/path: (test) fix ul_new_path() use lib/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42a9c18706d2c07628a582ae73f37b9a5c63f0ec Author: Karel Zak Date: Fri Jun 18 16:58:38 2021 +0200 more: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak text-utils/more.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 59bb9ab1363c98b202ba87319542a26eaf44a246 Author: Karel Zak Date: Fri Jun 18 16:56:52 2021 +0200 wall: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak term-utils/wall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 703ec6fc661b3955107d7466de3affe348da6b89 Author: Karel Zak Date: Fri Jun 18 16:55:40 2021 +0200 script: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak term-utils/script.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7b18166aa3f9d37f73b43daf2865d6d4d083d064 Author: Karel Zak Date: Fri Jun 18 16:52:26 2021 +0200 ldattach: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak sys-utils/ldattach.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b2bd06d9cad9eaef37fc734aba3cedc12db76839 Author: Karel Zak Date: Fri Jun 18 16:50:58 2021 +0200 hwclock: fix ul_path_scanf() use Signed-off-by: Karel Zak sys-utils/hwclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 856ec50de591c0a493ebe324b0e0f62f97b82334 Author: Karel Zak Date: Fri Jun 18 16:49:28 2021 +0200 eject: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak sys-utils/eject.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7bee16f27f064f9062083cd30d64b83ca9dcfb40 Author: Karel Zak Date: Fri Jun 18 16:42:07 2021 +0200 logger: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak misc-utils/logger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 609468bc9ba424c839991ab6ca52c5778ae0cbf3 Author: Karel Zak Date: Fri Jun 18 16:41:20 2021 +0200 libfdisk: add and fix __format__ attributes Reported-by: Jan Pazdziora Signed-off-by: Karel Zak disk-utils/cfdisk.c | 49 ++++++++++++++++++++++++++++++---------------- disk-utils/fdisk-list.c | 16 +++++++-------- disk-utils/sfdisk.c | 4 ++-- libfdisk/src/dos.c | 22 +++++++++++---------- libfdisk/src/gpt.c | 13 ++++++------ libfdisk/src/libfdisk.h.in | 9 ++++++--- libfdisk/src/sgi.c | 5 +++-- libfdisk/src/sun.c | 8 ++++---- 8 files changed, 74 insertions(+), 52 deletions(-) commit bda3f658e03be9ae62c172e0d7c9e43bfb4de1e3 Author: Karel Zak Date: Fri Jun 18 16:35:33 2021 +0200 findmnt: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak misc-utils/findmnt-verify.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 292161888c26150b64ffb88e1447ada04e29481b Author: Karel Zak Date: Fri Jun 18 16:34:20 2021 +0200 libmount: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak libmount/src/context.c | 2 +- libmount/src/mountP.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit b22ecdd8407e84b0aaaf65795386cac4a63db3e4 Author: Karel Zak Date: Fri Jun 18 16:33:16 2021 +0200 include/strutils: fix __format__attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak include/strutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f40ad0608ec08b788424a2b667d88b5bc4bea07 Author: Karel Zak Date: Fri Jun 18 16:32:37 2021 +0200 include/path: add __format__attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak include/path.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 7e787030bffb41a56f9a1e62b49ef23f0be1c6c7 Author: Karel Zak Date: Fri Jun 18 16:29:02 2021 +0200 include/c: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak include/c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fc0e55af15b24164f0efb1b696cbe40f1fd2800 Author: Anatoly Pugachev Date: Fri Jun 18 14:45:31 2021 +0200 tests: fix lsns test on kernels without USER namespaces Reported-by: Bruce Dubbs Signed-off-by: Karel Zak tests/ts/lsns/ioctl_ns | 3 +++ 1 file changed, 3 insertions(+) commit ed03caf2c642bb66f1b035b870236f99e87051f6 Author: Karel Zak Date: Fri Jun 18 14:37:28 2021 +0200 mount.8: fix overlayfs nfs_export= indention Signed-off-by: Karel Zak sys-utils/mount.8.adoc | 80 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 29 deletions(-) commit 421c6766ea5df55cc7a6826919ae67e6c8aa506f Author: Karel Zak Date: Fri Jun 18 12:25:46 2021 +0200 include/strv: fix format attributes Reported-by: Jan Pazdziora Signed-off-by: Karel Zak include/strv.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b81a870767c8e9544209e1cea2defd8d8ce23d0c Author: Christian Bartolomäus Date: Thu Jun 17 22:27:17 2021 +0200 Fix some brackets in synopses disk-utils/fsck.8.adoc | 2 +- disk-utils/sfdisk.8.adoc | 2 +- misc-utils/blkid.8.adoc | 2 +- sys-utils/prlimit.1.adoc | 4 ++-- sys-utils/setarch.8.adoc | 2 +- sys-utils/unshare.1.adoc | 2 +- term-utils/scriptreplay.1.adoc | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) commit c22bb73d3a104e3d9261951f0982afd511e784c6 Author: Tj Date: Thu Jun 17 13:13:22 2021 +0100 mount: man-page; add all overlayfs options The section in man (8) mount for overlay is missing nine options which aren't documented elsewhere either and are useful features to be aware of and use. Fixes #1350. sys-utils/mount.8.adoc | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 33eec71c1a94f28c899237e838aeafae679dcccb Author: Alex Xu <351006+Hello71@users.noreply.github.com> Date: Wed Jun 16 13:58:25 2021 +0000 build-sys: Update configure.ac 1. the test incorrectly used AC_COMPILE_IFELSE instead of AC_LINK_IFELSE, defeating the purpose of checking -lcrypt. 2. the test did not properly restore LIBS, causing later checks to all fail if libcrypt wasn't found. 3. HAVE_LIBCRYPT only controls whether to use -lcrypt, it is not needed or used in any source files. [kzak@redhat.com: - improve commit message - use UL_{SET,RESTORE}_FLAGS() rather than directly modify $LIBS] Signed-off-by: Karel Zak configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cff7e7d84b8e4769133868920cb27a16565ac92e Author: Karel Zak Date: Thu Jun 17 13:28:32 2021 +0200 lib/path: improve ul_path_readlink() to be more robust According to POSIX, readlink() makes no effort to null-terminate buffer with the result. It seems better to hide this disadvantage in the ul_path_...() API rather than assume buf[sz] = '\0' everywhere. Reported-by: Reported-by: Jan Pazdziora Signed-off-by: Karel Zak lib/path.c | 21 +++++++++++++-------- lib/sysfs.c | 11 ++++------- 2 files changed, 17 insertions(+), 15 deletions(-) commit f113d46a503b8bd9a87fff12e384f1c5468691dd Author: Karel Zak Date: Thu Jun 17 13:26:50 2021 +0200 mkfs.cramfs: add comment to explain readlink() use Signed-off-by: Karel Zak disk-utils/mkfs.cramfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 9461ae9b9097bc41c1ed88bf55cbb9f208610a4b Author: Karel Zak Date: Thu Jun 17 13:25:43 2021 +0200 rename: use readlink() in more robust way Reported-by: Jan Pazdziora Signed-off-by: Karel Zak misc-utils/rename.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit aec0e37683883c689ab1aa6278a0af23569045de Author: Karel Zak Date: Thu Jun 17 13:23:53 2021 +0200 namei: simplify code Signed-off-by: Karel Zak misc-utils/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37bb1b07e0671906d3de452d7759f346a331b15f Author: Karel Zak Date: Thu Jun 17 12:21:04 2021 +0200 more: fix setuid/setgid order The rule is pretty simple, always use setgid() before setuid(). Reported-by: Jan Pazdziora Signed-off-by: Karel Zak text-utils/more.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da0c591015f0ce58040768764b8068e33cd9c553 Author: Karel Zak Date: Wed Jun 16 15:44:02 2021 +0200 sulogin: add missing ifdefs Signed-off-by: Karel Zak login-utils/sulogin.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ee0653123c1ef9cada9734a0ba995cdd5c63bb00 Author: Karel Zak Date: Wed Jun 16 15:39:32 2021 +0200 sulogin: use explicit_bzero() for buffer with password Reported-by: Jan Pazdziora Signed-off-by: Karel Zak login-utils/sulogin.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 3aef5dcad5e343f2224cbf41b031b51acb5c3bce Author: Karel Zak Date: Wed Jun 16 15:13:50 2021 +0200 login: remove obsolete and confusing comment Reported-by: Jan Pazdziora Signed-off-by: Karel Zak login-utils/login.c | 1 - 1 file changed, 1 deletion(-) commit 3871a969ed98c1c3edc35b6092ac897d54e2e7cd Author: Karel Zak Date: Tue Jun 15 12:04:43 2021 +0200 mkswap: fix holes detection (infinite loop and/or stack-buffer-underflow) Reported-by: Brian Lane Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877 Fix: https://github.com/karelzak/util-linux/issues/1348 Signed-off-by: Karel Zak disk-utils/mkswap.c | 2 ++ 1 file changed, 2 insertions(+) commit 612913cda59b39ddcbf56af80eab6620cada56e8 Author: Karel Zak Date: Tue Jun 15 10:34:46 2021 +0200 lib/loopdev: perform retry on EAGAIN Suggested-by: Ingo Franzki Signed-off-by: Karel Zak sys-utils/losetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1e37433bbb635d0e512ee9701bac0a3039d3fa7 Author: Topi Miettinen Date: Sat Jun 12 11:34:36 2021 +0300 mount.8.adoc: document SELinux use of nosuid mount flag Using mount flag `nosuid` also affects SELinux domain transitions but this has not been documented well. Signed-off-by: Topi Miettinen sys-utils/mount.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b9d512c6f9f5db15220bd2f1ad602d169a7296c Author: Platon Pronko Date: Fri Jun 11 21:20:58 2021 +0300 dmesg: fix indentation in man page Double-semicolon at the end of the option line results in description being indented extra tab to the right. Replacing them with double-colons allows all options to be displayed at the same indent level. sys-utils/dmesg.1.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 296f21699ddc7c72e55bfc0d8979cd21f06ffc11 Author: Karel Zak Date: Fri Jun 11 15:43:36 2021 +0200 lib/path: fix possible leak when use ul_path_read_string() [coverity scan] Signed-off-by: Karel Zak lib/path.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a8deea07a7d56a1638d42e9fb6f0f3e2ab595cda Author: Karel Zak Date: Fri Jun 11 15:17:42 2021 +0200 hwclock: close adjtime on write error [coverity scan] Signed-off-by: Karel Zak sys-utils/hwclock.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 994b3295c2b9fb16c1f61f4a03518483a51a7872 Author: Karel Zak Date: Fri Jun 11 15:10:22 2021 +0200 newgrp: fix memory leak [coverity scan] Signed-off-by: Karel Zak login-utils/newgrp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit bcb6ccf819e09b0ebf014737f3d37015ebcc672e Author: Karel Zak Date: Thu Jun 10 13:44:25 2021 +0200 dmesg: fix possible memory leak [coverity scan] Signed-off-by: Karel Zak sys-utils/dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f0cf2484f6883eadfbcf1a88c9b5cc49b46c0e9 Author: Karel Zak Date: Thu Jun 10 13:35:05 2021 +0200 findmnt: (verify) fix memory leak [asan] Signed-off-by: Karel Zak misc-utils/findmnt-verify.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a7f7d3474a8b419ac424db4be0212eda5aebb0b8 Author: Karel Zak Date: Thu Jun 10 13:28:35 2021 +0200 findmnt: (verify) fix cache related memory leaks on --nocanonicalize [coverity scan] Signed-off-by: Karel Zak misc-utils/findmnt-verify.c | 47 +++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) commit d72c79d495a3281bfba6b93b295e6ae9979c892f Author: John Baublitz Date: Fri Jun 4 07:02:39 2021 -0400 libblkid: Add hyphens to UUID string representation in Stratis superblock parsing [kzak@redhat.com: - small code cleanup] Signed-off-by: Karel Zak libblkid/src/superblocks/stratis.c | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) commit a27ff267f0481dfcd0b817e88d7763e5bea9242a Author: Samir Benmendil Date: Wed Jun 9 01:21:46 2021 +0100 hexdump: correctly display signed single byte integers When using the format string '/1 "%d"', the byte did not display as a signed integer as expected, it was interpreted as unsigned. text-utils/hexdump-display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d3363ef6d73f4558c6d910cc7909e282594005e2 Author: ratijas Date: Tue Jun 8 19:12:19 2021 +0300 lsblk: fix formatting in -e option misc-utils/lsblk.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f42dc779e222303438480a27830f156f3cb285e Author: Qais Yousef Date: Mon Jun 7 17:11:11 2021 +0100 uclampset: Fix left over optind++ The code was changed to use ':' in getopt_long() but these were left over by mistake causing weird random errors when using these options depending on the order they were fed. Signed-off-by: Qais Yousef schedutils/uclampset.c | 3 --- 1 file changed, 3 deletions(-) commit 97660cb42a83eb3ffc15c99539c7d72b7f2b8f5d Author: Nicolai Dagestad Date: Sun Jun 6 18:28:35 2021 +0200 rfkill: Set scols table name to make the json output valid [kzak@redhat.com: - s/rfkill/rfkilldevices/] Fixes: https://github.com/karelzak/util-linux/issues/1339 Signed-off-by: Nicolai Dagestad Signed-off-by: Karel Zak sys-utils/rfkill.c | 1 + 1 file changed, 1 insertion(+) commit 250fc0bc9b41927ec8c7d9715d675068153c924c Author: Karel Zak Date: Mon Jun 7 10:32:20 2021 +0200 libsmartcols: fix bare array on JSON output The bare array ({[...]}) for top level list of entries is invalid. It seems better to print empty string than nothing. This is workaround for broken utils, better is to define a table name. Addresses: https://github.com/karelzak/util-linux/issues/1339 Signed-off-by: Karel Zak libsmartcols/src/print-api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af5527f45e627a3167da1f9afc325acc58418be3 Author: Karel Zak Date: Fri Jun 4 11:42:03 2021 +0200 build-sys: make re-use of generated man-pages more robust We need to ignore man-pages at all if not available (not generated yet), but asciidoctor is not installed. Fix: https://github.com/karelzak/util-linux/issues/1334 Signed-off-by: Karel Zak Makefile.am | 8 +++++++- configure.ac | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 66099fe11cc306f5b977a9090b8504404ce3de86 Author: Karel Zak Date: Thu Jun 3 12:17:27 2021 +0200 build-sys: add generated man-pages to distribution tarball Signed-off-by: Karel Zak Makefile.am | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit fb87dcc80e12ee8fd418681af1632e456ae3c15a Author: Georgy Yakovlev Date: Wed Jun 2 13:59:26 2021 -0700 lscpu: fix build on powerpc fails with error: label at end of compound statement and fix typo as bonus. Signed-off-by: Georgy Yakovlev sys-utils/lscpu-cputype.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9bf924165bc87cdfdec6f597364bc4f67d34a0d0 Author: Karel Zak Date: Wed Jun 2 13:32:43 2021 +0200 lsblk: use ID_MODEL_ENC is possible Fix: https://github.com/karelzak/util-linux/issues/1098 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bef5ab005e6c2ec2f604739b7bc75edea8d02315 Author: Karel Zak Date: Mon Jun 14 16:29:21 2021 +0200 include/strutils: fix heap-buffer-overflow in normalize_whitespace() Signed-off-by: Karel Zak include/strutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fce7b9501c7d9aee6b3eca7ce13971aad5e53344 Author: Karel Zak Date: Wed Jun 2 11:55:44 2021 +0200 build-sys: fix {release-version} man pages * define {release-version} as $VERSION * do not use {docdir} in adoc; it's built-in ascidoctor variable https://docs.asciidoctor.org/asciidoc/latest/attributes/document-attributes-reference/#intrinsic-attributes Addresses: https://github.com/karelzak/util-linux/issues/1327 Signed-off-by: Karel Zak Makefile.am | 2 ++ misc-utils/getopt.1.adoc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit e0c46c2d4ef9070f5ebbeb788c8d014623c51c5b Author: Karel Zak Date: Wed Jun 2 11:14:36 2021 +0200 build-sys: install hardlink bash-completion Signed-off-by: Karel Zak bash-completion/Makemodule.am | 3 +++ 1 file changed, 3 insertions(+) commit a057fdb13a97e51f2dc7a78454655d5618d4868f Author: Karel Zak Date: Tue Jun 1 10:37:01 2021 +0200 docs: fix typo in v2.37-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.37-ReleaseNotes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 635d382146065dc0c0b8c74e658f2ec2c8d8f060 Author: Karel Zak Date: Tue Jun 1 10:31:49 2021 +0200 docs: add uclampset to AUTHORS file Signed-off-by: Karel Zak AUTHORS | 1 + 1 file changed, 1 insertion(+)