]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
2 months agonsenter: support 'PID:inode' process address format
Christian Goeschel Ndjomouo [Mon, 12 Jan 2026 04:14:18 +0000 (23:14 -0500)] 
nsenter: support 'PID:inode' process address format

The 'PID:inode' can be used for the --target option
to uniquely identify a process in a race-free manner.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
2 months agoMerge branch 'pidutils_improve' of https://github.com/cgoesche/util-linux-fork
Karel Zak [Tue, 27 Jan 2026 10:37:28 +0000 (11:37 +0100)] 
Merge branch 'pidutils_improve' of https://github.com/cgoesche/util-linux-fork

* 'pidutils_improve' of https://github.com/cgoesche/util-linux-fork:
  lib: (pidutils) improve the return protocol
  lib: (pidutils) add a routine to parse pids and err() on failure
  lib: (pidutils) improve 'PID:inode' parsing logic

2 months agoMerge branch 'pager_removals' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 27 Jan 2026 10:35:51 +0000 (11:35 +0100)] 
Merge branch 'pager_removals' of https://github.com/stoeckmann/util-linux

* 'pager_removals' of https://github.com/stoeckmann/util-linux:
  lib/pager: Fix typos
  lib/pager: Simplify wait_for_pager
  lib/pager: Merge wait_or_whine into wait_for_pager
  lib/pager: The variable need_in is always 1
  lib/pager: Remove struct field `no_stdin`
  lib/pager: Remove struct field preexec_cb
  lib/pager: Remove unused define
  lib/pager: Remove unused struct entry `err`
  lib/pager: Remove unused struct field "out"

2 months agoMerge branch 'PR/libpath-nonnull-check' of https://github.com/karelzak/util-linux...
Karel Zak [Tue, 27 Jan 2026 10:35:07 +0000 (11:35 +0100)] 
Merge branch 'PR/libpath-nonnull-check' of https://github.com/karelzak/util-linux-work

* 'PR/libpath-nonnull-check' of https://github.com/karelzak/util-linux-work:
  lib/path: add NULL checks for path in statx and access

2 months agolsns: make the synopsis more coherent
Christian Goeschel Ndjomouo [Tue, 27 Jan 2026 01:14:02 +0000 (20:14 -0500)] 
lsns: make the synopsis more coherent

Using _namespace ID_ in the synopsis as argument definition
is more coherent as it lets a user easily infer that a
numeric value is required to identify a namespace.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
2 months agolib: (pidutils) improve the return protocol
Christian Goeschel Ndjomouo [Mon, 26 Jan 2026 14:29:33 +0000 (09:29 -0500)] 
lib: (pidutils) improve the return protocol

Instead of using generic return codes, lets
be more precise and return negative errno
numbers and set errno accordingly, so that
higher level callers can report errors more
accurately.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
2 months agoMerge branch 'spelling' of https://github.com/jwilk-forks/util-linux
Karel Zak [Mon, 26 Jan 2026 10:13:31 +0000 (11:13 +0100)] 
Merge branch 'spelling' of https://github.com/jwilk-forks/util-linux

* 'spelling' of https://github.com/jwilk-forks/util-linux:
  setpriv: (man) fix typo

2 months agolscpu: remove duplicate ARM names, clean up names
Karel Zak [Mon, 26 Jan 2026 09:37:49 +0000 (10:37 +0100)] 
lscpu: remove duplicate ARM names, clean up names

* Remove duplicate ARM core names
* Remove unwanted blank characters from core names

References: https://github.com/util-linux/util-linux/pull/3882
Reported-by: Martin Storsjö
Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agosetpriv: (man) fix typo
Jakub Wilk [Sat, 24 Jan 2026 10:51:01 +0000 (11:51 +0100)] 
setpriv: (man) fix typo

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2 months agolib: (pidutils) add a routine to parse pids and err() on failure
Christian Goeschel Ndjomouo [Tue, 13 Jan 2026 20:18:27 +0000 (15:18 -0500)] 
lib: (pidutils) add a routine to parse pids and err() on failure

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
2 months agolib: (pidutils) improve 'PID:inode' parsing logic
Christian Goeschel Ndjomouo [Wed, 14 Jan 2026 14:51:58 +0000 (09:51 -0500)] 
lib: (pidutils) improve 'PID:inode' parsing logic

The parsing logic in ul_parse_pid_str() failed to
identify invalid input when *pidstr starts with a
colon ':' followed by a number (inode), and also
in cases where the input does not consist of any
digits. And lastly if the PID or inode is 0.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
2 months agoMerge branch 'PR/libfdisk-EBR-gap' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 22 Jan 2026 19:03:20 +0000 (20:03 +0100)] 
Merge branch 'PR/libfdisk-EBR-gap' of https://github.com/karelzak/util-linux-work

* 'PR/libfdisk-EBR-gap' of https://github.com/karelzak/util-linux-work:
  tests: simplify TS_DESC in fdisk/mbr-logical-ebr-gap
  libfdisk: remove duplicate code
  tests: (fdisk) make sure test_strerror avalable
  tests: fdisk: add regression test for missing EBR gap between logical partitions
  libfdisk: (dos) fix logical partition start

2 months agotests: simplify TS_DESC in fdisk/mbr-logical-ebr-gap
Karel Zak [Thu, 22 Jan 2026 16:47:23 +0000 (17:47 +0100)] 
tests: simplify TS_DESC in fdisk/mbr-logical-ebr-gap

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolibfdisk: remove duplicate code
Karel Zak [Thu, 22 Jan 2026 16:44:25 +0000 (17:44 +0100)] 
libfdisk: remove duplicate code

References: 8b8da020f57414c90981371da71fdf32d2253ac7
Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agotests: (fdisk) make sure test_strerror avalable
Karel Zak [Thu, 22 Jan 2026 16:43:15 +0000 (17:43 +0100)] 
tests: (fdisk) make sure test_strerror avalable

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoMerge branch 'master' of https://github.com/martinjungblut/util-linux into PR/libfdis...
Karel Zak [Thu, 22 Jan 2026 16:29:51 +0000 (17:29 +0100)] 
Merge branch 'master' of https://github.com/martinjungblut/util-linux into PR/libfdisk-EBR-gap

* 'master' of https://github.com/martinjungblut/util-linux:
  tests: fdisk: add regression test for missing EBR gap between logical partitions
  libfdisk: (dos) fix logical partition start

2 months agolsfd: fix dependency on errnos.h
Masatake YAMATO [Thu, 22 Jan 2026 14:41:54 +0000 (23:41 +0900)] 
lsfd: fix dependency on errnos.h

Fix a bug that I introduced in 764f1d396f.

Makemodule.am listed a dependency on errnos.h for file.c, but the header
is actually used by error.c.  Fix the dependency to ensure correct
rebuilds.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: make sure errors array is not empty [-Werror=type-limits]
Karel Zak [Wed, 21 Jan 2026 10:56:54 +0000 (11:56 +0100)] 
lsfd: make sure errors array is not empty [-Werror=type-limits]

lsfd-cmd/error.c: In function ‘get_errno_name’:
lsfd-cmd/error.c:49:30: error: comparison of unsigned expression in ‘< 0’ is always false [-Werror=type-limits]
   49 |         for (size_t i = 0; i < ARRAY_SIZE(errnos); i ++) {
      |                              ^

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolib/pager: Fix typos
Tobias Stoeckmann [Tue, 20 Jan 2026 16:34:37 +0000 (17:34 +0100)] 
lib/pager: Fix typos

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: Simplify wait_for_pager
Tobias Stoeckmann [Mon, 19 Jan 2026 18:35:48 +0000 (19:35 +0100)] 
lib/pager: Simplify wait_for_pager

Remove unneeded checks and simplify loop to make it easier to see that
the function only waits until the child terminates.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: Merge wait_or_whine into wait_for_pager
Tobias Stoeckmann [Mon, 19 Jan 2026 18:25:30 +0000 (19:25 +0100)] 
lib/pager: Merge wait_or_whine into wait_for_pager

Move code from wait_or_whine into wait_for_pager to simplify code by
clarifying where values come from (pid is pager_process.pid).

Also, it shows that return values are actually not used.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: The variable need_in is always 1
Tobias Stoeckmann [Mon, 19 Jan 2026 18:18:16 +0000 (19:18 +0100)] 
lib/pager: The variable need_in is always 1

Right before start_command is called, cmd->in is set to -1. Thus,
need_in is always true.

This makes sense, since we create a pipe for tools to print data to
pager.

Remove obsolete code for better readability.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: Remove struct field `no_stdin`
Tobias Stoeckmann [Mon, 19 Jan 2026 18:10:42 +0000 (19:10 +0100)] 
lib/pager: Remove struct field `no_stdin`

The struct field `no_stdin` is always false, since it's never
initialized and only eventually reset to false when the whole
`pager_process` is reset to 0 with a `memset` call.

Since pager is supposed to read from stdin, this feature is not needed.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: Remove struct field preexec_cb
Tobias Stoeckmann [Mon, 19 Jan 2026 18:09:07 +0000 (19:09 +0100)] 
lib/pager: Remove struct field preexec_cb

The struct field preexec_cb is always set to pager_preexec. Simplify the
code by calling this function directly.

Removes function pointer handling.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: Remove unused define
Tobias Stoeckmann [Mon, 19 Jan 2026 18:06:50 +0000 (19:06 +0100)] 
lib/pager: Remove unused define

The NULL_DEVICE is never used.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: Remove unused struct entry `err`
Tobias Stoeckmann [Mon, 19 Jan 2026 18:05:16 +0000 (19:05 +0100)] 
lib/pager: Remove unused struct entry `err`

The struct entry `err` is never used. In original source files, it is
used to redirect stderr of pager.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolib/pager: Remove unused struct field "out"
Tobias Stoeckmann [Mon, 19 Jan 2026 18:02:50 +0000 (19:02 +0100)] 
lib/pager: Remove unused struct field "out"

The struct field `out` is never set, thus always 0. Since the pager
output is never redirected, this functionality stub can be removed.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agoMerge branch 'PR/unshare-signals-forwarding' of https://github.com/karelzak/util...
Karel Zak [Tue, 20 Jan 2026 14:35:37 +0000 (15:35 +0100)] 
Merge branch 'PR/unshare-signals-forwarding' of https://github.com/karelzak/util-linux-work

* 'PR/unshare-signals-forwarding' of https://github.com/karelzak/util-linux-work:
  tests: add tests for unshare --forward-signals
  unshare: document --forward-signals in man page
  unshare: implement signal forwarding when --forward-signals is used
  unshare: add --forward-signals option to argument parser

2 months agoMerge branch 'lsfd--add-error-c' of https://github.com/masatake/util-linux
Karel Zak [Tue, 20 Jan 2026 14:32:21 +0000 (15:32 +0100)] 
Merge branch 'lsfd--add-error-c' of https://github.com/masatake/util-linux

* 'lsfd--add-error-c' of https://github.com/masatake/util-linux:
  lsfd: (refactor) move the error object related code to a new file
  lsfd: (refactor) remove redundant is_error member from struct file
  lsfd: (refactor) add a helper function making error file objects
  lsfd: remove __unused__ attr from parameters used actually
  lsfd: (cosmetic) adjust white spaces in column definitions

2 months agoMerge branch 'patch-1' of https://github.com/finefoot/util-linux
Karel Zak [Tue, 20 Jan 2026 14:23:02 +0000 (15:23 +0100)] 
Merge branch 'patch-1' of https://github.com/finefoot/util-linux

* 'patch-1' of https://github.com/finefoot/util-linux:
  runuser|su: elaborate man page regarding TIOCSTI/TIOCLINUX ioctl command injection

2 months agorunuser|su: elaborate man page regarding TIOCSTI/TIOCLINUX ioctl command injection
finefoot [Sun, 21 Sep 2025 20:40:07 +0000 (22:40 +0200)] 
runuser|su: elaborate man page regarding TIOCSTI/TIOCLINUX ioctl command injection

2 months agolsfd: (refactor) move the error object related code to a new file
Masatake YAMATO [Mon, 19 Jan 2026 20:38:23 +0000 (05:38 +0900)] 
lsfd: (refactor) move the error object related code to a new file

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: (refactor) remove redundant is_error member from struct file
Masatake YAMATO [Mon, 19 Jan 2026 20:22:20 +0000 (05:22 +0900)] 
lsfd: (refactor) remove redundant is_error member from struct file

It is possible to detect whether a file object is an error object
or not from its class information.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: (refactor) add a helper function making error file objects
Masatake YAMATO [Sun, 12 Oct 2025 06:58:59 +0000 (15:58 +0900)] 
lsfd: (refactor) add a helper function making error file objects

new_error_file_common() is the helper function.  new_stat_error_file()
and new_stat_error_file() use the function.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: remove __unused__ attr from parameters used actually
Masatake YAMATO [Sun, 12 Oct 2025 20:16:38 +0000 (05:16 +0900)] 
lsfd: remove __unused__ attr from parameters used actually

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: (cosmetic) adjust white spaces in column definitions
Masatake YAMATO [Sun, 12 Oct 2025 20:25:05 +0000 (05:25 +0900)] 
lsfd: (cosmetic) adjust white spaces in column definitions

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agoMerge branch 'add-man-section-to-calls' of https://github.com/meeuw/util-linux
Karel Zak [Mon, 19 Jan 2026 11:23:17 +0000 (12:23 +0100)] 
Merge branch 'add-man-section-to-calls' of https://github.com/meeuw/util-linux

* 'add-man-section-to-calls' of https://github.com/meeuw/util-linux:
  Add man page section to (sys)calls

2 months agoautotools: use $PTHREAD_LIBS everywhere
Karel Zak [Mon, 19 Jan 2026 11:14:15 +0000 (12:14 +0100)] 
autotools: use $PTHREAD_LIBS everywhere

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoMerge branch 'fix-pthread' of https://github.com/bkuhls/util-linux
Karel Zak [Mon, 19 Jan 2026 11:06:46 +0000 (12:06 +0100)] 
Merge branch 'fix-pthread' of https://github.com/bkuhls/util-linux

* 'fix-pthread' of https://github.com/bkuhls/util-linux:
  autotools: optionally add libpthread to uuid.pc

2 months agoMerge branch 'pseudo-kiofuse' of https://github.com/Elsensee/util-linux
Karel Zak [Mon, 19 Jan 2026 11:03:45 +0000 (12:03 +0100)] 
Merge branch 'pseudo-kiofuse' of https://github.com/Elsensee/util-linux

* 'pseudo-kiofuse' of https://github.com/Elsensee/util-linux:
  Add fuse.kio-fuse to list of pseudo file systems

2 months agotests: add tests for unshare --forward-signals
Kiran Rangoon [Fri, 16 Jan 2026 17:06:48 +0000 (12:06 -0500)] 
tests: add tests for unshare --forward-signals

Add two test cases for the new --forward-signals option:
- forward-signals: verifies SIGTERM is forwarded to child
- forward-signals-kill-child: verifies compatibility with --kill-child

Both tests use test_sigreceive which exits with the signal number
received, confirming proper signal forwarding.

Signed-off-by: Kiran Rangoon <kiranrangoon0@gmail.com>
2 months agounshare: document --forward-signals in man page
Kiran Rangoon [Fri, 16 Jan 2026 17:06:47 +0000 (12:06 -0500)] 
unshare: document --forward-signals in man page

Add documentation for the new --forward-signals option, explaining
its use case (graceful shutdown during reboot/system management)
and interaction with the --fork option.

Signed-off-by: Kiran Rangoon <kiranrangoon0@gmail.com>
2 months agounshare: implement signal forwarding when --forward-signals is used
Kiran Rangoon [Fri, 16 Jan 2026 17:06:46 +0000 (12:06 -0500)] 
unshare: implement signal forwarding when --forward-signals is used

When --forward-signals is specified, install signal handlers for
SIGTERM and SIGINT that forward these signals to the child process.
This allows child processes with cleanup handlers to execute gracefully during shutdown scenarios like
system reboot.

Also fix waitpid() to handle EINTR properly when signals are being
forwarded, ensuring the parent waits for the child to complete
signal handling before exiting.

Signed-off-by: Kiran Rangoon <kiranrangoon0@gmail.com>
2 months agounshare: add --forward-signals option to argument parser
Kiran Rangoon [Fri, 16 Jan 2026 17:06:45 +0000 (12:06 -0500)] 
unshare: add --forward-signals option to argument parser

Add a new --forward-signals command-line option that will allow
unshare to forward SIGTERM and SIGINT signals from the parent
process to the forked child process.

This commit adds the option parsing infrastructure but does not
implement the signal forwarding logic yet. The flag defaults to 0
(disabled) to maintain backward compatibility.

Signed-off-by: Kiran Rangoon <kiranrangoon0@gmail.com>
2 months agoAdd man page section to (sys)calls
Dick Marinus [Sun, 18 Jan 2026 19:41:48 +0000 (20:41 +0100)] 
Add man page section to (sys)calls

2 months agoautotools: optionally add libpthread to uuid.pc
Bernd Kuhls [Fri, 16 Jan 2026 22:33:34 +0000 (23:33 +0100)] 
autotools: optionally add libpthread to uuid.pc

Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
2 months agoMerge branch 'PR/findmnt-mounttype' of https://github.com/karelzak/util-linux-work
Karel Zak [Wed, 14 Jan 2026 15:02:30 +0000 (16:02 +0100)] 
Merge branch 'PR/findmnt-mounttype' of https://github.com/karelzak/util-linux-work

* 'PR/findmnt-mounttype' of https://github.com/karelzak/util-linux-work:
  findmnt: fix misleading warning messages for ntfs3
  libmount: move fstype_to_mounttype() to include/
  include: rename mount-api-utils.h to mountutils.h

2 months agofindmnt: fix misleading warning messages for ntfs3
Karel Zak [Tue, 13 Jan 2026 17:38:24 +0000 (18:38 +0100)] 
findmnt: fix misleading warning messages for ntfs3

* Remap fstab aliases like "ntfs3" to "ntfs" as reported by libblkid.

* Use mounttype (from --with-ntfs-mounttype=) to check if supported by
  the kernel rather than the type provided by libblkid.

* Don't check if the kernel supports type read from filesystem if an
  explicit type specified in fstab.

Fixes: https://github.com/util-linux/util-linux/issues/3912
Addresses: https://github.com/util-linux/util-linux/pull/3963
Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolib/path: add NULL checks for path in statx and access
Karel Zak [Wed, 14 Jan 2026 11:12:35 +0000 (12:12 +0100)] 
lib/path: add NULL checks for path in statx and access

Coverity warns that *at() libc functions (faccessat, statx) have pathname
marked as nonnull. Add explicit runtime NULL checks returning -EINVAL
instead of using __attribute__((nonnull)) into include/path.h to maintain
runtime safety for suid code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoMerge branch 'unshare_typo' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 14 Jan 2026 09:25:55 +0000 (10:25 +0100)] 
Merge branch 'unshare_typo' of https://github.com/stoeckmann/util-linux

* 'unshare_typo' of https://github.com/stoeckmann/util-linux:
  unshare: (man) fix grammar

2 months agoMerge branch 'PR/blkpr-keys' of https://github.com/karelzak/util-linux-work
Karel Zak [Wed, 14 Jan 2026 09:25:17 +0000 (10:25 +0100)] 
Merge branch 'PR/blkpr-keys' of https://github.com/karelzak/util-linux-work

* 'PR/blkpr-keys' of https://github.com/karelzak/util-linux-work:
  blkpr: fix compilation [-Werror,-Wunused-function]
  blkpr: Call gettext() for descriptions, clean up
  blkpr: add read-reservation command
  blkpr: add read-keys command
  blkpr: prepare for _IOR() ioctls

2 months agomount: (man) add link to mount.ceph(8)
Karel Zak [Wed, 14 Jan 2026 09:23:03 +0000 (10:23 +0100)] 
mount: (man) add link to mount.ceph(8)

Suggested-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agounshare: (man) fix grammar
Tobias Stoeckmann [Tue, 13 Jan 2026 23:18:47 +0000 (00:18 +0100)] 
unshare: (man) fix grammar

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agolibmount: move fstype_to_mounttype() to include/
Karel Zak [Tue, 13 Jan 2026 17:36:39 +0000 (18:36 +0100)] 
libmount: move fstype_to_mounttype() to include/

Make the workaround function globally available.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoinclude: rename mount-api-utils.h to mountutils.h
Karel Zak [Tue, 13 Jan 2026 17:23:33 +0000 (18:23 +0100)] 
include: rename mount-api-utils.h to mountutils.h

Keep the filename consistent with other header filenames.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoMerge branch 'lslocks--fix-oPID' of https://github.com/masatake/util-linux
Karel Zak [Tue, 13 Jan 2026 14:08:44 +0000 (15:08 +0100)] 
Merge branch 'lslocks--fix-oPID' of https://github.com/masatake/util-linux

* 'lslocks--fix-oPID' of https://github.com/masatake/util-linux:
  lslocks: (bugfix) don't set rawdata in COL_PID if rawdata is null

2 months agolib/path: Ensure consistent and robust path checks
Karel Zak [Tue, 13 Jan 2026 12:52:41 +0000 (13:52 +0100)] 
lib/path: Ensure consistent and robust path checks

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoblkpr: fix compilation [-Werror,-Wunused-function]
Karel Zak [Tue, 13 Jan 2026 12:23:39 +0000 (13:23 +0100)] 
blkpr: fix compilation [-Werror,-Wunused-function]

sys-utils/blkpr.c:171:27: error: unused function 'type_to_str' [-Werror,-Wunused-function]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolslocks: (bugfix) don't set rawdata in COL_PID if rawdata is null
Masatake YAMATO [Tue, 13 Jan 2026 10:03:26 +0000 (19:03 +0900)] 
lslocks: (bugfix) don't set rawdata in COL_PID if rawdata is null

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: fill MNTID coulmn for exe, cwd, and rtd assocations
Masatake YAMATO [Fri, 9 Jan 2026 05:46:15 +0000 (14:46 +0900)] 
lsfd: fill MNTID coulmn for exe, cwd, and rtd assocations

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agotests: (lsfd::column-mntid) add a new case
Masatake YAMATO [Fri, 9 Jan 2026 02:47:25 +0000 (11:47 +0900)] 
tests: (lsfd::column-mntid) add a new case

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agotests: (test_mkfds::mmap) add "shared" paramter
Masatake YAMATO [Fri, 9 Jan 2026 02:48:35 +0000 (11:48 +0900)] 
tests: (test_mkfds::mmap) add "shared" paramter

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: fill MNTID coulmn for shm and mem assocations
Masatake YAMATO [Thu, 8 Jan 2026 21:59:56 +0000 (06:59 +0900)] 
lsfd: fill MNTID coulmn for shm and mem assocations

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolsfd: (refactor) add has_mnt_id helper macro
Masatake YAMATO [Fri, 9 Jan 2026 05:05:44 +0000 (14:05 +0900)] 
lsfd: (refactor) add has_mnt_id helper macro

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolib/path: add wrapers for statx(2)
Masatake YAMATO [Thu, 8 Jan 2026 21:57:45 +0000 (06:57 +0900)] 
lib/path: add wrapers for statx(2)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolib/path: add __format__ attr to ul_path_v?statf()
Masatake YAMATO [Fri, 9 Jan 2026 16:19:30 +0000 (01:19 +0900)] 
lib/path: add __format__ attr to ul_path_v?statf()

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agotests: (refactor) add ts_skip_config, a new helper function
Masatake YAMATO [Fri, 9 Jan 2026 03:44:00 +0000 (12:44 +0900)] 
tests: (refactor) add ts_skip_config, a new helper function

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agolib/path: (cosmetic) delete the empty line at the EOF
Masatake YAMATO [Fri, 9 Jan 2026 01:15:18 +0000 (10:15 +0900)] 
lib/path: (cosmetic) delete the empty line at the EOF

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agotests: (lsfd::mkfds-mmap-maksed-file) revise the description
Masatake YAMATO [Fri, 9 Jan 2026 02:11:53 +0000 (11:11 +0900)] 
tests: (lsfd::mkfds-mmap-maksed-file) revise the description

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 months agoblkpr: Call gettext() for descriptions, clean up
Karel Zak [Mon, 12 Jan 2026 15:27:23 +0000 (16:27 +0100)] 
blkpr: Call gettext() for descriptions, clean up

* Use N_() and _() macros to translate description texts.
* Avoid repeating command/flag/type names in description texts.
* Remove trailing line breaks; it's the caller's task to format
  before/after the descriptions.
* Improve coding style by starting strings at the beginning of the
  line, enhancing maintainability (80 characters limit).
* Keep "}, {" on separate lines as per our usual coding practice.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoblkpr: add read-reservation command
Stefan Hajnoczi [Wed, 17 Dec 2025 18:26:07 +0000 (13:26 -0500)] 
blkpr: add read-reservation command

The new IOC_PR_READ_RESERVATION ioctl reports the current reservation on
a device. Add a command so that users can inspect the current
reservation. This is useful both for troubleshooting and for recovery
scenarios.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2 months agoblkpr: add read-keys command
Stefan Hajnoczi [Wed, 17 Dec 2025 18:26:06 +0000 (13:26 -0500)] 
blkpr: add read-keys command

The new IOC_PR_READ_KEYS ioctl lists registered keys on a device. Add a
command so that users can inspect keys. This is useful both for
troubleshooting and for recovery scenarios.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2 months agoblkpr: prepare for _IOR() ioctls
Stefan Hajnoczi [Wed, 17 Dec 2025 18:26:05 +0000 (13:26 -0500)] 
blkpr: prepare for _IOR() ioctls

parse_pr_command() returns the ioctl command constant for a given
command or -1 when the command is unknown. Up until now all ioctl
command constants were positive, so the following check worked:

  if (command < 0)
      err(EXIT_FAILURE, _("unknown command"));

The top two bits of ioctl command constants encode the direction (_IO,
_IOR, _IOW, _IOWR). ioctl commands defined with _IOR have negative ioctl
command constants.

Explicitly check for -1 to differentiate "unknown command" from valid
ioctls commands. Later commits will add ioctl commands that use _IOR.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2 months agoMerge branch 'env_drop' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 12 Jan 2026 13:34:30 +0000 (14:34 +0100)] 
Merge branch 'env_drop' of https://github.com/stoeckmann/util-linux

* 'env_drop' of https://github.com/stoeckmann/util-linux:
  env: ignore only invalid environment variables

2 months agoMerge branch 'lsblk-ul-startswith' of https://github.com/codefiles/util-linux
Karel Zak [Mon, 12 Jan 2026 13:17:40 +0000 (14:17 +0100)] 
Merge branch 'lsblk-ul-startswith' of https://github.com/codefiles/util-linux

* 'lsblk-ul-startswith' of https://github.com/codefiles/util-linux:
  lsblk: use ul_startswith()

2 months agoMerge branch 'typos' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 12 Jan 2026 13:15:23 +0000 (14:15 +0100)] 
Merge branch 'typos' of https://github.com/stoeckmann/util-linux

* 'typos' of https://github.com/stoeckmann/util-linux:
  Fix typos in comments

2 months agoMerge branch 'login_motd_reg' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 12 Jan 2026 13:14:51 +0000 (14:14 +0100)] 
Merge branch 'login_motd_reg' of https://github.com/stoeckmann/util-linux

* 'login_motd_reg' of https://github.com/stoeckmann/util-linux:
  login: only print regular files for motd

2 months agoMerge branch 'login_sig_race' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 12 Jan 2026 13:13:17 +0000 (14:13 +0100)] 
Merge branch 'login_sig_race' of https://github.com/stoeckmann/util-linux

* 'login_sig_race' of https://github.com/stoeckmann/util-linux:
  login: remove signal handler before cleanup

2 months agoMerge branch 'fdisk_signal' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 12 Jan 2026 12:56:19 +0000 (13:56 +0100)] 
Merge branch 'fdisk_signal' of https://github.com/stoeckmann/util-linux

* 'fdisk_signal' of https://github.com/stoeckmann/util-linux:
  fdisk: make SIGINT handler signal-safe

2 months agoMerge branch 'fix_non_kernel_style_func_braces' of https://github.com/cgoesche/util...
Karel Zak [Mon, 12 Jan 2026 12:53:24 +0000 (13:53 +0100)] 
Merge branch 'fix_non_kernel_style_func_braces' of https://github.com/cgoesche/util-linux-fork

* 'fix_non_kernel_style_func_braces' of https://github.com/cgoesche/util-linux-fork:
  style: adapt function definitions to kernel style

2 months agoMerge branch 'systemd_lock' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 12 Jan 2026 12:26:23 +0000 (13:26 +0100)] 
Merge branch 'systemd_lock' of https://github.com/stoeckmann/util-linux

* 'systemd_lock' of https://github.com/stoeckmann/util-linux:
  uuidd: use locked system user account if available

2 months agoMerge branch 'avoid-ob_refcnt-when-freethreading' of https://github.com/wdconinc...
Karel Zak [Mon, 12 Jan 2026 12:23:32 +0000 (13:23 +0100)] 
Merge branch 'avoid-ob_refcnt-when-freethreading' of https://github.com/wdconinc/util-linux

* 'avoid-ob_refcnt-when-freethreading' of https://github.com/wdconinc/util-linux:
  fix: use Py_REFCNT macro to work with free-threaded python

2 months agoMerge branch 'lslocks--Q' of https://github.com/masatake/util-linux
Karel Zak [Mon, 12 Jan 2026 12:21:32 +0000 (13:21 +0100)] 
Merge branch 'lslocks--Q' of https://github.com/masatake/util-linux

* 'lslocks--Q' of https://github.com/masatake/util-linux:
  tests: (lslocks) test -Q,--filter option
  tests: (test_mkfds::nop) new factory just printing pid
  lslocks: special-case PID for filtering (skip −1)
  lslocks: make SIZE filterable by normalizing to bytes
  lslocks: implement Q, --filter option
  lslocks: factor out code getting and setting the data from add_scols_line
  lslocks: (refactor) move proc_locks to struct lslocks
  lslocks: (refactor) move pid_locks in main to struct lslocks
  lslocks: (refactor) move "tab" file static variable to struct lslocks
  lslocks: (refactor) add struct lslocks representing the global context
  lslocks: (refactor) use global bytes in get_json_type_for_column()
  lslocks: (refactor) add a helper function refining value returned from get_lock
  lslocks: (refactor) don't use redundant callback functions
  lslocks: (refactor) specify list_head as type instead of abusing void*
  lslocks: (refactor) use separate function to initialize libscols_table
  lslocks: (refactor) remove an unused local variable
  lslocks: (refactor) use narrow variable scoping for loop counters
  lslocks: (comment) fix grammar

2 months agoMerge branch 'PR/fallocate-report-holes' of https://github.com/karelzak/util-linux...
Karel Zak [Mon, 12 Jan 2026 12:21:17 +0000 (13:21 +0100)] 
Merge branch 'PR/fallocate-report-holes' of https://github.com/karelzak/util-linux-work

* 'PR/fallocate-report-holes' of https://github.com/karelzak/util-linux-work:
  tests: convert fallocate to use subtests
  fallocate: refactor --report-holes and --dig-holes output
  fallocate: add --report-holes

2 months agolsblk: use ul_startswith()
codefiles [Sun, 11 Jan 2026 19:54:26 +0000 (14:54 -0500)] 
lsblk: use ul_startswith()

2 months agoFix typos in comments
Tobias Stoeckmann [Sat, 10 Jan 2026 22:04:24 +0000 (23:04 +0100)] 
Fix typos in comments

No functional change.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agologin: only print regular files for motd
Tobias Stoeckmann [Sat, 10 Jan 2026 21:56:45 +0000 (22:56 +0100)] 
login: only print regular files for motd

The existing code tries to only print content of non-empty files, but
does not check the target of an encountered symbolic link, which could
be even something else, e.g. a fifo. Add the missing check to the
motddir_filter function.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agologin: remove signal handler before cleanup
Tobias Stoeckmann [Sat, 10 Jan 2026 21:37:30 +0000 (22:37 +0100)] 
login: remove signal handler before cleanup

Even though alarm(0) is called, another process could still send a
SIGALRM signal to the login process, which could trigger a use after
free for a tiny amount of time.

Not able to reproduce without adding a proper sleep.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agouuidd: use locked system user account if available
Tobias Stoeckmann [Tue, 6 Jan 2026 17:14:32 +0000 (18:14 +0100)] 
uuidd: use locked system user account if available

Beginning with systemd 257, it is possible to fully lock a sysuser
account. Do so for systems with met requirements.

Older systemd versions still use unlocked accounts.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agoenv: ignore only invalid environment variables
Tobias Stoeckmann [Thu, 8 Jan 2026 20:55:10 +0000 (21:55 +0100)] 
env: ignore only invalid environment variables

Returning NULL drops the start of the currently existing linked list,
effectively removing all previously added environment variables.

Only ignore the invalid one, but keep the linked list available.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 months agofdisk: make SIGINT handler signal-safe
Tobias Stoeckmann [Fri, 9 Jan 2026 20:05:02 +0000 (21:05 +0100)] 
fdisk: make SIGINT handler signal-safe

Checking debug options and calling fprintf is not signal-safe.
Install a debug handler if debugging is requested and use signal-safe
output in it.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
3 months agostyle: adapt function definitions to kernel style
Christian Goeschel Ndjomouo [Fri, 9 Jan 2026 03:50:23 +0000 (22:50 -0500)] 
style: adapt function definitions to kernel style

The util-linux project preferred coding style is based on the kernel
coding-style (https://docs.kernel.org/process/coding-style.html),
which explains that opening braces should be on a line on their own
after the function signature. Therefore, let us adapt functions that
violate this convention.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
3 months agofix: use Py_REFCNT macro to work with free-threaded python
Wouter Deconinck [Wed, 24 Dec 2025 21:49:34 +0000 (15:49 -0600)] 
fix: use Py_REFCNT macro to work with free-threaded python

3 months agoMerge branch 'fix/chrt-man-page' of https://github.com/jan-krieg/util-linux
Karel Zak [Thu, 8 Jan 2026 12:40:28 +0000 (13:40 +0100)] 
Merge branch 'fix/chrt-man-page' of https://github.com/jan-krieg/util-linux

* 'fix/chrt-man-page' of https://github.com/jan-krieg/util-linux:
  chrt: (man) fix note about --sched-period lower limit

3 months agoMerge branch 'fix/issue_3895_take2' of https://github.com/lord2y/util-linux
Karel Zak [Thu, 8 Jan 2026 12:39:44 +0000 (13:39 +0100)] 
Merge branch 'fix/issue_3895_take2' of https://github.com/lord2y/util-linux

* 'fix/issue_3895_take2' of https://github.com/lord2y/util-linux:
  tests: add regression test for repeated termreduce printing
  tests: add libsmartcols termreduce regression helper
  libsmartcols: avoid cumulative width reduction during printing

3 months agoMerge branch 'setpwnam_backup' of https://github.com/stoeckmann/util-linux
Karel Zak [Thu, 8 Jan 2026 12:37:06 +0000 (13:37 +0100)] 
Merge branch 'setpwnam_backup' of https://github.com/stoeckmann/util-linux

* 'setpwnam_backup' of https://github.com/stoeckmann/util-linux:
  login-utils: Use _PATH macros
  login-utils: Use /etc/passwd- as backup file

3 months agoMerge branch 'feat/new_tool_getpidino' of https://github.com/cgoesche/util-linux...
Karel Zak [Thu, 8 Jan 2026 12:35:43 +0000 (13:35 +0100)] 
Merge branch 'feat/new_tool_getpidino' of https://github.com/cgoesche/util-linux-fork

* 'feat/new_tool_getpidino' of https://github.com/cgoesche/util-linux-fork:
  lib: (pidfd-utils) minor correction in the ul_get_valid_pidfd_or_err() description
  tests: add getino tests
  bash-completion: add getino completions
  getino: new tool to print the unique pidfd or namespace inode number

3 months agoMerge branch 'blkid-bcachefs-fixes' of https://github.com/himikof/util-linux
Karel Zak [Thu, 8 Jan 2026 12:27:01 +0000 (13:27 +0100)] 
Merge branch 'blkid-bcachefs-fixes' of https://github.com/himikof/util-linux

* 'blkid-bcachefs-fixes' of https://github.com/himikof/util-linux:
  libblkid: (bcachefs) fix LABEL_SUB probing
  libblkid: (bcachefs) add new bcachefs_sb_member fields
  libblkid: (bcachefs) add members_v2 parsing support

3 months agolib: (pidfd-utils) minor correction in the ul_get_valid_pidfd_or_err() description
Christian Goeschel Ndjomouo [Sun, 21 Dec 2025 01:03:57 +0000 (20:03 -0500)] 
lib: (pidfd-utils) minor correction in the ul_get_valid_pidfd_or_err() description

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
3 months agotests: add getino tests
Christian Goeschel Ndjomouo [Sun, 21 Dec 2025 01:06:18 +0000 (20:06 -0500)] 
tests: add getino tests

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>