Karel Zak
856ec50de5
eject: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak
7bee16f27f
logger: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak
609468bc9b
libfdisk: add and fix __format__ attributes
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak
bda3f658e0
findmnt: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak
292161888c
libmount: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak
b22ecdd840
include/strutils: fix __format__attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak
2f40ad0608
include/path: add __format__attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:27:34 +02:00
Karel Zak
7e787030bf
include/c: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:26:30 +02:00
Anatoly Pugachev
5fc0e55af1
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>
2021-07-20 11:26:30 +02:00
Karel Zak
ed03caf2c6
mount.8: fix overlayfs nfs_export= indention
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:26:30 +02:00
Karel Zak
421c6766ea
include/strv: fix format attributes
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:25:50 +02:00
Christian Bartolomäus
b81a870767
Fix some brackets in synopses
2021-07-20 11:25:34 +02:00
Tj
c22bb73d3a
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 .
2021-07-20 11:25:13 +02:00
Alex Xu
33eec71c1a
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>
2021-07-20 11:25:00 +02:00
Karel Zak
cff7e7d84b
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>
2021-07-20 11:24:12 +02:00
Karel Zak
f113d46a50
mkfs.cramfs: add comment to explain readlink() use
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:24:12 +02:00
Karel Zak
9461ae9b90
rename: use readlink() in more robust way
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:24:12 +02:00
Karel Zak
aec0e37683
namei: simplify code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:23:40 +02:00
Karel Zak
37bb1b07e0
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>
2021-07-20 11:23:12 +02:00
Karel Zak
da0c591015
sulogin: add missing ifdefs
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:22:23 +02:00
Karel Zak
ee0653123c
sulogin: use explicit_bzero() for buffer with password
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:20:17 +02:00
Karel Zak
3aef5dcad5
login: remove obsolete and confusing comment
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:16:06 +02:00
Karel Zak
3871a969ed
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>
2021-07-20 11:14:38 +02:00
Karel Zak
612913cda5
lib/loopdev: perform retry on EAGAIN
...
Suggested-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:14:17 +02:00
Topi Miettinen
b1e37433bb
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>
2021-07-20 11:13:25 +02:00
Platon Pronko
4b9d512c6f
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.
2021-07-20 11:13:14 +02:00
Karel Zak
296f21699d
lib/path: fix possible leak when use ul_path_read_string() [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:13:02 +02:00
Karel Zak
a8deea07a7
hwclock: close adjtime on write error [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:13:02 +02:00
Karel Zak
994b3295c2
newgrp: fix memory leak [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:13:02 +02:00
Karel Zak
bcb6ccf819
dmesg: fix possible memory leak [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:13:02 +02:00
Karel Zak
5f0cf2484f
findmnt: (verify) fix memory leak [asan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:12:16 +02:00
Karel Zak
a7f7d3474a
findmnt: (verify) fix cache related memory leaks on --nocanonicalize [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:11:49 +02:00
John Baublitz
d72c79d495
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>
2021-07-20 11:09:58 +02:00
Samir Benmendil
a27ff267f0
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.
2021-07-20 11:09:26 +02:00
ratijas
d3363ef6d7
lsblk: fix formatting in -e option
2021-07-20 11:09:10 +02:00
Qais Yousef
4f42dc779e
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>
2021-07-20 11:08:52 +02:00
Nicolai Dagestad
97660cb42a
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>
2021-07-20 11:08:23 +02:00
Karel Zak
250fc0bc9b
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>
2021-07-20 11:08:02 +02:00
Karel Zak
af5527f45e
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>
2021-07-20 11:06:50 +02:00
Karel Zak
66099fe11c
build-sys: add generated man-pages to distribution tarball
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:06:20 +02:00
Georgy Yakovlev
fb87dcc80e
lscpu: fix build on powerpc
...
fails with error: label at end of compound statement
and fix typo as bonus.
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
2021-07-20 10:57:22 +02:00
Karel Zak
9bf924165b
lsblk: use ID_MODEL_ENC is possible
...
Fix: https://github.com/karelzak/util-linux/issues/1098
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 10:53:55 +02:00
Karel Zak
bef5ab005e
include/strutils: fix heap-buffer-overflow in normalize_whitespace()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-14 16:29:21 +02:00
Karel Zak
fce7b9501c
build-sys: fix {release-version} man pages
...
* define {release-version} as $VERSION
* do not use {docdir} in adoc; it's built-in ascidoctor variable
https://docs.asciidoctor.org/asciidoc/latest/attributes/document-attributes-reference/#intrinsic-attributes
Addresses: https://github.com/karelzak/util-linux/issues/1327
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-02 12:23:57 +02:00
Karel Zak
e0c46c2d4e
build-sys: install hardlink bash-completion
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-02 12:23:57 +02:00
Karel Zak
a057fdb13a
docs: fix typo in v2.37-ReleaseNotes
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-01 10:37:01 +02:00
Karel Zak
635d382146
docs: add uclampset to AUTHORS file
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-01 10:32:35 +02:00
Karel Zak
50736e4998
build-sys: release++ (v2.37)
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-01 09:52:10 +02:00
Karel Zak
8a988dd855
docs: update v2.37-ReleaseNotes
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-01 09:46:40 +02:00
Karel Zak
17559f6cc2
docs: update AUTHORS file
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-01 09:45:03 +02:00