]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Karel Zak [Fri, 25 Jun 2021 09:47:06 +0000 (11:47 +0200)]
Merge branch 'fix_mount_fscontext' of https://github.com/tweksteen/util-linux
* 'fix_mount_fscontext' of https://github.com/tweksteen/util-linux:
mount.8.adoc: Remove context options exclusion
Karel Zak [Fri, 25 Jun 2021 09:05:21 +0000 (11:05 +0200)]
hexdump: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 25 Jun 2021 08:24:35 +0000 (10:24 +0200)]
pg: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 24 Jun 2021 14:42:53 +0000 (16:42 +0200)]
misc: improve string to number conversions
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 24 Jun 2021 14:36:58 +0000 (16:36 +0200)]
include/strutils: consolidate string to number conversion
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 23 Jun 2021 09:37:31 +0000 (11:37 +0200)]
more: fix null-pointer dereference
The command allows executing arbitrary shell commands while viewing a file by
entering '!' followed by the command. Entering a command that contains a '%',
'!', or '\' causes a segmentation violation.
The same more(1) function has a problem when not file is specified (cat
/etc/passwd | more) on command line.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=
1975153
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 15:26:11 +0000 (17:26 +0200)]
agetty: do not use atol()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 15:06:46 +0000 (17:06 +0200)]
lscpu: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 14:50:46 +0000 (16:50 +0200)]
utmpdump: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 14:16:38 +0000 (16:16 +0200)]
swapon: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 13:19:22 +0000 (15:19 +0200)]
ipcs: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 13:15:46 +0000 (15:15 +0200)]
eject: do not use atoi()
* remove unnecessary strtok() use
* remove atoi use()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 12:42:56 +0000 (14:42 +0200)]
fsck: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 12:20:42 +0000 (14:20 +0200)]
include/strutils: cleanup strto..() functions
* add ul_strtos64() and ul_strtou64()
* add simple test
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 10:32:58 +0000 (12:32 +0200)]
blockdev: improve arguments parsing (remove atoi)
old version:
# blockdev --setfra 4x096 /dev/sdc
new version:
# blockdev --setfra 4x096 /dev/sdc
blockdev: failed to parse command argument: '4x096'
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 22 Jun 2021 09:50:06 +0000 (11:50 +0200)]
cfdisk: do not use atoi()
It's unnecessary to use atoi in this case.
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:37:48 +0000 (15:37 +0200)]
readprofile: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:34:06 +0000 (15:34 +0200)]
wipefs: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:33:36 +0000 (15:33 +0200)]
lslocks: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:32:51 +0000 (15:32 +0200)]
kill: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:31:43 +0000 (15:31 +0200)]
lslogins: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:29:43 +0000 (15:29 +0200)]
fsck: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:29:33 +0000 (15:29 +0200)]
lsmem: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:00:40 +0000 (15:00 +0200)]
lscpu: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:00:40 +0000 (15:00 +0200)]
hwclock: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:00:40 +0000 (15:00 +0200)]
ipcs: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:00:40 +0000 (15:00 +0200)]
libuuid: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:00:40 +0000 (15:00 +0200)]
libmount: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 13:00:40 +0000 (15:00 +0200)]
libblkid: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
Thiébaud Weksteen [Mon, 21 Jun 2021 12:15:16 +0000 (14:15 +0200)]
mount.8.adoc: Remove context options exclusion
The exclusivity between the {fscontext, defcontext} and context options
was removed in kernel 2.6.25[1]. No specific verification on these
options is done in mount(8)[2].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
c9180a57a9ab2d5525faf8815a332364ee9e89b7
[2] https://github.com/karelzak/util-linux/blob/master/libmount/src/context_mount.c#L202
Karel Zak [Mon, 21 Jun 2021 10:40:41 +0000 (12:40 +0200)]
misc: consolidate stat() error message
Let's use the same error message everywhere to reduce number of
strings for translators.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 10:39:33 +0000 (12:39 +0200)]
fsck.cramfs: use open+fstat rather than stat+open
Fixes: https://github.com/karelzak/util-linux/issues/1353
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 21 Jun 2021 10:25:31 +0000 (12:25 +0200)]
include/c: add drop_permissions(), consolidate UID/GID reset
Fixes: https://github.com/karelzak/util-linux/issues/1354
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 15:57:13 +0000 (17:57 +0200)]
dmesg: remove condition [lgtm scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Huang Shijie [Fri, 18 Jun 2021 12:46:32 +0000 (12:46 +0000)]
lscpu: add more sanity checks for dmi_decode_cputype()
After tested on different platforms, we found dmi_string() may return NULL
in some case.
So add more sanity checks for dmi_decode_cputype().
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Karel Zak [Fri, 18 Jun 2021 15:37:38 +0000 (17:37 +0200)]
tools: report and use LDFLAGS in tools/config-gen
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 15:21:13 +0000 (17:21 +0200)]
build-sys: use $LIBS rather than LDFLAGS
Fixes: https://github.com/karelzak/util-linux/pull/1349
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 15:02:38 +0000 (17:02 +0200)]
lib/path: (test) fix ul_new_path() use
Karel Zak [Fri, 18 Jun 2021 14:58:38 +0000 (16:58 +0200)]
more: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:56:52 +0000 (16:56 +0200)]
wall: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:55:40 +0000 (16:55 +0200)]
script: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:52:26 +0000 (16:52 +0200)]
ldattach: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:50:58 +0000 (16:50 +0200)]
hwclock: fix ul_path_scanf() use
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:49:28 +0000 (16:49 +0200)]
eject: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:42:07 +0000 (16:42 +0200)]
logger: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:41:20 +0000 (16:41 +0200)]
libfdisk: add and fix __format__ attributes
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:35:33 +0000 (16:35 +0200)]
findmnt: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:34:20 +0000 (16:34 +0200)]
libmount: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:33:16 +0000 (16:33 +0200)]
include/strutils: fix __format__attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:32:37 +0000 (16:32 +0200)]
include/path: add __format__attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 14:29:02 +0000 (16:29 +0200)]
include/c: add __format__ attribute
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Anatoly Pugachev [Fri, 18 Jun 2021 12:45:31 +0000 (14:45 +0200)]
tests: fix lsns test on kernels without USER namespaces
Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 12:37:28 +0000 (14:37 +0200)]
mount.8: fix overlayfs nfs_export= indention
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Jun 2021 10:33:10 +0000 (12:33 +0200)]
Merge branch 'man-mount-overlayfs' of https://github.com/iam-TJ/util-linux
* 'man-mount-overlayfs' of https://github.com/iam-TJ/util-linux:
mount: man-page; add all overlayfs options
Karel Zak [Fri, 18 Jun 2021 10:30:32 +0000 (12:30 +0200)]
Merge branch 'sys-utils_doc_brackets' of https://github.com/usev6/util-linux
* 'sys-utils_doc_brackets' of https://github.com/usev6/util-linux:
Fix some brackets in synopses
Karel Zak [Fri, 18 Jun 2021 10:25:46 +0000 (12:25 +0200)]
include/strv: fix format attributes
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Christian Bartolomäus [Thu, 17 Jun 2021 20:27:17 +0000 (22:27 +0200)]
Fix some brackets in synopses
Tj [Thu, 17 Jun 2021 12:13:22 +0000 (13:13 +0100)]
mount: man-page; add all overlayfs options
The section in man (8) mount for overlay is missing nine options which
aren't documented elsewhere either and are useful features to be aware
of and use.
Fixes #1350.
Alex Xu [Wed, 16 Jun 2021 13:58:25 +0000 (13:58 +0000)]
build-sys: Update configure.ac
1. the test incorrectly used AC_COMPILE_IFELSE instead of
AC_LINK_IFELSE, defeating the purpose of checking -lcrypt.
2. the test did not properly restore LIBS, causing later checks to all
fail if libcrypt wasn't found.
3. HAVE_LIBCRYPT only controls whether to use -lcrypt, it is not
needed or used in any source files.
[kzak@redhat.com: - improve commit message
- use UL_{SET,RESTORE}_FLAGS() rather than directly
modify $LIBS]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 Jun 2021 11:28:32 +0000 (13:28 +0200)]
lib/path: improve ul_path_readlink() to be more robust
According to POSIX, readlink() makes no effort to null-terminate buffer
with the result. It seems better to hide this disadvantage in the
ul_path_...() API rather than assume buf[sz] = '\0' everywhere.
Reported-by: Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 Jun 2021 11:26:50 +0000 (13:26 +0200)]
mkfs.cramfs: add comment to explain readlink() use
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 Jun 2021 11:25:43 +0000 (13:25 +0200)]
rename: use readlink() in more robust way
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 Jun 2021 11:23:53 +0000 (13:23 +0200)]
namei: simplify code
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 Jun 2021 10:21:04 +0000 (12:21 +0200)]
more: fix setuid/setgid order
The rule is pretty simple, always use setgid() before setuid().
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 Jun 2021 13:48:09 +0000 (15:48 +0200)]
hardlink: small regex stuff refactoring
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 Jun 2021 13:44:02 +0000 (15:44 +0200)]
sulogin: add missing ifdefs
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 Jun 2021 13:39:32 +0000 (15:39 +0200)]
sulogin: use explicit_bzero() for buffer with password
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 Jun 2021 13:13:50 +0000 (15:13 +0200)]
login: remove obsolete and confusing comment
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Huang Shijie [Tue, 15 Jun 2021 10:06:39 +0000 (10:06 +0000)]
lscpu: add bios_family
In the arm platform, we do not have the "CPU family" as X86.
In the linux kernel, it is hardcode to set the "CPU architecuture:8"
which should be changed for arm v9 in future.
This patch adds "bios_family" field, which we can get from the DMI table.
In the ampere Altra platform, we can get the new lscpu output:
----------------------------------------------------------------
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 160
On-line CPU(s) list: 0-159
Vendor ID: ARM
BIOS Vendor ID: Ampere(R)
Model name: Neoverse-N1
BIOS Model name: Ampere(R) Altra(R) Processor Q00-00 CPU @ 3.0GHz
BIOS CPU family: 257
Model: 1
Thread(s) per core: 1
----------------------------------------------------------------
[kzak@redhat.com: - s/sprintf/snprintf/]
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Huang Shijie [Tue, 15 Jun 2021 10:06:38 +0000 (10:06 +0000)]
lscpu: get the processor information by DMI
The patch :
367c85c47286 ("lscpu: use SMBIOS tables on ARM for lscpu")
relies on the existence of "/sys/firmware/dmi/entries/4-0/raw",
which may not exist in standard linux kernel.
But "/sys/firmware/dmi/tables/DMI" should exist and can provide the required
processor information.
This patch uses "/sys/firmware/dmi/tables/DMI"
to get the processor information:
Before this patch, in Ampere Altra platform, the lscpu output is:
---------------------------------------------
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 160
On-line CPU(s) list: 0-159
Vendor ID: ARM
Model name: Neoverse-N1
Model: 1
Thread(s) per core: 1
Core(s) per socket: 80
Socket(s): 2
........................................
---------------------------------------------
After this patch, we can use get the lscpu output
in Ampere Altra platform:
---------------------------------------------
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 160
On-line CPU(s) list: 0-159
Vendor ID: ARM
BIOS Vendor ID: Ampere(R)
Model name: Neoverse-N1
BIOS Model name: Ampere(R) Altra(R) Processor Q00-00 CPU @ 3.0GHz
Model: 1
Thread(s) per core: 1
Core(s) per socket: 80
Socket(s): 2
........................................
---------------------------------------------
[kzak@redhat.com: - s/sprintf/snprintf/]
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 Jun 2021 08:46:40 +0000 (10:46 +0200)]
libblkid: fix and cleanup blkid_safe_string()
* Don't use 'size_t len' variable for utf8_encoded_valid_unichar()
return code as it returns negative numbers on invalid utf8 sequence.
* Don't rely only on \0, but check the current position against output
buffer size.
* Accept hex encoding like the original version.
* Use else-if to avoid unnecessary 'continue'.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 Jun 2021 10:04:43 +0000 (12:04 +0200)]
mkswap: fix holes detection (infinite loop and/or stack-buffer-underflow)
Reported-by: Brian Lane <bcl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=
1971877
Fix: https://github.com/karelzak/util-linux/issues/1348
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 Jun 2021 08:34:46 +0000 (10:34 +0200)]
lib/loopdev: perform retry on EAGAIN
Suggested-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 Jun 2021 08:25:24 +0000 (10:25 +0200)]
libblkid: Optimize the blkid_safe_string() function
Processing whitespace characters. Allows valid ASCII, valid UTF-8.
Replace everything else with '_'
Co-Author: changlianzhi <changlianzhi@uniontech.com>
Signed-off-by: changlianzhi <changlianzhi@uniontech.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 Jun 2021 08:25:06 +0000 (10:25 +0200)]
lib/strutils: make test_strutils_normalize() more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 14 Jun 2021 14:24:59 +0000 (16:24 +0200)]
lib/strutils: improve normalize_whitespace()
Let's make it possible to use the function to normalize the string
between two buffers (from source to destination).
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 14 Jun 2021 10:48:08 +0000 (12:48 +0200)]
Merge branch 'document-selinux-nosuid' of https://github.com/topimiettinen/util-linux
* 'document-selinux-nosuid' of https://github.com/topimiettinen/util-linux:
mount.8.adoc: document SELinux use of nosuid mount flag
Topi Miettinen [Sat, 12 Jun 2021 08:34:36 +0000 (11:34 +0300)]
mount.8.adoc: document SELinux use of nosuid mount flag
Using mount flag `nosuid` also affects SELinux domain transitions but
this has not been documented well.
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
Platon Pronko [Fri, 11 Jun 2021 18:20:58 +0000 (21:20 +0300)]
dmesg: fix indentation in man page
Double-semicolon at the end of the option line results in description
being indented extra tab to the right. Replacing them with double-colons
allows all options to be displayed at the same indent level.
Karel Zak [Fri, 11 Jun 2021 13:43:36 +0000 (15:43 +0200)]
lib/path: fix possible leak when use ul_path_read_string() [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 11 Jun 2021 13:17:42 +0000 (15:17 +0200)]
hwclock: close adjtime on write error [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 11 Jun 2021 13:10:22 +0000 (15:10 +0200)]
newgrp: fix memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 10 Jun 2021 11:44:25 +0000 (13:44 +0200)]
dmesg: fix possible memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 10 Jun 2021 11:35:05 +0000 (13:35 +0200)]
findmnt: (verify) fix memory leak [asan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 10 Jun 2021 11:28:35 +0000 (13:28 +0200)]
findmnt: (verify) fix cache related memory leaks on --nocanonicalize [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 9 Jun 2021 14:12:13 +0000 (16:12 +0200)]
libblkid: check for ioctl macro rather than for header file
libblkid/src/probe.c:1012:22: error: ‘BLKGETZONESZ’ undeclared (first use in this function)
1012 | if (!ioctl(pr->fd, BLKGETZONESZ, &zone_size_sector))
| ^~~~~~~~~~~~
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 9 Jun 2021 14:09:16 +0000 (16:09 +0200)]
build-sys: make autogen.sh output more user friendly
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 9 Jun 2021 13:54:09 +0000 (15:54 +0200)]
build-sys: be verbose about missing gettext
Reported-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 9 Jun 2021 09:09:33 +0000 (11:09 +0200)]
lsblk: sort list of columns
It's better to maintain sorted list and it's also better for --help output.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 9 Jun 2021 08:57:54 +0000 (10:57 +0200)]
lsblk: add column START for partition start offsets
Fix: https://github.com/karelzak/util-linux/issues/1340
Signed-off-by: Karel Zak <kzak@redhat.com>
John Baublitz [Fri, 4 Jun 2021 11:02:39 +0000 (07:02 -0400)]
libblkid: Add hyphens to UUID string representation in Stratis superblock parsing
[kzak@redhat.com: - small code cleanup]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 9 Jun 2021 08:32:23 +0000 (10:32 +0200)]
Merge branch 'fix-display-signed-char' of https://github.com/Ram-Z/util-linux
* 'fix-display-signed-char' of https://github.com/Ram-Z/util-linux:
hexdump: correctly display signed single byte integers
Samir Benmendil [Wed, 9 Jun 2021 00:21:46 +0000 (01:21 +0100)]
hexdump: correctly display signed single byte integers
When using the format string '/1 "%d"', the byte did not display as a
signed integer as expected, it was interpreted as unsigned.
ratijas [Tue, 8 Jun 2021 16:12:19 +0000 (19:12 +0300)]
lsblk: fix formatting in -e option
Qais Yousef [Mon, 7 Jun 2021 16:11:11 +0000 (17:11 +0100)]
uclampset: Fix left over optind++
The code was changed to use ':' in getopt_long() but these were left
over by mistake causing weird random errors when using these options
depending on the order they were fed.
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Nicolai Dagestad [Sun, 6 Jun 2021 16:28:35 +0000 (18:28 +0200)]
rfkill: Set scols table name to make the json output valid
[kzak@redhat.com: - s/rfkill/rfkilldevices/]
Fixes: https://github.com/karelzak/util-linux/issues/1339
Signed-off-by: Nicolai Dagestad <nicolai@dagestad.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 7 Jun 2021 08:32:20 +0000 (10:32 +0200)]
libsmartcols: fix bare array on JSON output
The bare array ({[...]}) for top level list of entries is invalid. It
seems better to print empty string than nothing. This is workaround
for broken utils, better is to define a table name.
Addresses: https://github.com/karelzak/util-linux/issues/1339
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 4 Jun 2021 09:42:03 +0000 (11:42 +0200)]
build-sys: make re-use of generated man-pages more robust
We need to ignore man-pages at all if not available (not generated
yet), but asciidoctor is not installed.
Fix: https://github.com/karelzak/util-linux/issues/1334
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 3 Jun 2021 10:25:35 +0000 (12:25 +0200)]
Merge branch 'nortas' of https://github.com/gyakovlev/util-linux
* 'nortas' of https://github.com/gyakovlev/util-linux:
lscpu: fix build on powerpc
Karel Zak [Thu, 3 Jun 2021 10:17:27 +0000 (12:17 +0200)]
build-sys: add generated man-pages to distribution tarball
Signed-off-by: Karel Zak <kzak@redhat.com>