Changes between v2.33 and v2.34-rc1 -------------------------------------------- commit 4267f2bceaf2228c0906f31dccab2618068a5c70 Author: Karel Zak Date: Tue Apr 30 11:56:27 2019 +0200 build-sys: release++ (v2.34-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 6899ed8b7e6f9f2eed19eaef2d60eac57f3ff438 Author: Karel Zak Date: Tue Apr 30 11:52:20 2019 +0200 docs: update v2.34-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.34-ReleaseNotes | 427 ++++++++++++++++++++++++++++++ 1 file changed, 427 insertions(+) commit ee322c23f456b1914f65b407d29f0f72a7e6fa54 Author: Karel Zak Date: Mon Apr 29 14:59:39 2019 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit df8434230bd0ea039bbf42b6ce9cafa6c858fe15 Author: Karel Zak Date: Mon Apr 29 14:47:19 2019 +0200 tests: build-sys update * libblkid does not depend on libuuid anymore * libncurses depends on libdl due to $ ncursesw6-config --libs -lncursesw -ltinfo -ldl * new command hardlink (with dependence on libpcre2-8 * hwclock needs librt Signed-off-by: Karel Zak tests/expected/build-sys/config-all | 45 ++-- tests/expected/build-sys/config-all-non-nls | 45 ++-- tests/expected/build-sys/config-audit | 43 ++-- tests/expected/build-sys/config-chfnsh-libuser | 43 ++-- tests/expected/build-sys/config-chfnsh-no-password | 43 ++-- tests/expected/build-sys/config-chfnsh-pam | 43 ++-- tests/expected/build-sys/config-core | 43 ++-- tests/expected/build-sys/config-devel | 237 +++++++++++---------- tests/expected/build-sys/config-devel-non-docs | 45 ++-- tests/expected/build-sys/config-non-libblkid | 5 +- tests/expected/build-sys/config-non-libmount | 15 +- tests/expected/build-sys/config-non-libs | 3 +- tests/expected/build-sys/config-non-libsmartcols | 25 +-- tests/expected/build-sys/config-non-libuuid | 3 +- tests/expected/build-sys/config-non-nls | 43 ++-- tests/expected/build-sys/config-selinux | 43 ++-- tests/expected/build-sys/config-slang | 41 ++-- tests/expected/build-sys/config-static | 43 ++-- 18 files changed, 413 insertions(+), 395 deletions(-) commit 450016eb72abbfb0a339e49247947684ffab1e08 Author: Karel Zak Date: Thu Apr 25 10:18:08 2019 +0200 build-sys: don't use ASAN on XOS It seems that Apple Clang is not mature enough to use ASAN. AddressSanitizer: detect_leaks is not supported on this platform. Let's disable ASAN on XOS at all. Signed-off-by: Karel Zak .travis-functions.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 57f25377c3e36fc433addc7ee4647092314bd4f6 Author: Karel Zak Date: Wed Apr 24 18:39:05 2019 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 3946 +++++++++++++++++++++++++++----------------------- po/cs.po | 3950 +++++++++++++++++++++++++++----------------------- po/da.po | 3936 +++++++++++++++++++++++++++----------------------- po/de.po | 4128 ++++++++++++++++++++++++++++------------------------ po/es.po | 4127 ++++++++++++++++++++++++++++------------------------ po/et.po | 3928 +++++++++++++++++++++++++++----------------------- po/eu.po | 3942 +++++++++++++++++++++++++++----------------------- po/fi.po | 3953 +++++++++++++++++++++++++++----------------------- po/fr.po | 4126 ++++++++++++++++++++++++++++------------------------ po/gl.po | 3919 +++++++++++++++++++++++++++----------------------- po/hr.po | 4109 ++++++++++++++++++++++++++++------------------------ po/hu.po | 3951 +++++++++++++++++++++++++++----------------------- po/id.po | 3953 +++++++++++++++++++++++++++----------------------- po/it.po | 3963 +++++++++++++++++++++++++++----------------------- po/ja.po | 3950 +++++++++++++++++++++++++++----------------------- po/nl.po | 3947 +++++++++++++++++++++++++++----------------------- po/pl.po | 3936 +++++++++++++++++++++++++++----------------------- po/pt_BR.po | 3947 +++++++++++++++++++++++++++----------------------- po/ru.po | 3937 +++++++++++++++++++++++++++----------------------- po/sl.po | 3946 +++++++++++++++++++++++++++----------------------- po/sv.po | 4143 ++++++++++++++++++++++++++++------------------------- po/tr.po | 3941 +++++++++++++++++++++++++++----------------------- po/uk.po | 3934 +++++++++++++++++++++++++++----------------------- po/util-linux.pot | 3869 ++++++++++++++++++++++++++----------------------- po/vi.po | 3946 +++++++++++++++++++++++++++----------------------- po/zh_CN.po | 3944 +++++++++++++++++++++++++++----------------------- po/zh_TW.po | 3958 +++++++++++++++++++++++++++----------------------- 27 files changed, 57997 insertions(+), 49332 deletions(-) commit 08a2cf7292511d27969c900f5ce6b01569e61733 Author: Karel Zak Date: Wed Apr 24 18:31:08 2019 +0200 hardlink: remove \r from output * remove \r from internationalized messages * remove \r from all output to make it easy to use (see for example output file from "hardlink -vv --dry-run . &> log") * remove unnecessary formatting stuff from output, just keep is simple and stupid... Signed-off-by: Karel Zak misc-utils/hardlink.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 8a2c8175f2fbbc4d6ad94157a20589fe7348b607 Author: Sebastian Rasmussen Date: Wed Apr 24 18:10:37 2019 +0200 po: update sv.po (from translationproject.org) po/sv.po | 586 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 283 insertions(+), 303 deletions(-) commit 679bc72cf6d6c95d2b80c1bdbd4c7643202e98e3 Author: Božidar Putanec Date: Wed Apr 24 18:10:37 2019 +0200 po: update hr.po (from translationproject.org) po/hr.po | 9313 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 4576 insertions(+), 4737 deletions(-) commit bd5d0e0b46b5f30956443747b5b676b2482c47a7 Author: Frédéric Marchal Date: Wed Apr 24 18:10:36 2019 +0200 po: update fr.po (from translationproject.org) po/fr.po | 289 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 140 insertions(+), 149 deletions(-) commit fc2e4b525a1cbb7a00bf244bbbcfcf692cccc247 Author: Antonio Ceballos Roa Date: Wed Apr 24 18:10:36 2019 +0200 po: update es.po (from translationproject.org) po/es.po | 331 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 158 insertions(+), 173 deletions(-) commit a166829c7c6d19181025387fe853055a48a663b1 Author: Mario Blättermann Date: Wed Apr 24 18:10:36 2019 +0200 po: update de.po (from translationproject.org) po/de.po | 3021 ++++++++++++++++++++------------------------------------------ 1 file changed, 990 insertions(+), 2031 deletions(-) commit 4750cb912685ef2c41166704f96911366102b6ab Author: Karel Zak Date: Wed Apr 24 18:04:24 2019 +0200 build-sys: add devel-non-asan.conf This allows to use "./tools/config-gen devel-non-asan" for ./configure. Signed-off-by: Karel Zak tools/config-gen.d/devel-non-asan.conf | 6 ++++++ 1 file changed, 6 insertions(+) commit 58354269eb9ab3b1963b2d56294393a3d02db712 Author: Karel Zak Date: Wed Apr 24 18:02:39 2019 +0200 build-sys: add 'make checklibdoc' Let's to be sure that all libs API symbols are documented. Signed-off-by: Karel Zak Makefile.am | 13 +++++++++++++ tools/checklibdocs.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 00749b05b93978e93768fba73334edb2cc81ace1 Author: Karel Zak Date: Wed Apr 24 12:45:20 2019 +0200 su: make comment more friedly to 'make checkxalloc' Signed-off-by: Karel Zak login-utils/su-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b97a25162a96811086919d43e834717783e3d5ae Author: Karel Zak Date: Wed Apr 24 12:43:27 2019 +0200 losetup: man page has repeating words [make checkmans] Signed-off-by: Karel Zak sys-utils/losetup.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b17c997c0ae9b3268e1c2c22ca8906b2e22a5dd Author: Karel Zak Date: Wed Apr 24 12:24:15 2019 +0200 tests: auto-enable ASAN option if necessary Let's detect ASAN LDFLAGS in top level Makefile to make sure we call tests with --memcheck-asan if build-system has been configured with --enable-asan. Signed-off-by: Karel Zak tests/run.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 0d37969cbe2cb85d9c01f78071528a8a7c789f96 Author: Stanislav Brabec Date: Wed Apr 24 11:16:53 2019 +0200 lslogins: Fix discrepancies of SYS_UID_MIN util-linux does not contain useradd. Its most popular implementation comes from shadow. SYS_UID_MIN is one of common parameters. Its hardcoded fallback value is equal to 101 in shadow useradd (see shadow-4.6/libmisc/find_new_uid.c: get_ranges()), but 201 in login-utils/lslogins.c. Let lslogins use the same fallback as useradd from shadow. Hopefully most distros define its custom value of SYS_UID_MIN in /etc/login.defs, so this problem is not visible. login-utils/lslogins.1 does not mention its default at all. Add a reference and improve text of lslogins(1) to prevent off-by-one interpretation. Signed-off-by: Stanislav Brabec Signed-off-by: Karel Zak login-utils/lslogins.1 | 6 +++--- login-utils/lslogins.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit ce3d198d7c6031ef22bd23c80c24ea5c6ce0f194 Author: Wang Shilong Date: Tue Apr 23 23:58:28 2019 +0900 fstrim: document kernel return minlen explicitly Filesystem will modify @minlen according to its block size etc, and will return actual unit to userspace, document it into manpage. Cc: Darrick J. Wong Signed-off-by: Wang Shilong Reviewed-by: Darrick J. Wong sys-utils/fstrim.8 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 19bc8ef897a187cf7605fa22c60b410e72749ee8 Author: Karel Zak Date: Wed Apr 17 10:38:50 2019 +0200 tests: fix TS_ENABLE_ASAN usage Signed-off-by: Karel Zak tests/ts/kill/name_to_number | 2 +- tests/ts/libmount/tabfiles-tags | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2da48ba3cce141fa77c31ca70c5477d4ec98e190 Author: Karel Zak Date: Wed Apr 17 10:10:46 2019 +0200 tests: use TS_ENABLE_ASAN in tests to detect ASAN It seems better to not use any random ASAN variable. Signed-off-by: Karel Zak tests/ts/kill/name_to_number | 2 +- tests/ts/libmount/tabfiles-tags | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2c308875a7fa1aaa44892c368f6b37bcfcb8879a Author: Karel Zak Date: Tue Apr 16 15:14:13 2019 +0200 misc: consolidate version printing and close_stdout() Signed-off-by: Karel Zak Documentation/boilerplate.c | 5 ++--- disk-utils/addpart.c | 3 +-- disk-utils/blockdev.c | 8 +++----- disk-utils/cfdisk.c | 5 ++--- disk-utils/delpart.c | 3 +-- disk-utils/fdformat.c | 5 ++--- disk-utils/fdisk.c | 5 ++--- disk-utils/fsck.c | 8 +++----- disk-utils/fsck.cramfs.c | 5 ++--- disk-utils/fsck.minix.c | 5 ++--- disk-utils/isosize.c | 5 ++--- disk-utils/mkfs.bfs.c | 2 +- disk-utils/mkfs.c | 2 +- disk-utils/mkfs.cramfs.c | 7 +++---- disk-utils/mkfs.minix.c | 5 ++--- disk-utils/mkswap.c | 5 ++--- disk-utils/partx.c | 5 ++--- disk-utils/raw.c | 5 ++--- disk-utils/resizepart.c | 5 ++--- disk-utils/sfdisk.c | 6 ++---- disk-utils/swaplabel.c | 5 ++--- include/c.h | 5 +++++ login-utils/chfn.c | 6 +++--- login-utils/chsh.c | 5 ++--- login-utils/islocal.c | 2 +- login-utils/last.c | 5 ++--- login-utils/login.c | 3 +-- login-utils/logindefs.c | 2 +- login-utils/lslogins.c | 5 ++--- login-utils/newgrp.c | 5 ++--- login-utils/nologin.c | 4 +--- login-utils/su-common.c | 6 ++---- login-utils/sulogin.c | 8 ++++---- login-utils/utmpdump.c | 6 ++---- login-utils/vipw.c | 5 ++--- misc-utils/blkid.c | 2 +- misc-utils/cal.c | 5 ++--- misc-utils/fincore.c | 5 ++--- misc-utils/findfs.c | 5 ++--- misc-utils/findmnt.c | 13 ++++++------- misc-utils/getopt.c | 10 +++++----- misc-utils/hardlink.c | 5 ++--- misc-utils/kill.c | 8 +++----- misc-utils/logger.c | 12 ++++++------ misc-utils/look.c | 5 ++--- misc-utils/lsblk.c | 16 ++++++++-------- misc-utils/lslocks.c | 12 ++++++------ misc-utils/mcookie.c | 6 +++--- misc-utils/namei.c | 13 ++++++------- misc-utils/rename.c | 6 +++--- misc-utils/uuidd.c | 6 +++--- misc-utils/uuidgen.c | 8 ++++---- misc-utils/uuidparse.c | 6 +++--- misc-utils/whereis.c | 12 +++++------- misc-utils/wipefs.c | 11 +++++------ schedutils/chrt.c | 6 +++--- schedutils/ionice.c | 6 +++--- schedutils/taskset.c | 7 +++---- sys-utils/blkdiscard.c | 13 ++++++------- sys-utils/blkzone.c | 11 +++++------ sys-utils/chcpu.c | 10 +++++----- sys-utils/chmem.c | 13 ++++++------- sys-utils/choom.c | 6 +++--- sys-utils/ctrlaltdel.c | 5 ++--- sys-utils/dmesg.c | 13 ++++++------- sys-utils/eject.c | 12 +++++------- sys-utils/fallocate.c | 11 +++++------ sys-utils/flock.c | 6 +++--- sys-utils/fsfreeze.c | 9 ++++----- sys-utils/fstrim.c | 14 ++++++-------- sys-utils/hwclock.c | 6 +++--- sys-utils/ipcmk.c | 7 +++---- sys-utils/ipcrm.c | 6 +++--- sys-utils/ipcs.c | 6 +++--- sys-utils/ldattach.c | 4 ++-- sys-utils/losetup.c | 11 +++++------ sys-utils/lscpu.c | 10 +++++----- sys-utils/lsipc.c | 4 ++-- sys-utils/lsmem.c | 15 +++++++-------- sys-utils/lsns.c | 12 ++++++------ sys-utils/mount.c | 15 ++++++++------- sys-utils/mountpoint.c | 7 +++---- sys-utils/nsenter.c | 11 +++++------ sys-utils/pivot_root.c | 5 ++--- sys-utils/prlimit.c | 13 ++++++------- sys-utils/readprofile.c | 6 +++--- sys-utils/renice.c | 8 +++----- sys-utils/rfkill.c | 6 +++--- sys-utils/rtcwake.c | 6 +++--- sys-utils/setarch.c | 13 ++++++------- sys-utils/setpriv.c | 6 +++--- sys-utils/setsid.c | 8 ++++---- sys-utils/swapoff.c | 13 ++++++------- sys-utils/swapon.c | 13 ++++++------- sys-utils/switch_root.c | 5 ++--- sys-utils/tunelp.c | 11 +++++------ sys-utils/umount.c | 15 ++++++++------- sys-utils/unshare.c | 12 ++++++------ sys-utils/wdctl.c | 12 ++++++------ sys-utils/zramctl.c | 6 +++--- term-utils/mesg.c | 6 +++--- term-utils/script.c | 8 +++----- term-utils/scriptreplay.c | 6 +++--- term-utils/setterm.c | 6 +++--- term-utils/wall.c | 6 +++--- term-utils/write.c | 5 ++--- text-utils/col.c | 6 +++--- text-utils/colcrt.c | 6 +++--- text-utils/colrm.c | 3 +-- text-utils/column.c | 13 ++++++------- text-utils/hexdump.c | 7 +++---- text-utils/line.c | 5 ++--- text-utils/more.c | 10 ++++------ text-utils/pg.c | 8 ++++---- text-utils/rev.c | 5 ++--- text-utils/ul.c | 6 +++--- 116 files changed, 391 insertions(+), 466 deletions(-) commit 68224d108d1e5359a111cb2be0404f6556cb90dd Author: Karel Zak Date: Tue Apr 16 13:47:17 2019 +0200 include/c: add print_version() macro Let's consolidate the version printing code. It also seems better to use exit() after --version, because it's handled in different way by ASAN. It's strange, but ASAN reports leaks after return in main(). Note that we do not use free-before-exit. Signed-off-by: Karel Zak disk-utils/mkfs.bfs.c | 10 ++-------- disk-utils/mkfs.c | 10 ++-------- misc-utils/blkid.c | 11 +++-------- sys-utils/mount.c | 4 ++-- sys-utils/umount.c | 4 ++-- 5 files changed, 11 insertions(+), 28 deletions(-) commit 31c66833cb8e3aad8af0eea4a1744e9e14f657b9 Author: Karel Zak Date: Tue Apr 16 13:42:34 2019 +0200 include/closestream: add close_stdout_atexit() It seems better to have a way to control when atexit(close_stdout()) is used, because close stdout means that for example ASAN (or another into binary integrated tool) is not able to print the final summary. Signed-off-by: Karel Zak configure.ac | 2 ++ include/closestream.h | 11 +++++++++++ 2 files changed, 13 insertions(+) commit 7f8787d09405c7a8558f94d44186369422516a6f Author: Karel Zak Date: Tue Apr 16 10:51:35 2019 +0200 chcpu: fix memory leak The CPU set has been allocated more than once. Signed-off-by: Karel Zak sys-utils/chcpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2e5ff9db30ba4bf70f2df8b37ee28c3805c28ed3 Author: Karel Zak Date: Mon Apr 15 13:35:21 2019 +0200 libmount: fix compiler warning [-Wsometimes-uninitialized] Signed-off-by: Karel Zak libmount/src/tab_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bd44e8adeb8fbfa525778d3636b81555a448ca5 Author: Karel Zak Date: Mon Apr 15 13:05:33 2019 +0200 build-sys: enable ASAN on travis-ci Addresses: Addresses: https://github.com/systemd/systemd/pull/12252 Signed-off-by: Karel Zak .travis-functions.sh | 6 ++++-- tools/config-gen.d/devel.conf | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit ef61c093d31ee07a8e5df3125ea3418f49f46538 Author: Karel Zak Date: Mon Apr 15 13:01:21 2019 +0200 build-sys: add ASAN_LDFLAGS Signed-off-by: Karel Zak Makefile.am | 2 +- configure.ac | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 1271e63c499b272cfa65deda4a74197f5253df74 Author: Karel Zak Date: Mon Apr 15 12:58:48 2019 +0200 tests: ignore errors with enabled ASAN in python bindings temporary solution... as it ends with undefined symbol: __asan_option_detect_stack_use_after_return Signed-off-by: Karel Zak tests/ts/libmount/context-py | 4 ++++ tests/ts/libmount/context-utab-py | 4 ++++ tests/ts/libmount/tabfiles-py | 2 +- tests/ts/libmount/tabfiles-tags-py | 2 +- tests/ts/libmount/update-py | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) commit 82e39473a5b9139248c94a0d3b2f6432d57566cc Author: Karel Zak Date: Mon Apr 15 12:55:46 2019 +0200 libmount: fix memleak on parse errors Addresses: https://github.com/systemd/systemd/pull/12252 Signed-off-by: Karel Zak libmount/src/tab_parse.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 8302b2009a5584c7503ff4c63eaf9f701836b46f Author: Wang Shilong Date: Sun Apr 14 12:31:56 2019 +0900 fstrim: get realpath before trim ioctl Original motivation is we want to run fstrim command on Lustre[1] osd server mount point directly, however our server mount point doesn't export osd directory to users, and it will cause following command fail: $fstrim -v /mnt/mds/ But following succeed: $fstrim -v /mnt/mds We could improve this a bit by getting realpath before trapping kernel, this also give benifits to normal use cases. Cc: Andreas Dilger Cc: Shuichi Ihara [1] http://wiki.lustre.org/Main_Page Signed-off-by: Wang Shilong sys-utils/fstrim.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 8b2464ae2ab3d73b9000e4567eeefac7b2366d77 Author: Karel Zak Date: Thu Apr 11 13:55:51 2019 +0200 tests: update lscpu due to 'Vulnerability' fields Signed-off-by: Karel Zak tests/expected/lscpu/lscpu-x86_64-epyc_7451 | 69 ++++++++++++++++------------- 1 file changed, 37 insertions(+), 32 deletions(-) commit b8910af5a67db98bea9111c648ab224625c46784 Author: Karel Zak Date: Thu Apr 11 13:53:03 2019 +0200 lscpu: wrap default output long lines on terminal Signed-off-by: Karel Zak sys-utils/lscpu.1 | 5 ++++- sys-utils/lscpu.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit 639eeb28ddcef3f6d8ee91874a9b633096e202fc Author: Karel Zak Date: Thu Apr 11 13:45:29 2019 +0200 lscpu: report CPU vulnerabilities Signed-off-by: Karel Zak sys-utils/lscpu.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ sys-utils/lscpu.h | 7 ++++++ 2 files changed, 80 insertions(+) commit 3c4ff2dc9d3fa334623b02b492b30a31dadb81e4 Author: Karel Zak Date: Thu Apr 11 13:13:06 2019 +0200 include/strutils: add functions to replace and remove chars from string Signed-off-by: Karel Zak include/strutils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7761bd3bb6c56a375ad8d027c20d020aaa33e2d8 Author: Karel Zak Date: Thu Apr 11 13:11:53 2019 +0200 lib/fileutils: add xreaddir() Remove duplicate code and keep only one implementation in include/fileutils.h. Signed-off-by: Karel Zak include/fileutils.h | 15 +++++++++++++++ lib/path.c | 15 --------------- lib/sysfs.c | 15 --------------- misc-utils/lsblk.c | 19 +------------------ 4 files changed, 16 insertions(+), 48 deletions(-) commit 146900d41166efc375d69d7a51f9675dba684f6a Author: Andrew Savchenko Date: Fri Mar 23 17:40:22 2018 +0300 setarch: add new e2k subarches Signed-off-by: Karel Zak sys-utils/setarch.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5b13d6a1c905e1e425e6b7ca340a410c580f0f75 Author: Karel Zak Date: Mon Apr 8 13:33:04 2019 +0200 tests: add /mnt/test/foo^Mbar to mountinfo tests Addresses: https://github.com/karelzak/util-linux/issues/780 Signed-off-by: Karel Zak tests/expected/libmount/tabdiff-mount | 1 + tests/expected/libmount/tabdiff-move | 1 + tests/expected/libmount/tabdiff-remount | 1 + tests/expected/libmount/tabdiff-umount | 1 + tests/expected/libmount/tabfiles-parse-mountinfo | 12 ++++++++++++ tests/expected/libmount/tabfiles-py-parse-mountinfo | 12 ++++++++++++ tests/ts/libmount/files/mountinfo | 1 + 7 files changed, 29 insertions(+) commit 6c9ab254aefb6ce7e0e032690791ad451f6b9408 Author: Karel Zak Date: Mon Apr 8 13:33:04 2019 +0200 libmount: don't use sscanf() for swaps parsing Addresses: https://github.com/karelzak/util-linux/issues/780 Signed-off-by: Karel Zak include/pathnames.h | 1 - libmount/src/tab_parse.c | 120 +++++++++++++++++++++++++++++------------------ 2 files changed, 74 insertions(+), 47 deletions(-) commit 86673b3a462a3e253f791a963ad05da27acfe133 Author: Karel Zak Date: Mon Apr 8 13:33:04 2019 +0200 libmount: don't use sscanf() for mountinfo parsing Addresses: https://github.com/karelzak/util-linux/issues/780 Signed-off-by: Karel Zak include/pathnames.h | 2 +- libmount/src/tab_parse.c | 204 ++++++++++++++++++++++++++--------------------- 2 files changed, 114 insertions(+), 92 deletions(-) commit 36fcefa651621fdea19ca0cedf4d64a78c0a8446 Author: Karel Zak Date: Mon Apr 8 13:33:04 2019 +0200 libmount: don't use sscanf() for fstab parsing Addresses: https://github.com/karelzak/util-linux/issues/780 Signed-off-by: Karel Zak lib/mangle.c | 2 +- libmount/src/tab_parse.c | 135 ++++++++++++++++++++++++----------------------- 2 files changed, 69 insertions(+), 68 deletions(-) commit f1428af5be9febc613b556bd4768a9d2baf25f95 Merge: e10864398 25d9f1403 Author: Karel Zak Date: Tue Apr 2 12:05:25 2019 +0200 Merge branch 'spelling' of https://github.com/jwilk-forks/util-linux * 'spelling' of https://github.com/jwilk-forks/util-linux: docs: fix typo commit e1086439814951d460fca3c986e6784568677aab Author: Marcos Paulo de Souza Date: Mon Apr 1 18:38:31 2019 -0300 fstrim.c: Remove commnet about vfat not supporting fstrim Commit f663b5b38f ("fat: add FITRIM ioctl for FAT file system") in linux kernel added support for using fstrim with vfat filesystem. Signed-off-by: Marcos Paulo de Souza sys-utils/fstrim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c313ee737b7309ea4bafbd3f05c8a4421aab29cf Author: Karel Zak Date: Fri Mar 29 13:00:42 2019 +0100 tastset: (man) add :N stride for CPU lists Signed-off-by: Karel Zak schedutils/taskset.1 | 4 ++++ 1 file changed, 4 insertions(+) commit 4534e4f2fbd7cd1917c0367ddc09b1482d529117 Author: Karel Zak Date: Thu Mar 28 15:29:09 2019 +0100 fsck: (man) labels are available for all filesystems Signed-off-by: Karel Zak disk-utils/fsck.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99c1ebee2106bb72d0fd6908bd47eb3f5334ae96 Author: Karel Zak Date: Mon Mar 25 16:39:43 2019 +0100 su: change error message We use PAM and if pam_strerror() returns nothing we have no clue why authentication failed. It's mistake to blame incorrect password if there are many possible reason... Addresses: https://github.com/karelzak/util-linux/issues/778 Signed-off-by: Karel Zak login-utils/su-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25d9f1403dcf112e23d87b1cbcda4a189c664089 Author: Jakub Wilk Date: Fri Mar 22 13:27:33 2019 +0100 docs: fix typo Signed-off-by: Jakub Wilk Documentation/deprecated.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65bcbf105bfc5f6510b8df8db09d9458f942c799 Author: Karel Zak Date: Wed Mar 20 13:12:25 2019 +0100 taskset: fix cpuset list parser taskset hangs when executed with badly formatted cpuset list, for example: $ taskset -c 0--1 true The current cpuset list parser is pretty weak as based on scanf() without strings verification ("-1" as input for "%u" returns unexpected number). It seems faster and better to use strtoul() and isdigit(). Addresses: https://github.com/karelzak/util-linux/issues/77 Signed-off-by: Karel Zak lib/cpuset.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 06c141a99a059088a85f256d6e4096ca49874926 Author: Karel Zak Date: Tue Mar 19 17:00:01 2019 +0100 lscpu: (man) tiny changes sys-utils/lscpu.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a44cd89128bc83c5850f392f82c1dbfcc750df21 Author: Karel Zak Date: Tue Mar 19 16:56:28 2019 +0100 lscpu: fix excl[] array order It (rows and columns) must be in ASCII order. Signed-off-by: Karel Zak misc-utils/lsblk.c | 1 + sys-utils/lscpu.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 0a31a242cbed77f33c007a4fe66b7c54986a1cd2 Author: Karel Zak Date: Tue Mar 19 16:47:55 2019 +0100 lscpu: fix and document --output-all Signed-off-by: Karel Zak sys-utils/lscpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2ec00a10b222920d77d857bbc67f16e6cb7138ef Author: Karel Zak Date: Tue Mar 19 16:40:51 2019 +0100 lscpu: define libsmartcols flags for -e Signed-off-by: Karel Zak sys-utils/lscpu.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4161da7bb00967c301e6b0b3cf9f782d51a50dbc Author: Karel Zak Date: Tue Mar 19 16:24:54 2019 +0100 lscpu: fix --caches order Signed-off-by: Karel Zak sys-utils/lscpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9261d0a119a48b763ca9d3114f82674e69de75d3 Author: Karel Zak Date: Tue Mar 19 14:22:33 2019 +0100 lscpu: (man) make SYNOPSIS compatible with another utils In this case is really no reason to duplicate all options in SYNOPSIS. Signed-off-by: Karel Zak sys-utils/lscpu.1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2011528bce58dd31d5ee0287f2367da1f2d6cfa9 Author: Karel Zak Date: Tue Mar 19 14:21:02 2019 +0100 lscpu: add --bytes Signed-off-by: Karel Zak sys-utils/lscpu.1 | 3 +++ sys-utils/lscpu.c | 33 +++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) commit 0e86bc8406959d0d56194d4f404b780e6b70caa4 Author: Karel Zak Date: Tue Mar 19 13:47:11 2019 +0100 lscpu: add --caches $ lscpu -C NAME ONE-SIZE ALL-SIZE WAYS TYPE LEVEL L3 8M 8M 16 Unified 3 L2 256K 1M 8 Unified 2 L1i 32K 128K 8 Instruction 1 L1d 32K 128K 8 Data 1 The patch also updates extra caches (s390) output in lsblk summary to be compatible with output about normal caches. Addresses: https://github.com/karelzak/util-linux/issues/663 Signed-off-by: Karel Zak Documentation/TODO | 9 - sys-utils/lscpu.1 | 11 ++ sys-utils/lscpu.c | 251 ++++++++++++++++++++++++---- sys-utils/lscpu.h | 7 +- tests/expected/lscpu/lscpu-s390-lpar-drawer | 4 +- 5 files changed, 233 insertions(+), 49 deletions(-) commit 357dd756d14c664b408d8a1bfdede45bc040131c Author: Karel Zak Date: Tue Mar 19 12:40:49 2019 +0100 lib/path: remove extra semi-colons Signed-off-by: Karel Zak lib/path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc07239d5cc8c68173afde8f1b62101a70e47daf Author: Karel Zak Date: Tue Mar 19 11:36:43 2019 +0100 lscpu: rename macros and functions We need to differentiate between output about CPUs and another stuff (caches in future). Let's make it more obvious in code. Signed-off-by: Karel Zak sys-utils/lscpu.c | 154 +++++++++++++++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 77 deletions(-) commit 1b4b184cc8e59e86d3219eaf5c15b75658bab2a9 Author: Karel Zak Date: Tue Mar 19 13:56:26 2019 +0100 tests: update lscpu output Signed-off-by: Karel Zak tests/expected/lscpu/lscpu-ppc-qemu | 2 -- tests/expected/lscpu/lscpu-ppc64-POWER7 | 4 ++-- tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu | 4 ++-- tests/expected/lscpu/lscpu-s390-lpar-drawer | 8 ++++---- tests/expected/lscpu/lscpu-vbox-win | 6 +++--- tests/expected/lscpu/lscpu-x86_64-64cpu | 8 ++++---- tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 8 ++++---- tests/expected/lscpu/lscpu-x86_64-epyc_7451 | 8 ++++---- 8 files changed, 23 insertions(+), 25 deletions(-) commit e5f721132ec8b8c933a396d8dcb3efcb67854f13 Author: Karel Zak Date: Tue Mar 19 11:09:02 2019 +0100 lscpu: report more usable cache sizes The current version reports cache size as reported by /sys, it means real size of the one piece of the cache. This way provides minimal overview about all system as the cache is often shared between CPUs. It seems better to report all size of the caches in the summary output. It also does not make sense to report sizes per core (or socket) as CPU topology may be pretty complicated. The final solution (not implemented yet) will be to have --list-caches where we can report all details like all-size, item-size, per-core size, ways, type, etc. Addresses: https://github.com/karelzak/util-linux/issues/663 Signed-off-by: Karel Zak sys-utils/lscpu.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) commit fb3761809fa847cb0012f98c6614d5e8c1f8dbe2 Author: Karel Zak Date: Mon Mar 18 16:58:41 2019 +0100 lsblk: force tree on --json --tree independently on used columns Signed-off-by: Karel Zak misc-utils/lsblk.8 | 6 ++++-- misc-utils/lsblk.c | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) commit 58bfb7e927ed9666633b66621edd7f05c6f692f6 Author: Karel Zak Date: Mon Mar 18 14:14:09 2019 +0100 docs: TODO lscpu --list-caches Addresses: https://github.com/karelzak/util-linux/issues/663 Signed-off-by: Karel Zak Documentation/TODO | 9 +++++++++ 1 file changed, 9 insertions(+) commit 16ca05511b90ba3204fccdad28b5526ba10263cf Author: Karel Zak Date: Fri Mar 15 13:33:40 2019 +0100 lscpu: add 'Frequency boost' Show turbo boost status on platforms where is available a file /sys/devices/system/cpu/cpufreq/boost. Addresses: https://github.com/karelzak/util-linux/issues/755 Signed-off-by: Karel Zak sys-utils/lscpu.c | 7 +++++++ sys-utils/lscpu.h | 1 + tests/expected/lscpu/lscpu-x86_64-epyc_7451 | 1 + 3 files changed, 9 insertions(+) commit a8f103f079dd812327caaf6f87df3a8c945acdbc Merge: 9bfff042d 63391d757 Author: Karel Zak Date: Mon Mar 11 12:09:30 2019 +0100 Merge branch 'swapon-btrfs' of https://github.com/marcosfrm/util-linux * 'swapon-btrfs' of https://github.com/marcosfrm/util-linux: swapon.8: mention btrfs(5) commit 9bfff042d05044d0ea4552f1b2d0566ba328a3a7 Merge: 5bf5752e2 f28985ffc Author: Karel Zak Date: Mon Mar 11 12:06:38 2019 +0100 Merge branch 'setterm' of https://github.com/jwilk-forks/util-linux * 'setterm' of https://github.com/jwilk-forks/util-linux: setterm: fix --hbcolor description commit 5bf5752e28ffde28dea48abea48c720396bf88e4 Author: Karel Zak Date: Mon Mar 11 12:02:31 2019 +0100 blkid: (man) cleanup return code section Addresses: https://github.com/karelzak/util-linux/issues/764 Signed-off-by: Karel Zak misc-utils/blkid.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 63391d7579a4bf4d3a044d14aea0ceba5b028083 Author: Marcos Mello Date: Mon Mar 11 07:30:35 2019 -0300 swapon.8: mention btrfs(5) See: https://github.com/kdave/btrfs-progs/commit/5c880c82c2044b0abae5c838c733a2e6522ed122 sys-utils/swapon.8 | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit f28985ffc341ae7f2c47df8329f173e0bbf65521 Author: Jakub Wilk Date: Fri Mar 8 21:25:59 2019 +0100 setterm: fix --hbcolor description --hbcolor is for half-bright characters, which is sort of opposite of bold. Signed-off-by: Jakub Wilk term-utils/setterm.1 | 2 +- term-utils/setterm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ffe147fadde382108f6a96809cb1f222e6ae94e6 Merge: 984710658 bec23f0bf Author: Karel Zak Date: Fri Mar 8 13:15:29 2019 +0100 Merge branch 'setterm' of https://github.com/jwilk-forks/util-linux * 'setterm' of https://github.com/jwilk-forks/util-linux: setterm: update comments about -ulcolor/-hbcolor syntax setterm: fix bright colors for --ulcolor/--hbcolor setterm: disallow "default" for --ulcolor/--hbcolor commit 9847106585455897b1c9961a6850fe6b16ccad3c Merge: f91c21cc7 248be5c98 Author: Karel Zak Date: Fri Mar 8 12:33:10 2019 +0100 Merge branch 'patch-2' of https://github.com/MeggyCal/util-linux * 'patch-2' of https://github.com/MeggyCal/util-linux: Update mount.8 commit f91c21cc7ef20751954a486a758a48cf0506462a Author: Karel Zak Date: Fri Mar 8 12:14:19 2019 +0100 mkswap: be more explicit about maximal number of pages Addresses: https://github.com/karelzak/util-linux/pull/766 Signed-off-by: Karel Zak disk-utils/mkswap.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d5eb4c46405413a8dd69d01f4e094f4390944d1 Author: Tim Hildering Date: Mon Mar 4 19:15:08 2019 +0100 libmount: improve fs referencing in tables * Added member 'struct libmnt_table *tab' to libmnt_fs structure. * Added 'mnt_fs_get_table()'. * Removed overhead from 'mnt_table_{insert,move,remove}_fs(). * Added check to 'mnt_table_set_iter()' that entry is member of table. [kzak@redhat.com: - add to libmount.sys - add to docs - cleanup commit message - set fs->tab = NULL before mnt_unref_fs() in mnt_table_remove_fs()] Signed-off-by: Tim Hildering Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 1 + libmount/src/fs.c | 17 +++++++++++++++++ libmount/src/libmount.h.in | 1 + libmount/src/libmount.sym | 1 + libmount/src/mountP.h | 1 + libmount/src/tab.c | 20 +++++++++++--------- 6 files changed, 32 insertions(+), 9 deletions(-) commit bec23f0bf280e45c7d8f9a71ca19d392bf0a83ab Author: Jakub Wilk Date: Thu Mar 7 22:07:37 2019 +0100 setterm: update comments about -ulcolor/-hbcolor syntax Signed-off-by: Jakub Wilk term-utils/setterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d886e86f62d190a65023ab1be921ac592225018 Author: Jakub Wilk Date: Thu Mar 7 21:55:07 2019 +0100 setterm: fix bright colors for --ulcolor/--hbcolor The "bright" keyword was parsed, but it didn't actually affect the color that was set. Signed-off-by: Jakub Wilk term-utils/setterm.c | 3 +++ 1 file changed, 3 insertions(+) commit c1b4cf105dacee1452c725d5517c13fd41f712cf Author: Jakub Wilk Date: Thu Mar 7 21:42:09 2019 +0100 setterm: disallow "default" for --ulcolor/--hbcolor Passing "default" to --ulcolor or --hbcolor worked, but it set the color to bright red. This was not a documented syntax, so let's forbid it. Signed-off-by: Jakub Wilk term-utils/setterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 248be5c98d6838342814415adf3c0a977134db1e Author: MeggyCal Date: Thu Mar 7 17:24:22 2019 +0100 Update mount.8 xfs is widely supported today sys-utils/mount.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64a87be1a4a899ee43b0960a669046e127cf46fa Author: Karel Zak Date: Wed Mar 6 13:12:23 2019 +0100 su: add note about ECHO on --pty Signed-off-by: Karel Zak login-utils/runuser.1 | 4 ++++ login-utils/su.1 | 4 ++++ 2 files changed, 8 insertions(+) commit 5932ef81deb0b823ffa52bc6206cdd3c583bb4e9 Author: Karel Zak Date: Wed Mar 6 12:02:30 2019 +0100 su: be sensitive to another SIGCHLD ssi_codes See the same issue for script: 27afe5016842c22d256ea9f88b598d637ca0df84 Signed-off-by: Karel Zak login-utils/su-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 282ca3d87b4ab2e3f077c959fd5e0f87980120d6 Author: Karel Zak Date: Wed Mar 6 11:54:51 2019 +0100 su: fix --pty terminal initialization * use proper winsize rather than uninitialized variable (Oops...) * set the current terminal to the raw mode * disable ECHO for non-terminal execution to be compatible with non-pty output Addresses: https://github.com/karelzak/util-linux/issues/767 Signed-off-by: Karel Zak login-utils/su-common.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 2648be66d2a91a2d884fdab0de58a883d7d54ce6 Author: Karel Zak Date: Tue Mar 5 13:56:33 2019 +0100 tests: add missing ts_check_test_command call Signed-off-by: Karel Zak tests/ts/misc/strtosize | 2 ++ 1 file changed, 2 insertions(+) commit 884019e2eab288727f56a3f5a3cff31811e11517 Author: Karel Zak Date: Tue Mar 5 11:38:44 2019 +0100 build-sys: add check-programs make target Signed-off-by: Karel Zak Makefile.am | 2 ++ 1 file changed, 2 insertions(+) commit 7c90efa384cbb2ace873e2b90e8cc396a1719535 Author: Karel Zak Date: Tue Mar 5 11:06:41 2019 +0100 tests: add --noskip-commands The default is SKIP missing commands on --use-system-commands, but with --noskip-commands the test will FAIL. Signed-off-by: Karel Zak tests/functions.sh | 9 ++++++++- tests/run.sh | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) commit bb872a239ce9faae7ac672a9137945dd8e4ee964 Author: Karel Zak Date: Mon Mar 4 17:32:03 2019 +0100 tests: add missing TS_CMD_UMOUNT check Signed-off-by: Karel Zak tests/ts/libmount/loop | 1 + 1 file changed, 1 insertion(+) commit 2fadcded53add5b5b0ca7071f310a0f37c711c51 Author: Karel Zak Date: Mon Mar 4 17:28:15 2019 +0100 tests: (kill) do not use shell build-in Signed-off-by: Karel Zak tests/ts/kill/all_processes | 5 +++++ tests/ts/kill/name_to_number | 5 +++++ tests/ts/kill/options | 5 +++++ tests/ts/kill/print_pid | 5 +++++ tests/ts/kill/queue | 5 +++++ 5 files changed, 25 insertions(+) commit 43b4a4d3c720a4e65fe9de884cd73e0b1b94fbef Author: Karel Zak Date: Mon Mar 4 17:10:04 2019 +0100 tests: add --use-system-commands This change allows to use commands from $PATH rather than from $top_builddir. There two basic use cases: * check differences between installed and git version run.sh --use-system-command --show-diff * check system binaries by upstream tests (for example tests from src.rpm package) Signed-off-by: Karel Zak tests/commands.sh | 196 ++++++++++++++++++++++++++--------------------------- tests/functions.sh | 34 ++++++++-- tests/run.sh | 33 +++++---- 3 files changed, 147 insertions(+), 116 deletions(-) commit 19e00ec9e9e9c36305cf2dd163d0333e2d72c671 Author: Karel Zak Date: Mon Mar 4 16:42:30 2019 +0100 tests: add missing ts_check_test_command calls Signed-off-by: Karel Zak tests/ts/fsck/ismounted | 2 ++ tests/ts/hexdump/format-strings | 1 + tests/ts/hexdump/highlighting | 1 + tests/ts/ipcs/limits | 1 + tests/ts/ipcs/limits2 | 1 + tests/ts/ipcs/mk-rm-msg | 1 + tests/ts/ipcs/mk-rm-sem | 1 + tests/ts/ipcs/mk-rm-shm | 1 + tests/ts/misc/swaplabel | 1 + 9 files changed, 10 insertions(+) commit 0b07e2682f09fdf34874c14372c9059baf315a95 Author: Karel Zak Date: Mon Mar 4 13:13:30 2019 +0100 su/runuser: don't mark --pty as experimental, add it to runuser.1 too * let's assume that --pty is stable enough that we do not have to remove it ;-) * add --pty to the runuser.1 man page Addresses: https://github.com/karelzak/util-linux/issues/760 Signed-off-by: Karel Zak login-utils/runuser.1 | 9 +++++++++ login-utils/su.1 | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) commit b6c2665e4d19e5ff5489acb381ca59b711ae2127 Merge: 3cd5e33b5 3bb960c7b Author: Karel Zak Date: Mon Mar 4 11:48:20 2019 +0100 Merge branch 'mps_losetup_has_device_inline' of https://github.com/marcosps/util-linux * 'mps_losetup_has_device_inline' of https://github.com/marcosps/util-linux: lib/loopdev.c: Inline loopcxt_has_device commit 3cd5e33b5c07ad75806993deff723f4fdb8fd533 Merge: 72aa1db70 b24c7d585 Author: Karel Zak Date: Mon Mar 4 11:46:16 2019 +0100 Merge branch 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linux * 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linux: test: Adding AMD EPYC 7451 24-Core Processor commit 72aa1db70c59e6bb43afc4315cef00db3ecfef84 Author: Patrick Steinhardt Date: Fri Mar 1 18:35:49 2019 +0100 last: do not use non-standard __UT_NAMESIZE In commit b22332dd4 (last: fix wtmp user name buffer overflow [asan], 2019-01-13), we started to make sure that the `ut_user` field of the `utmpx` struct is always NUL-terminated. The implementation makes use of the `__UT_NAMESIZE` define to determine the position of the last character in that array. The problem is that this is a non-standard define that is not necessarily available on non-glibc platforms. As there is no standardized define, we should just use `sizeof`. This fixes compilation on musl libc based systems. Signed-off-by: Patrick Steinhardt login-utils/last.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89342e0406209f195bf7a1a5396ac74c16470ac6 Author: Stanislav Brabec Date: Thu Feb 28 23:09:40 2019 +0100 libmount: Recognize more fuse filesystems as pseudofs and netfs Add some fuse filesystems to the list of pseudofs and netfs. There are still tens of filesystems that should be evaluated and added. Signed-off-by: Stanislav Brabec libmount/src/utils.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit dcf03ffb379227678d4035df2c48f6604b9f663a Author: Stanislav Brabec Date: Wed Feb 27 23:22:40 2019 +0100 agetty: Switch to 8-bit processing in get_logname() for UTF-8 terminals If the terminal is in the UTF-8 mode, get_logname() should use 8-bit processing. Signed-off-by: Stanislav Brabec Cc: Lubomir Rintel Tested-by: Lubomir Rintel term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5de9751997cf490088f62f41fd92be57cf7ceea4 Author: Stanislav Brabec Date: Wed Feb 27 23:22:19 2019 +0100 agetty: Fix input of non-ASCII characters in get_logname() As login supports non-ASCII characters in the logname, agetty should be consistent. 8b58ffdd re-activated old and ASCII-only get_logname(), which restricted the input to ASCII only. As the code does not read whole characters, isascii(ascval) and isprint(ascval) returns nonsenses after entering a non-ASCII character. As keyboard maps don't contain unprintable non-control characters, it seems to be relatively safe to remove both checks. Signed-off-by: Stanislav Brabec Cc: Lubomir Rintel Tested-by: Lubomir Rintel term-utils/agetty.c | 2 -- 1 file changed, 2 deletions(-) commit 3bb960c7b5f1428f1bff885b2667787e8af5001b Author: Marcos Paulo de Souza Date: Sun Mar 3 09:15:13 2019 -0300 lib/loopdev.c: Inline loopcxt_has_device loopcxt_has_device is a one liner, so adding inline statement does not hurt. Signed-off-by: Marcos Paulo de Souza lib/loopdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09fc947089d329f7e7e0317c22cfd80b78bb36c5 Author: Karel Zak Date: Fri Mar 1 15:04:54 2019 +0100 tests: make sure TS_HELPER_MBSENCODE compiled Signed-off-by: Karel Zak tests/ts/misc/mbsencode | 2 ++ 1 file changed, 2 insertions(+) commit c9fbfcfc492893defa030bf027714c047c6b4524 Author: Karel Zak Date: Thu Feb 28 14:08:23 2019 +0100 blockdev: make –-getbsz less confusing for end-users Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1684078 Signed-off-by: Karel Zak disk-utils/blockdev.8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 777c1593538697646d9bd8c34a52a7bb32b863bf Author: Karel Zak Date: Wed Feb 27 12:22:33 2019 +0100 tests: use subtests in fdisk/mbr-nondos-mode Signed-off-by: Karel Zak tests/expected/fdisk/mbr-nondos-mode | 250 --------------------- .../fdisk/mbr-nondos-mode-1nd-primary-delete | 19 ++ tests/expected/fdisk/mbr-nondos-mode-1st-active | 15 ++ tests/expected/fdisk/mbr-nondos-mode-1st-primary | 15 ++ .../fdisk/mbr-nondos-mode-1st-primary-delete | 20 ++ .../fdisk/mbr-nondos-mode-1st-primary-recreate | 15 ++ tests/expected/fdisk/mbr-nondos-mode-2nd-primary | 16 ++ tests/expected/fdisk/mbr-nondos-mode-empty-pt | 14 ++ tests/expected/fdisk/mbr-nondos-mode-extended | 17 ++ .../expected/fdisk/mbr-nondos-mode-extended-delete | 12 + .../fdisk/mbr-nondos-mode-first-sector-at-end | 47 ++++ tests/expected/fdisk/mbr-nondos-mode-logical | 21 ++ .../expected/fdisk/mbr-nondos-mode-logical-delete | 18 ++ .../fdisk/mbr-nondos-mode-logical-recreate | 21 ++ tests/ts/fdisk/mbr-nondos-mode | 57 +++-- 15 files changed, 289 insertions(+), 268 deletions(-) commit ca614ef8c702f6d5a962bc07b3a590438da1b546 Author: Karel Zak Date: Wed Feb 27 12:03:28 2019 +0100 tests: add fdisk (dos) first sector dialog test The test verifies that the "First sector" dialog offers relevant range in the begin of the device if the end of the device is already used. Signed-off-by: Karel Zak tests/expected/fdisk/mbr-nondos-mode | 47 ++++++++++++++++++++++++++++++++++++ tests/ts/fdisk/mbr-nondos-mode | 18 ++++++++++++++ 2 files changed, 65 insertions(+) commit b24c7d585d2d09fec72dde72111522c54cb425c5 Author: Erwan Velu Date: Wed Feb 27 10:16:27 2019 +0100 test: Adding AMD EPYC 7451 24-Core Processor This cpu is massively numa and have interesting cache organization. This will be useful to test & implement issue #663 Signed-off-by: Erwan Velu tests/expected/lscpu/lscpu-x86_64-epyc_7451 | 233 +++++++++++++++++++++++++++ tests/ts/lscpu/dumps/x86_64-epyc_7451.tar.gz | Bin 0 -> 361027 bytes 2 files changed, 233 insertions(+) commit 69e0e554d715fdc01288a485b028b78265a915f5 Merge: 834b3d07e 1ec4c065a Author: Karel Zak Date: Tue Feb 26 12:25:21 2019 +0100 Merge branch 'dana/column-x' of https://github.com/okdana/util-linux * 'dana/column-x' of https://github.com/okdana/util-linux: column: Address fill-order confusion in documentation commit 834b3d07e498937b729306358683ade395c7df7f Author: Juerg Haefliger Date: Fri Feb 22 17:04:12 2019 +0100 libfdisk: (dos) Use strtoul to parse the label-id Parsing of the label-id fails on 32-bit if the MSB is set. Fix that by using strtoul instead of strtol. Signed-off-by: Juerg Haefliger libfdisk/src/dos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adea904a61a93557e08809249fcac38e9da5cebd Author: Karel Zak Date: Mon Feb 25 13:59:50 2019 +0100 libfdisk: (dos) rewrite fist/last free sector functions The current code uses first[] and last[] arrays to specify partition ranges. This is unnecessary as we already have all in memory. The current code offers in first and last sector dialogs ranges without care about already used areas. This commit makes things more readable, more user-friendly and remove obscure first[] and last[]. Reported-by: 冰柯 libfdisk/src/dos.c | 275 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 169 insertions(+), 106 deletions(-) commit 1ec4c065a204ae175c65488487c6b84a7f55598c Author: dana Date: Fri Feb 22 14:11:29 2019 -0600 column: Address fill-order confusion in documentation Historical versions of column have described the default fill order as rows-then-columns and the -x order as columns-then-rows. This was misleading at best, and the util-linux implementation was updated to clarify the actual behaviour in 3e094e5fe2 (March 2017). However, the other implementations (used by *BSD, macOS, Debian, &al.) continue to use the previous wording, and a user comparing them could easily get the false impression that util-linux column has exactly the opposite fill behaviour from BSD column. To address this, a note is added to the man page explaining the change and clarifying that, despite what the BSD documentation says, the two implementations behave identically in this regard. Signed-off-by: dana text-utils/column.1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 911e694528618b52ce23e4e29a7a85ee9f4edf05 Author: Karel Zak Date: Thu Feb 21 13:49:39 2019 +0100 libmount: add mnt_table_{find,insert,move}_fs() Add functions to insert FS into table to specified position and to move FS between two tables. Co-Author: Tim Hildering Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 5 +- libmount/src/libmount.h.in | 5 + libmount/src/libmount.sym | 5 +- libmount/src/tab.c | 172 ++++++++++++++++++++++++++++++- tests/expected/libmount/tabfiles-find-fs | 1 + tests/ts/libmount/tabfiles | 5 + 6 files changed, 188 insertions(+), 5 deletions(-) commit 65ba9a8ccd75e1548a96fb6aa2ad023c18fc97ef Author: Karel Zak Date: Wed Feb 20 13:19:23 2019 +0100 lscpu: document --hex output regression (since v2.30) Addresses: https://github.com/karelzak/util-linux/issues/744 Signed-off-by: Karel Zak sys-utils/lscpu.1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b9c088f2f3a30adaa658b1e1ad0cf30b618a1559 Author: Karel Zak Date: Wed Feb 20 12:49:24 2019 +0100 lsblk: allow to specify tree column * document --tree (was missing in the man page) * add optional argument to --tree to specify tree For example: $ lsblk -o KNAME,SIZE,MOUNTPOINT --tree=KNAME /dev/dm-0 KNAME SIZE MOUNTPOINT dm-0 232.9G └─dm-1 232.9G └─dm-2 232.9G Signed-off-by: Karel Zak misc-utils/lsblk.8 | 6 ++++++ misc-utils/lsblk.c | 26 +++++++++++++++++--------- misc-utils/lsblk.h | 4 +++- 3 files changed, 26 insertions(+), 10 deletions(-) commit ebb636899096eb7062721dc49334cb023850a520 Author: Karel Zak Date: Wed Feb 20 12:47:24 2019 +0100 libsmartcols: print tree also for empty cells Signed-off-by: Karel Zak libsmartcols/src/print.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3c21e32245b2c5c57574f39c1c0832465483b187 Author: Karel Zak Date: Mon Feb 18 16:38:11 2019 +0100 libfdisk: (dos) improve first unused sector for logical partitions Make sure we probe within extended partition. Signed-off-by: Karel Zak libfdisk/src/dos.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 110260830d49b1872c29af3e3fc16bdba15f7376 Author: Sami Kerola Date: Mon Jan 14 22:40:34 2019 +0000 docs: fix typos [codespell] Reference: https://github.com/codespell-project/codespell Signed-off-by: Sami Kerola lib/loopdev.c | 6 +++--- lib/path.c | 4 ++-- libblkid/src/probe.c | 2 +- libfdisk/samples/mkpart-fullspec.c | 2 +- libfdisk/src/alignment.c | 2 +- libfdisk/src/libfdisk.h.in | 6 +++--- libfdisk/src/script.c | 2 +- libfdisk/src/sgi.c | 2 +- libfdisk/src/utils.c | 2 +- libmount/python/tab.c | 2 +- libsmartcols/src/grouping.c | 4 ++-- libsmartcols/src/print.c | 2 +- libsmartcols/src/smartcolsP.h | 2 +- login-utils/lslogins.c | 2 +- misc-utils/logger.c | 2 +- misc-utils/lsblk.h | 2 +- misc-utils/whereis.c | 2 +- sys-utils/eject.c | 2 +- term-utils/agetty.c | 2 +- 19 files changed, 25 insertions(+), 25 deletions(-) commit fcb89ba7bbb68589e8e1871a8b8f0dc6b2fc6b7a Author: Sami Kerola Date: Fri Jan 25 20:54:42 2019 +0000 include/path.h: remove duplicate header inclusion Signed-off-by: Sami Kerola include/path.h | 1 - 1 file changed, 1 deletion(-) commit e73456dfbb36c8d19a802ffe46b8ebccd77ccb22 Author: Sami Kerola Date: Fri Feb 8 22:01:05 2019 +0000 include: add no return function attribute This warning is repeated 112 times when compiling with all warnings. xalloc.h:23:1: warning: function '__err_oom' could be declared with attribute 'noreturn' [-Wmissing-noreturn] Signed-off-by: Sami Kerola include/xalloc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 123eb9ef8cb8dea88a57d86681524e78fdb5e104 Author: Sami Kerola Date: Sat Feb 9 08:47:43 2019 +0000 hardlink, wall: fix variable shadowing misc-utils/hardlink.c:91:65: warning: declaration shadows a variable in the global scope [-Wshadow] misc-utils/hardlink.c:73:5: note: previous declaration is here int content_only = 0; term-utils/wall.c:114:40: warning: declaration shadows a variable in the global scope [-Wshadow] term-utils/wall.c:129:65: warning: declaration shadows a variable in the global scope [-Wshadow] /usr/include/bits/getopt_core.h:36:14: note: previous declaration is here extern char *optarg; Signed-off-by: Sami Kerola misc-utils/hardlink.c | 4 ++-- term-utils/wall.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit 4813a5210f6fb979d8f7a592f71a2f9c4d3db179 Author: Sami Kerola Date: Sat Feb 9 09:34:52 2019 +0000 various: fix 'uninitialized when used' warnings [clang] This change fixes "warning: variable 'var' may be uninitialized when used here [-Wconditional-uninitialized]" warnings reported in various files. Signed-off-by: Sami Kerola disk-utils/mkfs.minix.c | 2 +- disk-utils/sfdisk.c | 2 +- libblkid/src/partitions/dos.c | 2 +- libblkid/src/partitions/partitions.c | 2 +- libblkid/src/superblocks/ddf_raid.c | 2 +- libblkid/src/superblocks/hfs.c | 2 +- libblkid/src/superblocks/zfs.c | 2 +- libfdisk/src/dos.c | 2 +- libfdisk/src/table.c | 2 +- misc-utils/logger.c | 2 +- misc-utils/uuidd.c | 3 ++- misc-utils/uuidparse.c | 2 +- sys-utils/hwclock.c | 2 +- sys-utils/readprofile.c | 2 +- sys-utils/setarch.c | 2 +- 15 files changed, 16 insertions(+), 15 deletions(-) commit d135e1a1e355494d485241a782c02f823906c9e8 Author: Karel Zak Date: Mon Feb 18 13:10:58 2019 +0100 cal: fix Sexit and Senter Signed-off-by: Karel Zak misc-utils/cal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6fb1ce79dba98c01678561236e9364bedc02b38 Author: Tobias Stoeckmann Date: Sun Feb 17 22:55:29 2019 +0100 sfdisk: Avoid out of boundary read with readline It is not guaranteed that the returned string of readline() actually contains as many bytes as buf can contain. If bufsz is larger than the allocated memory by readline, an out of boundary read occurs and leads to undefined behaviour. Most likely that will be a crash. This can be reproduced when readline-support is compiled in and when you directly enter "quit" and "n" (to not write changes back to disk) when sfdisk was called with any given device. Signed-off-by: Tobias Stoeckmann disk-utils/sfdisk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9a76780f861628aeb5af7d799f0ae004a09fa360 Author: Fabian.Kirsch@dlr.de Date: Wed Feb 13 14:49:10 2019 +0000 libfdisk: sanity check, to prevent overlapping partitions from being partly reported as free i noticed wrongly reported free space when looking with cfdisk on an USB drive prepared with the latest alpine *.iso[1]. Feel free to apply below patch, which fixed the issue for me. Greetings Fabian [1]: http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86/alpine-extended-3.9.0-x86.iso Signed-off-by: Karel Zak libfdisk/src/table.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a57c9865f803679ea3d7f7e77f53492dda12256b Author: Karel Zak Date: Mon Feb 18 12:35:09 2019 +0100 libmount: (tabdiff) use list_add_tail() in more robust way Signed-off-by: Karel Zak libmount/src/context_mount.c | 3 +++ libmount/src/tab_diff.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 1882b3a617e3e609021297cb6e35eb726ae73d33 Author: Karel Zak Date: Mon Feb 18 12:34:11 2019 +0100 libfdisk: use list_add_tail() in more robust way Signed-off-by: Karel Zak libfdisk/src/table.c | 3 +++ 1 file changed, 3 insertions(+) commit ebc2397ec4ebef700c27297f394a3460a7d0f754 Author: Karel Zak Date: Mon Feb 18 12:33:12 2019 +0100 libsmartcols: use list_add_tail() in more robust way Signed-off-by: Karel Zak libsmartcols/src/grouping.c | 6 ++++++ libsmartcols/src/table.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 84084dc324d892b2acf85fe9f79170b4d5bd7956 Author: Karel Zak Date: Mon Feb 18 12:31:37 2019 +0100 libblkid: tiny code simplification Signed-off-by: Karel Zak libblkid/src/probe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit beb60dbd6feab18fc75c5405dc52f6dce6fa4934 Author: Tim Hildering Date: Mon Feb 18 00:01:18 2019 +0100 libmount: check table membership before adding entry Added validation to function 'mnt_table_add_fs()' to check that added @fs is not already a member of another table. Signed-off-by: Karel Zak libmount/src/tab.c | 3 +++ 1 file changed, 3 insertions(+) commit 3de236340dbf8f7f6c771798497e500a4fb878e0 Author: Karel Zak Date: Thu Feb 14 10:41:59 2019 +0100 wall: remove unnecessary warning wall(1) may be used in scripts or in pipe. In this case report failed ttyname() does not make sense, especially if the code does not depend on on this function. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1608176 Signed-off-by: Karel Zak term-utils/wall.c | 1 - 1 file changed, 1 deletion(-) commit f920f73d83f8fd52e7a14ec0385f61fab448b491 Author: Karel Zak Date: Tue Feb 12 14:22:49 2019 +0100 tests: update fdisk outputs Signed-off-by: Karel Zak tests/expected/blkid/md-raid1-whole | 2 +- tests/expected/fdisk/mbr-dos-mode | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 39f37044b3146f222cda182494abd4ddb5217335 Author: Karel Zak Date: Tue Feb 12 14:21:54 2019 +0100 fdisk: use 2 decimal places for size in disk summary In the disk summary it seems nice, but I'm not sure about lists (SIZE columns). It seems more readable to keep the lists with one decimal place only. New output: # sfdisk --list /dev/sda Old output: Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors New output: Disk /dev/sda: 223.58 GiB, 240057409536 bytes, 468862128 sectors The rest is unchanged: ... Device Start End Sectors Size Type /dev/sda1 2048 411647 409600 200M EFI System /dev/sda2 411648 821247 409600 200M Linux filesystem /dev/sda3 821248 274087935 273266688 130.3G Linux filesystem /dev/sda4 274087936 378945535 104857600 50G Linux filesystem /dev/sda5 378945536 468862094 89916559 42.9G Linux filesystem Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1673452 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 3 ++- disk-utils/fdisk-list.c | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit 07b94c9f327c0b3230022b55f8105249f205a739 Author: Karel Zak Date: Tue Feb 12 13:27:56 2019 +0100 lib/strutils: support two decimal places in size_to_human_string() output Signed-off-by: Karel Zak include/strutils.h | 7 ++++--- lib/strutils.c | 15 +++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) commit 3b9dc305eefabb2ce0b01d75e259b91a42ec687f Author: Karel Zak Date: Mon Feb 11 14:53:51 2019 +0100 tests: (hardlink) update noregex Signed-off-by: Karel Zak tests/expected/hardlink/options-noregex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 985421192df68af82a9eaa93f6426d64bccf9cdc Author: Karel Zak Date: Mon Feb 11 14:01:55 2019 +0100 hardlink: add long options Signed-off-by: Karel Zak misc-utils/hardlink.1 | 39 ++++++++++++++++++++++++--------------- misc-utils/hardlink.c | 21 +++++++++++++-------- 2 files changed, 37 insertions(+), 23 deletions(-) commit c8ca29beb2443675f04976dbc213abacb21ee949 Author: Karel Zak Date: Mon Feb 11 13:30:46 2019 +0100 hardlink: rename function Signed-off-by: Karel Zak misc-utils/hardlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd7722af0227c9614f00003dd6fb14bc6b4830ae Author: Karel Zak Date: Mon Feb 11 13:25:04 2019 +0100 hardlink: make code more readable Signed-off-by: Karel Zak misc-utils/hardlink.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 0b05aab4022724cc7d6ed753cc66f187b07a00ae Author: Karel Zak Date: Mon Feb 11 13:18:35 2019 +0100 hardlink: cleanup global variables * remove NAMELEN, use PATH_MAX * mark global variables as static * move all global variables to the begin of the code Signed-off-by: Karel Zak misc-utils/hardlink.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit 3807e71af42ad75cfbf668faa4c4000228696202 Author: Karel Zak Date: Mon Feb 11 13:00:18 2019 +0100 hardlink: remove typedefs - remove typedefs - use long names for structs Signed-off-by: Karel Zak misc-utils/hardlink.c | 65 ++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) commit 5c8f6fce2251b6bd92a9c5e8a22a1bda1acd329c Author: Karel Zak Date: Mon Feb 11 10:37:09 2019 +0100 tests: (hardlink) update summary output Signed-off-by: Karel Zak tests/expected/hardlink/options-dryrun | 14 ++++++-------- tests/expected/hardlink/options-nargs | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) commit c2f6513c106f5522555a8c129f4e6579b9642c65 Author: Sven Wiltink Date: Fri Feb 8 10:53:21 2019 +0100 lsblk: use ID_SCSI_SERIAL when available Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d55db6724ce938ec7d5e6d4d3ed11379ade33266 Author: Karel Zak Date: Wed Feb 6 17:21:36 2019 +0100 hardlink: cleanup error messages, use xalloc.h - do not use magical doexit(), just use err() - print summary on exit Signed-off-by: Karel Zak misc-utils/hardlink.c | 78 ++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 48 deletions(-) commit c545e62c68c3c3794bedb2af0b1840b62792422c Author: Karel Zak Date: Wed Feb 6 17:13:08 2019 +0100 hardlink: cleanup verbose and warning messages - use warn() - use stdout rather than stderr Signed-off-by: Karel Zak misc-utils/hardlink.c | 104 +++++++++++++++++++++----------------------------- 1 file changed, 43 insertions(+), 61 deletions(-) commit bd9a35c6cea54ad881f3408a512a283992402a1a Author: Karel Zak Date: Wed Feb 6 14:37:34 2019 +0100 hardlink: (man) add AVAILABILITY Signed-off-by: Karel Zak misc-utils/hardlink.1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 117f4d8bf4fc3a21d9009222cbfad56f79b73c94 Merge: 8487dbee9 bd0be5e02 Author: Karel Zak Date: Wed Feb 6 13:55:20 2019 +0100 Merge branch 'hardlink' of https://github.com/rudimeier/util-linux into hardlink * 'hardlink' of https://github.com/rudimeier/util-linux: (25 commits) hardlink: add first simple tests hardlink: util-linux usage hardlink: fix compiler warnings hardlink: style indentations and license header hardlink: enable build with and without pcre2 fixes for the fixes temporal fix before re-patch (updates from Fedora repo) Update hardlink.1 Fixed version number, added changelog about Todd Lewis' patch exclude files via pcre Fixed 32 bit build with gcc7 (RH Bugzilla ID 1422989) spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); update FSF address at .c source file Revert "spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file" spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file Mention -f option in the man page do not allow to hardlink files across filesystems by default (#786719) (use -f option to override) fix possible buffer overflows, integer overflows, update man page fix URL and remove mmap() (#676962, #672917) - update docs to describe highest verbosity -vv option (#210816) - use dist Resolves: 210816 mostly spec cleanup ... commit 8487dbee9f68b2fc9b92a955a5f0f18d60975640 Author: Stanislav Brabec Date: Wed Feb 6 00:07:54 2019 +0100 mount: Do not call mnt_pretty_path() on net file systems. Calling mnt_pretty_path() on network file systems can cause mangling of the output: root# mount | grep nfs nfs.example.com:/home on /home type nfs4 ... root# mkdir -p nfs.example.com:/home root# mount | grep nfs /root/nfs.example.com:/home on /home type nfs4 ... Signed-off-by: Stanislav Brabec sys-utils/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc06250f116d899f656b0c8415cd955c01ef63a1 Author: Karel Zak Date: Tue Feb 5 18:07:26 2019 +0100 col: improve error message, update regression test Signed-off-by: Karel Zak tests/expected/col/multibyte | 2 +- text-utils/col.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9113d6c1e62ac5660f9ab97fe455078810873759 Author: Karel Zak Date: Tue Feb 5 12:13:46 2019 +0100 docs: add col(1) to TODO Addresses: https://github.com/karelzak/util-linux/issues/749 Signed-off-by: Karel Zak Documentation/TODO | 7 +++++++ 1 file changed, 7 insertions(+) commit 004356f05018e3bfcaddd2652846659a4d8481f3 Author: Karel Zak Date: Tue Feb 5 12:06:00 2019 +0100 col: make flush_line() a little bit robust The code is horrible. The core of the problem are signed integers and no check for the limits. This patch fixes c->c_column = cur_col; where c_column is "short" and "cur_col" is int. Let's use "int" for all the variables. It's really not perfect as for bigger lines it can segfault again... The patch also removes some unnecessary static variables. Addresses: https://github.com/karelzak/util-linux/issues/749 Signed-off-by: Karel Zak text-utils/col.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit f571d10d4a3c82e5643770db91c91baf4e8fa4aa Merge: 3a2bcd7dd 41f58b603 Author: Karel Zak Date: Tue Feb 5 11:09:02 2019 +0100 Merge branch 'patch-1' of https://github.com/edupont/util-linux * 'patch-1' of https://github.com/edupont/util-linux: Typo in configuration help commit 3a2bcd7dd25bf1c60668fc75bb266f5b7a2550a9 Merge: 5d3a4aab6 9de7fe4a3 Author: Karel Zak Date: Tue Feb 5 11:07:32 2019 +0100 Merge branch 'mount-nosuid' of https://github.com/Lekensteyn/util-linux * 'mount-nosuid' of https://github.com/Lekensteyn/util-linux: mount.8: clarify (no)suid behavior on file capabilities commit 5d3a4aab64ec3b6d2db2a3bfe67379a114bd0ee0 Author: Icenowy Zheng Date: Thu Jan 24 18:33:34 2019 +0800 libfdisk: (gpt) add HiFive Unleashed bootloader partition UUIDs The HiFive Unleashed SBC's bootloader seeks for GPT partitions with specific UUID for loading the next stage bootloader (ZSBL loads FSBL, and FSBL loads BBL). Add these partition type UUIDs. Signed-off-by: Icenowy Zheng libfdisk/src/gpt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f90d8b8bccc8f410dd6dc36a028889ea3169b26b Author: Karel Zak Date: Mon Feb 4 14:16:11 2019 +0100 cal: use standout mode on monochrome terminals The function colors_init() checks for colors, it means it fails on monochrome terminals, but cal(1) in this case still need to highlight the current day. Reported-by: Nuno Silva Signed-off-by: Karel Zak misc-utils/cal.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 5db5962339dbd619a8f779961548fb667d3c9376 Author: Karel Zak Date: Mon Feb 4 14:14:37 2019 +0100 lib/colors: force to "never" mode on non-terminal output Signed-off-by: Karel Zak include/colors.h | 3 +++ lib/colors.c | 20 +++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) commit 41f58b60305f989e185bf005bfcc3574b8cd9273 Author: edupont Date: Fri Feb 1 22:57:34 2019 +0100 Typo in configuration help configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9de7fe4a3d5ea9b495ccd19eed9abe11da844b81 Author: Peter Wu Date: Fri Feb 1 15:40:53 2019 +0100 mount.8: clarify (no)suid behavior on file capabilities Clarify that the nosuid option also affects file capabilities and that it only limits execution of programs. (setgid on directories still inherit the group regardless of the nosuid option.) The new text is taken from the mount(2) manual page from the man-pages project. Addresses: https://github.com/karelzak/util-linux/issues/482 Signed-off-by: Peter Wu sys-utils/mount.8 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 167a2b520a38d20e0f5a8617d66cb7a27b0ae35a Author: Karel Zak Date: Thu Jan 31 14:16:42 2019 +0100 sfdisk: fix logical partition resize when start specified Addresses: https://github.com/karelzak/util-linux/issues/745 Signed-off-by: Karel Zak libfdisk/src/partition.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 8fd512e932a51da6b2b40ace8a00fa8da00b02fe Author: Karel Zak Date: Tue Jan 29 15:59:41 2019 +0100 logger: (man) add info about rewrite and authors Signed-off-by: Karel Zak misc-utils/logger.1 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit bd0029f6be3c751818d776d7c1c7030972882606 Author: Karel Zak Date: Tue Jan 29 15:44:13 2019 +0100 logger: (man) make more obvious that --server/socket is required The options --tcp/udp specify only how, but no where. Signed-off-by: Karel Zak misc-utils/logger.1 | 4 ++++ 1 file changed, 4 insertions(+) commit 70c364b4db6530ada12f7103b5c5d8ceb777307f Author: Johannes Nixdorf Date: Tue Jan 22 19:17:55 2019 +0100 build-sys: fix crypt() detection without -lcrypt The check tested whether code using crypt() links without -lcrypt, but didn't set have_crypt to yes if it succeeded. This fixes the check erroneously failing when compiling against musl libc. Signed-off-by: Johannes Nixdorf configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1c4a2600cc5dc44e6d517ca9fa6f3d7b1ef9d481 Author: Karel Zak Date: Wed Jan 23 11:41:43 2019 +0100 logger: concatenate multiple lines of MESSAGE into a single field. this is deemed a useful special case since journalctl will only show either the first or last element of the message array if the field appears multiple times. Based on patch from: Kjetil Torgrim Homme https://github.com/karelzak/util-linux/pull/743 Addresses: https://github.com/karelzak/util-linux/issues/742 Signed-off-by: Karel Zak misc-utils/logger.1 | 4 ++++ misc-utils/logger.c | 24 ++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit c2435b946f574880201cb41d989d8d63d4bbf87d Author: Karel Zak Date: Tue Jan 22 12:33:19 2019 +0100 libblkid: remove dependence on libuuid Currently we use libuuid to print UUID only. This code is possible to replace by one snprintf(). It seems better to duplicate this one snprintf than force all distros to keep libuuid together with libblkid. Note, this scenario has been already supported on --disable-libuuid. Reported-by: Josh Triplett Signed-off-by: Karel Zak libblkid/blkid.pc.in | 1 - libblkid/src/Makemodule.am | 11 ----------- libblkid/src/blkidP.h | 4 +--- libblkid/src/probe.c | 8 -------- 4 files changed, 1 insertion(+), 23 deletions(-) commit 33e87bf1524baa215413cbcb26668e600a7b5cb8 Author: Andreas Schwab Date: Sat Jan 19 23:18:16 2019 +0100 setarch: don't return address of automatic variable On architectures without special personalities setarch uses the contents of a local variable with automatic storage duration after return from the function, causing it to report a spurious error. $ setarch m68k setarch: Kernel cannot set architecture to m68k Signed-off-by: Andreas Schwab sys-utils/setarch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 014e7eb321f22cf5f55505704501d4b605d9d256 Author: Jeffrey Ferreira Date: Tue Jan 22 11:56:16 2019 +0100 losetup: update an error message Update an error message to add --partscan to the list of options only allowed during loop device setup. Signed-off-by: Jeffrey Ferreira Signed-off-by: Karel Zak sys-utils/losetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 422f0e9f206a145c59a71333dad20d38cbbfc0c4 Author: Karel Zak Date: Tue Jan 22 11:50:20 2019 +0100 losetup: properly use --sector-size when create a new device The --partscan functionality depends on sector size. Make sure sector size is set before we force kernel to scan the device for partitions. For example: losetup -f loopfile --sector-size 4KiB --partscan --show where 'loopfile' contains GPT with 4096 sectors. Reported-by: Jeffrey Ferreira Signed-off-by: Karel Zak sys-utils/losetup.8 | 4 +++- sys-utils/losetup.c | 36 +++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 18 deletions(-) commit 75d239ffd89b93f79059928e436f1068f402452e Author: Karel Zak Date: Tue Jan 22 11:37:35 2019 +0100 lib/loopdev: set blocksize when create a new device The partition scanner in kernel depends on blocksize. We need to set the blocksize before we call LOOP_SET_STATUS64 (this ioctl triggers the scanner). This patch extends the internal API to save blocksize into loopdev context to be usable later for loopcxt_setup_device(). Signed-off-by: Karel Zak include/loopdev.h | 2 ++ lib/loopdev.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 9fcc893624dc4c9f2617fbf6827d7df3537d5452 Author: Karel Zak Date: Tue Jan 22 11:12:42 2019 +0100 lib/loopdev: differentiate between setter()s and ioctl calls Now the internal API uses loopcxt_set_...() to set context variables as well as to call ioctls. This patch introduces loopcxt_ioctl_...() to makes things more obvious to readers. Signed-off-by: Karel Zak include/loopdev.h | 9 +++++---- lib/loopdev.c | 10 +++++----- sys-utils/losetup.c | 8 ++++---- 3 files changed, 14 insertions(+), 13 deletions(-) commit 56c2d2904f018e08131bc0ef0c90b6c69b762268 Author: Karel Zak Date: Tue Jan 22 10:13:54 2019 +0100 swapon: be more explicit about BTRFS It seems nocow and nodatasum attributes are required. See btrfs_swap_activate() in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed46ff3d423780fa5173b38a844bf0fdb210a2a7 Addresses: https://github.com/karelzak/util-linux/issues/633 Signed-off-by: Karel Zak sys-utils/swapon.8 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1895c76f741a9cb85f83b333dbf0079528d254f0 Author: Karel Zak Date: Tue Jan 22 10:02:17 2019 +0100 swapon: rewrite section about swapfiles * don't duplicate info on two places -- let's keep only small note in mkswap(8) man page, suggest to read swapon(8) man page * add info about kernel versions for XFS and Btrfs swapfiles support * use subsection in the NOTES Addresses: https://github.com/karelzak/util-linux/issues/633 Signed-off-by: Karel Zak disk-utils/mkswap.8 | 15 +++------------ sys-utils/swapon.8 | 45 +++++++++++++++++++++------------------------ 2 files changed, 24 insertions(+), 36 deletions(-) commit 77983e4a21588eb75515b307aed0c4c2f67afb79 Author: Karel Zak Date: Mon Jan 21 17:01:25 2019 +0100 swapon: (man) iomap for swapfile is already supported by kernel ... since commit 67482129cdabf7cede1301d2415ef4f0156d35cd (Linus' tree). Signed-off-by: Karel Zak disk-utils/mkswap.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eebfa469fcd07eb020dc4d6f1ae1a661d4b365ee Author: Karel Zak Date: Mon Jan 21 12:44:49 2019 +0100 swapon: (man) cleanup note about holes Addresses: https://github.com/karelzak/util-linux/issues/633 Signed-off-by: Karel Zak disk-utils/mkswap.8 | 17 +++++++++-------- sys-utils/swapon.8 | 20 +++++++++----------- 2 files changed, 18 insertions(+), 19 deletions(-) commit c22fc04127506c4c22db2cd87706f53448e9af64 Author: Karel Zak Date: Mon Jan 21 11:56:27 2019 +0100 mount: (man) add note about --all to remount desc Signed-off-by: Karel Zak sys-utils/mount.8 | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6daf185c3cc2b7c4b85f8dd39c9caaab5caea434 Author: Karel Zak Date: Fri Jan 18 12:13:12 2019 +0100 losetup: use offset in warn_size() calculation # dd if=/dev/urandom of=dummy bs=513 count=1 2>/dev/null # losetup -f --show --offset 1 dummy /dev/loop0 losetup: dummy: Warning: file does not fit into a 512-byte sector; the end of the file will be ignore The warning is bogus as with offset the size of the file fits into 512-byte sector. Simple test that all is right: # dd if=dummy bs=1 skip=1 2>/dev/null | sha256sum - /dev/loop0 da2ed0ade6ea518a802cd8a7a3c01c408ad8699ef6856b0b01f92b867d4ba9b5 - da2ed0ade6ea518a802cd8a7a3c01c408ad8699ef6856b0b01f92b867d4ba9b5 /dev/loop0 Addresses: https://github.com/karelzak/util-linux/issues/722 Signed-off-by: Karel Zak sys-utils/losetup.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8a74df7f74544ea7d8c3e564665803c68d5c32c1 Author: Karel Zak Date: Fri Jan 18 11:38:57 2019 +0100 libfdisk: add comment to fdisk_set_first_lba() Signed-off-by: Karel Zak libfdisk/src/context.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4644c7f3a326d63996f1dc3fcba8e94c4b43122e Author: Karel Zak Date: Fri Jan 18 11:14:38 2019 +0100 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 4 ---- 1 file changed, 4 deletions(-) commit 9ed2117897dadcfed28f3d0cd9c23e92ba9e1c6c Author: Karel Zak Date: Thu Jan 17 11:19:27 2019 +0100 whereis: search in /(s)bin before /usr/lib Addresses: https://github.com/karelzak/util-linux/issues/741 Signed-off-by: Karel Zak misc-utils/whereis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 189a1bf3b314a8fc48c29ea1e0287d5cc71021a0 Author: Karel Zak Date: Wed Jan 16 15:00:07 2019 +0100 libmount: add support for MS_REMOUNT on --all This patch add to support for remount-all operation to libmount and mount(8). For example: mount --all -o remount,ro -t vfat to remount read-only all VFAT filesystems. Addresses: https://github.com/karelzak/util-linux/issues/589 Signed-off-by: Karel Zak Documentation/TODO | 5 -- libmount/docs/libmount-sections.txt | 1 + libmount/src/context.c | 43 +++++++++++++++ libmount/src/context_mount.c | 106 ++++++++++++++++++++++++++++++++++++ libmount/src/libmount.h.in | 6 ++ libmount/src/libmount.sym | 1 + libmount/src/mountP.h | 1 + sys-utils/mount.8 | 4 ++ sys-utils/mount.c | 56 ++++++++++++++++++- 9 files changed, 217 insertions(+), 6 deletions(-) commit 12d12102d6e79c3627dbf0569f1c97b00202ce4c Author: Karel Zak Date: Tue Jan 15 11:44:25 2019 +0100 fsck.cramfs: fix utimes() usage The bug has been introduced by untested commit ad7ac3d598e2d541d9eba70975e68dff7e52c7d9 ;-( Signed-off-by: Karel Zak disk-utils/fsck.cramfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f4609dee2097a6398df780d5f805807eb6a05182 Author: Karel Zak Date: Mon Jan 14 12:18:35 2019 +0100 build-sys: use REALTIME_LIBS for hwclock due to monotonic.c Signed-off-by: Karel Zak sys-utils/Makemodule.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 491f3693cbe71fd3cef3f63bb0a286ee85422456 Merge: 5ae171e1f ad7ac3d59 Author: Karel Zak Date: Mon Jan 14 12:04:04 2019 +0100 Merge branch 'time-fixes' of https://github.com/kerolasa/util-linux * 'time-fixes' of https://github.com/kerolasa/util-linux: fsck.cramfs: use utimes() instead of utime() that is obsolete hwclock: use monotonic time to measure how long setting time takes include: add indirect monotonic clock id specifier timeutils: match today day and this year correctly commit 5ae171e1f95be929b3486c4b9feed236cd3a3260 Merge: 3ebfc8d37 cae9283ab Author: Karel Zak Date: Mon Jan 14 11:58:06 2019 +0100 Merge branch 'asan-fixes' of https://github.com/kerolasa/util-linux commit cae9283ab18956951d9e037f18be09edccae4751 Author: Sami Kerola Date: Sun Jan 13 19:59:40 2019 +0000 readprofile: check input file is not empty [asan] Addresses: https://github.com/karelzak/util-linux/issues/717 Signed-off-by: Sami Kerola sys-utils/readprofile.c | 2 ++ 1 file changed, 2 insertions(+) commit b22332dd4f0042e9fc7248aa918b991d684d8f28 Author: Sami Kerola Date: Sun Jan 13 19:48:59 2019 +0000 last: fix wtmp user name buffer overflow [asan] Ensure utmp user name field is null terminated. Without that getpwnam() can buffer overflow, when wtmp file is malformed. Addresses: https://github.com/karelzak/util-linux/issues/715 Signed-off-by: Sami Kerola login-utils/last.c | 1 + 1 file changed, 1 insertion(+) commit 3ebfc8d370d21c875cde325532f580acb6250e3d Author: Sami Kerola Date: Sat Jan 12 11:14:15 2019 +0000 bash-completion: umount support relative path and ~ as home shorthands Addresses: https://github.com/karelzak/util-linux/issues/703 Signed-off-by: Sami Kerola bash-completion/umount | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit ad7ac3d598e2d541d9eba70975e68dff7e52c7d9 Author: Sami Kerola Date: Mon Jan 7 22:23:04 2019 +0000 fsck.cramfs: use utimes() instead of utime() that is obsolete Reference: http://man7.org/linux/man-pages/man3/utime.3p.html#APPLICATION_USAGE Signed-off-by: Sami Kerola disk-utils/fsck.cramfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f78a90217447b10cb52c2789d88da07088b37425 Author: Sami Kerola Date: Mon Jan 7 21:34:11 2019 +0000 hwclock: use monotonic time to measure how long setting time takes Earlier gettimeofday() was affected by discontinuous jumps. Measuring how long time it takes to set time using function that effected by the very thing being measured makes head spin. Lets make this less confusing with monotonic clock that ticks on without jumps. Signed-off-by: Sami Kerola sys-utils/Makemodule.am | 4 +++- sys-utils/hwclock-rtc.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit ee6e39305c55d04e647c294898568ed1d3699638 Author: Sami Kerola Date: Mon Jan 7 21:31:34 2019 +0000 include: add indirect monotonic clock id specifier Avoid repeated ifdef checks in code by adding a project specific preprocessor definition. Signed-off-by: Sami Kerola include/monotonic.h | 6 ++++++ lib/monotonic.c | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) commit d393c00c6cd57ef7f122f4e1730b3c410b6084cb Author: Sami Kerola Date: Sat Jan 5 21:32:23 2019 +0000 timeutils: match today day and this year correctly Assumption all years since 1970 have been exactly 365 days long has it's problems when leap years happen. Lets use struct tm fields that are provided by localtime_r(), making year and day to be correctly compared even when it's late new years eve somewhere else than UTC-0. Signed-off-by: Sami Kerola include/timeutils.h | 3 --- lib/timeutils.c | 27 +++++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) commit 1a83c00d888fad89f09c4acf2033790d5dcae48e Author: Karel Zak Date: Fri Jan 11 12:16:00 2019 +0100 login: add support for login.defs(5) LASTLOG_UID_MAX This new variable allows to keep lastlog file small and filter out things like huge nfsnobody UIDs. The variable is also supported by shadow-utils (adduser, etc.). Addresses: https://github.com/shadow-maint/shadow/pull/142/ Signed-off-by: Karel Zak login-utils/login.1 | 11 +++++++++++ login-utils/login.c | 3 +++ 2 files changed, 14 insertions(+) commit 623427456eb632bb0b041b5fe430f70d2d3ce232 Author: Karel Zak Date: Fri Jan 11 12:15:00 2019 +0100 login-utils/logindefs: clenaup API The default value should be unsigned if the result is also unsigned... Signed-off-by: Karel Zak login-utils/logindefs.c | 2 +- login-utils/logindefs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fe7d63105d923d43c9f478acded0ac888463e456 Author: Karel Zak Date: Fri Jan 11 10:44:14 2019 +0100 fstrim: check for read-only devices on -a/-A to avoid "FITRIM ioctl failed: Remote I/O error" Addresses: https://github.com/karelzak/util-linux/issues/738 Signed-off-by: Karel Zak sys-utils/fstrim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 86f42e5a2a9d8a483ad0ca85fdf090172fb4d385 Author: Stanislav Brabec Date: Thu Jan 10 01:28:54 2019 +0100 su-common.c: prefer ENV_SUPATH over ENV_ROOTPATH ENV_SUPATH and ENV_ROOTPATH are equivalent and ENV_ROOTPATH takes precedence in both login and su. It makes no sense. More logical would be precedence of ENV_SUPATH in su and ENV_ROOTPATH in login. Signed-off-by: Stanislav Brabec login-utils/login.1 | 2 +- login-utils/runuser.1 | 2 +- login-utils/su-common.c | 4 ++-- login-utils/su.1 | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 15a191f6d30dfe202a080a3d90968b63d695a29f Author: Stanislav Brabec Date: Thu Jan 10 01:28:53 2019 +0100 su-common.c: prefer /etc/default/su over login.defs su(1) documentation says: /etc/default/su command specific logindef config file /etc/login.defs global logindef config file It indirectly indicates that /etc/default/su should take precedence over /etc/login.defs. But the reverse is true. It is not possible to define ENV_PATH in /etc/login.defs and then make su specific customization in /etc/default/su. We need to change read order to match the documented behavior. Signed-off-by: Stanislav Brabec login-utils/su-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6effcac61152880451da25142cf93931834ffa9 Author: Karel Zak Date: Thu Jan 10 12:17:19 2019 +0100 fdisk: make partition types uses more robust * report failed partition type parsing * make sure partition types code (from user reply) for MBR is hex Reported-by: Jonny Grant Signed-off-by: Karel Zak disk-utils/fdisk.c | 11 ++++++++--- libfdisk/src/parttype.c | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) commit 19e4cfef52a8f8436cb6bf925be48bd4ab9419b0 Author: Karel Zak Date: Thu Jan 10 11:26:05 2019 +0100 fdisk: support CTRL+C on change-partition-type dialog Reported-by: Jonny Grant Signed-off-by: Karel Zak disk-utils/fdisk.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 7a40136c2fce157f08ab97201fba26cf17675a39 Author: Carlos Santos Date: Mon Jan 7 17:32:34 2019 -0200 utmpdump: fix word swapping in manual page From The only binary version of the utmp(5) is standardised. To Only the binary version of the utmp(5) is standardised. Change-Id: I0033f6cf055d569c7dfca5e05e918f735ea72582 Signed-off-by: Carlos Santos login-utils/utmpdump.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 969e8cbeb124581b376bc5534c716d1b18144190 Author: Karel Zak Date: Tue Jan 8 12:07:18 2019 +0100 libblkid: improve whole-disk detection when read /proc/partitions blkid(8) in high-level mode checks partitions and unpartitioned whole-disk devices from the file /proc/partitions. The current heuristic assumes that partition name ends with a digit. Unfortunately, this is not correct -- for example md0 or nvme0n1 are whole-disk devices. This commit uses sysfs_devno_is_wholedisk() to make sure the device is a partition (according to kernel or DM). It's probably more expensive, because this way requires more syscalls (to read stuff from /sys etc.). The patch also adds more information to the blkid(8) man page. Addresses: https://github.com/karelzak/util-linux/issues/728 Signed-off-by: Karel Zak libblkid/src/devname.c | 25 ++++++++++++++----------- misc-utils/blkid.8 | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) commit 963413a1adf6767ab17712097e288e1a346f63a7 Author: Khem Raj Date: Fri Jan 4 22:38:25 2019 -0800 ldattach: Check for value of _HAVE_STRUCT_TERMIOS_C_ISPEED in glibc 2.29+ checking for just existence of _HAVE_STRUCT_TERMIOS_C_ISPEED won't be enough, the value has to be checked see https://sourceware.org/git/?p=glibc.git;a=commit;h=e5a50db36eaa6e8c6427b3a971563240b633ca85 Signed-off-by: Khem Raj sys-utils/ldattach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b13b5602e16f719934b29d5efbf5a3aacf9832c Author: Karel Zak Date: Wed Jan 2 14:44:59 2019 +0100 libblkid: (ntfs) fix compiler warning [-Wpedantic] libblkid/src/superblocks/ntfs.c:80:2: warning: ISO C restricts enumerator values to range of 'int' (4294967295 is too large) [-Wpedantic] Addressed: https://github.com/karelzak/util-linux/pull/732 Signed-off-by: Karel Zak libblkid/src/superblocks/ntfs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 523de2ec6f41e5cfff31c99393c8d3b1a88a62bf Author: Sami Kerola Date: Thu Dec 13 22:12:26 2018 +0000 chmem: add initilizer [clang] warning: use of GNU empty initializer extension [-Wgnu-empty-initializer] Signed-off-by: Sami Kerola sys-utils/chmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5837f08a505df84f8a35ab418d296ba14812b90c Author: Sami Kerola Date: Thu Dec 13 21:55:02 2018 +0000 libsmartcols: remove extra ';' outside of a function [-Wextra-semi] Signed-off-by: Sami Kerola libsmartcols/src/grouping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d6cad08cf74dc5d7323c973a32d3c67150c89a9 Merge: 24fa736d9 36b0530e1 Author: Karel Zak Date: Wed Jan 2 14:20:21 2019 +0100 Merge branch 'master' of https://github.com/kvanals/util-linux * 'master' of https://github.com/kvanals/util-linux: Removed BlueStore VERSION information as it is gibberish Updated BlueStore expected result Added BlueStore test image commit 36b0530e122a4c8102856175907d7ae086e3a4de Author: Kenneth Van Alstyne Date: Mon Dec 17 20:21:32 2018 -0600 Removed BlueStore VERSION information as it is gibberish libblkid/src/superblocks/bluestore.c | 2 -- tests/expected/blkid/low-probe-bluestore | 1 - 2 files changed, 3 deletions(-) commit 24fa736d9157fba97f2107e7190ce97759254d73 Author: John W Higgins Date: Mon Dec 17 17:11:44 2018 -0800 Remove duplicate entry for reset-env from usage I assume the second entry was not desired in the original commit. Line 153-154 would appear to be a duplicate sys-utils/setpriv.c | 1 - 1 file changed, 1 deletion(-) commit c011711ad643606f2c66e5cd2397830a36422d23 Author: Kenneth Van Alstyne Date: Mon Dec 17 12:07:14 2018 -0600 Updated BlueStore expected result tests/expected/blkid/low-probe-bluestore | 1 + 1 file changed, 1 insertion(+) commit 6032c9f1f8f5a822927f72fedf04bedd57f4f33c Author: Kenneth Van Alstyne Date: Mon Dec 17 11:05:24 2018 -0600 Added BlueStore test image tests/expected/blkid/low-probe-bluestore | 2 ++ tests/ts/blkid/images-fs/bluestore.img.xz | Bin 0 -> 412 bytes 2 files changed, 2 insertions(+) commit 200769b6c0dff6863089ea2a9ff4ea9ccbd15d0f Author: Karel Zak Date: Mon Dec 17 11:05:23 2018 +0100 libblkid: (bluestore) terminate magic strings array Signed-off-by: Karel Zak libblkid/src/superblocks/bluestore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit be2762b862dc4c20bf6ff88ecab0cc99fb8ed76f Merge: 144f12959 412549727 Author: Karel Zak Date: Mon Dec 17 10:45:33 2018 +0100 Merge branch 'master' of https://github.com/kvanals/util-linux * 'master' of https://github.com/kvanals/util-linux: Finished up BlueStore support Added support for detecting Ceph BlueStore Block Devices commit 144f12959c7f0f62adc9dcb2794b09b1b58ebc6e Author: Jean-Philippe ROMAIN Date: Mon Dec 17 09:30:54 2018 +0100 dmesg: correct "-n, --console-level level" example in manual page When providing an abbreviation of the level name with the option "-n, --console-level level", it corresponds to the level (included) up to which messages are displayed on the console. If a level number is given, this level is excluded. So in the given example, "-n 1" is equivalent to "-n emerg". Signed-off-by: Jean-Philippe Romain sys-utils/dmesg.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be042335b82cd36df49c826971437006ac662f32 Author: Sami Kerola Date: Sat Dec 15 16:05:40 2018 +0000 docs: add link to mail list archive Signed-off-by: Sami Kerola README | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ae62a1751f01e47d5535339b31d7e327e1fe1126 Author: Tony Asleson Date: Thu Dec 13 09:03:28 2018 -0600 libblkid: stratis: correct byte order Stratis superblock is little endian, ensure we retrieve the number of sectors and initialization time correctly. Signed-off-by: Tony Asleson libblkid/src/superblocks/stratis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4125497278525da7fdac70bc92d11b9b2b6ad634 Author: Kenneth Van Alstyne Date: Fri Dec 14 14:32:13 2018 -0600 Finished up BlueStore support libblkid/src/Makemodule.am | 1 + libblkid/src/superblocks/superblocks.c | 1 + libblkid/src/superblocks/superblocks.h | 1 + 3 files changed, 3 insertions(+) commit bd301d459fce7d4f7a09e5db1107d3de26bedaa7 Author: Kenneth Van Alstyne Date: Fri Dec 14 14:27:10 2018 -0600 Added support for detecting Ceph BlueStore Block Devices libblkid/src/superblocks/bluestore.c | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 6bf071afa2ca3d7853aa76a702415fa77c1719e5 Merge: 4d09682b3 32865bd5d Author: Karel Zak Date: Wed Dec 12 14:25:22 2018 +0100 Merge branch 'aarch32_on_aarch64' of https://github.com/jlinton/util-linux * 'aarch32_on_aarch64' of https://github.com/jlinton/util-linux: lscpu: Add aarch32 detection on aarch64 commit 4d09682b3cd91cc96d12a38dba922c1d3dc083d5 Author: Karel Zak Date: Wed Dec 12 12:14:39 2018 +0100 mkswap: use dd(1) in example rather than fallocate(1) The man page warns against fallocate on some filesystems and recommends dd(1) as the most portable solution. So, let's use dd(1) also in the example used in the same man page. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1203378 Signed-off-by: Karel Zak disk-utils/mkswap.8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 32865bd5df59f14fd3fe6651acebde99b0691b5d Author: Jeremy Linton Date: Tue Dec 11 12:27:29 2018 -0600 lscpu: Add aarch32 detection on aarch64 aarch32 support is an optional feature of ARMv8, as CPUs which don't support aarch32 become more common, lets make sure that lscpu can tell a user quickly if they are on a machine that only supports 64-bit. Signed-off-by: Jeremy Linton sys-utils/lscpu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6245c26ad4e4a7cc97a209a6b237e8c4bd1706a4 Author: Karel Zak Date: Tue Dec 11 14:20:19 2018 +0100 lslogins: make valid_pwd() more robust Signed-off-by: Karel Zak login-utils/lslogins.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4d33953ea9790d6369a3a843e54fd76e5e65d8ab Merge: 9e07672bb 577bb86f5 Author: Karel Zak Date: Tue Dec 11 14:14:37 2018 +0100 Merge branch 'fix-couple-warnings' of https://github.com/kerolasa/util-linux * 'fix-couple-warnings' of https://github.com/kerolasa/util-linux: hexdump: fix potential null pointer dereference warnings lslogins: remove duplicate NULL check libsmartcols: fix variable shadowing lsblk: fix null pointer dereferences commit 9e07672bb9989c88f6a7d8b8ab23158701fb4eec Author: Karel Zak Date: Tue Dec 11 11:44:48 2018 +0100 tests: check for tar and {b,g}zip Signed-off-by: Karel Zak tests/ts/lscpu/lscpu | 2 ++ tests/ts/lsmem/lsmem | 2 ++ 2 files changed, 4 insertions(+) commit 577bb86f5b0662ac81699580b55b5a4b11611f01 Author: Sami Kerola Date: Mon Dec 10 21:41:19 2018 +0000 hexdump: fix potential null pointer dereference warnings First three fixes on lines 133, 151, and 280 are cosmetic. Because there was unobvious null check compiler thought variable might be null, and warned when after pointer adjustment it was followed without null check. Perhaps this will not happen sometime in future when compiler is made more smart, meanwhile lets give better hints to avoid false positive. The last change addresses issue that is possible, at least in theory. text-utils/hexdump-parse.c:465:12: warning: potential null pointer dereference [-Wnull-dereference] Signed-off-by: Sami Kerola text-utils/hexdump-parse.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit a81a48779b858b7ab49fff3ed52dec21a26049a5 Author: Sami Kerola Date: Mon Dec 10 20:41:18 2018 +0000 lslogins: remove duplicate NULL check Having this excess NULL check in place causes small performance penalty, and makes compiler to guess wrong if a null should be checked. To me getting rid of false positive warning is more useful. login-utils/lslogins.c:634:7: warning: potential null pointer dereference [-Wnull-dereference] Signed-off-by: Sami Kerola login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 539e96b14106d4245589fdf7963c68530a3026a7 Author: Sami Kerola Date: Mon Dec 10 20:30:59 2018 +0000 libsmartcols: fix variable shadowing libsmartcols/src/grouping.c:115:26: warning: declaration of ‘ln’ shadows a previous local [-Wshadow] libsmartcols/src/grouping.c:108:24: note: shadowed declaration is here Signed-off-by: Sami Kerola libsmartcols/src/grouping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e361253e886424cbe37693d92eb368a595fd9e9a Author: Sami Kerola Date: Mon Dec 10 20:14:12 2018 +0000 lsblk: fix null pointer dereferences Both catched with -Wnull-dereference compiler option: Signed-off-by: Sami Kerola misc-utils/lsblk-devtree.c | 3 ++- misc-utils/lsblk.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 2859592ecb7b48d47d2e34d589ea35f76e329416 Author: Karel Zak Date: Mon Dec 10 16:25:08 2018 +0100 libmount: (umount) make mnt_stat_mountpoin() usable for relative paths # mount -o loop devicefile /mnt/test # umount devicefile umount: devicefile: not mounted. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653781 Signed-off-by: Karel Zak libmount/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32dae768227e753061571b7ec2426d3938c2c905 Author: Karel Zak Date: Mon Dec 10 14:34:12 2018 +0100 umount: fix --quiet Addresses: https://github.com/karelzak/util-linux/commit/d5fd9ac6b208c5acdb6c0023757a7e2827474482#commitcomment-31610748 Signed-off-by: Karel Zak sys-utils/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c455cdb30d212b6488d3e9f2f663fcc1f6ad267c Author: Karel Zak Date: Mon Dec 10 14:26:04 2018 +0100 choom: fix negative adjust score usage It's really bad idea to use uint64_t (ul_path_write_u64(()) when write signed number. Addresses: https://github.com/karelzak/util-linux/issues/723 Signed-off-by: Karel Zak include/path.h | 1 + lib/path.c | 22 ++++++++++++++++++++++ sys-utils/choom.c | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) commit 88cd3f2256d02d9a102aa43df6f30b8d2c8865c5 Author: Seth Girvan Date: Fri Dec 7 02:02:00 2018 -0800 libuuid: fix man page typos Signed-off-by: Seth Girvan libuuid/man/uuid.3 | 4 ++-- libuuid/man/uuid_generate.3 | 10 +++++----- libuuid/man/uuid_parse.3 | 4 ++-- libuuid/man/uuid_unparse.3 | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit f78f2983d305fb18db6965661e14f73297b344b7 Author: Karel Zak Date: Mon Dec 10 12:03:18 2018 +0100 fstrim: fix usage() Signed-off-by: Karel Zak sys-utils/fstrim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d046b6754113797987d4dd71f3eb7bfa58ecfd55 Merge: 410d12e5b 3ccbdf7aa Author: Karel Zak Date: Mon Dec 10 11:58:04 2018 +0100 Merge branch '2018wk48' of https://github.com/kerolasa/util-linux * '2018wk48' of https://github.com/kerolasa/util-linux: include/c: check returns_nonnull function attribute with __GNUC_PREREQ commit 410d12e5beb78838fc7c6d47d4c433459dc8b857 Author: Karel Zak Date: Mon Dec 10 11:45:03 2018 +0100 fstrim: trim also root FS on --fstab The root fs ("/") is optional in many case in /etc/fstab. This patch forces fstrim to read kernel command line for the root= option to get root FS if the entry is missing in your fstab. Addresses: https://github.com/karelzak/util-linux/issues/719 Signed-off-by: Karel Zak sys-utils/fstrim.8 | 3 ++- sys-utils/fstrim.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) commit 1dae161c839ead8a642b74f432e0f82bb5f5fdd2 Author: Karel Zak Date: Mon Dec 10 11:39:08 2018 +0100 libmount: export mnt_guess_system_root() by API Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 1 + libmount/src/libmount.h.in | 2 ++ libmount/src/libmount.sym | 4 ++++ libmount/src/mountP.h | 1 - libmount/src/utils.c | 7 ++++++- 5 files changed, 13 insertions(+), 2 deletions(-) commit 0bd05f5ee4876ffd13c98acd56c2bff9971f28f1 Author: Karel Zak Date: Fri Dec 7 12:29:50 2018 +0100 lsblk: add --merge Signed-off-by: Karel Zak Documentation/TODO | 16 ----------- misc-utils/lsblk-devtree.c | 34 +++++++++++++++++++++- misc-utils/lsblk.8 | 28 +++++++++++------- misc-utils/lsblk.c | 71 +++++++++++++++++++++++++++++++++------------- misc-utils/lsblk.h | 10 +++++++ 5 files changed, 112 insertions(+), 47 deletions(-) commit 4f4c2b3cdd8d6f74c2196983647604d1349941b8 Author: Karel Zak Date: Fri Dec 7 12:28:36 2018 +0100 libsmartcols: add grouping API docs Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 309c76e4ee67d21c10e1724633d128d5a5c838c0 Author: Karel Zak Date: Fri Dec 7 12:26:58 2018 +0100 libsmartcols: add grouping samples Signed-off-by: Karel Zak libsmartcols/samples/Makemodule.am | 9 ++ libsmartcols/samples/grouping-overlay.c | 137 ++++++++++++++++++++++++++++++ libsmartcols/samples/grouping-simple.c | 144 ++++++++++++++++++++++++++++++++ 3 files changed, 290 insertions(+) commit d52f5542b03d31a0b55b3a68588e9395b2877f31 Author: Karel Zak Date: Fri Dec 7 11:54:39 2018 +0100 libsmartcols: add lines grouping support For some use-case we need to describe M:N relation between output lines. The nice examples are RAIDs or multi-path devices in lsblk output. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 955.7M 0 loop ┌┈▶ ├─test-thin-metadata 253:0 0 2M 0 dm └┬▶ └─test-thin-data 253:1 0 953.7M 0 dm └┈┈test-thin-pool 253:2 0 953.7M 0 dm In this example two line (test-thin-metadata and test-thin-data) are parents for another line (test-thin-pool). The new API uses term "group" for parental line -- the number of group members is unlimited and every group has at least one child. It's possible that group's child is member of another group: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 955.7M 0 loop ┌┈▶ ├─test-thin-metadata 253:0 0 2M 0 dm └┬▶ └─test-thin-data 253:1 0 953.7M 0 dm ┌┈▶ └┈┈test-thin-pool 253:2 0 953.7M 0 dm ┆ └─test-thin 253:3 0 190.8M 0 dm └┬▶ loop1 7:1 0 190.8M 0 loop └┈┈┈┈┈test-thin-extsnap 253:4 0 190.8M 0 dm For now multi-group relation is unsupported and one line can be member of one group only. The library API and printing code is ready to support this feature, but not sure if we really need it. All what is necessary is to create array of groups in the line struct. Note that grouping is independent on standard parent->child relations between lines and grouping can connect arbitrary lines. The restriction is only that group child cannot be child of another line or child of another group. These cross reference are (and probably will be) impossible. The patch is relative large, but easy to review. Changes: * add new UTF symbols * add scols_symbols_set_group_* public API to modify new symbols * add struct libscols_group, used only internally * add "grpset" array to table struct -- the array is used to keep position of the group in the output. Every active group uses three items in the grpset. If there is more overlapping groups than bigger grpset is allocated. Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 1 + libsmartcols/src/buffer.c | 12 + libsmartcols/src/calculate.c | 22 +- libsmartcols/src/column.c | 1 + libsmartcols/src/grouping.c | 587 +++++++++++++++++++++++++++++++++++++ libsmartcols/src/init.c | 1 + libsmartcols/src/libsmartcols.h.in | 12 + libsmartcols/src/libsmartcols.sym | 12 + libsmartcols/src/line.c | 23 ++ libsmartcols/src/print.c | 195 ++++++++++-- libsmartcols/src/smartcolsP.h | 135 ++++++++- libsmartcols/src/symbols.c | 138 ++++++++- libsmartcols/src/table.c | 100 ++++++- 13 files changed, 1177 insertions(+), 62 deletions(-) commit 7ca122ba843db03d734fdc3f63cfca98a3817fdf Author: Karel Zak Date: Fri Dec 7 11:37:24 2018 +0100 include/list: add list_entry_is_first() and list_count_entries() Signed-off-by: Karel Zak include/list.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 3bb882be440ad37036382854f7b16047b1d52f16 Author: Karel Zak Date: Thu Oct 25 16:26:30 2018 +0200 libsmartcols: split print.c into print.c, put.c and print-api.c Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 2 + libsmartcols/src/fput.c | 97 +++++++++++++ libsmartcols/src/print-api.c | 208 ++++++++++++++++++++++++++ libsmartcols/src/print.c | 322 ++--------------------------------------- libsmartcols/src/smartcolsP.h | 22 +++ 5 files changed, 339 insertions(+), 312 deletions(-) commit 06a8decd724b9c11801ed60794d541bc4ad2f3bb Author: Karel Zak Date: Thu Oct 25 16:01:23 2018 +0200 libsmartcols: move width calculation to separate file Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 1 + libsmartcols/src/calculate.c | 391 ++++++++++++++++++++++++++++++++++++++++ libsmartcols/src/print.c | 398 +---------------------------------------- libsmartcols/src/smartcolsP.h | 17 ++ 4 files changed, 412 insertions(+), 395 deletions(-) commit ecd7cd253db1a97fc6ef9e203e4494f0172fb26e Author: Karel Zak Date: Thu Oct 25 15:43:43 2018 +0200 libsmartcols: rename table_print.c to print.c Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 2 +- libsmartcols/src/{table_print.c => print.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit ce6cb22f0dc21ee2caece4169a63e4090e942db0 Author: Karel Zak Date: Thu Oct 25 15:39:47 2018 +0200 libsmartcols: move buffer stuff to buffer.c Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 1 + libsmartcols/src/buffer.c | 140 +++++++++++++++++++++++++++++++++++++++++ libsmartcols/src/smartcolsP.h | 20 ++++++ libsmartcols/src/table_print.c | 136 +-------------------------------------- 4 files changed, 163 insertions(+), 134 deletions(-) commit 6408e164e1aec1ce56b135f7cfaf2bf1669a5258 Author: Karel Zak Date: Thu Oct 25 15:38:08 2018 +0200 libsmartcols: add another UTF symbols Signed-off-by: Karel Zak libsmartcols/src/table.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5d201da68f9efab64f9983ab2be1d44e3c09b36d Author: Karel Zak Date: Thu Oct 25 14:12:16 2018 +0200 libsmartcols: add is_last_child(), move is_last_column() Signed-off-by: Karel Zak libsmartcols/src/smartcolsP.h | 22 ++++++++++++++++++++++ libsmartcols/src/table_print.c | 19 ++----------------- 2 files changed, 24 insertions(+), 17 deletions(-) commit 0986f29a3f7c48f86eb3241f94077ba1c52331fa Author: Karel Zak Date: Tue Oct 23 14:04:55 2018 +0200 lsblk: make devtree dependences more generic We also need reference from child to parent to implement multi-parent view. This change allows to walk on tree in both directions. Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 86 ++++++++++++++++++++++++++++++++-------------- misc-utils/lsblk.h | 11 ++++-- 2 files changed, 68 insertions(+), 29 deletions(-) commit 94d4c2dca456227f0cf34498eef51e9ac9efbdbd Author: Karel Zak Date: Thu Oct 18 16:16:12 2018 +0200 docs: add lsblk --merge to TODO Signed-off-by: Karel Zak Documentation/TODO | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit dc4662f0e755929de9cbe98b1b343b492fd620f4 Author: Karel Zak Date: Thu Oct 18 15:46:07 2018 +0200 lsblk: add --dedup The target use-case are systems with large number of multi-path devices or systems with duplicate (copied) filesystems. The feature is flexible enough to use arbitrary column (for example WWM or UUID, ...) as de-duplication key. For example tree with multi-path devices sd{c,d,e,f} ./lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 223.6G 0 disk ├─sda1 8:1 0 200M 0 part /boot/efi ├─sda2 8:2 0 200M 0 part /boot ├─sda3 8:3 0 130.3G 0 part ├─sda4 8:4 0 50G 0 part / └─sda5 8:5 0 42.9G 0 part sdb 8:16 0 74.5G 0 disk └─sdb1 8:17 0 74.5G 0 part /home/archive sdc 8:32 0 100M 0 disk └─mpatha 253:0 0 100M 0 mpath ├─mpatha1 253:1 0 50M 0 part └─mpatha2 253:2 0 49M 0 part sdd 8:48 0 100M 0 disk └─mpatha 253:0 0 100M 0 mpath ├─mpatha1 253:1 0 50M 0 part └─mpatha2 253:2 0 49M 0 part sde 8:64 0 100M 0 disk └─mpatha 253:0 0 100M 0 mpath ├─mpatha1 253:1 0 50M 0 part └─mpatha2 253:2 0 49M 0 part sdf 8:80 0 100M 0 disk └─mpatha 253:0 0 100M 0 mpath ├─mpatha1 253:1 0 50M 0 part └─mpatha2 253:2 0 49M 0 part De-duplicate by WWN: ./lsblk -M WWN NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 223.6G 0 disk ├─sda1 8:1 0 200M 0 part /boot/efi ├─sda2 8:2 0 200M 0 part /boot ├─sda3 8:3 0 130.3G 0 part ├─sda4 8:4 0 50G 0 part / └─sda5 8:5 0 42.9G 0 part sdb 8:16 0 74.5G 0 disk └─sdb1 8:17 0 74.5G 0 part /home/archive sdc 8:32 0 100M 0 disk └─mpatha 253:0 0 100M 0 mpath ├─mpatha1 253:1 0 50M 0 part └─mpatha2 253:2 0 49M 0 part Addresses: https://github.com/karelzak/util-linux/issues/616 Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 123 +++++++++++++++++++++++++++++++++++++++++---- misc-utils/lsblk.8 | 8 +++ misc-utils/lsblk.c | 66 +++++++++++++++++++++++- misc-utils/lsblk.h | 6 +++ 4 files changed, 192 insertions(+), 11 deletions(-) commit 10501add02abf12d41246c04a81ac599179266c7 Author: Karel Zak Date: Thu Oct 18 13:57:46 2018 +0200 lsblk: remember whole-disk, remove unused struct member Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 5 +++-- misc-utils/lsblk.c | 20 ++++++++++++-------- misc-utils/lsblk.h | 7 +++---- 3 files changed, 18 insertions(+), 14 deletions(-) commit d81e32bde97e193ddd77ac9b4a85104b69730bca Author: Karel Zak Date: Thu Oct 18 12:39:41 2018 +0200 lsblk: make device_get_data() more generic * independent on smartcols line * keep sort data optional Signed-off-by: Karel Zak misc-utils/lsblk.c | 134 +++++++++++++++++++++++++++++++---------------------- misc-utils/lsblk.h | 2 - 2 files changed, 78 insertions(+), 58 deletions(-) commit 57a061339b5e522f64aebf5a51abf4f0b2efdb42 Author: Karel Zak Date: Wed Oct 17 14:13:31 2018 +0200 lsblk: apply --nodeps to partitions too The new implementation differentiates between partitions and another dependences -- this is regression, we need root devices only. Signed-off-by: Karel Zak misc-utils/lsblk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8a2f175cbbd9850922fb5bbb96c5a58a4a2d73c0 Author: Karel Zak Date: Wed Oct 17 14:10:27 2018 +0200 lsblk: read queue/discard_granularity only when necessary Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 1 + misc-utils/lsblk.c | 29 +++++++++++++++++------------ misc-utils/lsblk.h | 3 ++- 3 files changed, 20 insertions(+), 13 deletions(-) commit 81a8936c56b25192f23f82798da7f6a9ddf76feb Author: Karel Zak Date: Wed Oct 17 13:48:43 2018 +0200 lsblk: reuse 'removable' flag from parent It's used in the default output, let's make it a little bit more effective. Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 2 +- misc-utils/lsblk.c | 34 +++++++++++++++++++++++++++++----- misc-utils/lsblk.h | 1 + 3 files changed, 31 insertions(+), 6 deletions(-) commit ff7992d631c864bfcbf9f3fbf64cf3adbbd99f18 Author: Karel Zak Date: Wed Oct 17 13:19:50 2018 +0200 lsblk: don't keep sysfs dirs open Don't keep open sysfs file descriptors for all time to avoid problems on systems with huge number of block devices. Signed-off-by: Karel Zak misc-utils/lsblk.c | 62 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 16 deletions(-) commit c9ea91d41ef0fb1975e8340a010e777aee84b089 Author: Karel Zak Date: Wed Oct 17 13:18:25 2018 +0200 lib/path: allow to close dirfd Signed-off-by: Karel Zak include/path.h | 2 ++ lib/path.c | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) commit b158bd29deb76b0814b4e0e6354e96e4a8abe5c5 Author: Karel Zak Date: Wed Oct 17 11:14:40 2018 +0200 lsblk: rename set_device() Signed-off-by: Karel Zak misc-utils/lsblk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b93585e8fc768926b282d91de27d0fa123e2335a Author: Karel Zak Date: Wed Oct 17 10:54:59 2018 +0200 lsblk: add comments Signed-off-by: Karel Zak misc-utils/lsblk.c | 58 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 12 deletions(-) commit e7b5353e8b7c17e4efc742e6458bbf3321ce0f42 Author: Karel Zak Date: Tue Oct 16 15:53:22 2018 +0200 lsblk: add process_all_devices_inverse() This is necessary to implement --inverse. Note that this new implementation scans /sys/dev/block/ to get top-level devices and than it calls process_one_device(). Note that standard non-inverse tree does not use process_one_device() as it's more effective to scan /sys/block where are no partitions. Signed-off-by: Karel Zak misc-utils/lsblk.c | 125 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 90 insertions(+), 35 deletions(-) commit 93c687d895752582bd95ef52a53684b346f2cc70 Author: Karel Zak Date: Tue Oct 16 15:52:13 2018 +0200 lib/sysfs: add function to detect partitioned devices Signed-off-by: Karel Zak include/sysfs.h | 1 + lib/sysfs.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit e15c9e3dc53e64508720634c0fe926d4230e229b Author: Karel Zak Date: Tue Oct 16 14:37:28 2018 +0200 lsblk: reorder functions The goal is to call process_one_device() from process_all_devices(), so let's it keep in code in the right order. Signed-off-by: Karel Zak misc-utils/lsblk.c | 113 +++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 56 deletions(-) commit cf3c1bc77aa52d30b27f4bf270c3f1808554a0d1 Author: Karel Zak Date: Tue Oct 16 14:35:36 2018 +0200 lsblk: make process_partitions() more readable Signed-off-by: Karel Zak misc-utils/lsblk.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0e086f8230aa02560a0e47f7ce93f16fee920275 Author: Karel Zak Date: Tue Oct 16 14:29:00 2018 +0200 lsblk: remove unncessary parent pointer Signed-off-by: Karel Zak misc-utils/lsblk.c | 50 ++++++++++++++++++-------------------------------- misc-utils/lsblk.h | 1 - 2 files changed, 18 insertions(+), 33 deletions(-) commit ae4c2c375b13d32f3f56b915d0371c87a76fac42 Author: Karel Zak Date: Tue Oct 16 14:20:29 2018 +0200 lsblk: use real rather than hardcoded parent Signed-off-by: Karel Zak misc-utils/lsblk.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 4ca3c472f3de65c516e84f3b6156f29b38ebb408 Author: Karel Zak Date: Tue Oct 16 13:39:25 2018 +0200 lsblk: use devtree functions Signed-off-by: Karel Zak misc-utils/lsblk.c | 196 ++++++++++++++++++++++++++++------------------------- 1 file changed, 104 insertions(+), 92 deletions(-) commit e2d7870b00e3bc47b0c8f767f33d6db402ba7f66 Author: Karel Zak Date: Tue Oct 16 13:37:36 2018 +0200 lsblk: add lsblk_device_has_dependence() Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 37 +++++++++++++++++++++++++++---------- misc-utils/lsblk.h | 3 ++- 2 files changed, 29 insertions(+), 11 deletions(-) commit 291606faf999560738e4c47abc79084045181933 Author: Karel Zak Date: Mon Oct 15 16:12:33 2018 +0200 lsblk: process_one_device() refactoring Signed-off-by: Karel Zak misc-utils/lsblk.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 583b6489f636f843b5ad784785d5ab2142e906aa Author: Karel Zak Date: Mon Oct 15 15:53:33 2018 +0200 lsblk: add devtree_get_device_or_new() Signed-off-by: Karel Zak misc-utils/lsblk.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 97c89dff138aeecc76e9fe2313fc27bf7c32aa6b Author: Karel Zak Date: Mon Oct 15 14:25:15 2018 +0200 lsblk: keep functions names consistent Signed-off-by: Karel Zak misc-utils/lsblk.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 9b4c6486122c2f7545e1ab8b21a70a93f7257c69 Author: Karel Zak Date: Mon Oct 15 14:16:32 2018 +0200 lsblk: remove unused reset_device() Now all is maintained by reference counting ion the devtree. Signed-off-by: Karel Zak misc-utils/lsblk.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 57502dd34c532b679b3e1fe36f5a2a5fc47faf3a Author: Karel Zak Date: Mon Oct 15 14:14:33 2018 +0200 lsblk: fix devtree deallocation Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 16 +++------------- misc-utils/lsblk.c | 5 +++-- 2 files changed, 6 insertions(+), 15 deletions(-) commit f43b8297599e0e871ab569a3ff5d2ce515409aac Author: Karel Zak Date: Mon Oct 15 13:55:08 2018 +0200 lsblk: split sysfs reading and scols table filling This change allows read devices from sysfs only once and reuse device properties if the device is references more than once in the tree (RAIDs, etc.). * every device is in the tree only once (tree->devices list) * iterate_block_devices() reuse already read devices (for example if already read for any dependence) * the smartscols table is build from the final tree The patch temporary disables dependencies evaluation (in process_blkdev() to keep the patch small and simple. Signed-off-by: Karel Zak misc-utils/lsblk.c | 78 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 22 deletions(-) commit 21d4a48c9cf304e771a7554b54f75df8e8565e34 Author: Karel Zak Date: Mon Oct 15 13:53:19 2018 +0200 lsblk: cleanup device reference in the tree Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 38 +++++++++++++++++++++++++++++++++++--- misc-utils/lsblk.h | 3 ++- 2 files changed, 37 insertions(+), 4 deletions(-) commit 3bf2a36cc50daf5f3df4943f5d31cf600056c89b Author: Karel Zak Date: Fri Oct 12 12:51:03 2018 +0200 lsblk: remove badly named debug interface name Signed-off-by: Karel Zak misc-utils/lsblk.c | 40 ++++++++++++++++++++-------------------- misc-utils/lsblk.h | 3 +-- 2 files changed, 21 insertions(+), 22 deletions(-) commit 5bb395f4f60f4c163ccf036421fafc72e5f5259e Author: Karel Zak Date: Fri Oct 12 12:50:03 2018 +0200 lsblk: add basic function to build devices tree Signed-off-by: Karel Zak misc-utils/Makemodule.am | 1 + misc-utils/lsblk-devtree.c | 257 +++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsblk.h | 99 ++++++++++++++++- 3 files changed, 354 insertions(+), 3 deletions(-) commit a0a76f42650fb4bf6773349b14b52be5b52339d7 Author: Karel Zak Date: Fri Oct 12 12:48:42 2018 +0200 lsblk: properly initialize structs Signed-off-by: Karel Zak misc-utils/lsblk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7cd9de40fa5149cdc35167f59e138b3551027318 Author: Karel Zak Date: Tue Oct 9 12:48:34 2018 +0200 lsblk: rename reset_lsblk_device() to reset_device() Signed-off-by: Karel Zak misc-utils/lsblk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fed34a1e631594d4c4337a1b2a7e9507715e11c6 Author: Karel Zak Date: Tue Oct 9 12:46:28 2018 +0200 lsblk: rename blkdev_cxt to lsblk_device The patch does not change code logic and semantic -- just rename. * set_cxt() to set_device() * struct blkdev_cxt to lsblk_device Signed-off-by: Karel Zak misc-utils/lsblk-mnt.c | 34 ++-- misc-utils/lsblk-properties.c | 50 ++--- misc-utils/lsblk.c | 464 +++++++++++++++++++++--------------------- misc-utils/lsblk.h | 8 +- 4 files changed, 278 insertions(+), 278 deletions(-) commit 8229ed2f5c9f663cd363c8fac1454ad886776d5a Author: Karel Zak Date: Thu Nov 22 12:53:00 2018 +0100 build-sys: do not require crypt() The function is necessary only for newgrp and sulogin. Addresses: https://github.com/karelzak/util-linux/issues/584 Signed-off-by: Karel Zak configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a68ed87ffe10a172a20094e2c3c7a542c5d71fbe Author: Karel Zak Date: Wed Oct 24 14:32:29 2018 +0200 build-sys: do not require dirfd() The dirfd() is required on many places, but it should not be required for all utils by ./configure.ac. Signed-off-by: Karel Zak configure.ac | 10 ++++++---- lib/Makemodule.am | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) commit 3001923ba14defd950109a55414aab841cd4dc9a Author: Karel Zak Date: Wed Oct 24 14:21:15 2018 +0200 build-sys: improve error message Signed-off-by: Karel Zak configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6df5acf970852a94b254800dc69569bd1f4c9ae8 Author: Karel Zak Date: Wed Oct 24 12:28:13 2018 +0200 lib/timer: add fallback if timer_create() not available * add struct ul_timer as API abstraction to hide differences between timer_create() and setitimer() * add setitimer() detection to ./configure.ac * add fallback code to use setitimer() if timer_create() not available (for example on OSX) Addresses: https://github.com/karelzak/util-linux/issues/584 Signed-off-by: Karel Zak configure.ac | 4 ++++ include/timer.h | 15 +++++++++++++-- lib/timer.c | 40 +++++++++++++++++++++++++++++++++++----- misc-utils/uuidd.c | 8 +++++--- sys-utils/flock.c | 8 +++++--- 5 files changed, 62 insertions(+), 13 deletions(-) commit 9a558f9cf68f89f62799b073d0fe7fcdd7aafdba Author: Karel Zak Date: Wed Oct 24 12:18:54 2018 +0200 build-sys: make sure HAVE_TIMER_CREATE defined Signed-off-by: Karel Zak configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1866fa6a596af6b85506f2ac35242d60decfb14d Author: Ruediger Meier Date: Sun Dec 2 19:23:45 2018 +0100 include/c: re-add type checking in container_of() This reverts parts of commit eb06d5d4, which seems to be based on Linux kernel commit c7acec71. Unlike the original kernel patch we did not add that even stronger type checking by using macro BUILD_BUG_ON_MSG. So basically we removed a useful warning when compiling such broken code: struct st { int a; char b; }; struct st t = { .a = 1, .b = 2 }; struct st *x = container_of(&t.a, struct st, b); printf("%p %p\n", (void *)&t, (void *)x); Moreover we also introduced a new compiler warning for intel/icc: "arithmetic on pointer to void or function type" Let's just revert the update of container_of() because adding a kernel-like BUILD_BUG_ON_MSG would be too much noise and also problematic (see kernel commit c03567a8). Also note that the original problem addressed by the kernel commit seems to be only reproducible with gcc 4.9, not with any later gcc nor clang,icc. Moreover, currently we have no such use-case in the UL sources anyways. Signed-off-by: Ruediger Meier include/c.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ccbdf7aa494ce854d9f346ab6bd6f51b952ff32 Author: Sami Kerola Date: Sun Dec 2 16:28:22 2018 +0000 include/c: check returns_nonnull function attribute with __GNUC_PREREQ Karel pointed out previous commit could have been better in github feedback, so lets use the version check macro instead of compare versions directly. Previous-commit: f1b327f8d5c8de7bf7fae99e85765d0954a25bac Reference: https://github.com/karelzak/util-linux/pull/704#issuecomment-432605211 Signed-off-by: Sami Kerola include/c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d79f5805ff2d7651ec70b06753e908cc782857a Author: Karel Zak Date: Fri Nov 30 12:24:15 2018 +0100 tests: make lsns-netnsid portable It seems ip(8) link-show command does not provide link-netnsid in all cases (versions ?). Let's try to use "ip netns list-id" as fallback. This commit also add possibility to debug the script by $LOG variable. Signed-off-by: Karel Zak tests/ts/lsns/netnsid | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 7174b93dfda08f87228bb7aec6274fe60af581bd Author: Karel Zak Date: Fri Nov 30 12:22:48 2018 +0100 tests: enlarge backing file for fstab-btrfs It seems the new limit for Btrfs is 47MiB. Signed-off-by: Karel Zak tests/ts/mount/fstab-btrfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e11d0b8c88ace886fd60e2a6a01428e4934865ca Author: Karel Zak Date: Thu Nov 29 13:33:02 2018 +0100 lib/canonicalize: fix typo Addresses: https://github.com/karelzak/util-linux/commit/8b8277b7a812c04f2288460f3a8d23cdd53ff66d#commitcomment-31491031 Signed-off-by: Karel Zak lib/canonicalize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df61216c678c6d00a85230521d3e9bd7354788cb Author: Karel Zak Date: Thu Nov 15 12:11:29 2018 +0100 libmount: (fuse) follow only user_id= on umount The option user= is already handled by evaluate_permissions() and by classic mount and umount usermount support. It seems we do not need to duplicate support for user= in is_fuse_usermount(). The option user_id= is fuse specific and it's maintained by libfuse/kernel in /proc/self/mountinfo. This is feature we need to support in umount(8). Addresses: https://github.com/karelzak/util-linux/pull/705 Signed-off-by: Karel Zak libmount/src/context_umount.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) commit 5fea669e9ef0a08804f72bb40f859f239f68c30a Author: Rian Hunter Date: Fri Oct 12 19:48:47 2018 -0700 libmount: Support unmount FUSE mounts FUSE mounts don't need an fstab entry to be unmounted. This checks if a mount is a FUSE mount before checking for the fstab entry, and if so returns success. [kzak@redhat.com: - use libmount tools for mount options - use namespace switches - cleanup code The requirement is user= or user_id= in /proc/self/mountinfo for fuse filesystem. The logic is the same as for user= mount options, but in this case it is not maintained by libmount in userspace, but by fuse FS in kernel.] Co-Author: Karel Zak Signed-off-by: Karel Zak libmount/src/context_umount.c | 82 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) commit e101a9eb0fab6725e0a239a92f9b50822c494a3e Author: Rian Hunter Date: Fri Oct 12 19:45:06 2018 -0700 lib/canonicalize: do restricted canonicalize in a subprocess Accessing FUSE mounts require suid/sgid (saved uid) to be equal to the owner of the mount. If mount is running as a setuid process, swapping creds by only setting the euid/egid isn't enough to change the suid/sgid as well. We must do a full setuid()/setgid(), but that removes our ability to re-assume the identity of the original euid. The solution is swap creds in a child process, preserving the creds of the parent. [kzak@redhat.com: - use switch() rather than if() for fork - use all-io.h - close unused pipe[] ends - be more strict about used types] Addresses: https://github.com/karelzak/util-linux/pull/705 Co-Author: Karel Zak Signed-off-by: Karel Zak lib/canonicalize.c | 99 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 77 insertions(+), 22 deletions(-) commit 0ab08179171cf872cace11bf679e4a9eab7af687 Author: Karel Zak Date: Thu Nov 29 13:30:11 2018 +0100 blkid: fix usage() Signed-off-by: Karel Zak misc-utils/blkid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e91d5dd716ebc6144bcb0cabb0ec847a678be9e Author: Karel Zak Date: Thu Nov 29 13:21:36 2018 +0100 blkid: make PART_ENTRY_* tags optional (add --no-part-details) blkid(8) returns information from partition table also for empty partitions. This is necessary for example for udev, but it could be confusing if you care about on-device content only. Default: # blkid -p /dev/md0p1; echo $? /dev/md0p1: PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="6d8796b1-01" PART_ENTRY_TYPE="0x83" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="204800" PART_ENTRY_DISK="9:0" 0 With --no-part-details: # blkid -p /dev/md0p1 --no-part-details; echo $? 2 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653413 Signed-off-by: Karel Zak misc-utils/blkid.8 | 6 +++++- misc-utils/blkid.c | 15 +++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) commit 4850e972572179cef74143a09a03fbe7d745c6d8 Author: Noel Cragg Date: Thu Nov 29 11:38:41 2018 +0100 mkswap: fix page size warning message Signed-off-by: Karel Zak disk-utils/mkswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c7431fd18b5777e8efe9a5eb61d91d16bf35465 Author: Carlos Santos Date: Thu Nov 22 13:05:49 2018 -0200 build-sys: make fdisk, sfdisk, cfdisk optional (enabled by default) Useful for embedded systems, on which only few utilities are required. [kzak@redhat.com: - rename to --disable-fdisks - use $enable_{c,s,}fdisk in code] Signed-off-by: Carlos Santos Signed-off-by: Karel Zak configure.ac | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit df8d991b241d3eec80a621372f0c80a59abbfdae Author: Andreas Henriksson Date: Fri Nov 23 12:10:59 2018 +0100 uuidd: Add hardening settings to uuidd.service This limits what the uuid daemon has access to when it runs. Further improving this with additional option or making things even tighter is most likely possible. Signed-off-by: Andreas Henriksson misc-utils/uuidd.service.in | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 627a0efa75e370f954ed63f7238324a764083323 Author: Roland Kammerer Date: Thu Nov 22 14:42:48 2018 +0100 tests: add test images for drbd v08/v09 This adds DRBD meta data images for DRBD versions 8 and 9, as well as the according expected output. Signed-off-by: Roland Kammerer tests/expected/blkid/low-probe-drbd-v08 | 5 +++++ tests/expected/blkid/low-probe-drbd-v09 | 5 +++++ tests/ts/blkid/images-fs/drbd-v08.img.xz | Bin 0 -> 448 bytes tests/ts/blkid/images-fs/drbd-v09.img.xz | Bin 0 -> 460 bytes 4 files changed, 10 insertions(+) commit f069b1282452e20711d580027b818e2e09db174a Merge: 46ffa930f 61bea8d56 Author: Karel Zak Date: Thu Nov 22 12:04:54 2018 +0100 Merge branch 'master' of https://github.com/nyantec/util-linux * 'master' of https://github.com/nyantec/util-linux: fix a bug where switch_root would erroneously try to parse initargs commit 46ffa930f202a469443f3d637cb4f80275d01bef Merge: 2dd292faf f1b327f8d Author: Karel Zak Date: Thu Nov 22 11:51:00 2018 +0100 Merge branch '2018wk41' of https://github.com/kerolasa/util-linux * '2018wk41' of https://github.com/kerolasa/util-linux: include/c: use returns_nonnull function attribute in xalloc.h commit 2dd292faf7c6a672389e898e650fd36c2b4c3c4e Merge: 8f3d2d76a 8f93c8c71 Author: Karel Zak Date: Thu Nov 22 11:40:42 2018 +0100 Merge branch 'fix-uuid-oids-test' of https://github.com/Whissi/util-linux * 'fix-uuid-oids-test' of https://github.com/Whissi/util-linux: tests: run oids test only when uuidgen tool was built commit 8f3d2d76aa3f5e20313362db6669dcd001bff26c Author: Andreas Henriksson Date: Thu Nov 22 11:13:58 2018 +0100 fstrim: Add hardening settings to fstrim.service This limits what the fstrim process has access to when it runs. PrivateUsers can't be enabled because of: "If this mode is enabled, all unit processes are run without privileges in the host user namespace[...]" Further improving this with additional option or making things even tighter is most likely possible. Signed-off-by: Andreas Henriksson Signed-off-by: Karel Zak sys-utils/fstrim.service.in | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3fa06e049012218d883d0e1251df86bafbc446bf Author: Karel Zak Date: Thu Nov 22 11:03:35 2018 +0100 setarch: fix obscure sparc32bash use-case Reported-by: Carlos Santos Signed-off-by: Karel Zak sys-utils/setarch.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit f1b327f8d5c8de7bf7fae99e85765d0954a25bac Author: Sami Kerola Date: Sat Oct 6 12:31:09 2018 +0100 include/c: use returns_nonnull function attribute in xalloc.h Let the compiler optimize based on the knowledge that the return value will never be null. Reference: https://patchwork.ozlabs.org/patch/281112/#631159 Signed-off-by: Sami Kerola include/c.h | 6 ++++++ include/xalloc.h | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit ca2071c6ea01419b954ad61397f4bee41b5f441a Author: Roland Kammerer Date: Tue Nov 20 17:10:49 2018 +0100 libblkid: add check for DRBD9 This adds the according meta-data structs + defines and an additional function to detect DRBD9 magics. Signed-off-by: Roland Kammerer libblkid/src/superblocks/drbd.c | 111 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 107 insertions(+), 4 deletions(-) commit d16afd8d157d41bd128da9f792ee49a716b76fd1 Author: Stanislav Brabec Date: Tue Nov 20 00:38:14 2018 +0100 agetty: Return old behavior with empty logname c094fcd37 introduced a behavior change: When Return is entered with empty logname, nothing happens. As it confuses users, return back the old behavior: re-prompt. Signed-off-by: Stanislav Brabec term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7fb72090b2d02baf86480b11346f41627291372 Author: Andreas Henriksson Date: Mon Nov 12 20:50:23 2018 +0100 libblkid: Fix hidding typo Spelling error spotted by lintian. Signed-off-by: Andreas Henriksson libblkid/src/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f7a57f58b8b65b18a27635d8490122eb4b48823 Author: Andreas Henriksson Date: Mon Nov 12 19:45:51 2018 +0100 fstrim: Add Documentation key to fstrim.service sys-utils/fstrim.service.in | 1 + 1 file changed, 1 insertion(+) commit c8d61f361ccc0fa6e128d5b8597f79953a80c74e Author: Andreas Henriksson Date: Mon Nov 12 19:39:45 2018 +0100 uuidd: Add Documentation key to uuidd.service misc-utils/uuidd.service.in | 1 + 1 file changed, 1 insertion(+) commit 7004da3d73a9b15e089a292eecb4f8963ab0baa7 Author: Sami Kerola Date: Sun Aug 12 13:56:33 2018 +0100 fstrim: use long options in systemd service file Long options are more user friendly. Signed-off-by: Sami Kerola sys-utils/fstrim.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd0be5e02afd76a065315cc51f3c96c2b53fcdf0 Author: Ruediger Meier Date: Mon Nov 12 20:27:52 2018 +0100 hardlink: add first simple tests The test still fails without pcre2 and may also make problems on exotic file systems. Signed-off-by: Ruediger Meier tests/commands.sh | 1 + tests/expected/hardlink/options-content | 26 +++++++++ tests/expected/hardlink/options-dryrun | 34 +++++++++++ tests/expected/hardlink/options-nargs | 34 +++++++++++ tests/expected/hardlink/options-noregex | 1 + tests/expected/hardlink/options-orig | 26 +++++++++ tests/expected/hardlink/options-regex-escapes | 26 +++++++++ tests/ts/hardlink/options | 78 ++++++++++++++++++++++++++ tests/ts/hardlink/testdir1.tar.xz | Bin 0 -> 26468 bytes 9 files changed, 226 insertions(+) commit 7d50d3612163833f0863f4c007159bc8edf65663 Author: Ruediger Meier Date: Thu Jun 14 01:13:56 2018 +0200 hardlink: util-linux usage Signed-off-by: Ruediger Meier misc-utils/hardlink.c | 71 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 20 deletions(-) commit 53071734aa19a7d1ee4cf71590e3521aa89aaa54 Author: Ruediger Meier Date: Tue Jun 12 20:19:21 2018 +0200 hardlink: fix compiler warnings Signed-off-by: Ruediger Meier misc-utils/hardlink.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 55c000e1ebb95ebb222206da692ceb77d0ba8409 Author: Ruediger Meier Date: Tue Jun 12 19:32:33 2018 +0200 hardlink: style indentations and license header Signed-off-by: Ruediger Meier misc-utils/hardlink.c | 769 +++++++++++++++++++++++++++----------------------- 1 file changed, 413 insertions(+), 356 deletions(-) commit 04ae85a7e57691983c25f0917cfb8ae4dcb462d5 Author: Ruediger Meier Date: Tue Jun 12 14:04:06 2018 +0200 hardlink: enable build with and without pcre2 Signed-off-by: Ruediger Meier .gitignore | 1 + configure.ac | 12 ++++++++++++ misc-utils/Makemodule.am | 12 ++++++++++++ misc-utils/hardlink.c | 19 +++++++++++++++++-- 4 files changed, 42 insertions(+), 2 deletions(-) commit 61bea8d56715a51733832a350f21fbd1dc74e5a4 Merge: 9737a1671 f0af42b51 Author: Paul Asmuth Date: Mon Nov 12 14:22:12 2018 +0100 Merge branch 'master' of github.com:karelzak/util-linux commit 9737a1671117e2d8ade95cd46df2c0787d9266cd Author: Paul Asmuth Date: Fri Nov 9 17:02:11 2018 +0100 fix a bug where switch_root would erroneously try to parse initargs before this change, switch_root would try to parse all arguments, including 'initargs', using getopt, which would lead to an 'unrecognized option' error when trying to pass a flag to the init program sys-utils/switch_root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0af42b51761428bdd821b31381fbfa1346f6782 Author: Laurent Vivier Date: Fri Oct 5 13:09:30 2018 +0200 unshare: allow to set user ID and group ID This patch introduces two new parameters to set the user ID and the group ID of the program to be executed. Setting group ID also drops supplementary groups. The option names used are the same as for nsenter, -S, --setuid and -G, --setgid. Signed-off-by: Laurent Vivier bash-completion/unshare | 4 +++- sys-utils/unshare.1 | 7 +++++++ sys-utils/unshare.c | 30 +++++++++++++++++++++++++++--- 3 files changed, 37 insertions(+), 4 deletions(-) commit bf8834d4f43e39c4212e1974cee4a76c1a8ba545 Author: Laurent Vivier Date: Fri Oct 5 13:09:29 2018 +0200 unshare: allow to set a new root This patch instroduces two new parameters to set the new root and the new working directory in this new root. This allows to combine "unshare chroot" in one command, and doing like this the /proc filesystem is correctly mounted in the new root with "--mount-proc". The new parameters are -R, --root and -w, --wd. The names are the same as for nsenter, except for "-r" that is already used by "--map-root-user" and replaced by "-R". Signed-off-by: Laurent Vivier bash-completion/unshare | 4 +++- sys-utils/unshare.1 | 6 ++++++ sys-utils/unshare.c | 34 +++++++++++++++++++++++++++++----- 3 files changed, 38 insertions(+), 6 deletions(-) commit f8ee3af9fabc4369c36fdbd706a17deb246a751c Author: Christian Hesse Date: Wed Nov 7 13:55:06 2018 +0100 agetty: fix output of escaped characters Signed-off-by: Christian Hesse term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1741d2ea572be01899107bd171d4e8a3e50c73d9 Author: Milan Broz Date: Wed Nov 7 12:48:37 2018 +0100 libblkid: fix detection of dm-integrity superblock Some new features in Linux kernel 4.19 for dm-integrity use metadata format version 2, patch adds it to detection. Signed-off-by: Milan Broz libblkid/src/superblocks/lvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7a412fe0ae5fa08b891769be2961e5d80769484 Author: Samuel Thibault Date: Mon Nov 12 11:31:17 2018 +0100 agetty: fix portability issues Signed-off-by: Karel Zak term-utils/agetty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa Author: Thomas Deutschmann Date: Sun Nov 11 02:17:55 2018 +0100 tests: run oids test only when uuidgen tool was built oids test did not check if uuidgen was available. oids test was also calling uuidgen from PATH which could result in wrong results if uuidgen from a previous util-linux installation was used. With this commit we will check if uuidgen was built and make sure that we only call the uuidgen binary we just built. If uuidgen is not available we will skip this test. tests/ts/uuid/oids | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e1686b25acdedb34cc357f08f0dd3ca01c559dfd Author: Justin Chen Date: Thu Nov 1 11:10:38 2018 -0700 rtcwake: use poweroff if shutdown is not found Some systems do not have the shutdown command. Use poweroff as an alternative. Signed-off-by: Justin Chen include/pathnames.h | 1 + sys-utils/rtcwake.c | 39 +++++++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 12 deletions(-) commit f385180ab3766f3b83966472963fd7859984cfaf Merge: 7816ee22d 5aad3c12f Author: Ruediger Meier Date: Tue Jun 12 14:26:03 2018 +0200 Merge branch 'hardlink-import' into hardlink Import hardlink source and manpage version 1.3 from https://pagure.io/hardlink.git revision 24da8615f7a9c67648bfe9b6709ba7786d61b89a commit 5aad3c12f30819ceed1025e9d20e14bd47d5932b Author: Kevin Fenzi Date: Sun Sep 17 14:07:42 2017 -0700 fixes for the fixes Signed-off-by: Francisco Javier Tsao Santín misc-utils/hardlink.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b9498938911cabd10130adbcda797d3fe8a2763 Author: Francisco Javier Tsao Santín Date: Tue Oct 17 23:21:36 2017 +0200 temporal fix before re-patch (updates from Fedora repo) misc-utils/hardlink.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88824694f68b3da23954bf3bae5db8e915164111 Author: utoddl Date: Mon Aug 14 14:46:25 2017 +0000 Update hardlink.1 The example regex in the BUGS section needs its backslashes backslashed. misc-utils/hardlink.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c64d7e60b19fefbbffbab72ecb89b7b4c652d04c Author: Francisco Javier Tsao Santín Date: Mon Apr 24 00:06:03 2017 +0200 Fixed version number, added changelog about Todd Lewis' patch misc-utils/hardlink.c | 1 + 1 file changed, 1 insertion(+) commit 551e8963f4ca7850a2d91bcb5ffb6032a690e93f Author: Todd Lewis Date: Tue Mar 28 15:16:56 2017 -0400 exclude files via pcre misc-utils/hardlink.1 | 14 +++++++++++++- misc-utils/hardlink.c | 53 ++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 57 insertions(+), 10 deletions(-) commit 92c79dc79e1154f15d6049961287e367fc43aab2 Author: Francisco Javier Tsao Santín Date: Thu Feb 16 20:08:40 2017 +0100 Fixed 32 bit build with gcc7 (RH Bugzilla ID 1422989) misc-utils/hardlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4d072ba7155358ac50531bda512442f514b37e37 Author: Francisco Javier Tsao Santín Date: Sun Jul 10 04:12:06 2016 +0200 spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); update FSF address at .c source file misc-utils/hardlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cbb0524c7c8b4aa62d1dc2fd07c7392ede7cfc5f Author: Francisco Javier Tsao Santín Date: Sun Jul 10 04:03:41 2016 +0200 Revert "spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file" This reverts commit bb9e76ae339794c2243ae294207942b7ea278364. misc-utils/hardlink.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit c11af66f0fce8ded25f92c8dde294afb2a64b735 Author: Francisco Javier Tsao Santín Date: Sun Jul 10 03:57:43 2016 +0200 spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file misc-utils/hardlink.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 348af99a6296d9d15de10700594e1403d23a9a37 Author: Jan Zeleny Date: Wed Apr 10 14:47:17 2013 +0200 Mention -f option in the man page misc-utils/hardlink.1 | 2 ++ 1 file changed, 2 insertions(+) commit c23b4a230531da663fc35a478754c641866cb6df Author: Jindrich Novy Date: Sun Apr 15 11:22:10 2012 +0200 do not allow to hardlink files across filesystems by default (#786719) (use -f option to override) misc-utils/hardlink.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 94b040b06ba018af0799e4117fe5c8dc99f70ef4 Author: Jindrich Novy Date: Fri Oct 21 02:49:08 2011 +0200 fix possible buffer overflows, integer overflows, update man page misc-utils/hardlink.1 | 13 ++++-- misc-utils/hardlink.c | 125 ++++++++++++++++++++++++++++++++++---------------- 2 files changed, 95 insertions(+), 43 deletions(-) commit 0cd6b1d3539a25a8bd5513e3c7d9b092a5ca47d3 Author: Jindrich Novy Date: Thu Mar 3 12:15:33 2011 +0100 fix URL and remove mmap() (#676962, #672917) misc-utils/hardlink.c | 52 +++++++++++++++++++-------------------------------- 1 file changed, 19 insertions(+), 33 deletions(-) commit a272f143e7daca35c3617ba02a9371dbe4b5a0ac Author: Jindrich Novy Date: Sun Oct 29 07:19:35 2006 +0000 - update docs to describe highest verbosity -vv option (#210816) - use dist Resolves: 210816 misc-utils/hardlink.1 | 6 ++++-- misc-utils/hardlink.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit b4ece7768f292758e99de782ba248d3b0a9751d7 Author: Jindrich Novy Date: Mon Nov 14 08:31:25 2005 +0000 mostly spec cleanup misc-utils/hardlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cabf1c1cb7409db30917e1d7e8546ec850e43c1d Author: Jindrich Novy Date: Mon Nov 7 14:07:33 2005 +0000 add -h option misc-utils/hardlink.1 | 39 +++++++++++++++++++++++++++++++++++++++ misc-utils/hardlink.c | 8 +++++--- 2 files changed, 44 insertions(+), 3 deletions(-) commit a810992a7215994d020897215946fbddad3d8e68 Author: Dave Jones Date: Fri Aug 26 04:42:38 2005 +0000 Document hardlink command line options. (Ville Skytta) (#161738) misc-utils/hardlink.c | 3 +++ 1 file changed, 3 insertions(+) commit a16d7294a868f4dacb1482d49820f0226e50e949 Author: Jeremy Katz Date: Wed Apr 27 22:05:13 2005 +0000 - don't try to hardlink 0 byte files (#154404) misc-utils/hardlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5edefc924240843c842f77020da0b7c418c1a50a Author: Dave Jones Date: Wed Feb 9 23:12:47 2005 +0000 kill warning misc-utils/hardlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ec20db824044c36412508310705f32e3503aa4c Author: Dave Jones Date: Fri Jan 7 05:58:05 2005 +0000 auto-import hardlink-1.0-1.1 on branch devel from hardlink-1.0-1.1.src.rpm misc-utils/hardlink.c | 344 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 344 insertions(+)