Changes between v2.28 and v2.28.1 -------------------------------------------- commit fdb55358caa889732ae874ce7347f54e2b979061 Author: Karel Zak Date: Thu Aug 11 11:28:45 2016 +0200 build-sys: release++ (v2.28.1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 99060be4cd52d0a42d7538b205fd579ac59d74c0 Author: Karel Zak Date: Thu Aug 11 11:27:19 2016 +0200 docs: update v2.28.1-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.28.1-ReleaseNotes | 95 +++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit d918de5716c336a7cbac5363dac5550d3d7e86d2 Author: Karel Zak Date: Thu Aug 11 11:23:05 2016 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 25ba0f672b02349a424bd91c950e5fe6a0a0e8c2 Author: Karel Zak Date: Thu Aug 11 11:20:46 2016 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 922 ++++++++++++++++++----------------- po/cs.po | 925 ++++++++++++++++++----------------- po/da.po | 925 ++++++++++++++++++----------------- po/de.po | 925 ++++++++++++++++++----------------- po/es.po | 925 ++++++++++++++++++----------------- po/et.po | 922 ++++++++++++++++++----------------- po/eu.po | 922 ++++++++++++++++++----------------- po/fi.po | 922 ++++++++++++++++++----------------- po/fr.po | 925 ++++++++++++++++++----------------- po/gl.po | 922 ++++++++++++++++++----------------- po/hr.po | 922 ++++++++++++++++++----------------- po/hu.po | 922 ++++++++++++++++++----------------- po/id.po | 922 ++++++++++++++++++----------------- po/it.po | 924 ++++++++++++++++++----------------- po/ja.po | 1401 +++++++++++++++++++---------------------------------- po/nl.po | 977 +++++++++++++++++++------------------ po/pl.po | 925 ++++++++++++++++++----------------- po/pt_BR.po | 925 ++++++++++++++++++----------------- po/ru.po | 923 ++++++++++++++++++----------------- po/sl.po | 922 ++++++++++++++++++----------------- po/sv.po | 977 +++++++++++++++++++------------------ po/tr.po | 922 ++++++++++++++++++----------------- po/uk.po | 925 ++++++++++++++++++----------------- po/util-linux.pot | 927 +++++++++++++++++------------------ po/vi.po | 925 ++++++++++++++++++----------------- po/zh_CN.po | 924 ++++++++++++++++++----------------- po/zh_TW.po | 922 ++++++++++++++++++----------------- 27 files changed, 12675 insertions(+), 12845 deletions(-) commit 108ebe813c0c096d3a2feb524e101e48891f54bd Author: Sebastian Rasmussen Date: Thu Aug 11 11:16:50 2016 +0200 po: update sv.po (from translationproject.org) po/sv.po | 6904 +++++++++++++++++++++++++++++--------------------------------- 1 file changed, 3217 insertions(+), 3687 deletions(-) commit bd24c7de0b67771384574ee4c857d6e7a11ed21e Author: Benno Schulenberg Date: Thu Aug 11 11:16:50 2016 +0200 po: update nl.po (from translationproject.org) po/nl.po | 479 +++++++++++++++++++++++++++++---------------------------------- 1 file changed, 218 insertions(+), 261 deletions(-) commit 5f39173f6afec6282fa9c9615452c259c96dcbb5 Author: Takeshi Hamasaki Date: Thu Aug 11 11:16:50 2016 +0200 po: update ja.po (from translationproject.org) po/ja.po | 644 +++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 529 insertions(+), 115 deletions(-) commit adaa1dad339fa81d2699933e56e3bd277de721e8 Author: Karel Zak Date: Wed May 25 15:28:42 2016 +0200 tools: add script to load .po from translationproject.org I use it for years, let's keep it in the repository. Signed-off-by: Karel Zak tools/git-tp-sync | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 0155e6f707c2e717033d78854fc869372664c9b1 Author: Filipe Brandenburger Date: Wed Aug 10 13:17:12 2016 -0700 tests: Use proper word splitting when executing tests Use the shell special variable "$@" instead of the inferior $* to execute the test command in ts_valgrind. The expansion of "$@" respects proper word splitting and makes it possible to pass the command empty arguments. It might also prevent surprises with quoting in corner cases. Tested that `make check` passes. Valgrind run with `make check TS_OPTS='--nonroot --memcheck'` passes. Signed-off-by: Filipe Brandenburger tests/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c074a7608428ab55d008da101f6780d421453fd0 Author: Filipe Brandenburger Date: Wed Aug 10 13:27:07 2016 -0700 libmount: Preserve empty string value in optstr parsing Recent mount (since the switch to libmount in v2.22) drops the '=' in mount options that are set to an empty value. For example, the command line below will be affected: # mount -o rw,myopt='' -t tmpfs tmpfs /mnt/tmp Fix that by preserving an empty string in the options passed to the mount(2) syscall when they are present on the command line. Add test cases to ensure empty string handling is working as expected and in order to prevent regressions in the future. Also tested manually by stracing mount commands (on a kernel which accepts a special extra option, for testing purposes.) Before this commit: # strace -e mount ./mount -t tmpfs -o rw,myopt='' tmpfs /mnt/tmp mount("tmpfs", "/mnt/tmp", "tmpfs", MS_MGC_VAL, "myarg") = -1 EINVAL (Invalid argument) After this commit: # strace -e mount ./mount -t tmpfs -o rw,myopt='' tmpfs /mnt/tmp mount("tmpfs", "/mnt/tmp", "tmpfs", MS_MGC_VAL, "myopt=") = 0 All test cases pass, including newly added test cases. Also checked them with valgrind using: $ tests/run.sh --memcheck libmount/optstr Fixes #332. Signed-off-by: Filipe Brandenburger libmount/src/optstr.c | 4 ++-- tests/expected/libmount/optstr-append-empty-value | 1 + tests/expected/libmount/optstr-deduplicate-empty | 1 + tests/expected/libmount/optstr-prepend-empty-value | 1 + tests/expected/libmount/optstr-remove-empty-value | 1 + tests/expected/libmount/optstr-set-empty | 1 + tests/expected/libmount/optstr-set-new-empty | 1 + tests/expected/libmount/optstr-set-new-end-empty | 1 + tests/ts/libmount/optstr | 28 ++++++++++++++++++++++ 9 files changed, 37 insertions(+), 2 deletions(-) commit b2cf95957fc216827234a39de912e4bebb3500a2 Author: Karel Zak Date: Wed Aug 10 15:24:42 2016 +0200 tests: update build-sys test Signed-off-by: Karel Zak tests/expected/build-sys/config-all | 1 + tests/expected/build-sys/config-all-non-nls | 1 + tests/expected/build-sys/config-audit | 1 + tests/expected/build-sys/config-chfnsh-libuser | 1 + tests/expected/build-sys/config-chfnsh-no-password | 1 + tests/expected/build-sys/config-chfnsh-pam | 1 + tests/expected/build-sys/config-core | 1 + tests/expected/build-sys/config-devel | 1 + tests/expected/build-sys/config-devel-non-docs | 1 + tests/expected/build-sys/config-disable-all | 1 + tests/expected/build-sys/config-non-libblkid | 1 + tests/expected/build-sys/config-non-libmount | 1 + tests/expected/build-sys/config-non-libs | 1 + tests/expected/build-sys/config-non-libsmartcols | 1 + tests/expected/build-sys/config-non-libuuid | 1 + tests/expected/build-sys/config-non-nls | 1 + tests/expected/build-sys/config-selinux | 1 + tests/expected/build-sys/config-slang | 1 + tests/expected/build-sys/config-static | 1 + 19 files changed, 19 insertions(+) commit daf627c88f02a8eece42490079c2b983cec3a289 Author: Chris Metcalf Date: Tue Aug 9 11:31:41 2016 +0200 taskset: clarify that masks are always hex in man page The man page confusingly says that the mask is "typically" hexadecimal, when in fact it is always hexadecimal. Fix the language, and provide an additional example with no leading "0x". Also, provide an example using the --cpu-list option. Signed-off-by: Chris Metcalf Signed-off-by: Karel Zak schedutils/taskset.1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 70cce6f8bad8ddeba7d468481b11c90fc87c13f5 Author: Karel Zak Date: Mon Aug 8 12:15:47 2016 +0200 sfdisk: add show-pt-geometry to usage() and sfdisk.8 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 4 +++- disk-utils/sfdisk.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit f8db7181fd657c5d73ac965ff4b7e054f209346d Author: Stanislav Brabec Date: Fri Aug 5 13:05:39 2016 +0200 deprecated.txt: Add sfdisk --show-pt-geometry Documentation/deprecated.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 1e1f4a8e99e80f614cecf2dd63134c84b53baf07 Author: Stanislav Brabec Date: Thu Aug 4 20:15:57 2016 +0200 sfdisk: Add --show-pt-geometry compatibility code --show-pt-geometry existed since cf3f26bf (2006), and it is used by third party tools. To prevent failure of these tools, add a minimal compatibility code. Signed-off-by: Stanislav Brabec disk-utils/sfdisk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cd8ff331632f8d87158092db1ada8d19350403a4 Author: Karel Zak Date: Fri Jul 15 10:39:20 2016 +0200 liblkid: fix probe_nilfs2 I/O error backup Signed-off-by: Karel Zak libblkid/src/superblocks/nilfs.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 67d5f8c3646b5ec3b2249575700c341e564d0c69 Author: Karel Zak Date: Tue Aug 2 11:58:50 2016 +0200 libsmartcols: Corrected JSON escaping Based on patch set https://github.com/karelzak/util-linux/pull/331 from Fordi. Addresses: https://github.com/karelzak/util-linux/issues/330 Co-Author: Bryan Elliott Signed-off-by: Karel Zak include/carefulputc.h | 80 ++++++++++++++++++++++++++++++++++++++++++ libsmartcols/src/table_print.c | 4 +-- 2 files changed, 82 insertions(+), 2 deletions(-) commit ae1fc92c07b6b04fa1233001e008e525f6110f33 Author: Karel Zak Date: Wed Jul 20 13:20:14 2016 +0200 agetty: call uname() only when necessary Signed-off-by: Karel Zak term-utils/agetty.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e5bf20c159cfcba7da6816b2e2c61c366112bfe9 Author: Karel Zak Date: Wed Jul 20 13:16:13 2016 +0200 agetty: fix \S usage If \S without argument used then uninitialized 'varname' compared with ANSI_COLOR. Addresses: https://github.com/karelzak/util-linux/issues/329 Signed-off-by: Karel Zak term-utils/agetty.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit d9208580d0b70dbdc67e18d6bd191e70e4ccf361 Author: Tobias Stoeckmann Date: Sat Jul 16 12:51:42 2016 +0200 tailf: Fix previously adjusted segfault patch Casting the value to be checked to size_t renders the check useless. If st_size is SIZE_MAX+1, it will be truncated to 0 and the check succeeds. In fact, this check can never be false because every value stored in a size_t is smaller or equal to SIZE_MAX. I think this adjustment was meant to fix a compiler warning for 64 bit systems for which sizeof(off_t) is sizeof(size_t), but the signedness differs. Going unconditionally to the greatest possible unsigned int type if st_size is positive (off_t is signed) will fix this issue. Signed-off-by: Tobias Stoeckmann text-utils/tailf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3c5bc5c061b26971eb59619ee505d20120a77aa Author: Tobias Stoeckmann Date: Sun Jul 10 16:14:08 2016 +0200 tailf: Fix segmentation fault in tailf on 32 bit tailf crashes with a segmentation fault when used with a file that is exactly 4GB in size due to an integer overflow between off_t and size_t: $ dd if=/dev/zero of=tailf.crash bs=1 count=1 seek=4294967295 $ tailf tailf.crash Segmentation fault $ _ Signed-off-by: Tobias Stoeckmann Signed-off-by: Karel Zak text-utils/tailf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3ba194dd15ee03235c3192a37dac5cec4d8f76a6 Author: Allon Mureinik Date: Thu Jul 14 12:19:25 2016 +0200 blkdiscard: Improve man page Improve the grammar and phrasing of the --verbose option and how it interacts with the --step option. Signed-off-by: Allon Mureinik sys-utils/blkdiscard.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9db164bc70afdffd167b084050a4a2e899abc3a Author: Thierry Vignaud Date: Tue Jul 5 18:39:05 2016 +0200 fdisk: make -l behaves like fdisk -l aka having the same spacing between disks Signed-off-by: Karel Zak disk-utils/fdisk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 234976de506061d6c0388ca9018b9c2d7928b18b Author: Karel Zak Date: Tue Jul 12 13:34:54 2016 +0200 libblkid: avoid non-empty recursion in EBR This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f. We also need to detect non-empty recursion in the EBR chain. It's possible to create standard valid logical partitions and in the last one points back to the EBR chain. In this case all offsets will be non-empty. Unfortunately, it's valid to create logical partitions that are not in the "disk order" (sorted by start offset). So link somewhere back is valid, but this link cannot points to already existing partition (otherwise we will see recursion). This patch forces libblkid to ignore duplicate logical partitions, the duplicate chain segment is interpreted as non-data segment, after 100 iterations with non-data segments it will break the loop -- no memory is allocated in this case by the loop. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1349536 References: http://seclists.org/oss-sec/2016/q3/40 Signed-off-by: Karel Zak libblkid/src/partitions/dos.c | 7 +++++++ libblkid/src/partitions/partitions.c | 14 ++++++++++++++ libblkid/src/partitions/partitions.h | 2 ++ 3 files changed, 23 insertions(+) commit 3005a5b8968bda9a2c3f2a161e2e39114498807d Author: Karel Zak Date: Thu Jul 7 14:22:41 2016 +0200 libblkid: ignore extended partition at zero offset If the extended partition starts at zero LBA then MBR is interpreted as EBR and all is recursively parsed... result is out-of-memory. MBR --extended-partition--> EBR --> MBR --> ENB --> MBR ... Note that such PT is not possible to create by standard partitioning tools. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1349536 Signed-off-by: Karel Zak libblkid/src/partitions/dos.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 2ef4fafcc7247025058ccfd263cbbf561f41a37f Author: Alexey Obitotskiy Date: Fri Jun 24 11:59:35 2016 +0200 libblkid: Add metadata signature check for IMSM on 4Kn drives Drives with 512 and 4K sectors have different offset for metadata signature. Without signature detected on 4Kn drives those drives will not be recognized as raid member. This patch adds checking for IMSM signature for 4Kn drives. Signed-off-by: Alexey Obitotskiy libblkid/src/superblocks/isw_raid.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 2c8a304b4017c04d964809f3211e083f13a9c706 Author: Karel Zak Date: Thu Jun 30 14:00:44 2016 +0200 agetty: don't modify argv[] when parse speeds Signed-off-by: Karel Zak term-utils/agetty.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 35198544555b77a5d90620eba48872fb0188b942 Author: Torsten Hilbrich Date: Mon Jun 20 07:09:10 2016 +0200 liblkid: Add length check in probe_nilfs2 before crc32 The bytes variable is read from the file system to probe and must be checked before used as length parameter in the crc32 call. The following problems may occur here: - bytes smaller than sumoff + 4: underflow in length calculation - bytes larger than remaining space in sb: overflow of buffer This fixes a problem where an encrypted volume had the correct magic values 0x3434 at offset 0x406 and the following uint16_t (which is read into the nilfs_super_block.s_bytes struct) was parsed as 1. Then crc32 was called with the length value 18446744073709551597 causing a segmentation fault. [kzak@redhat.com: - fix probe_nilfs2() return code] Signed-off-by: Karel Zak libblkid/src/superblocks/nilfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 40ccb9dbb2c498ca2e724144062e87e3b05fce42 Author: Karel Zak Date: Tue Jun 21 14:06:14 2016 +0200 libfdisk: (gpt) be more careful with 64bit constants It's probably more robust (and readable) to be explicit when we count with constant and 64bit numbers. Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1344482 Signed-off-by: Karel Zak libfdisk/src/gpt.c | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit 332574c4d204175627203625fc032251df49b04a Author: Karel Zak Date: Tue Jun 21 13:32:14 2016 +0200 logger: be more precise about --port description Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ea6e86672c27b272d835651302ed17525de298b Author: Karel Zak Date: Tue Jun 14 13:15:44 2016 +0200 chfn: chsh: use selinux_check_passwd_access() * selinux/av_permissions.h and magic constants are deprecated, the recommended solution is to use string_to_security_class() and string_to_av_perm() to get access vector * it also seems that selinux_check_passwd_access() does exactly the same as our checkAccess(), let's use it. Signed-off-by: Karel Zak login-utils/chfn.c | 5 +++-- login-utils/chsh.c | 5 +++-- login-utils/selinux_utils.c | 30 ++++-------------------------- login-utils/selinux_utils.h | 7 ++++++- 4 files changed, 16 insertions(+), 31 deletions(-) commit 9a12bc245d5c68549891f432917c9b6e2fba4b33 Author: Karel Zak Date: Wed Jun 8 13:38:48 2016 +0200 build-sys: workaround for autoconf "present but cannot be compiled" See also: https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Present-But-Cannot-Be-Compiled.html Signed-off-by: Karel Zak configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5162f7997dd260b211b72b7eed582fd41f63c4b0 Author: Waldemar Brodkorb Date: Fri Jun 3 04:23:28 2016 +0200 build-sys: fix uClibc-ng scanf check uClibc-ng tries to be compatible with GNU libc and defines __GLIBC__ and pretend to be version 2.2. We once changed it to 2.10, but then some hard to fix problems in different software packages (gcc) occured. It would be better if we disable the special GNU libc checks for uClibc-ng here. uClibc-ng implements the required scanf functionality. Signed-off-by: Waldemar Brodkorb configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a5f9cdc2a7e73a64481e398c180dcacf74ff685 Author: Karel Zak Date: Fri Jun 3 12:20:24 2016 +0200 cfdisk: use libsmartcols ASCII for non-widechar environment Reported-by: Stanislav Brabec Signed-off-by: Karel Zak disk-utils/cfdisk.c | 4 ++++ 1 file changed, 4 insertions(+) commit c39556aa7767bde12e6ff723278a83384f25c86d Author: Karel Zak Date: Thu Jun 2 14:41:08 2016 +0200 lsblk: improve support for nvme Signed-off-by: Karel Zak misc-utils/lsblk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3b94a098b04c581be353e71a212a6964b53dd640 Author: Karel Zak Date: Wed May 25 16:11:51 2016 +0200 lsblk: use ID_WWN_WITH_EXTENSION is possible Addresses: https://github.com/karelzak/util-linux/issues/321 Signed-off-by: Karel Zak misc-utils/lsblk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7a7b5ddd14bcdab4c6e617fc9820e98cfdc4988a Author: Karel Zak Date: Wed May 25 15:59:15 2016 +0200 build-sys: add tools/Makemodule.am We have "make" targets which depends on tools/check*.sh scripts. It's ugly to exclude these scripts from the release tar balls (as generated by "make distcheck"). Signed-off-by: Karel Zak Makefile.am | 5 ++--- tools/Makemodule.am | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 35cf01a5357a8169baa5a2fb1e855a817a4e8651 Author: Mike Frysinger Date: Tue May 10 15:26:54 2016 -0400 man pages: fix spacing between man page name & section number Most have standardized correctly, but fix a few latent ones. Signed-off-by: Mike Frysinger disk-utils/cfdisk.8 | 2 +- disk-utils/sfdisk.8 | 4 ++-- misc-utils/kill.1 | 2 +- misc-utils/logger.1 | 2 +- sys-utils/losetup.8 | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit da78fe0f35f824e70c71f1c51b5af2f87e949068 Author: Sassan Panahinejad Date: Thu May 12 13:09:00 2016 +0100 libfdisk: fix range checking for fdisk_set_last_lba libfdisk/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8830b3f5b8137332a47e23d7d59207a9148dd486 Author: Karel Zak Date: Mon May 16 15:05:28 2016 +0200 logger: add man page note about the default --tag Signed-off-by: Karel Zak misc-utils/logger.1 | 2 ++ 1 file changed, 2 insertions(+) commit 54b77abc986f99450c177850bc3e176ab61298c2 Author: Wayne Pollock Date: Wed May 4 17:15:14 2016 +0100 write: fix setuid related regression The write(1) is commonly a setuid binary, because common users cannot by default write to each others terminals. Since the commit in reference, that is part of releases v2.24 to v2.28, the write(1) has used access(2) to check capability to write to a destination terminal. The catch is that access(2) uses real UID and GID to when performing the accessibility. The obvious correction is to avoid access(2) when in context of setuid binaries. As a smaller fix, but equally important fix, ensure the 'msgsok' variable is initialized to indicate no access. Uninitialized variable will almost certainly do wrong thing at the time of check. Breaking-commit: 0233a8ea18bec17dd59cfe1fec8281 Signed-off-by: Sami Kerola Signed-off-by: Karel Zak Signed-off-by: Wayne Pollock term-utils/write.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e0d30ef4c0a8baf5ad52f4ebce2ceef1944d711b Author: Victor Dodon Date: Thu Apr 21 00:24:58 2016 -0700 sfdisk: exit with error if rereading partition table fails Use the return value of fdisk_reread_partition_table in write_changes so that sfdisk exits with error if re-reading the partition table fails. Signed-off-by: Victor Dodon disk-utils/sfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b7f8bbba13c6b2b26d14163569b35353ce9ceb9 Author: Karel Zak Date: Thu Apr 28 13:54:01 2016 +0200 libblkid: make I/O errors on CDROMs non-fatal It seems too tricky to get a real size of the data track on hybrid disks with audio+data. It seems overkill to analyze all header in libblkid and on some disks it's probably possible to get I/O error almost everywhere due to crazy copy protection etc. Signed-off-by: Karel Zak libblkid/src/probe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2c7f803463c7af6e90db237d3177df5627d33de0 Author: Karel Zak Date: Mon Apr 25 11:59:06 2016 +0200 libfdisk: don't offer zero length freespace Reported-by: Kay Sievers Signed-off-by: Karel Zak libfdisk/src/table.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 3c39ff5089b8f5e2f3e8e0879d427fee731e22e8 Author: Yuriy M. Kaminskiy Date: Fri Apr 8 00:38:56 2016 +0300 fsck: fix racing between unlock/unlink and open Process A Process B Process C open() [creates file] lock() [succeed] open() [open existing] lock()... running() close() [...succeed] unlink() running() open() [creates file] {BAD!} lock() [succeed] {BAD!} running() {BAD!} close() Cons: leaves empty (unlocked/harmless) .lock files in /run/fsck/ Signed-off-by: Yuriy M. Kaminskiy disk-utils/fsck.c | 1 - 1 file changed, 1 deletion(-) commit b6384d233e300d42d5d39a39ff2c51f3419de639 Author: Sami Kerola Date: Sun Apr 3 17:43:19 2016 +0100 lib: avoid double free in loopdev.c Found with scan-build. Reviewed-by: Yuriy M. Kaminskiy Signed-off-by: Sami Kerola lib/loopdev.c | 1 + 1 file changed, 1 insertion(+) commit 564fe08cabaa8961198ac45f6672e748a0f47429 Author: Sami Kerola Date: Sun Apr 3 17:39:41 2016 +0100 setpwnam: fix memory leak Found with scan-build. Signed-off-by: Sami Kerola login-utils/setpwnam.c | 1 + 1 file changed, 1 insertion(+) commit bcddfdb2ab83779e27a8c38fec806dccf7aaf02f Author: Sami Kerola Date: Sun Apr 3 17:34:53 2016 +0100 libmount: fix memory leak Found with scan-build. Signed-off-by: Sami Kerola libmount/src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1544a638c484c190f47f5564941c3eebdc047659 Author: Petr Uzel Date: Mon Apr 18 16:22:05 2016 +0200 libblkid: make blkid_do_wipe() work with probes with offset When a probe is created with an offset, e.g. via blkid_probe_set_device(), this offset is correctly used when looking for the signatures, but is not respected by blkid_do_wipe() function. Therefore the signature is removed from an invalid location. Usecase: Wiping signatures from an area on the block device where partition is to be created (but as it does not exist yet, there's no device node for it and probe on the whole block device has to be used with correct offset and length). Reproducer: ======================== wiper.c =========================== const char *dev; unsigned long offset; unsigned long size; int main(int argc, char** argv) { if (argc != 4) { printf("usage: wiper dev offset size\n"); exit(1); } dev = argv[1]; offset = strtoull(argv[2], NULL, 10); size = strtoull(argv[3], NULL, 10); printf("dev=%s, off=%llu, size=%llu\n", dev, offset, size); int fd = open (dev, O_RDWR); if (fd == -1) { perror("open"); exit(1); } blkid_loff_t wipe_offset = offset * SECTOR_SIZE; blkid_loff_t wipe_size = size * SECTOR_SIZE; int ret; blkid_probe pr; pr = blkid_new_probe(); if (!pr) return 0; ret = blkid_probe_set_device(pr, fd, wipe_offset, wipe_size); ret = blkid_probe_enable_superblocks(pr, 1); ret = blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_MAGIC); while (blkid_do_probe(pr) == 0) { ret = blkid_do_wipe(pr, 0); } blkid_free_probe(pr); close(fd); } ======================== wiper.c =========================== Steps to reproduce: modprobe scsi_debug parted -s /dev/sdX mklabel gpt parted -s /dev/sdX mkpart first 2048s 4095s mkfs.ext2 /dev/sdX1 wipefs -np /dev/sdX1 ./wiper /dev/sdX1 2048 2048 Actual result: wiper gets into endless loop, because blkid_do_wipe() wipes at wrong location (1080), leaving the signature on /dev/sdc1. So it is again found by blkid_do_probe(), and so on. Expected result: wiper clears the ext2 signature at offset 1049656(=1080+2048*512). Signed-off-by: Petr Uzel libblkid/src/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22b8a60ec655714d9d6d7220a7dbc6c489f67285 Author: Karel Zak Date: Mon Apr 18 13:19:12 2016 +0200 pylibmount: include c.h ... for sys/sysmacros.h and major() and minor() macros. Reported-by: Mike Frysinger Signed-off-by: Karel Zak libmount/python/pylibmount.h | 1 + 1 file changed, 1 insertion(+) commit 39f577e53675453eb48cd806310bff1253e45145 Author: Lubomir Rintel Date: Mon Apr 18 09:01:23 2016 +0200 mkswap: tolerate ENOTSUP when failing to relabel It might be that the underlying filesystem just doesn't support SELinux labeling. This fixes creating swap on vfat live media: # livecd-iso-to-disk.sh --msdos --swap-size-mb 666 ... Signed-off-by: Lubomir Rintel disk-utils/mkswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9937b1f425071659471194afad63c3da6fc4ab7 Author: Sami Kerola Date: Sat Apr 16 19:05:58 2016 +0100 mount: try to tell what mount was doing when it failed Earlier output did not give enough information to system admin to fix an issue in /etc/fstab effectively. $ sudo mount -a mount: mount(2) failed: No such file or directory Addresses: https://bugs.launchpad.net/bugs/1557145 Signed-off-by: Sami Kerola sys-utils/mount.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 71c681ecae1c66339c537453ea5a1b7f307a7fe8 Author: Sami Kerola Date: Sat Apr 16 18:35:02 2016 +0100 dmesg: --notime should not suppress --show-delta The --show-delta is off by default, which means it can be only on when user has requested to see these time stamps. The --notime option should not turn the delta outputing off, because then option order matters and no-one wants that. Example of the old output: $ dmesg --notime --show-delta | sed -n 's/ version.*//p; q' [< 0.000000>] Linux $ dmesg --show-delta --notime | sed -n 's/ version.*//p; q' Linux Addresses: https://bugs.launchpad.net/bugs/1544595 Signed-off-by: Sami Kerola sys-utils/dmesg.c | 1 - 1 file changed, 1 deletion(-) commit 06aa13858b6a0f8b6f534c25c26eb594cb30dd15 Author: Sami Kerola Date: Sat Apr 16 17:43:01 2016 +0100 script: avoid trying fclose(NULL) Here is a one-liner to reproduce the issue. $ mkdir example && cd example && chmod 0500 . && script Script started, file is typescript script: cannot open typescript: Permission denied Script done, file is typescript Segmentation fault (core dumped) Addresses: https://bugs.launchpad.net/bugs/1537518 Signed-off-by: Sami Kerola term-utils/script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d92ee41b9f390bc8b1167bbb2880b923e76be99b Author: Karel Zak Date: Fri Apr 15 10:47:12 2016 +0200 umount: add note about FS names differences to the man page Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1327209 Signed-off-by: Karel Zak sys-utils/umount.8 | 6 ++++++ 1 file changed, 6 insertions(+) commit dc304c7ce450ac9c1c8318061a17ccb5383958f5 Author: Karel Zak Date: Fri Apr 15 14:48:29 2016 +0200 libmount: make kernel_fs_postparse() more robust Signed-off-by: Karel Zak libmount/src/tab_parse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 46e07be47bac97ba1bb41493929e43f185702740 Author: Karel Zak Date: Fri Apr 15 14:30:43 2016 +0200 libmount: fix mnt_table_parse_stream() logic Signed-off-by: Karel Zak libmount/src/tab_parse.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit efeb2a9bfa53fa7fd2181724c9fb99f255fc8420 Author: Ruediger Meier Date: Wed Apr 6 15:43:07 2016 +0200 build-sys: add --enable-libuuid-force-uuidd To build libuuid with uuidd support even though the daemon is disabled (--disable-uuidd). Signed-off-by: Ruediger Meier configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cbd6033684a88b7306f58667f21bda1ef54052cd Author: Karel Zak Date: Wed Apr 13 14:41:47 2016 +0200 wipefs: force GPT detection The library libblkid (as well as fdisks) requires protective MBR when probe for GPT by default. This is unnecessary for wipefs where we're more promiscuous and we want to delete as much as possible. This patch enables BLKID_PARTS_FORCE_GPT for wipefs. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1326474 Signed-off-by: Karel Zak misc-utils/wipefs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8dfe8fe87e7c0d760b12cfc461b5f19248799225 Author: Sami Kerola Date: Sat Apr 2 16:58:14 2016 +0100 colcrt: avoid the command getting hung [afl] Some inputs make getwc(3) not to progress file descriptor and neither to report EILSEQ. Detect such situation and skip the bad input. Signed-off-by: Sami Kerola tests/colcrt | Bin 0 -> 14720 bytes tests/expected/colcrt/regressions-hang1 | 3 +++ tests/ts/colcrt/hang1 | 1 + tests/ts/colcrt/regressions | 3 ++- text-utils/colcrt.c | 7 +++++++ 5 files changed, 13 insertions(+), 1 deletion(-) commit 0f2f9fbd886a6418e6475b3c895b7da03462421c Author: Karel Zak Date: Wed Apr 13 11:52:43 2016 +0200 script: use empty-slave heuristic more carefully script(1) waits for empty slave FD (shell stdin) before it writes to master. This feature has been intorduiced by 54c6611d6f7b73609a5331f4d0bcf63c4af6429e to avoid misbehavior when we need to send EOF to the shell. Unfortunately, this feature has been used all time for all messages. This is wrong because command in the session (or shell) may ignore stdin at all and wait forever in busy loop is really bad idea. Test case: script /dev/null tailf /etc/passwd ... script process taking 100% CPU. This patch forces script to use empty-stave detection only when we need to write EOF. The busy loop has been modified to use nanosleep and it does not wait forever... Addresses: http://bugs.debian.org/820843 Signed-off-by: Karel Zak term-utils/script.c | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-)