]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
3 hours agoMerge branch 'lsmem_annotate_opt' of https://github.com/cgoesche/util-linux-fork master
Karel Zak [Tue, 28 Apr 2026 13:23:28 +0000 (15:23 +0200)] 
Merge branch 'lsmem_annotate_opt' of https://github.com/cgoesche/util-linux-fork

* 'lsmem_annotate_opt' of https://github.com/cgoesche/util-linux-fork:
  lsmem: add column header annotations

4 hours agoMerge branch 'PR/autotools-pkg-config-libs' of https://github.com/karelzak/util-linux...
Karel Zak [Tue, 28 Apr 2026 12:18:36 +0000 (14:18 +0200)] 
Merge branch 'PR/autotools-pkg-config-libs' of https://github.com/karelzak/util-linux-work

* 'PR/autotools-pkg-config-libs' of https://github.com/karelzak/util-linux-work:
  autotools: fix AM_CONDITIONAL for HAVE_UDEV and HAVE_AUDIT
  autotools,meson: drop unnecessary libm from test_pty
  autotools: split MATH_LIBS and ISNAN_LIBS
  autotools: use PKG_CHECK_MODULES for zlib
  autotools: use PKG_CHECK_MODULES for libcap-ng
  autotools: use PKG_CHECK_MODULES for libaudit
  autotools: use PKG_CHECK_MODULES for libudev
  autotools: use $(MATH_LIBS) instead of -lm for hwclock
  autotools: use $(SQLITE3_LIBS) instead of -lsqlite3
  autotools: use $(SELINUX_LIBS) instead of -lselinux
  autotools: use $(ECONF_LIBS) instead of -leconf

4 hours agoMerge branch 'cross-platform' of https://github.com/t-8ch/util-linux
Karel Zak [Tue, 28 Apr 2026 12:17:24 +0000 (14:17 +0200)] 
Merge branch 'cross-platform' of https://github.com/t-8ch/util-linux

* 'cross-platform' of https://github.com/t-8ch/util-linux:
  treewide: avoid unused argument and missing return warnings in fallbacks
  hardlink: (tests) Ignore xattrs
  setpgid: (tests) validate presence of /proc/self/stat
  tests: show kernel type

5 hours agoMerge branch 'dmesg_tests' of https://github.com/cgoesche/util-linux-fork
Karel Zak [Tue, 28 Apr 2026 11:35:48 +0000 (13:35 +0200)] 
Merge branch 'dmesg_tests' of https://github.com/cgoesche/util-linux-fork

* 'dmesg_tests' of https://github.com/cgoesche/util-linux-fork:
  tests: (dmesg) use more long-opts to better track coverage

5 hours agoMerge branch 'fix_issue/4271' of https://github.com/echoechoin/util-linux
Karel Zak [Tue, 28 Apr 2026 11:17:58 +0000 (13:17 +0200)] 
Merge branch 'fix_issue/4271' of https://github.com/echoechoin/util-linux

* 'fix_issue/4271' of https://github.com/echoechoin/util-linux:
  dmesg: fix out-of-bounds read when parsing malformed kmsg file

7 hours agoautotools: fix AM_CONDITIONAL for HAVE_UDEV and HAVE_AUDIT
Karel Zak [Mon, 27 Apr 2026 10:19:30 +0000 (12:19 +0200)] 
autotools: fix AM_CONDITIONAL for HAVE_UDEV and HAVE_AUDIT

Ensure AM_CONDITIONAL is always defined when entering the
else-branch, even when the library is not found. Previously,
when with_udev=auto (default) and libudev was not available,
the conditional was never defined, causing a configure error.

7 hours agoautotools,meson: drop unnecessary libm from test_pty
Karel Zak [Thu, 16 Apr 2026 14:19:38 +0000 (16:19 +0200)] 
autotools,meson: drop unnecessary libm from test_pty

test_pty only uses pty-session.c and monotonic.c, neither of which
use any math functions. Remove the unnecessary libm dependency from
both autotools and meson build files.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: split MATH_LIBS and ISNAN_LIBS
Karel Zak [Thu, 16 Apr 2026 14:13:29 +0000 (16:13 +0200)] 
autotools: split MATH_LIBS and ISNAN_LIBS

Separate libm detection into two variables, consistent with how
meson.build handles lib_m vs math_libs:

 - MATH_LIBS: unconditional -lm for general math functions (floor,
   round, etc.), used by hwclock and test_pty
 - ISNAN_LIBS: conditional -lm only when isnan is not available
   in libc, used by script, scriptreplay, scriptlive

Previously MATH_LIBS was only set when isnan needed -lm, making it
unreliable for utilities that need other math functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use PKG_CHECK_MODULES for zlib
Karel Zak [Thu, 16 Apr 2026 13:48:29 +0000 (15:48 +0200)] 
autotools: use PKG_CHECK_MODULES for zlib

Replace AC_CHECK_LIB(z) with PKG_CHECK_MODULES to use the pkg-config
module shipped by zlib. This creates $(Z_LIBS) variable, replacing
hardcoded -lz in Makemodule.am files.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use PKG_CHECK_MODULES for libcap-ng
Karel Zak [Thu, 16 Apr 2026 13:44:32 +0000 (15:44 +0200)] 
autotools: use PKG_CHECK_MODULES for libcap-ng

Replace UL_CHECK_LIB(cap-ng) with PKG_CHECK_MODULES to use the
pkg-config module shipped by libcap-ng. This creates $(CAP_NG_LIBS)
variable, replacing hardcoded -lcap-ng in Makemodule.am files.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use PKG_CHECK_MODULES for libaudit
Karel Zak [Thu, 16 Apr 2026 13:33:47 +0000 (15:33 +0200)] 
autotools: use PKG_CHECK_MODULES for libaudit

Replace UL_CHECK_LIB(audit) with PKG_CHECK_MODULES to use the
pkg-config module shipped by libaudit. This creates $(AUDIT_LIBS)
variable, replacing hardcoded -laudit in Makemodule.am files.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use PKG_CHECK_MODULES for libudev
Karel Zak [Thu, 16 Apr 2026 13:31:55 +0000 (15:31 +0200)] 
autotools: use PKG_CHECK_MODULES for libudev

Replace UL_CHECK_LIB(udev) with PKG_CHECK_MODULES to use the
pkg-config module shipped by libudev. This creates $(UDEV_LIBS)
variable, replacing hardcoded -ludev in Makemodule.am files.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use $(MATH_LIBS) instead of -lm for hwclock
Karel Zak [Thu, 16 Apr 2026 13:15:20 +0000 (15:15 +0200)] 
autotools: use $(MATH_LIBS) instead of -lm for hwclock

Use the variable set by AC_CHECK_LIB in configure.ac rather than
hardcoding -lm, consistent with how other utilities use $(MATH_LIBS).

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use $(SQLITE3_LIBS) instead of -lsqlite3
Karel Zak [Thu, 16 Apr 2026 13:11:25 +0000 (15:11 +0200)] 
autotools: use $(SQLITE3_LIBS) instead of -lsqlite3

Use the pkg-config variable set by PKG_CHECK_MODULES in configure.ac
rather than hardcoding -lsqlite3.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use $(SELINUX_LIBS) instead of -lselinux
Karel Zak [Thu, 16 Apr 2026 13:11:05 +0000 (15:11 +0200)] 
autotools: use $(SELINUX_LIBS) instead of -lselinux

Use the pkg-config variable set by PKG_CHECK_MODULES in configure.ac
rather than hardcoding -lselinux.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoautotools: use $(ECONF_LIBS) instead of -leconf
Karel Zak [Thu, 16 Apr 2026 13:07:36 +0000 (15:07 +0200)] 
autotools: use $(ECONF_LIBS) instead of -leconf

Use the pkg-config variable set by PKG_CHECK_MODULES in configure.ac
rather than hardcoding -leconf. This is consistent with how setpriv
already links libeconf and ensures correct flags from pkg-config.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 hours agoMerge branch 'PR/ci-fix-po4a-build' of https://github.com/karelzak/util-linux-work
Karel Zak [Tue, 28 Apr 2026 09:15:35 +0000 (11:15 +0200)] 
Merge branch 'PR/ci-fix-po4a-build' of https://github.com/karelzak/util-linux-work

* 'PR/ci-fix-po4a-build' of https://github.com/karelzak/util-linux-work:
  ci: install libunicode-linebreak-perl for po4a translations
  ci: fix CodeQL build failure due to missing po4a dependency

7 hours agoMerge branch 'fix/4287' of https://github.com/echoechoin/util-linux
Karel Zak [Tue, 28 Apr 2026 09:12:52 +0000 (11:12 +0200)] 
Merge branch 'fix/4287' of https://github.com/echoechoin/util-linux

* 'fix/4287' of https://github.com/echoechoin/util-linux:
  bits: use getline() to avoid stdin input truncation

8 hours agoMerge branch 'macos-prep' of https://github.com/t-8ch/util-linux
Karel Zak [Tue, 28 Apr 2026 08:49:13 +0000 (10:49 +0200)] 
Merge branch 'macos-prep' of https://github.com/t-8ch/util-linux

* 'macos-prep' of https://github.com/t-8ch/util-linux:
  libsmartcols: Ignore -Wsign-compare in filter-scanner.l
  flock: (test) Only test fcntl vs flock on Linux
  meson: (libfdisk, libsmartcols, libmount) handle linkers without version script support
  hardlink: handle ENOTDIR from nftw() on a file

8 hours agotreewide: avoid unused argument and missing return warnings in fallbacks
Thomas Weißschuh [Sun, 12 Apr 2026 06:07:40 +0000 (08:07 +0200)] 
treewide: avoid unused argument and missing return warnings in fallbacks

Make sure that the callback codepaths do not generate warnings about
unused arguments and missing returns.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agohardlink: (tests) Ignore xattrs
Thomas Weißschuh [Sun, 12 Apr 2026 06:11:20 +0000 (08:11 +0200)] 
hardlink: (tests) Ignore xattrs

If the code is built without xattr support, those won't be printed
and the tests fails.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agosetpgid: (tests) validate presence of /proc/self/stat
Thomas Weißschuh [Sun, 12 Apr 2026 06:12:38 +0000 (08:12 +0200)] 
setpgid: (tests) validate presence of /proc/self/stat

The tests use /proc/self/stat and fail if that is not available.
Handle its absence gracefully.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agotests: show kernel type
Thomas Weißschuh [Sun, 12 Apr 2026 06:12:15 +0000 (08:12 +0200)] 
tests: show kernel type

In addition to the kernel version it is useful to know the kernel type.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agolibsmartcols: Ignore -Wsign-compare in filter-scanner.l
Thomas Weißschuh [Sun, 12 Apr 2026 06:08:46 +0000 (08:08 +0200)] 
libsmartcols: Ignore -Wsign-compare in filter-scanner.l

The code generated from filter-scanner.l generates a sign comparision
warning on macOS.

There is nothing we can do about that, so ignore the warning similar to
other generated code.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agoflock: (test) Only test fcntl vs flock on Linux
Thomas Weißschuh [Sun, 12 Apr 2026 06:12:29 +0000 (08:12 +0200)] 
flock: (test) Only test fcntl vs flock on Linux

On other operating systems fcntl and flock may not actually be
independent, failing the test. This happens for example on macOS.

Only run this subtest on Linux.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agomeson: (libfdisk, libsmartcols, libmount) handle linkers without version script support
Thomas Weißschuh [Sun, 12 Apr 2026 06:03:43 +0000 (08:03 +0200)] 
meson: (libfdisk, libsmartcols, libmount) handle linkers without version script support

The linker may not support version scripts. Handle this for libfdisk,
libsmartcols and libmount the same way as libuuid and libblkid.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agohardlink: handle ENOTDIR from nftw() on a file
Thomas Weißschuh [Sun, 12 Apr 2026 06:09:32 +0000 (08:09 +0200)] 
hardlink: handle ENOTDIR from nftw() on a file

POSIX allows nftw() to return ENOTDIR if the path argument does not
point to a directory. This happens for example on macOS.

Handle ENOTDIR by calling the existing handler manually on the single
file.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
8 hours agoMerge branch 'unshare_whitelist_env_option' of https://github.com/cgoesche/util-linux...
Karel Zak [Tue, 28 Apr 2026 08:12:45 +0000 (10:12 +0200)] 
Merge branch 'unshare_whitelist_env_option' of https://github.com/cgoesche/util-linux-fork

* 'unshare_whitelist_env_option' of https://github.com/cgoesche/util-linux-fork:
  unshare: add whitelist-env command line option

8 hours agoMerge branch 'fix_kernel_version_check' of https://github.com/cgoesche/util-linux...
Karel Zak [Tue, 28 Apr 2026 08:06:23 +0000 (10:06 +0200)] 
Merge branch 'fix_kernel_version_check' of https://github.com/cgoesche/util-linux-fork

* 'fix_kernel_version_check' of https://github.com/cgoesche/util-linux-fork:
  tests/functions.sh: consider '+' for metadata in kernel version parsing

9 hours agoMerge branch 'runuser_regression' of https://github.com/cgoesche/util-linux-fork
Karel Zak [Tue, 28 Apr 2026 07:55:50 +0000 (09:55 +0200)] 
Merge branch 'runuser_regression' of https://github.com/cgoesche/util-linux-fork

* 'runuser_regression' of https://github.com/cgoesche/util-linux-fork:
  su-common: revert "su: pass arguments after <user> to shell"
  tests: add regression tests for runuser

9 hours agoci: install libunicode-linebreak-perl for po4a translations
Karel Zak [Mon, 27 Apr 2026 12:31:47 +0000 (14:31 +0200)] 
ci: install libunicode-linebreak-perl for po4a translations

The distcheck job fails because po4a requires the
Unicode::GCString Perl module (provided by
libunicode-linebreak-perl) to detect two-line titles
in AsciiDoc files.

9 hours agoci: fix CodeQL build failure due to missing po4a dependency
Karel Zak [Mon, 27 Apr 2026 12:29:51 +0000 (14:29 +0200)] 
ci: fix CodeQL build failure due to missing po4a dependency

Replace the autobuild action with a custom build step that
disables document translation. The autobuild auto-installed
po4a but the environment lacks the Unicode::GCString Perl
module, causing the translation step to fail. CodeQL analysis
does not need translated man pages.

9 hours agoMerge branch 'manpage-fix' of https://github.com/t-8ch/util-linux
Karel Zak [Tue, 28 Apr 2026 07:48:54 +0000 (09:48 +0200)] 
Merge branch 'manpage-fix' of https://github.com/t-8ch/util-linux

* 'manpage-fix' of https://github.com/t-8ch/util-linux:
  lastlog2: (man) fix example syntax

15 hours agodmesg: fix out-of-bounds read when parsing malformed kmsg file
WanBingjiang [Thu, 23 Apr 2026 10:48:06 +0000 (18:48 +0800)] 
dmesg: fix out-of-bounds read when parsing malformed kmsg file

Add bounds check to LAST_KMSG_FIELD macro to prevent accessing
memory before the buffer start, and null-terminate the record
buffer in print_kmsg_file() to stop string functions from reading
past the valid data.

Addresses: https://github.com/util-linux/util-linux/issues/4271
Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
26 hours agolsmem: add column header annotations
Christian Goeschel Ndjomouo [Mon, 23 Mar 2026 02:56:56 +0000 (22:56 -0400)] 
lsmem: add column header annotations

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
27 hours agotests: (dmesg) use more long-opts to better track coverage
Christian Goeschel Ndjomouo [Thu, 23 Apr 2026 18:29:32 +0000 (14:29 -0400)] 
tests: (dmesg) use more long-opts to better track coverage

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
27 hours agounshare: add whitelist-env command line option
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 04:16:11 +0000 (00:16 -0400)] 
unshare: add whitelist-env command line option

This new option allows controlled inheritance of environment
variables from the parent process by the unshared process.

This option by default clears all environment variables except
for those provided in the option argument, specified as a
comma-separated list.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
27 hours agolastlog2: (man) fix example syntax
Thomas Weißschuh [Mon, 27 Apr 2026 13:24:47 +0000 (15:24 +0200)] 
lastlog2: (man) fix example syntax

The examples are not using the right syntax for literal blocks,
leading to errors from asciidoctor.

Use the correct syntax.

Fixes: cd112d860bf6 ("lastlog2: add --journal option to manage SQLite journal mode")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
27 hours agosu-common: revert "su: pass arguments after <user> to shell"
Christian Goeschel Ndjomouo [Tue, 7 Apr 2026 14:25:17 +0000 (10:25 -0400)] 
su-common: revert "su: pass arguments after <user> to shell"

This reverts commit ac0147fd14b348097c82c1c89a5417b582e26bad.

Commit ac0147f added '+' to the getopt(3) option string which
allowed the passing of all arguments after a non-option arg
to be passed to the invoked shell, in this case after <user>.
However, this introduced a regression in runuser(1) and su(1)
where options for both utilities are scattered before and after
the username. E.g.: "su <user> -c 'echo foo' -s /bin/bash" will
pass both -c and -s argument sets to the invoked shell instead
of simply passing -c 'echo foo'.

Note that this behavior is more common in BSD/macOS-style
implementations of su(1), in a future commit this behavior will
be added more sensibly and carefully.

Addresses: ac0147f
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
27 hours agotests: add regression tests for runuser
Christian Goeschel Ndjomouo [Fri, 3 Apr 2026 16:06:59 +0000 (12:06 -0400)] 
tests: add regression tests for runuser

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
29 hours agoMerge branch 'mkfs_cramfs_args' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 27 Apr 2026 11:38:38 +0000 (13:38 +0200)] 
Merge branch 'mkfs_cramfs_args' of https://github.com/stoeckmann/util-linux

* 'mkfs_cramfs_args' of https://github.com/stoeckmann/util-linux:
  mkfs.cramfs: Consider -i only once
  mkfs.cramfs: Add -p padding only once

29 hours agoMerge branch 'ci/openwrt-25.12' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 27 Apr 2026 11:31:15 +0000 (13:31 +0200)] 
Merge branch 'ci/openwrt-25.12' of https://github.com/t-8ch/util-linux

* 'ci/openwrt-25.12' of https://github.com/t-8ch/util-linux:
  ci: update to latest OpenWrt release

29 hours agoMerge branch 'PR/agetty-credentials' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 27 Apr 2026 11:09:43 +0000 (13:09 +0200)] 
Merge branch 'PR/agetty-credentials' of https://github.com/karelzak/util-linux-work

* 'PR/agetty-credentials' of https://github.com/karelzak/util-linux-work:
  agetty: add support for more systemd credentials
  agetty: add cred_read_bool() for credential boolean parsing
  agetty: add cred_read_num() for credential numeric parsing
  agetty: add cred_read_str() for credential string parsing

29 hours agopo-man: add ll2_get_journal_mode and ll2_set_journal_mode to po4a.cfg
Karel Zak [Mon, 27 Apr 2026 11:05:35 +0000 (13:05 +0200)] 
po-man: add ll2_get_journal_mode and ll2_set_journal_mode to po4a.cfg

30 hours agotools/git-tp-sync: update po4a.cfg language list on sync
Karel Zak [Mon, 27 Apr 2026 10:48:23 +0000 (12:48 +0200)] 
tools/git-tp-sync: update po4a.cfg language list on sync

Signed-off-by: Karel Zak <kzak@redhat.com>
30 hours agoMerge branch 'patch-27' of https://github.com/mariobl/util-linux
Karel Zak [Mon, 27 Apr 2026 10:42:56 +0000 (12:42 +0200)] 
Merge branch 'patch-27' of https://github.com/mariobl/util-linux

* 'patch-27' of https://github.com/mariobl/util-linux:
  [po-man] Add missing languages to po4a.cfg

30 hours agoMerge branch 'manpages_term_consistency' of https://github.com/cgoesche/util-linux...
Karel Zak [Mon, 27 Apr 2026 10:34:50 +0000 (12:34 +0200)] 
Merge branch 'manpages_term_consistency' of https://github.com/cgoesche/util-linux-fork

* 'manpages_term_consistency' of https://github.com/cgoesche/util-linux-fork:
  man: use the term 'calling process' instead of 'current process'
  man: use the term unprivileged instead of non-root
  man: (mount) fix minor term inconsistency
  man: use symbolic link instead of symlink
  man: use superblock term consistently
  man: use the term 'real-time' more consistently
  man: use 'pseudoterminal' instead of 'pseudo[- ]terminal'
  man: use 'pathname' instead of 'path name'
  man: use 'nonzero' instead of 'non-zero'
  man: use 'uppercase' instead of 'upper case'
  man: use 'lowercase' instead of 'lower case'
  man: (lastlog) fix minor wording inconsistency
  man: use 'filesystem(s)' instead of 'file system(s)'
  man: use 'filename(s)' instead of 'file name(s)'
  man: use 'Epoch' instead of 'epoch'
  man: use 'built-in' instead of 'builtin'
  man: use 'bit mask' instead of 'bitmask'

31 hours agolsblk: update source file comments after rename
Karel Zak [Mon, 27 Apr 2026 09:41:56 +0000 (11:41 +0200)] 
lsblk: update source file comments after rename

Signed-off-by: Karel Zak <kzak@redhat.com>
31 hours agoMerge branch 'close/issue_4146' of https://github.com/lord2y/util-linux
Karel Zak [Mon, 27 Apr 2026 09:39:52 +0000 (11:39 +0200)] 
Merge branch 'close/issue_4146' of https://github.com/lord2y/util-linux

* 'close/issue_4146' of https://github.com/lord2y/util-linux:
  lsblk: move source files to dedicated lsblk-cmd/ directory

31 hours agobash-completion: (lastlog2) quote $cur in --journal completion
Karel Zak [Mon, 27 Apr 2026 09:37:53 +0000 (11:37 +0200)] 
bash-completion: (lastlog2) quote $cur in --journal completion

Signed-off-by: Karel Zak <kzak@redhat.com>
31 hours agoMerge branch 'fix/4157' of https://github.com/echoechoin/util-linux
Karel Zak [Mon, 27 Apr 2026 09:37:19 +0000 (11:37 +0200)] 
Merge branch 'fix/4157' of https://github.com/echoechoin/util-linux

* 'fix/4157' of https://github.com/echoechoin/util-linux:
  liblastlog2: declare variables at the top of the block
  liblastlog2: register journal mode man pages in build system
  lastlog2: add --journal option to manage SQLite journal mode
  liblastlog2: add support for WAL journal mode

31 hours agoMerge branch 'lsblk_annotate_opt' of https://github.com/cgoesche/util-linux-fork
Karel Zak [Mon, 27 Apr 2026 09:28:18 +0000 (11:28 +0200)] 
Merge branch 'lsblk_annotate_opt' of https://github.com/cgoesche/util-linux-fork

* 'lsblk_annotate_opt' of https://github.com/cgoesche/util-linux-fork:
  lsblk: add column header annotations

31 hours agoMerge branch 'pager-enable-lslocks' of https://github.com/kurok/util-linux
Karel Zak [Mon, 27 Apr 2026 09:25:03 +0000 (11:25 +0200)] 
Merge branch 'pager-enable-lslocks' of https://github.com/kurok/util-linux

* 'pager-enable-lslocks' of https://github.com/kurok/util-linux:
  lslocks: add --pager and --nopager options

32 hours agocopyfilerange: use err() instead of errx() with glibc %m
Karel Zak [Mon, 27 Apr 2026 08:32:06 +0000 (10:32 +0200)] 
copyfilerange: use err() instead of errx() with glibc %m

Replace errx() + %m format specifier with err(), which portably
appends strerror(errno) without relying on the glibc-specific %m
extension.

Signed-off-by: Karel Zak <kzak@redhat.com>
32 hours agoMerge branch 'warnerr_newline' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 27 Apr 2026 08:31:20 +0000 (10:31 +0200)] 
Merge branch 'warnerr_newline' of https://github.com/stoeckmann/util-linux

* 'warnerr_newline' of https://github.com/stoeckmann/util-linux:
  Fix error message handling in sample/test code
  wdctl: Remove newline from warning message
  eject: Remove newline from warning messages
  copyfilerange: Remove newline from error messages
  sulogin: Remove newline from error messages
  mkfs.minix: Remove newline from error message

32 hours agoMerge branch 'bash' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 27 Apr 2026 08:21:05 +0000 (10:21 +0200)] 
Merge branch 'bash' of https://github.com/t-8ch/util-linux

* 'bash' of https://github.com/t-8ch/util-linux:
  treewide: use bash from PATH

32 hours agoMerge branch 'PR/libblkid-fix-overflows' of https://github.com/karelzak/util-linux...
Karel Zak [Mon, 27 Apr 2026 08:17:54 +0000 (10:17 +0200)] 
Merge branch 'PR/libblkid-fix-overflows' of https://github.com/karelzak/util-linux-work

* 'PR/libblkid-fix-overflows' of https://github.com/karelzak/util-linux-work:
  libblkid: reiserfs: add block size validation for reiser4
  libblkid: erofs: validate blkszbits before checksum calculation
  libblkid: exfs: avoid 32-bit overflow in rextsize validation
  libblkid: solaris: use 64-bit for partition offset calculations
  libblkid: bsd: use 64-bit for partition offset calculations
  libblkid: mac: use 64-bit for partition offset calculations
  libblkid: dos: use 64-bit for partition offset calculations
  libblkid: udf: avoid 32-bit overflow in offset calculations
  libblkid: vfat: avoid 32-bit overflow in offset calculations
  libblkid: ubi: fix probe return values
  libblkid: f2fs: tighten log_blocksize validation
  libblkid: nilfs: fix byte order and block size validation
  libblkid: gpt: fix wiper offset to use sector size
  libblkid: udf: cap descriptor sequence iteration count
  libblkid: bcache: add missing NULL check
  libblkid: bsd: read enough data to cover disklabel struct
  libblkid: befs: improve bounds checking in B+ tree search
  libblkid: ntfs: improve integer overflow checks

32 hours agocopyfilerange: (man) fix swapped offsets in command example
Štěpán Němec [Wed, 22 Apr 2026 18:25:03 +0000 (20:25 +0200)] 
copyfilerange: (man) fix swapped offsets in command example

Signed-off-by: Štěpán Němec <stepnem@smrk.net>
34 hours agobits: use getline() to avoid stdin input truncation
WanBingjiang [Mon, 27 Apr 2026 06:25:54 +0000 (14:25 +0800)] 
bits: use getline() to avoid stdin input truncation

Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
47 hours agolsblk: move source files to dedicated lsblk-cmd/ directory
Alessandro Ratti [Fri, 27 Mar 2026 14:40:49 +0000 (15:40 +0100)] 
lsblk: move source files to dedicated lsblk-cmd/ directory

Move all lsblk source files from misc-utils/ to a dedicated
lsblk-cmd/ directory, following the pattern established by lsfd-cmd/.
Update both autotools and meson build systems accordingly.

Closes: https://github.com/util-linux/util-linux/issues/4146
Signed-off-by: Alessandro Ratti <alessandro@0x65c.net>
4 days agoliblastlog2: declare variables at the top of the block
WanBingjiang [Fri, 24 Apr 2026 09:01:44 +0000 (17:01 +0800)] 
liblastlog2: declare variables at the top of the block

Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
4 days agoliblastlog2: register journal mode man pages in build system
WanBingjiang [Fri, 24 Apr 2026 08:53:28 +0000 (16:53 +0800)] 
liblastlog2: register journal mode man pages in build system

Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
4 days agolastlog2: add --journal option to manage SQLite journal mode
WanBingjiang [Wed, 22 Apr 2026 05:46:56 +0000 (13:46 +0800)] 
lastlog2: add --journal option to manage SQLite journal mode

Add -j/--journal option to the lastlog2 command to allow users to
view and set the SQLite journal mode. Without an argument, it displays
the current mode. With an argument, it sets the mode to the specified
value (WAL, DELETE, TRUNCATE, PERSIST, MEMORY, OFF).

The option supports flexible argument formats:
- Short option with space: -j WAL
- Short option without space: -jWAL
- Long option with equals: --journal=WAL

Also update bash-completion to provide journal mode suggestions and
add documentation to the man page with usage examples.

Addresses: https://github.com/util-linux/util-linux/issues/4157
Addresses: https://github.com/util-linux/util-linux/issues/4261
Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
4 days agoliblastlog2: add support for WAL journal mode
WanBingjiang [Wed, 22 Apr 2026 05:46:56 +0000 (13:46 +0800)] 
liblastlog2: add support for WAL journal mode

Add ll2_set_journal_mode() and ll2_get_journal_mode() functions to
allow setting and querying SQLite journal modes. This enables users
to switch to WAL (Write-Ahead Logging) mode for better concurrency
in high-traffic scenarios.

WAL mode allows readers and writers to operate concurrently without
blocking each other, significantly reducing database lock contention
in environments with frequent SSH logins.

The journal mode setting is persistent and only needs to be set once
per database.

Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
5 days agotreewide: use bash from PATH
Thomas Weißschuh [Sun, 12 Apr 2026 06:00:35 +0000 (08:00 +0200)] 
treewide: use bash from PATH

The system shell at /bin/bash may not be sufficient.
Look it up from $PATH, so the user can override it.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
5 days agoMerge branch 'PR/flock-shell-regression' of https://github.com/karelzak/util-linux...
Karel Zak [Thu, 23 Apr 2026 12:09:00 +0000 (14:09 +0200)] 
Merge branch 'PR/flock-shell-regression' of https://github.com/karelzak/util-linux-work

* 'PR/flock-shell-regression' of https://github.com/karelzak/util-linux-work:
  nsenter: update shell selection documentation
  unshare: update shell selection documentation
  flock: document shell selection in man page
  more: update shell selection documentation
  scriptlive: update shell selection documentation
  script: update shell selection documentation

5 days agolibblkid: reiserfs: add block size validation for reiser4
Karel Zak [Wed, 15 Apr 2026 18:59:15 +0000 (20:59 +0200)] 
libblkid: reiserfs: add block size validation for reiser4

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: erofs: validate blkszbits before checksum calculation
Karel Zak [Wed, 15 Apr 2026 18:40:03 +0000 (20:40 +0200)] 
libblkid: erofs: validate blkszbits before checksum calculation

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: exfs: avoid 32-bit overflow in rextsize validation
Karel Zak [Wed, 15 Apr 2026 18:38:08 +0000 (20:38 +0200)] 
libblkid: exfs: avoid 32-bit overflow in rextsize validation

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: solaris: use 64-bit for partition offset calculations
Karel Zak [Wed, 15 Apr 2026 18:37:45 +0000 (20:37 +0200)] 
libblkid: solaris: use 64-bit for partition offset calculations

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: bsd: use 64-bit for partition offset calculations
Karel Zak [Wed, 15 Apr 2026 18:37:12 +0000 (20:37 +0200)] 
libblkid: bsd: use 64-bit for partition offset calculations

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: mac: use 64-bit for partition offset calculations
Karel Zak [Wed, 15 Apr 2026 18:36:41 +0000 (20:36 +0200)] 
libblkid: mac: use 64-bit for partition offset calculations

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: dos: use 64-bit for partition offset calculations
Karel Zak [Wed, 15 Apr 2026 18:36:10 +0000 (20:36 +0200)] 
libblkid: dos: use 64-bit for partition offset calculations

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: udf: avoid 32-bit overflow in offset calculations
Karel Zak [Wed, 15 Apr 2026 18:31:19 +0000 (20:31 +0200)] 
libblkid: udf: avoid 32-bit overflow in offset calculations

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: vfat: avoid 32-bit overflow in offset calculations
Karel Zak [Wed, 15 Apr 2026 18:26:25 +0000 (20:26 +0200)] 
libblkid: vfat: avoid 32-bit overflow in offset calculations

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: ubi: fix probe return values
Karel Zak [Wed, 15 Apr 2026 15:18:20 +0000 (17:18 +0200)] 
libblkid: ubi: fix probe return values

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: f2fs: tighten log_blocksize validation
Karel Zak [Wed, 15 Apr 2026 15:16:07 +0000 (17:16 +0200)] 
libblkid: f2fs: tighten log_blocksize validation

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: nilfs: fix byte order and block size validation
Karel Zak [Wed, 15 Apr 2026 13:53:56 +0000 (15:53 +0200)] 
libblkid: nilfs: fix byte order and block size validation

Fix s_dev_size comparison to use le64_to_cpu() for big-endian
architectures. Tighten s_log_block_size check to match kernel limit
(NILFS_MAX_BLOCK_SIZE=65536, max shift 6).

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: gpt: fix wiper offset to use sector size
Karel Zak [Wed, 15 Apr 2026 13:51:19 +0000 (15:51 +0200)] 
libblkid: gpt: fix wiper offset to use sector size

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: udf: cap descriptor sequence iteration count
Karel Zak [Wed, 15 Apr 2026 13:48:09 +0000 (15:48 +0200)] 
libblkid: udf: cap descriptor sequence iteration count

The descriptor count is derived from attacker-controlled anchor length
and has no upper bound. Cap at 64 -- a UDF volume descriptor sequence
contains only a handful of descriptors (PVD, LVD, USD, IUVD, TD, ...),
similar to the kernel's UDF_MAX_TD_NESTING limit in fs/udf/super.c.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: bcache: add missing NULL check
Karel Zak [Wed, 15 Apr 2026 13:42:40 +0000 (15:42 +0200)] 
libblkid: bcache: add missing NULL check

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: bsd: read enough data to cover disklabel struct
Karel Zak [Wed, 15 Apr 2026 13:38:29 +0000 (15:38 +0200)] 
libblkid: bsd: read enough data to cover disklabel struct

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: befs: improve bounds checking in B+ tree search
Karel Zak [Wed, 15 Apr 2026 13:35:32 +0000 (15:35 +0200)] 
libblkid: befs: improve bounds checking in B+ tree search

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agolibblkid: ntfs: improve integer overflow checks
Karel Zak [Wed, 15 Apr 2026 13:20:47 +0000 (15:20 +0200)] 
libblkid: ntfs: improve integer overflow checks

Signed-off-by: Karel Zak <kzak@redhat.com>
5 days agoMerge branch 'meson-cleanup' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 23 Apr 2026 12:01:20 +0000 (14:01 +0200)] 
Merge branch 'meson-cleanup' of https://github.com/t-8ch/util-linux

* 'meson-cleanup' of https://github.com/t-8ch/util-linux:
  meson: unify the feature checking

5 days agoci: update to latest OpenWrt release
Thomas Weißschuh [Wed, 22 Apr 2026 16:52:10 +0000 (18:52 +0200)] 
ci: update to latest OpenWrt release

Adapt to the new compression scheme and GCC version.
Replace the removed target bcm63xx with the new loongarch64.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
5 days agomkfs.cramfs: Consider -i only once
Tobias Stoeckmann [Wed, 22 Apr 2026 19:16:19 +0000 (21:16 +0200)] 
mkfs.cramfs: Consider -i only once

If multiple files are specified through -i, all sizes are added to
estimated filesystem size, yet only the last given file will be
added.

Increase fslen_ub only once.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
5 days agomkfs.cramfs: Add -p padding only once
Tobias Stoeckmann [Wed, 22 Apr 2026 19:14:45 +0000 (21:14 +0200)] 
mkfs.cramfs: Add -p padding only once

If -p is supplied multiple times, the estimated filesystem size is
increased multiple times as well, even though padding will happen only
once.

Increase fslen_ub only once.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
6 days agoliblastlog2: wait on busy SQLite connections
WanBingjiang [Mon, 30 Mar 2026 08:28:24 +0000 (16:28 +0800)] 
liblastlog2: wait on busy SQLite connections

Avoiding 'SQL error: database is locked' when lastlog2 writes lastlog2
databese.

Addresses: https://github.com/util-linux/util-linux/issues/4157
Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
6 days agolslocks: add --pager and --nopager options
yuriyryabikov [Wed, 22 Apr 2026 11:46:13 +0000 (12:46 +0100)] 
lslocks: add --pager and --nopager options

Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
6 days agoMerge branch 'lslogins_support_gid_and_uid' of https://github.com/cgoesche/util-linux...
Karel Zak [Wed, 22 Apr 2026 11:44:51 +0000 (13:44 +0200)] 
Merge branch 'lslogins_support_gid_and_uid' of https://github.com/cgoesche/util-linux-fork

* 'lslogins_support_gid_and_uid' of https://github.com/cgoesche/util-linux-fork:
  lslogins: use new lib functions for user/group name parsing

6 days agoagetty: add support for more systemd credentials
Karel Zak [Wed, 22 Apr 2026 10:30:49 +0000 (12:30 +0200)] 
agetty: add support for more systemd credentials

Add support for more configuration options via systemd credentials:

  agetty.delay      == --delay
  agetty.hangup     == --hangup
  agetty.nice       == --nice
  agetty.noclear    == --noclear
  agetty.nohints    == --nohints
  agetty.nohostname == --nohostname
  agetty.noissue    == --noissue

Addresses: https://github.com/util-linux/util-linux/issues/2255
Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agoagetty: add cred_read_bool() for credential boolean parsing
Karel Zak [Wed, 22 Apr 2026 10:23:37 +0000 (12:23 +0200)] 
agetty: add cred_read_bool() for credential boolean parsing

Introduce cred_read_bool() helper that reads a systemd credential
file and parses the value as a boolean using ul_strtobool(). The
invert argument allows handling "noissue"-style credentials where
true means the flag should be cleared rather than set.

Addresses: https://github.com/util-linux/util-linux/issues/2255
Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agoagetty: add cred_read_num() for credential numeric parsing
Karel Zak [Wed, 22 Apr 2026 10:21:50 +0000 (12:21 +0200)] 
agetty: add cred_read_num() for credential numeric parsing

Introduce cred_read_num() helper that reads a systemd credential
file and parses the value as a number. The type argument selects
between unsigned ('u') and signed ('d') parsing, making it easy
to extend for other numeric types in the future.

Addresses: https://github.com/util-linux/util-linux/issues/2255
Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agoagetty: add cred_read_str() for credential string parsing
Karel Zak [Wed, 22 Apr 2026 10:18:08 +0000 (12:18 +0200)] 
agetty: add cred_read_str() for credential string parsing

Introduce cred_read_str() helper that reads a systemd credential
file and stores the string value into a struct member addressed
via offsetof(). This replaces the open-coded string credential
handling and prepares for adding more credential types.

Addresses: https://github.com/util-linux/util-linux/issues/2255
Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agotests/functions.sh: consider '+' for metadata in kernel version parsing
Christian Goeschel Ndjomouo [Tue, 21 Apr 2026 19:01:01 +0000 (15:01 -0400)] 
tests/functions.sh: consider '+' for metadata in kernel version parsing

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agolslogins: use new lib functions for user/group name parsing
Christian Goeschel Ndjomouo [Mon, 30 Mar 2026 03:55:08 +0000 (23:55 -0400)] 
lslogins: use new lib functions for user/group name parsing

This patch makes use of the new ul_get{grp,userpw}_str lib
functions to parse user/group names passed to the --logins
and --groups options. The use of these functions simplifies
the code base and makes str_to_uint() useless, therefore we
can remove it.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use the term 'calling process' instead of 'current process'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 02:19:40 +0000 (22:19 -0400)] 
man: use the term 'calling process' instead of 'current process'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use the term unprivileged instead of non-root
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 02:16:29 +0000 (22:16 -0400)] 
man: use the term unprivileged instead of non-root

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: (mount) fix minor term inconsistency
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 02:09:29 +0000 (22:09 -0400)] 
man: (mount) fix minor term inconsistency

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