]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
4 months agoMerge branch 'master-branch-1' of https://github.com/Leefancy/util-linux
Karel Zak [Mon, 9 Mar 2026 11:49:10 +0000 (12:49 +0100)] 
Merge branch 'master-branch-1' of https://github.com/Leefancy/util-linux

* 'master-branch-1' of https://github.com/Leefancy/util-linux:
  The incorrect order of fcntl() parameters resulted in the inability to clear O_NONBLOCK

4 months agoMerge branch 'pager_fork_failure' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 9 Mar 2026 11:44:31 +0000 (12:44 +0100)] 
Merge branch 'pager_fork_failure' of https://github.com/stoeckmann/util-linux

* 'pager_fork_failure' of https://github.com/stoeckmann/util-linux:
  lib/pager: Translate error message
  lib/pager: Always reset signals before exit
  lib/pager: Properly handle fork error return value

4 months agodocs: getopt: improve arg example in getopt-example
Ben Song [Mon, 2 Mar 2026 13:48:25 +0000 (21:48 +0800)] 
docs: getopt: improve arg example in getopt-example

The option `wow!*\?` in original example is not the argument of
`--c-long`. Only `=` separated in optional option is allowed.

[karelzak@redhat.com: - fix tcsh quote style to use backtick-quote
 matching actual script output, remove orphaned comment about
 exclamation mark escaping]

Based-on-patch-by: Ben Song <bensongsyz@gmail.com>
Addresses: https://github.com/util-linux/util-linux/pull/4088
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoMerge branch 'patch-27' of https://github.com/mariobl/util-linux
Karel Zak [Mon, 9 Mar 2026 11:18:20 +0000 (12:18 +0100)] 
Merge branch 'patch-27' of https://github.com/mariobl/util-linux

* 'patch-27' of https://github.com/mariobl/util-linux:
  Put file types in namei.1.adoc in a table structure
  Convert code blocks into tables
  Remove backticks from table in terminal-colors.d.5.adoc

# Conflicts:
# lib/terminal-colors.d.5.adoc

4 months agolslogins: fix broken GROUP column output
Karel Zak [Mon, 9 Mar 2026 11:04:44 +0000 (12:04 +0100)] 
lslogins: fix broken GROUP column output

The condition on COL_GROUP incorrectly checked `!grp->gr_name`
instead of `!user->group`. This caused the GROUP column to always
be empty because when gr_name is non-NULL (normal case) the
assignment was skipped, and when gr_name is NULL, xstrdup() would
crash.

Fixes: https://github.com/util-linux/util-linux/issues/4097
Fixes: 52a6e45bfe5ddee1fed20f2f4f7542cac6bf13c9
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agopam_lastlog2: add -lpam to Makemodule.am
Karel Zak [Mon, 9 Mar 2026 10:25:58 +0000 (11:25 +0100)] 
pam_lastlog2: add -lpam to Makemodule.am

If we don't add this, we don't actually link with PAM; compare the
before and after of pam_lastlog2.so -- without -lpam it does not list
libpam.so.0 as a NEEDED dependency.

Signed-off-by: Morgan Jones <me@numin.it>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoterminal-colors.d: (man) do not show 'type' as an optional part
Benno Schulenberg [Sun, 1 Mar 2026 16:45:05 +0000 (17:45 +0100)] 
terminal-colors.d: (man) do not show 'type' as an optional part

That is: remove the square brackets from around 'type' in the synopsis.

Also, do not give the impression that a leading dot by itself is fine
before the 'type'.  That is: a dot is required only when 'name' and/or
'@term' is present.

Also, do not colorize the square brackets as if they were part of the
placeholders.  (And use ++double plus++ passthroughs for the opening
square brackets, to prevent asciidoctor from misinterpreting them.)

Indent the list of file types, for clarity.

And correct or improve some wordings, and remove an inconvenient
blank line in an example.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agofindfs: (man) improve the markup, the layout, and the wording
Benno Schulenberg [Sat, 28 Feb 2026 11:52:45 +0000 (12:52 +0100)] 
findfs: (man) improve the markup, the layout, and the wording

Mark NAME as a placeholder instead of a literal, and rename it to
TAGNAME to make it clearer what "tag" in the description refers to.

Indent the list of possible tags, to make it clearer where the
description continues.

Drop the angle brackets around placeholders -- those are used
in --help output, but in man pages it is just italics.

Also add a missing section header.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agolib/meson: move caputils.c from lib_common to per-binary sources
Karel Zak [Mon, 9 Mar 2026 10:03:54 +0000 (11:03 +0100)] 
lib/meson: move caputils.c from lib_common to per-binary sources

caputils.c is GPL-licensed, and libcommon should only contain LGPL
or public domain code (as stated in lib/Makemodule.am). Move it out
of lib_common_sources and add it directly to the sources of binaries
that use it (unshare, nsenter, setpriv), matching autotools.

Addresses: https://github.com/util-linux/util-linux/issues/4085
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolib/meson: remove unconditional procfs.c from lib_common_sources
Karel Zak [Mon, 9 Mar 2026 09:31:25 +0000 (10:31 +0100)] 
lib/meson: remove unconditional procfs.c from lib_common_sources

procfs.c was listed in the base lib_common_sources and also added
conditionally under HAVE_OPENAT/HAVE_DIRFD (line 88). In autotools,
procfs.c is only added conditionally. Remove it from the base list
to match autotools and avoid duplication.

Addresses: https://github.com/util-linux/util-linux/issues/4085
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolib/meson: remove duplicated source files from lib_common_sources
Karel Zak [Mon, 9 Mar 2026 09:30:57 +0000 (10:30 +0100)] 
lib/meson: remove duplicated source files from lib_common_sources

The files idcache.c, randutils.c, md5.c, sha1.c, strutils.c, and
strv.c were listed both in the base lib_common_sources string list
and then appended again via files() objects. Remove them from the
base list since the files() append is needed for the named variables
used by other meson.build files.

Addresses: https://github.com/util-linux/util-linux/issues/4085
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agopg: Reset SIGCHLD to default
Tobias Stoeckmann [Sat, 7 Mar 2026 20:13:21 +0000 (21:13 +0100)] 
pg: Reset SIGCHLD to default

When pg runs a child process, i.e. evaluating an "!" command, it calls
wait to receive status for the child.

If SIGCHLD is ignored, this results in an endless loop. Fix this by
resetting SIGCHLD to default before the any fork() call is performed.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agoThe incorrect order of fcntl() parameters resulted in the inability to clear O_NONBLOCK
Leefancy [Wed, 4 Mar 2026 09:30:12 +0000 (17:30 +0800)] 
The incorrect order of fcntl() parameters resulted in the inability to clear O_NONBLOCK

Signed-off-by: Leefancy <lijian01@kylinos.cn>
4 months agoeject: Reset SIGCHLD to default for wait
Tobias Stoeckmann [Fri, 6 Mar 2026 20:58:46 +0000 (21:58 +0100)] 
eject: Reset SIGCHLD to default for wait

If SIGCHLD is ignored, the wait call which waits for the umount command
to finish could fail with -1 and ECHILD. Since its return value is not
checked, the uninitialized status variable would be read, leading to
undefined behavior.

While at it, removed the additionally printed newline from errx message.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agoeject: Fix OOB access with empty argument
Tobias Stoeckmann [Fri, 6 Mar 2026 20:50:09 +0000 (21:50 +0100)] 
eject: Fix OOB access with empty argument

The the supplied argument is an empty string, eject triggers an out of
boundary access due to strlen() - 1 calculation.

Verify that the string is not empty before checking its last character.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agofincore: should add break here
Weixie Cui [Fri, 6 Mar 2026 12:40:08 +0000 (20:40 +0800)] 
fincore: should add break here

4 months agoPut file types in namei.1.adoc in a table structure
Mario Blättermann [Thu, 5 Mar 2026 19:53:18 +0000 (20:53 +0100)] 
Put file types in namei.1.adoc in a table structure

4 months agolib/pager: Translate error message
Tobias Stoeckmann [Thu, 5 Mar 2026 16:08:58 +0000 (17:08 +0100)] 
lib/pager: Translate error message

Since the error message is not printed by a signal handler anymore, it
can be translated.

Requested-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agolib/pager: Always reset signals before exit
Tobias Stoeckmann [Tue, 3 Mar 2026 17:07:27 +0000 (18:07 +0100)] 
lib/pager: Always reset signals before exit

Just in case another exit handler relies on these signal handlers being
set to default, or to allow users to press ^C and let the program exit
as expected.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agoMerge branch 'mkfs_minix_alarm' of https://github.com/stoeckmann/util-linux
Karel Zak [Thu, 5 Mar 2026 08:54:05 +0000 (09:54 +0100)] 
Merge branch 'mkfs_minix_alarm' of https://github.com/stoeckmann/util-linux

* 'mkfs_minix_alarm' of https://github.com/stoeckmann/util-linux:
  mkfs.minix: Simplify SIGALRM handler

4 months agoMerge branch 'PR/portability-hurd' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 5 Mar 2026 08:35:54 +0000 (09:35 +0100)] 
Merge branch 'PR/portability-hurd' of https://github.com/karelzak/util-linux-work

* 'PR/portability-hurd' of https://github.com/karelzak/util-linux-work:
  agetty: simplify USE_SYSTEMD ifdef in output_special_char
  agetty: introduce USE_NETLINK to separate netlink from reload
  agetty: guard netlink-related code with AGETTY_RELOAD
  libblkid: guard loop device code with __linux__ in cache
  build-sys: move shells.c to common (non-Linux) sources
  build-sys: move netlink sources from libcommon to agetty

4 months agoMerge branch 'PR/lsmem-sysroot-prefix' of https://github.com/karelzak/util-linux...
Karel Zak [Thu, 5 Mar 2026 08:34:48 +0000 (09:34 +0100)] 
Merge branch 'PR/lsmem-sysroot-prefix' of https://github.com/karelzak/util-linux-work

* 'PR/lsmem-sysroot-prefix' of https://github.com/karelzak/util-linux-work:
  lsmem: apply --sysroot prefix to all sysfs paths

4 months agolsmem: apply --sysroot prefix to all sysfs paths
Karel Zak [Tue, 3 Mar 2026 09:56:38 +0000 (10:56 +0100)] 
lsmem: apply --sysroot prefix to all sysfs paths

Tests fail on architectures where /sys/module/memory_hotplug/parameters/
memmap_on_memory does not exist (e.g., loong64), because lsmem reads
from the real /sys instead of the --sysroot directory.

 - Route memmap_on_memory read through ul_path API with a local handler
   in print_summary(), so --sysroot prefix is respected.

 - Apply --sysroot prefix to sysmemconfig (/sys/firmware/memory) before
   the memory0 existence check.

 - Fix sysmemconfig memory leak (missing ul_unref_path).

 - Update expected test output (remove "Memmap on memory parameter"
   lines, not available in test dumps).

Reported-by: Chris Hofstaedtler <zeha@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Tested-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
4 months agoConvert code blocks into tables
Mario Blättermann [Wed, 4 Mar 2026 18:24:04 +0000 (19:24 +0100)] 
Convert code blocks into tables

4 months agolib/pager: Properly handle fork error return value
Tobias Stoeckmann [Tue, 3 Mar 2026 17:05:20 +0000 (18:05 +0100)] 
lib/pager: Properly handle fork error return value

Most of the code checks for pager_process.pid != 0 to see if a pager is
running. If fork fails and returns -1, pager_process.pid is not 0, too.

This in turn leads to an issue if waitpid is eventually called with -1
as pid, which would wait for all children. Since there are no children,
the wait_for_pager function calls err with an EXIT_FAILURE value.

Properly handle a potential fork error.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agomkfs.minix: Simplify SIGALRM handler
Tobias Stoeckmann [Tue, 3 Mar 2026 17:04:08 +0000 (18:04 +0100)] 
mkfs.minix: Simplify SIGALRM handler

Calling printf is not signal safe and in general there are too many
branches in alarm_intr for what it's used for.

Check the signal flag outside of the handler and print messages when
needed. Also, disable the alarm and reset the signal handling when it's
not needed anymore.

While at it, use correct formatter in printf.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agotools/git-grouped-log: add co-author support
Karel Zak [Tue, 3 Mar 2026 11:52:11 +0000 (12:52 +0100)] 
tools/git-grouped-log: add co-author support

Parse Co-authored-by and Co-Author trailers from commit bodies and
display co-author names alongside the primary author.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoagetty: simplify USE_SYSTEMD ifdef in output_special_char
Karel Zak [Tue, 3 Mar 2026 11:34:43 +0000 (12:34 +0100)] 
agetty: simplify USE_SYSTEMD ifdef in output_special_char

Remove unnecessary duplicate #ifdef USE_SYSTEMD around the else
branch for utmpx-based user counting. Use the same pattern as
USE_NETLINK where the else and opening brace are split across the
endif boundary.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoagetty: introduce USE_NETLINK to separate netlink from reload
Karel Zak [Tue, 3 Mar 2026 11:30:34 +0000 (12:30 +0100)] 
agetty: introduce USE_NETLINK to separate netlink from reload

The netlink functionality (network address display in issue file)
and the reload mechanism (inotify-based) are separate features that
shared the same AGETTY_RELOAD ifdef guard. Additionally, the netlink
code in output_special_char() used a different guard
(#if defined(RTMGRP_IPV4_IFADDR) && defined(RTMGRP_IPV6_IFADDR))
creating inconsistency.

Introduce USE_NETLINK, defined when AGETTY_RELOAD is enabled and
the required RTMGRP constants are available. Use it consistently
for all netlink-specific code (nl field, helper functions, socket
handling, escape sequences \4, \6, \a, \A).

Keep AGETTY_RELOAD for the inotify/reload mechanism only.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoagetty: guard netlink-related code with AGETTY_RELOAD
Karel Zak [Tue, 3 Mar 2026 11:00:43 +0000 (12:00 +0100)] 
agetty: guard netlink-related code with AGETTY_RELOAD

The struct issue nl field and related helper functions use types
and headers (netaddrq.h, linux/netlink.h) that are only available
when AGETTY_RELOAD is defined. Guard the .nl.fd initializations
in main() and show_issue(), and wrap the netlink helper functions
(print_iface_best, print_addrq_bestofall, dump_iface_good,
dump_iface_all) with #ifdef AGETTY_RELOAD.

This fixes compilation on systems without inotify/netlink support
(e.g., GNU/Hurd).

Co-authored-by: Samuel Thibault <samuel.thibault@aquilenet.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibblkid: guard loop device code with __linux__ in cache
Karel Zak [Tue, 3 Mar 2026 10:42:55 +0000 (11:42 +0100)] 
libblkid: guard loop device code with __linux__ in cache

The is_loopdev() and loopdev_has_backing_file() functions from
loopdev.h are Linux-specific. Guard the loop device cache cleanup
in blkid_gc_cache() with __linux__ to allow compilation on
non-Linux systems like GNU/Hurd.

Co-authored-by: Samuel Thibault <samuel.thibault@aquilenet.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agobuild-sys: move shells.c to common (non-Linux) sources
Karel Zak [Tue, 3 Mar 2026 10:41:50 +0000 (11:41 +0100)] 
build-sys: move shells.c to common (non-Linux) sources

shells.c uses POSIX setusershell()/getusershell()/endusershell()
which are available on non-Linux systems (e.g., GNU/Hurd). Move it
from the Linux-only section to common libcommon sources.

The meson build already had shells.c in common sources, so only
the autotools build needed fixing.

Co-authored-by: Samuel Thibault <samuel.thibault@aquilenet.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agobuild-sys: move netlink sources from libcommon to agetty
Karel Zak [Tue, 3 Mar 2026 10:39:14 +0000 (11:39 +0100)] 
build-sys: move netlink sources from libcommon to agetty

The netlink and netaddrq sources use Linux-specific headers
(linux/netlink.h, linux/rtnetlink.h) and cannot be compiled on
non-Linux systems like GNU/Hurd.

Move them out of libcommon and link directly into agetty (the only
user), following the same pattern as plymouth-ctrl.c. Also move the
corresponding test programs to the Linux-only section.

Co-authored-by: Samuel Thibault <samuel.thibault@aquilenet.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoRemove backticks from table in terminal-colors.d.5.adoc
Mario Blättermann [Mon, 2 Mar 2026 20:27:56 +0000 (21:27 +0100)] 
Remove backticks from table in terminal-colors.d.5.adoc

4 months agoMerge branch 'pager_git' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 2 Mar 2026 11:52:48 +0000 (12:52 +0100)] 
Merge branch 'pager_git' of https://github.com/stoeckmann/util-linux

* 'pager_git' of https://github.com/stoeckmann/util-linux:
  lib/pager: Drop less workaround
  lib/pager: Add LV support
  lib/pager: Do not overwrite LESS environment var

4 months agoMerge branch 'libblkid/parent-offset' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 2 Mar 2026 10:17:30 +0000 (11:17 +0100)] 
Merge branch 'libblkid/parent-offset' of https://github.com/t-8ch/util-linux

* 'libblkid/parent-offset' of https://github.com/t-8ch/util-linux:
  libblkid: (probe) Account for IO bias when retrieving buffer from parent

4 months agoMerge branch 'hardlink_arithmetic' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 2 Mar 2026 09:30:59 +0000 (10:30 +0100)] 
Merge branch 'hardlink_arithmetic' of https://github.com/stoeckmann/util-linux

* 'hardlink_arithmetic' of https://github.com/stoeckmann/util-linux:
  lib/fileeq: Check arithmetic in ul_fileeq_set_size

4 months agobuild(deps): bump actions/upload-artifact from 6 to 7
dependabot[bot] [Sun, 1 Mar 2026 18:12:51 +0000 (18:12 +0000)] 
build(deps): bump actions/upload-artifact from 6 to 7

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agolibblkid: (probe) Account for IO bias when retrieving buffer from parent
Thomas Weißschuh [Sun, 1 Mar 2026 11:10:39 +0000 (12:10 +0100)] 
libblkid: (probe) Account for IO bias when retrieving buffer from parent

The 'off' variable gets aligned to 'pr->io_size'. However when
delegating to the parent prober, the value for 'off' from the original
function parameter needs to be used.

Undo the bias before calling into the parent prober.

Fixes: 8a534253bc52 ("libblkid: (probe) read data in chunks")
Closes: https://github.com/util-linux/util-linux/issues/4078
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
4 months agoman: hide LIBSMARTCOLS_JSON in man pages that do not support --json
WanBingjiang [Fri, 27 Feb 2026 08:34:27 +0000 (16:34 +0800)] 
man: hide LIBSMARTCOLS_JSON in man pages that do not support --json

PR #4070 consolidated libsmartcols env vars into man-common/env-smartcols.adoc
and had all tools (including fdisk and cfdisk) include it. That documented
LIBSMARTCOLS_JSON in fdisk/cfdisk man pages although those tools do not
support --json output, which is misleading.

Use ifdef::smartcols-json[] in env-smartcols.adoc so the JSON env var
section is only rendered for man pages that set :smartcols-json: (column,
lsblk, findmnt, sfdisk). fdisk and cfdisk include the same file but do not
set the attribute, so they only show the debug-related variables.

Addresses: util-linux#4070

4 months agolib/pager: Drop less workaround
Tobias Stoeckmann [Thu, 26 Feb 2026 21:11:28 +0000 (22:11 +0100)] 
lib/pager: Drop less workaround

This was fixed in less back in 2007. Let's follow git and drop the
workaround.

Taken from https://github.com/git/git/commit/e8320f350f523c3219ff8ec639663193941af57d

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agolib/pager: Add LV support
Tobias Stoeckmann [Thu, 26 Feb 2026 21:10:40 +0000 (22:10 +0100)] 
lib/pager: Add LV support

Set LV environment variable to "-c" for lv support.

Taken from https://github.com/git/git/commit/e54c1f2d2533c5406abeb8e3e0cf78c68ca9c21e

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agolib/pager: Do not overwrite LESS environment var
Tobias Stoeckmann [Thu, 26 Feb 2026 21:08:57 +0000 (22:08 +0100)] 
lib/pager: Do not overwrite LESS environment var

If LESS is already set, do not overwrite it.

Taken from https://github.com/git/git/commit/25fc1786ab147daa9ffa43ebcbaf5c1cc6e50d4f

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agolib/fileeq: Check arithmetic in ul_fileeq_set_size
Tobias Stoeckmann [Tue, 24 Feb 2026 20:43:16 +0000 (21:43 +0100)] 
lib/fileeq: Check arithmetic in ul_fileeq_set_size

Make sure that arithmetics do not overflow data types. Such overflows
could occur with large hardlink options or on 32 bit systems with large
files (due to size_t usage).

If possible, reduce sizes so operations can continue successfully.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agotests/lsfd: skip executable mode tests when not running as root
Thomas Weißschuh [Thu, 26 Feb 2026 16:55:58 +0000 (17:55 +0100)] 
tests/lsfd: skip executable mode tests when not running as root

This test does not necessarily work without root.

Reported-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
4 months agomeson: define _GNU_SOURCE when testing for 'struct statx'
Thomas Weißschuh [Thu, 26 Feb 2026 16:52:44 +0000 (17:52 +0100)] 
meson: define _GNU_SOURCE when testing for 'struct statx'

glibc (at least with 2.43) requires _GNU_SOURCE to be defined to expose
'struct statx' from 'sys/stat.h'.

Define _GNU_SOURCE in the feature test, so 'struct statx' is correctly
detected. The code is being build with _GNU_SOURCE anyways.

With autotools this happens automatically.

Reported-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
4 months agobuild-sys: update release dates v2.43-devel
Karel Zak [Thu, 26 Feb 2026 10:53:42 +0000 (11:53 +0100)] 
build-sys: update release dates

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agopo: merge changes
Karel Zak [Thu, 26 Feb 2026 10:47:41 +0000 (11:47 +0100)] 
po: merge changes

4 months agopo-man: merge changes
Karel Zak [Thu, 26 Feb 2026 10:47:27 +0000 (11:47 +0100)] 
po-man: merge changes

4 months agotools/git-tp-sync: fix po/ update
Karel Zak [Thu, 26 Feb 2026 10:46:51 +0000 (11:46 +0100)] 
tools/git-tp-sync: fix po/ update

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agotools/checkconfig: strip C comments before macro extraction
Karel Zak [Thu, 26 Feb 2026 10:27:48 +0000 (11:27 +0100)] 
tools/checkconfig: strip C comments before macro extraction

Strip C/C++ comments (// line comments, single-line /* */ and
multi-line /* */ blocks) before extracting HAVE_ and ENABLE_ macros.
This avoids false positives from macros mentioned in comments, e.g.
"when HAVE_PIDFD_* ..." in include/pidfd-utils.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoinclude/path: fix HAVE_STRUCT_STATX use
Karel Zak [Thu, 26 Feb 2026 10:20:18 +0000 (11:20 +0100)] 
include/path: fix HAVE_STRUCT_STATX use

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolib/procfs: remove duplicate statfs_magic.h include
Karel Zak [Thu, 26 Feb 2026 10:13:40 +0000 (11:13 +0100)] 
lib/procfs: remove duplicate statfs_magic.h include

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoinclude/mountutils: remove duplicate inttypes.h include
Karel Zak [Thu, 26 Feb 2026 10:11:28 +0000 (11:11 +0100)] 
include/mountutils: remove duplicate inttypes.h include

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agotools: git-version-bump, accept X.Y-devel version on master branch
Karel Zak [Thu, 26 Feb 2026 09:39:08 +0000 (10:39 +0100)] 
tools: git-version-bump, accept X.Y-devel version on master branch

Allow "X.Y-devel" as a valid version format, restricted to the master
branch only. Release versions (X.Y, X.Y.Z, X.Y-rcN, X.Y.Z-rcN) still
require a stable/vX.Y branch.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agopo: update LINGUAS list
Karel Zak [Thu, 26 Feb 2026 09:18:50 +0000 (10:18 +0100)] 
po: update LINGUAS list

4 months agopo: add ar.po (from translationproject.org)
Zayed Al-Saidi [Thu, 26 Feb 2026 09:18:50 +0000 (10:18 +0100)] 
po: add ar.po (from translationproject.org)

4 months agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Thu, 26 Feb 2026 09:18:50 +0000 (10:18 +0100)] 
po: update uk.po (from translationproject.org)

4 months agopo: update sv.po (from translationproject.org)
Daniel Nylander [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update sv.po (from translationproject.org)

4 months agopo: update sr.po (from translationproject.org)
Мирослав Николић [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update sr.po (from translationproject.org)

4 months agopo: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update ro.po (from translationproject.org)

4 months agopo: update pt.po (from translationproject.org)
Pedro Albuquerque [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update pt.po (from translationproject.org)

4 months agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update pl.po (from translationproject.org)

4 months agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update nl.po (from translationproject.org)

4 months agopo: update ko.po (from translationproject.org)
Seong-ho Cho [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update ko.po (from translationproject.org)

4 months agopo: update ja.po (from translationproject.org)
YOSHIDA Hideki [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update ja.po (from translationproject.org)

4 months agopo: update hr.po (from translationproject.org)
Božidar Putanec [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update hr.po (from translationproject.org)

4 months agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update fr.po (from translationproject.org)

4 months agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update es.po (from translationproject.org)

4 months agopo: update de.po (from translationproject.org)
Christian Kirbach [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update de.po (from translationproject.org)

4 months agopo: update cs.po (from translationproject.org)
Petr Písař [Thu, 26 Feb 2026 09:18:49 +0000 (10:18 +0100)] 
po: update cs.po (from translationproject.org)

4 months agopo-man: merge changes
Karel Zak [Thu, 26 Feb 2026 09:18:47 +0000 (10:18 +0100)] 
po-man: merge changes

4 months agopo-man: add sv.po (from translationproject.org)
Daniel Nylander [Thu, 26 Feb 2026 09:18:05 +0000 (10:18 +0100)] 
po-man: add sv.po (from translationproject.org)

4 months agopo-man: add ar.po (from translationproject.org)
Zayed Al-Saidi [Thu, 26 Feb 2026 09:18:05 +0000 (10:18 +0100)] 
po-man: add ar.po (from translationproject.org)

4 months agopo-man: update uk.po (from translationproject.org)
Yuri Chornoivan [Thu, 26 Feb 2026 09:18:05 +0000 (10:18 +0100)] 
po-man: update uk.po (from translationproject.org)

4 months agopo-man: update sr.po (from translationproject.org)
Мирослав Николић [Thu, 26 Feb 2026 09:18:05 +0000 (10:18 +0100)] 
po-man: update sr.po (from translationproject.org)

4 months agopo-man: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Thu, 26 Feb 2026 09:18:05 +0000 (10:18 +0100)] 
po-man: update ro.po (from translationproject.org)

4 months agopo-man: update pl.po (from translationproject.org)
Michał Kułach [Thu, 26 Feb 2026 09:18:04 +0000 (10:18 +0100)] 
po-man: update pl.po (from translationproject.org)

4 months agopo-man: update es.po (from translationproject.org)
Antonio Ceballos Roa [Thu, 26 Feb 2026 09:18:04 +0000 (10:18 +0100)] 
po-man: update es.po (from translationproject.org)

4 months agopo-man: update de.po (from translationproject.org)
Mario Blättermann [Thu, 26 Feb 2026 09:18:04 +0000 (10:18 +0100)] 
po-man: update de.po (from translationproject.org)

4 months agoMerge remote-tracking branch 'github/dependabot/github_actions/actions/upload-artifact-6'
Karel Zak [Thu, 26 Feb 2026 09:03:33 +0000 (10:03 +0100)] 
Merge remote-tracking branch 'github/dependabot/github_actions/actions/upload-artifact-6'

4 months agoMerge remote-tracking branch 'github/dependabot/github_actions/actions/cache-5'
Karel Zak [Thu, 26 Feb 2026 09:03:01 +0000 (10:03 +0100)] 
Merge remote-tracking branch 'github/dependabot/github_actions/actions/cache-5'

4 months agoMerge branch 'PR/dmesg-kmsg-timestamp-bounds' of https://github.com/karelzak/util...
Karel Zak [Thu, 26 Feb 2026 08:52:22 +0000 (09:52 +0100)] 
Merge branch 'PR/dmesg-kmsg-timestamp-bounds' of https://github.com/karelzak/util-linux-work

* 'PR/dmesg-kmsg-timestamp-bounds' of https://github.com/karelzak/util-linux-work:
  dmesg: add bounds checking to parse_kmsg_timestamp()

4 months agoMerge branch 'PR/libblkid-superblocks-overflow' of https://github.com/karelzak/util...
Karel Zak [Thu, 26 Feb 2026 08:52:02 +0000 (09:52 +0100)] 
Merge branch 'PR/libblkid-superblocks-overflow' of https://github.com/karelzak/util-linux-work

* 'PR/libblkid-superblocks-overflow' of https://github.com/karelzak/util-linux-work:
  libblkid: fix integer overflows in HFS+ offset calculations
  libblkid: fix integer overflow in linux_raid checksum size
  libblkid: fix integer overflow in nvidia_raid size check

4 months agolib/fileeq: Handle large files on 32 bit correctly
Tobias Stoeckmann [Wed, 25 Feb 2026 17:05:57 +0000 (18:05 +0100)] 
lib/fileeq: Handle large files on 32 bit correctly

The size_t iterator in ul_fileeq could overflow on 32 bit systems with
large file support. If this happens, the intro array is erroneously
overwritten, which could lead to false positive matches later on.

The iterator is checked against a size_t limit in get_digest, which is a
safe operation on 32 and 64 bit architectures.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 months agohexdump: (man) document byte order dependency in multi-byte formats
Karel Zak [Wed, 25 Feb 2026 10:58:16 +0000 (11:58 +0100)] 
hexdump: (man) document byte order dependency in multi-byte formats

Addresses: https://github.com/util-linux/util-linux/issues/4072
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agofdisk: (man) correct the markup + punctuation of two option descriptions
Benno Schulenberg [Tue, 24 Feb 2026 15:24:22 +0000 (16:24 +0100)] 
fdisk: (man) correct the markup + punctuation of two option descriptions

Do not colorize 'dos' and 'cylinders' as if they were placeholders --
they are literal example values.

Also, use a semicolon where a comma will not do.  And remove three
redundant blank lines.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agohexdump: sanitize fiemap ioctl output
Karel Zak [Wed, 25 Feb 2026 10:01:02 +0000 (11:01 +0100)] 
hexdump: sanitize fiemap ioctl output

Cap fm_mapped_extents to FIEMAP_EXTENTS_BATCH after each ioctl() call
to prevent potential out-of-bounds access if the kernel returns more
extents than requested.

Reported-by: Coverity Scan
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agodmesg: add bounds checking to parse_kmsg_timestamp()
Karel Zak [Wed, 25 Feb 2026 09:47:09 +0000 (10:47 +0100)] 
dmesg: add bounds checking to parse_kmsg_timestamp()

Add 'end' pointer parameter to parse_kmsg_timestamp() to validate
buffer boundaries, consistent with parse_syslog_timestamp(),
parse_faclev(), parse_callerid(), and skip_item().

Also remove misleading "for debug messages" comment from the
null-termination in print_kmsg() -- the null-termination is required
for correctness.

Originally reported by Coverity (CID 501581, STRING_NULL). The
Coverity report itself is not valid (the buffer is properly
null-terminated before parsing), but the code was inconsistent --
parse_kmsg_timestamp() was the only parser without bounds checking.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibblkid: fix integer overflows in HFS+ offset calculations
Karel Zak [Wed, 25 Feb 2026 09:21:56 +0000 (10:21 +0100)] 
libblkid: fix integer overflows in HFS+ offset calculations

Two 32-bit multiplications using on-disk values can overflow:

 - leaf_node_head (uint32_t) * leaf_node_size (uint16_t) used to
   calculate leaf_block; overflow produces a wrong block number,
   causing reads from incorrect offsets.

 - embed_first_block (uint16_t) * alloc_block_size (uint32_t) used to
   calculate the embedded HFS+ volume offset; overflow truncates the
   result, again causing reads from wrong offsets.

Fix by widening leaf_block and off to uint64_t and casting
multiplication operands.  Bogus results from crafted images are then
safely rejected by blkid_probe_get_buffer() bounds checking and
the extent loop exhaustion.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibblkid: fix integer overflow in linux_raid checksum size
Karel Zak [Wed, 25 Feb 2026 09:14:43 +0000 (10:14 +0100)] 
libblkid: fix integer overflow in linux_raid checksum size

The checksum size calculation uses on-disk max_dev (uint32_t) multiplied
by sizeof(dev_roles[0]).  On 32-bit systems, this overflows size_t,
resulting in a truncated buffer and checksum computed over wrong data,
potentially allowing crafted images to bypass validation.

Fix by computing in uint64_t.  Note that blkid_probe_get_buffer() has
a hardcoded 8 MiB limit, so unreasonably large (but non-overflowed)
values are still safely rejected.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibblkid: fix integer overflow in nvidia_raid size check
Karel Zak [Wed, 25 Feb 2026 08:58:32 +0000 (09:58 +0100)] 
libblkid: fix integer overflow in nvidia_raid size check

The size validation `le32_to_cpu(nv->size) * 4 != NVIDIA_SUPERBLOCK_SIZE`
is subject to 32-bit unsigned integer overflow. A crafted value like
0x4000001E overflows when multiplied by 4, wrapping to 120 and passing
the check. The checksum loop then iterates ~1 billion times, reading
far beyond the 120-byte buffer.

Fix by comparing against the expected count directly without
multiplication. Also add a buffer size parameter to
nvraid_verify_checksum() as defense-in-depth against oversized reads.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoMerge branch 'PR/libblkid-iso9660-false-positive' of https://github.com/karelzak...
Karel Zak [Wed, 25 Feb 2026 08:08:28 +0000 (09:08 +0100)] 
Merge branch 'PR/libblkid-iso9660-false-positive' of https://github.com/karelzak/util-linux-work

* 'PR/libblkid-iso9660-false-positive' of https://github.com/karelzak/util-linux-work:
  libblkid: iso9660: validate root directory to reduce false positives

4 months agoMerge branch 'PR/man-smartcols-env' of https://github.com/karelzak/util-linux-work
Karel Zak [Wed, 25 Feb 2026 08:08:00 +0000 (09:08 +0100)] 
Merge branch 'PR/man-smartcols-env' of https://github.com/karelzak/util-linux-work

* 'PR/man-smartcols-env' of https://github.com/karelzak/util-linux-work:
  man pages: consolidate libsmartcols environment variables

4 months agoblkzone: remove unnecessary brackets
Karel Zak [Wed, 25 Feb 2026 08:06:17 +0000 (09:06 +0100)] 
blkzone: remove unnecessary brackets

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoMerge branch 'wilfred/fixup-blkzone' of https://github.com/twilfredo/util-linux
Karel Zak [Wed, 25 Feb 2026 08:05:15 +0000 (09:05 +0100)] 
Merge branch 'wilfred/fixup-blkzone' of https://github.com/twilfredo/util-linux

* 'wilfred/fixup-blkzone' of https://github.com/twilfredo/util-linux:
  blkzone: add more checks when printing zone write_pointer

4 months agoMerge branch 'lsfd--socknetns-for-tuntap' of https://github.com/masatake/util-linux
Karel Zak [Wed, 25 Feb 2026 08:02:05 +0000 (09:02 +0100)] 
Merge branch 'lsfd--socknetns-for-tuntap' of https://github.com/masatake/util-linux

* 'lsfd--socknetns-for-tuntap' of https://github.com/masatake/util-linux:
  lsfd: fill SOCK.NETNS column for tuntap
  lsfd: load the information of the network namespace behind a tun device
  lsfd: (refactor) call ioctl(TUNGETDEVNETNS) from target_fd related methods
  lsfd: add stubs of target_fd related methods to cdev_class
  tests: (lsfd::*) revise the way to use "$?"
  tests: (lsns::*) revise the way to use "$?"

4 months agofsck.cramfs: fix off-by-one heap write in do_symlink()
Karel Zak [Wed, 25 Feb 2026 07:55:42 +0000 (08:55 +0100)] 
fsck.cramfs: fix off-by-one heap write in do_symlink()

In do_symlink(), the decompressed symlink target is NUL-terminated by
writing outbuffer[size] = 0. The outbuffer is allocated as blksize * 2
bytes, but uncompress_block() can return up to blksize * 2, so when
size == blksize * 2 the NUL write lands one byte past the heap
allocation. Allocating one extra byte ensures the NUL terminator stays
within bounds. The stream.avail_out value remains blksize * 2, so
decompression behavior is unchanged.

Reported-by: Pavel Kohout, Aisle Research, www.aisle.com
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolsfd: fill SOCK.NETNS column for tuntap
Masatake YAMATO [Wed, 4 Feb 2026 21:14:52 +0000 (06:14 +0900)] 
lsfd: fill SOCK.NETNS column for tuntap

There are two network namespaces associated with a file descriptor
opening /dev/net/tun.

One is the device network namespace (devnetns). A tun/tap file
descriptor is associated with a network device, and the devnetns
is the namespace in which that device exists. lsfd already provides
this information via the TUN.DEVNETNS column.

The other is the socket network namespace (socknetns). A tun/tap
file descriptor is also associated with a socket, and the socknetns
is the namespace in which that socket was created. lsfd already
has the SOCK.NETNS column for reporting this information, but it
was not filled for file descriptors opening /dev/net/tun.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agolsfd: load the information of the network namespace behind a tun device
Masatake YAMATO [Wed, 4 Feb 2026 20:50:24 +0000 (05:50 +0900)] 
lsfd: load the information of the network namespace behind a tun device

Signed-off-by: Masatake YAMATO <yamato@redhat.com>