Karel Zak
c0617de5a4
agetty: do not use atol()
...
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:50:52 +02:00
Karel Zak
cb75cf88b8
lscpu: do not use atoi()
...
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:50:52 +02:00
Karel Zak
9ee95fa26a
utmpdump: do not use atoi()
...
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:49:57 +02:00
Karel Zak
878307e960
swapon: do not use atoi()
...
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:49:57 +02:00
Karel Zak
e4aad0a9c4
ipcs: do not use atoi()
...
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:49:57 +02:00
Karel Zak
0ea3e2f0ed
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>
2021-07-20 11:49:57 +02:00
Karel Zak
ee021a5f9e
fsck: do not use atoi()
...
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:49:57 +02:00
Karel Zak
a9768580a4
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>
2021-07-20 11:34:53 +02:00
Karel Zak
cbfbbc44c4
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>
2021-07-20 11:34:53 +02:00
Karel Zak
22cecf786f
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>
2021-07-20 11:34:53 +02:00
Karel Zak
aeba558136
readprofile: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak
9411b6ccf8
wipefs: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak
c357816caa
lslocks: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak
7a50f117a4
kill: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak
21ef212a58
lslogins: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak
b2db509d13
fsck: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak
8803c8d4ab
lsmem: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:34:53 +02:00
Karel Zak
096487c616
lscpu: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Karel Zak
8335261c3d
hwclock: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Karel Zak
b6cd420e03
ipcs: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Karel Zak
62aa386c4f
libuuid: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Karel Zak
0729593862
libmount: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Karel Zak
736b6ab7fd
libblkid: check errno after strto..()
...
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:33:27 +02:00
Thiébaud Weksteen
864578ded7
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
2021-07-20 11:33:27 +02:00
Karel Zak
b0f8d63e63
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>
2021-07-20 11:33:27 +02:00
Karel Zak
86328e78ea
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>
2021-07-20 11:31:43 +02:00
Karel Zak
155b79d38e
dmesg: remove condition [lgtm scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:31:43 +02:00
Karel Zak
b342240e84
tools: report and use LDFLAGS in tools/config-gen
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:30:46 +02:00
Karel Zak
a000aad7a6
build-sys: use $LIBS rather than LDFLAGS
...
Fixes: https://github.com/karelzak/util-linux/pull/1349
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:30:00 +02:00
Karel Zak
ab26415a03
lib/path: (test) fix ul_new_path() use
2021-07-20 11:30:00 +02:00
Karel Zak
42a9c18706
more: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:30:00 +02:00
Karel Zak
59bb9ab136
wall: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:30:00 +02:00
Karel Zak
703ec6fc66
script: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:30:00 +02:00
Karel Zak
7b18166aa3
ldattach: add __format__ attribute
...
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:30:00 +02:00
Karel Zak
b2bd06d9ca
hwclock: fix ul_path_scanf() use
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-07-20 11:29:01 +02:00
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