]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Thomas Devoogdt [Mon, 7 Apr 2025 12:20:12 +0000 (14:20 +0200)]
namespace.h: fix compilation on Linux < 4.10
sys-utils/lsns.c: In function ‘add_namespace_from_sock’:
sys-utils/lsns.c:580:19: error: ‘SIOCGSKNS’ undeclared (first use in this function)
nsfd = ioctl(sk, SIOCGSKNS);
^~~~~~~~~
SIOCGSKNS was added in https://github.com/torvalds/linux/commit/
c62cce2caee558e18aa05c01c2fd3b40f07174f2 .
Fixes: https://github.com/util-linux/util-linux/issues/3502
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
(cherry picked from commit
10ee66ed1b08586bde42582e34355418eef33ef5 )
Karel Zak [Tue, 25 Mar 2025 11:44:13 +0000 (12:44 +0100)]
fdisk: fix possible memory leak
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
71719680968c86a09ad0ba76339447f18996610b )
Karel Zak [Tue, 25 Mar 2025 11:23:35 +0000 (12:23 +0100)]
fdformat: use size_t and ssize_t
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
310806a25f1da9e1e6819c57d2e358bb439ed56d )
Karel Zak [Tue, 25 Mar 2025 11:14:14 +0000 (12:14 +0100)]
cfdisk: fix memory leak and possible NULL dereference [gcc-analyzer]
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
33ca468b67d34dead8fb8b41dc9f328971e5fe70 )
cgoesche [Sat, 5 Apr 2025 05:43:04 +0000 (01:43 -0400)]
more: fix broken ':!command' command key
Addresses: #3509
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit
3f3bb6f9103daaf7a8f47ebe57cbe90bac852e6e )
cgoesche [Sat, 5 Apr 2025 05:29:35 +0000 (01:29 -0400)]
more: fix implicit previous shell_line execution #3508
run_shell() will implicitly execute the previous ctl->shell_line
not only if the function was indirectly invoked by the '.' command
but also by a subsequent '!' command.
Addresses: #3508
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit
b6f9362988dbe5427d52b31ac3add37a7ddb6b12 )
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)]
treewide: avoid strcasecmp() for ASCII-only strings
Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.
Fixes: https://github.com/util-linux/util-linux/issues/3490
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
107293a68206f24e531fd906e8114b578911bb7a )
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)]
fdisk,partx: avoid strcasecmp() for ASCII-only strings
Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
7efdcd75f041fa1cb9a7c05e22dea3567d48bf9e )
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)]
libmount: avoid strcasecmp() for ASCII-only strings
Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
ea694f8b91b82474c018dac2250b03cb00685b26 )
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)]
lsblk: avoid strcasecmp() for ASCII-only strings
Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.
Fixes: https://github.com/util-linux/util-linux/issues/3490
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
b5ae9e8d0234738f381c56aa797aeba81a05d587 )
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)]
libfdisk: avoid strcasecmp() for ASCII-only strings
Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
8ec0c305e9f6ab904119201a13873faedb30da57 )
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)]
libblkid: avoid strcasecmp() for ASCII-only strings
Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
7eb663503c77d739f2cc80d78ee9d380b11b6eb9 )
Karel Zak [Wed, 2 Apr 2025 09:00:47 +0000 (11:00 +0200)]
include/cctype: fix string comparison
Reimplement c_strcasecmp() and c_strncasecmp() to be libc compatible
and fix c_strncasecmp() to avoid \0 misinterpretation. The original
implementation was pretty stupid (sorry).
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
259157b0c1a00806ff75188325e40ba10adf12ce )
Masatake YAMATO [Sun, 5 Jan 2025 18:30:25 +0000 (03:30 +0900)]
lsfd: (bug fix) scan the protocol field of /proc/net/packet as a hex number
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit
0da7e8201aa7b9b2c5d0e901c0ccfd6f3bdc54d3 )
Masatake YAMATO [Sun, 5 Jan 2025 18:49:46 +0000 (03:49 +0900)]
tests: (test_mkfds::mapped-packet-socket) add a new parameter, protocol
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit
a6584a456835bbef703d7aae1f51d4e07177f8cb )
Masatake YAMATO [Sun, 5 Jan 2025 17:55:19 +0000 (02:55 +0900)]
lsfd: fix the description for PACKET.PROTOCOL column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit
df3b38fab56001537364302479b33cb104ef7411 )
pls-no-hack [Fri, 28 Mar 2025 13:52:49 +0000 (13:52 +0000)]
Fix typo in blkdiscard docs
(cherry picked from commit
7d181e8f1ecdeca764b62f1daf0bb13cec349e7e )
Karel Zak [Tue, 1 Apr 2025 12:36:36 +0000 (14:36 +0200)]
lsns: enhance compilation without USE_NS_GET_API
- Move add_namespace_for_nsfd() declaration to the #ifdef block
(based on
c62ed3d58602fd29fe12085f7caf03761ed91b81 )
References:
2ced43400f35f7bd45b29364e04166a63a06e16a
Signed-off-by: Karel Zak <kzak@redhat.com>
Thomas Devoogdt [Tue, 25 Mar 2025 10:58:18 +0000 (11:58 +0100)]
lsns: fix undefined reference to add_namespace_for_nsfd #3483
Fixes:
sys-utils/lsns-lsns.o: In function `read_process':
lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
collect2: error: ld returned 1 exit status
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
(cherry picked from commit
2ced43400f35f7bd45b29364e04166a63a06e16a )
Karel Zak [Mon, 24 Mar 2025 13:31:05 +0000 (14:31 +0100)]
libmount: fix --no-canonicalize regression
Fixes: https://github.com/util-linux/util-linux/issues/3474
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
7dbfe31a83f45d5aef2b508697e9511c569ffbc8 )
Karel Zak [Mon, 24 Mar 2025 14:18:24 +0000 (15:18 +0100)]
meson: fix manadocs for libsmartcols and libblkid
Fixes: https://github.com/util-linux/util-linux/issues/3475
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
531b2afd4ef3016b14fff41eef208ead5213138e )
Karel Zak [Thu, 20 Mar 2025 12:15:26 +0000 (13:15 +0100)]
meson: fix po-man installation
* in po-man/meson.build use already defined mandir
* make sure $DESTDIR is used in the install script
Addresses: https://github.com/util-linux/util-linux/pull/3378
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
56b97db03a56d90f0480885a35b0383afabc2e18 )
Karel Zak [Thu, 20 Mar 2025 10:57:06 +0000 (11:57 +0100)]
misc: never include wchar.h
We have a portable "widechar.h" that follows --disable-widechar and
provides portability. It is a bug to directly include libc's wchar.h
or wctype.h.
Fixes: https://github.com/util-linux/util-linux/issues/3470
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
5c0888dde3cc296d06b8243dcc78248ff90526e5 )
Karel Zak [Thu, 20 Mar 2025 10:56:07 +0000 (11:56 +0100)]
autotools: don't use wide-character ncurses if --disable-widechar
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
23aa09d7baec72cf6bac9d32c844a5bd2a6ef609 )
Karel Zak [Thu, 20 Mar 2025 10:53:59 +0000 (11:53 +0100)]
column: fix compiler warning for non-widechar compilation
text-utils/column.c: In function ‘ansi_esc_width’:
text-utils/column.c:212:17: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
0e28ab361375036f62dbba9d589576d38f43f157 )
Masanari Iida [Mon, 24 Mar 2025 07:21:44 +0000 (16:21 +0900)]
lib/fileeq.c Fix a typo in message.
This patch fixes a spelling typo in a command message.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
(cherry picked from commit
ccda6b9abde4425c03bf9c8da967fa02a64d0887 )
Karel Zak [Thu, 20 Mar 2025 13:18:14 +0000 (14:18 +0100)]
irqtop,lsirq: use scols debug
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
b7f5e6bba0b77c50eff53d5a9079403cde4cfc18 )
Karel Zak [Tue, 18 Mar 2025 12:50:51 +0000 (13:50 +0100)]
build-sys: update release dates
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 18 Mar 2025 12:50:16 +0000 (13:50 +0100)]
docs: update v2.41-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
Yuri Chornoivan [Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)]
po: update uk.po (from translationproject.org)
Remus-Gabriel Chelu [Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)]
po: update ro.po (from translationproject.org)
Jakub Bogusz [Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)]
po: update pl.po (from translationproject.org)
Benno Schulenberg [Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)]
po: update nl.po (from translationproject.org)
Seong-ho Cho [Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)]
po: update ko.po (from translationproject.org)
Božidar Putanec [Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)]
po: update hr.po (from translationproject.org)
Frédéric Marchal [Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)]
po: update fr.po (from translationproject.org)
Karel Zak [Tue, 18 Mar 2025 12:44:57 +0000 (13:44 +0100)]
po-man: merge changes
Michał Kułach [Tue, 18 Mar 2025 12:44:49 +0000 (13:44 +0100)]
po-man: add pl.po (from translationproject.org)
Yuri Chornoivan [Tue, 18 Mar 2025 12:44:49 +0000 (13:44 +0100)]
po-man: update uk.po (from translationproject.org)
Remus-Gabriel Chelu [Tue, 18 Mar 2025 12:44:48 +0000 (13:44 +0100)]
po-man: update ro.po (from translationproject.org)
Frédéric Marchal [Tue, 18 Mar 2025 12:44:48 +0000 (13:44 +0100)]
po-man: update fr.po (from translationproject.org)
Karel Zak [Tue, 18 Mar 2025 12:39:09 +0000 (13:39 +0100)]
po-man: fix typos in configuration
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
126ef957f7c5d42a4ef51353d521eee6e22b8015 )
Karel Zak [Mon, 17 Mar 2025 12:38:20 +0000 (13:38 +0100)]
terminal-colors.d: support NO_COLOR
We already provide the ability to easily disable output colorization,
but there is also the https://no-color.org initiative based on the
NO_COLOR environment variable. Let's support this method to disable
colors. Let's be friendly :-)
Addresses: https://github.com/util-linux/util-linux/issues/3463
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
61bd162fa1246a1d296cf943d12f7c01c8053b10 )
Gaël PORTAY [Tue, 18 Mar 2025 08:58:32 +0000 (09:58 +0100)]
su: (man) fix duplicate asterisk
Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
1b317ef942bf007d2c765a390d2087a79a6de766 )
Karel Zak [Mon, 17 Mar 2025 13:35:10 +0000 (14:35 +0100)]
include: use public domain for colors.{c,h} and xalloc.h
The LGPL makes it difficult to use the code in the old BSD tools we
have in util-linux. After obtaining agreement from the major
contributors to the files, we are changing it to "Public Domain".
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
549a5178574364a2bd219ad1ed028f4f4ea71c3d )
Karel Zak [Mon, 17 Mar 2025 12:55:06 +0000 (13:55 +0100)]
unshare: fix typo in --map-groups=subids map name [coverity scan]
Addresses: https://github.com/util-linux/util-linux/pull/3121
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
9dd140220c6d6c53383405191001c7372488d264 )
Koutheir Attouchi [Thu, 13 Mar 2025 18:45:01 +0000 (14:45 -0400)]
Use ipc_stat::cgid for the column COL_CGID.
(cherry picked from commit
c64c64b7683695828a6fef044c7193cfa0461be9 )
Masatake YAMATO [Fri, 14 Mar 2025 21:54:02 +0000 (06:54 +0900)]
lsfd: (man) fix a typo
(cherry picked from commit
d6cdde2d6b9482c1cb790bd17c84fc31a2fad410 )
Benno Schulenberg [Sun, 16 Mar 2025 15:20:39 +0000 (16:20 +0100)]
various: (man) list --help and --version last among the options
Almost all util-linux man pages mention -h/--help and -V/--version
last in the list of options. Make the few deviant pages conform.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit
77b01d90dad212e57fa801e2eccda9724d102c0b )
Benno Schulenberg [Sun, 16 Mar 2025 15:20:38 +0000 (16:20 +0100)]
more: remove a duplicate call of setlocale()
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit
361718387dc19334d060b5f303cd9fe1c19af01e )
Karel Zak [Mon, 17 Mar 2025 09:32:08 +0000 (10:32 +0100)]
lslogins: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
ede1561d2071e0da859cbdd36bee8cf07807caf4 )
Karel Zak [Wed, 12 Mar 2025 14:34:17 +0000 (15:34 +0100)]
hwclock: avoid dereferencing a pointer [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
16c1d8734847bdeac0e6650a7364e33fb881bfc6 )
Karel Zak [Wed, 12 Mar 2025 14:16:18 +0000 (15:16 +0100)]
lsfd: initialize struct stat [coverity scan]
It's probably unnecessary, but for a complicated function, it's
probably better just to keep the static analyzer happy.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
e05e2b4f89a00fadc1032ad7720fefdd99dca029 )
Karel Zak [Wed, 12 Mar 2025 14:05:47 +0000 (15:05 +0100)]
unshare: make strings more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
ad591f1a8e5917cd41d91de18626494e072414f8 )
Karel Zak [Wed, 12 Mar 2025 13:29:10 +0000 (14:29 +0100)]
liblastlog2: (test) fix memory leak in failed test [coverity scan]
This is just a cosmetic change to satisfy the static analyzer. The
free-before-exit is unnecessary, but in this case (library test), it's
better.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
2e6cc76741a580b9338ab679cf96375eb1084e92 )
Karel Zak [Wed, 12 Mar 2025 13:11:49 +0000 (14:11 +0100)]
libmount: remove possible leak in mnt_context_guess_srcpath_fstype() [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
6e2127384ba267119311437b233e413e16ef8721 )
Karel Zak [Wed, 12 Mar 2025 12:55:12 +0000 (13:55 +0100)]
test_sysinfo: remove memory lea [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
87c1ea68155b88ccdc07069c267a3121468d72c8 )
Karel Zak [Wed, 12 Mar 2025 12:49:02 +0000 (13:49 +0100)]
lslogins: remove possible memory leaks [coverity scan]
The column can be specified more than once. In this case, the code
will gather the column data multiple times, resulting in a memory
leak.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
52a6e45bfe5ddee1fed20f2f4f7542cac6bf13c9 )
Karel Zak [Mon, 17 Mar 2025 10:49:57 +0000 (11:49 +0100)]
more: fix repeat command
The function more_key_command() may modify the current command setting.
We need to remember the original unmodified version, as specified by
the user, as the previous command; otherwise, the output will be affected
by unexpected cmd.number settings.
Simple reproducer:
$ more -c /etc/passwd
- Press <enter> to jump to the next line.
- Press '.' to repeat the last command.
Old version:
- It clears the screen and prints only one line (like the "1 <enter>" command).
Fixed version:
- It jumps to the next line (like the "<enter>" command).
Reported-by: Benno Schulenberg <bensberg@telfort.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
5be4bdf81a8e89b98b12db275deb6154f87feb4b )
Karel Zak [Mon, 17 Mar 2025 09:54:55 +0000 (10:54 +0100)]
swapon: remove unnecessary variable usage
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
7dd72369680323a1c01dd7226e1158741cc8d55d )
Benno Schulenberg [Sun, 16 Mar 2025 15:20:37 +0000 (16:20 +0100)]
irqtop,lsirq: set up locale path, so messages get actually translated
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit
7a912b98f99131049f91c1a3f53c4f51075ac348 )
Benno Schulenberg [Thu, 13 Mar 2025 14:51:49 +0000 (15:51 +0100)]
swapon: make options --help and --version override --summary
When -h or --help is among the given options, most utilities
print a help text, ignoring all other options and arguments.
Make `swapon --summary --help` conform to this general pattern.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit
ad9b9058721a7322f702d5c9beea6e77cd923377 )
Masatake YAMATO [Tue, 11 Mar 2025 15:19:45 +0000 (00:19 +0900)]
lsfd: (man) fix a typo
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit
beaa7dd93ed336c7e486f1200feeaaec50bb8e52 )
Karel Zak [Thu, 13 Mar 2025 13:46:38 +0000 (14:46 +0100)]
tools/poman-translate: fix to work outside on source dir
* Let's check only the adoc file name if defined in po4a.cfg, not the
complete path.
cd ..
meson setup build-dir util-linux
ninja -C build-dir
* Exclude manpage-stub.adoc (it's just an example)
Addresses: https://github.com/util-linux/util-linux/pull/3378
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
95833d8e5e32dea9781873cbbd4e8b01e02d8bad )
Christian Hesse [Wed, 12 Mar 2025 13:06:14 +0000 (14:06 +0100)]
meson: bring hexdump in line with others
Before it was different, and the executable was not installed.
(cherry picked from commit
ecd8d1e56ca5aeef0b47f3a2b855b83e121359b8 )
Karel Zak [Thu, 13 Mar 2025 09:09:21 +0000 (10:09 +0100)]
autotools: add missing meson.build files
Fixes: https://github.com/util-linux/util-linux/issues/3460
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
b8d8e3c7a03e36e3e4ef1c31416f7ef1e36a3e58 )
Karel Zak [Thu, 13 Mar 2025 08:54:45 +0000 (09:54 +0100)]
tools: add SPDX-License-Identifier
Add an SPDX label to the newly added scripts.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
f4c71fbb24a0a47e1c9e9d834bc05f4c02bdc4c7 )
WanBingjiang [Fri, 7 Mar 2025 02:11:54 +0000 (10:11 +0800)]
sys-utils/chmem: fix typo.
(cherry picked from commit
43d88060d368c17c7ca572f13ced42c255c540ab )
Jeremy Linton [Thu, 6 Mar 2025 18:17:30 +0000 (12:17 -0600)]
lscpu: New Arm part numbers
Arm has announced the Cortex-A320 and published the TRM here:
https://developer.arm.com/documentation/109551
The Cortex-A520AE with a TRM here:
https://developer.arm.com/documentation/107726
The Cortex-A720AE with a TRM here:
https://developer.arm.com/documentation/102828
The Neoverse-V3AE with a TRM here:
https://developer.arm.com/documentation/101595
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
(cherry picked from commit
be77fa82ad491f38537030c329c2a8e0612506a5 )
Karel Zak [Mon, 10 Mar 2025 13:43:00 +0000 (14:43 +0100)]
exch: cosmetic code changes
* Remove unnecessary dirfd (use AT_FDCWD directly)
* Remove unnecessary 'rc' variable
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
6bef160562189a72c6f5c779cb7e06e72a0fe6bc )
Thomas Devoogdt [Thu, 6 Mar 2025 13:18:48 +0000 (14:18 +0100)]
exch: fix compile error if renameat2 is not present
https://www.man7.org/linux/man-pages/man2/rename.2.html
Available since Linux 3.15 or glibc 2.28,
add a fallback for older systems.
My initial implementation did the exchange using a swap
file if both HAVE_RENAMEAT2 and SYS_renameat2 were absent.
But that is not really what is desired since exch is supposed
to be atomic. So simply return -1 renameat2 is available.
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
(cherry picked from commit
72a99516f7bdf72411501d0a04cc8f8a7e562d10 )
Thomas Devoogdt [Thu, 6 Mar 2025 10:49:12 +0000 (11:49 +0100)]
{configure.ac,meson.build}: conditionally build {enosys,setpriv} if seccomp is present #3280
misc-utils/enosys.c:25:27: fatal error: linux/seccomp.h: No such file or directory
#include <linux/seccomp.h>
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
(cherry picked from commit
8de1ec203b0fbf86ae67b1ac18ba094d36b6a34a )
Karel Zak [Thu, 6 Mar 2025 11:14:41 +0000 (12:14 +0100)]
build-sys: update release dates
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 Mar 2025 11:11:37 +0000 (12:11 +0100)]
tests: update lsmem outputs
Addresses:
68c9f5578230b8a715204d7f05b52b65f97f808a
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
0e08b4300efac2230d65bdbc737985e399b168d7 )
Karel Zak [Thu, 6 Mar 2025 10:09:13 +0000 (11:09 +0100)]
tools/git-version-bump: add from master branch
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 Mar 2025 10:07:42 +0000 (11:07 +0100)]
docs: update v2.41-rc2-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 Mar 2025 10:05:55 +0000 (11:05 +0100)]
tools/git-grouped-log: sort output
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 Mar 2025 09:52:59 +0000 (10:52 +0100)]
tools/git-grouped-log: add from master branch
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 Mar 2025 09:39:15 +0000 (10:39 +0100)]
tools/git-tp-sync: update also po-man
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 Mar 2025 09:38:20 +0000 (10:38 +0100)]
po-man: merge changes
Karel Zak [Thu, 6 Mar 2025 09:23:36 +0000 (10:23 +0100)]
tools/git-tp-sync: fix checkout -f use
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 6 Mar 2025 09:22:03 +0000 (10:22 +0100)]
po: merge changes
Benno Schulenberg [Thu, 6 Mar 2025 09:06:48 +0000 (10:06 +0100)]
po: update nl.po (from translationproject.org)
Antonio Ceballos Roa [Thu, 6 Mar 2025 09:06:48 +0000 (10:06 +0100)]
po: update es.po (from translationproject.org)
Benno Schulenberg [Tue, 4 Mar 2025 16:08:06 +0000 (17:08 +0100)]
hardlink: replace a strange word in an error message
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit
bd83387e25fca9e3fbeb6787b421b24673d7ac8c )
Benno Schulenberg [Tue, 4 Mar 2025 16:08:05 +0000 (17:08 +0100)]
lsmem: increase the available width for the summary text labels
This allows the subsequent numbers to get vertically aligned for
most translations too.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit
68c9f5578230b8a715204d7f05b52b65f97f808a )
Masatake YAMATO [Wed, 5 Mar 2025 14:25:52 +0000 (23:25 +0900)]
tests: (lsns/nsfs) consider the cases that lsns returns multiple paths
Fixes #3442
If a target directory is bind-mount'ed, lsns returns multiple paths
as the value for NSFS column. This change considers this case.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit
dc5c86e91aa9a8fa386896865e069383c5bc4cac )
Masatake YAMATO [Tue, 4 Mar 2025 19:39:12 +0000 (04:39 +0900)]
tests: (lsns/nsfs) check test_sysinfo helper
This check was missed though the command was used in
the test case.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit
f39d142bfea2471ea94cb17de884642e8fcbc880 )
Karel Zak [Wed, 5 Mar 2025 08:53:34 +0000 (09:53 +0100)]
tests: improve test_sysinfo to check for NS_GET_NSTYPE usability
Now the test checks if the kernel supports the NS_GET_NSTYPE ioctl,
but it seems that on some platforms it's implemented but does not work
as expected and returns ENOTTY.
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
4391638806a40b71383646a33ed022476f4c9dea )
Karel Zak [Tue, 4 Mar 2025 18:07:43 +0000 (19:07 +0100)]
tests: check for ns-get*-ok
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
4f6135531ceb808e721f36937c0a11c865bb4bd8 )
Frantisek Sumsal [Tue, 4 Mar 2025 12:37:11 +0000 (13:37 +0100)]
ci: bump uraimo/run-on-arch-action to v3
The latest v3 version should address the sporadic segfaults we've been
seeing (mainly on s390x).
(cherry picked from commit
14707be7318936a6bed2f1bba5dc7b8741e83992 )
Frantisek Sumsal [Tue, 4 Mar 2025 12:36:53 +0000 (13:36 +0100)]
Revert "ci: temporarily switch the alt-arch job worker to Ubuntu 22.04"
This reverts commit
c389f166e5c35e3a7d91205997b75bec5d4353fb .
(cherry picked from commit
fca77fea84d080547714f5c866c0775d04b61125 )
Antonio Russo [Sun, 2 Mar 2025 19:58:07 +0000 (12:58 -0700)]
fallocate: rework incompatible options
Follow up to
d95f9a6 , addressing ordering requirements, natural
incompatibilities between various options, and limitations of
posix_fallocate.
(cherry picked from commit
7130d901f1867061514296395589fe004a3e4bec )
Masatake YAMATO [Tue, 4 Mar 2025 11:05:29 +0000 (20:05 +0900)]
test_mkfds: disable ppoll multiplexer if sigset_t is not defined
Fixes #3432
The ppoll multiplexer requires RAW sigset_t type generally defined in
asm/linux.h. However, the parisc arch of the kernel older than
487fa28fa8b60417642ac58e8beda6e2509d18f9 didn't export the type to
the user space.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit
82390c030674ec496ab70b143c54f7e961f45a48 )
Karel Zak [Tue, 4 Mar 2025 10:44:16 +0000 (11:44 +0100)]
test_mkfds: remove local pidfd_open() fallback
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
3664cacaafa4834b0b7702da9e4df0aef9700263 )
Karel Zak [Tue, 4 Mar 2025 08:47:11 +0000 (09:47 +0100)]
include/pidfd-utils: improve robustness
* remove global UL_HAVE_PIDFD, in many cases we need only subset of pidfd
kernel API, rrather than all the functios
* improve #ifdefs for pidfd_*() direct syscalls
* improve dummy fallback to not redefine system header files
Fixes: https://github.com/util-linux/util-linux/issues/3437
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit
4a1053812f396619070b6849f4d8830c1ee272ee )
Benno Schulenberg [Mon, 3 Mar 2025 10:21:37 +0000 (11:21 +0100)]
column: replace a mistaken word in an error message
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit
455e609f06810d01336b61a273673e4fddeb33c2 )
WanBingjiang [Wed, 26 Feb 2025 07:17:19 +0000 (15:17 +0800)]
misc-utils/lastlog2: Add option -a for listing active users only
(cherry picked from commit
00bd8b9fc1369706d973b5e3cd1f2f7320ed9426 )
WanBingjiang [Thu, 27 Feb 2025 07:13:37 +0000 (15:13 +0800)]
sys-utils/lscpu: Change object type to SCOLS_JSON_STRING if data == "-"
(cherry picked from commit
049901c63ea7ad8a1e0ba4feeaf7360dbf4bdc2f )
Karel Zak [Wed, 26 Feb 2025 10:50:47 +0000 (11:50 +0100)]
include/mount-api-utils: improve coding style
Improve the alignment of comments and other elements.
Signed-off-by: Karel Zak <kzak@redhat.com>