]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
7 weeks 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>
7 weeks 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>
7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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.

7 weeks 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.

7 weeks 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

7 weeks agorename: fix buffer overflow by using PATH_MAX instead of unreliable st_size
WanBingjiang [Tue, 28 Apr 2026 07:32:55 +0000 (15:32 +0800)] 
rename: fix buffer overflow by using PATH_MAX instead of unreliable st_size

/proc and virtual filesystems return st_size = 0, leading to invalid buffers

Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
7 weeks agorename: add --copy option to copy instead of rename
WanBingjiang [Fri, 27 Feb 2026 09:08:39 +0000 (17:08 +0800)] 
rename: add --copy option to copy instead of rename

Regular files: copy content with ul_copy_file(), preserve permissions.
Symlinks: create new link with same target. Add tests and man page.

Addresses: util-linux#3887

7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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>
7 weeks 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

7 weeks 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'

7 weeks 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>
7 weeks 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

7 weeks 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>
7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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>
7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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

7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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

8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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

8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks agoman: use symbolic link instead of symlink
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 02:05:00 +0000 (22:05 -0400)] 
man: use symbolic link instead of symlink

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use superblock term consistently
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:57:15 +0000 (21:57 -0400)] 
man: use superblock term consistently

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use the term 'real-time' more consistently
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:54:49 +0000 (21:54 -0400)] 
man: use the term 'real-time' more consistently

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'pseudoterminal' instead of 'pseudo[- ]terminal'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:50:38 +0000 (21:50 -0400)] 
man: use 'pseudoterminal' instead of 'pseudo[- ]terminal'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'pathname' instead of 'path name'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:46:34 +0000 (21:46 -0400)] 
man: use 'pathname' instead of 'path name'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'nonzero' instead of 'non-zero'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:45:27 +0000 (21:45 -0400)] 
man: use 'nonzero' instead of 'non-zero'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'uppercase' instead of 'upper case'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:44:28 +0000 (21:44 -0400)] 
man: use 'uppercase' instead of 'upper case'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'lowercase' instead of 'lower case'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:43:35 +0000 (21:43 -0400)] 
man: use 'lowercase' instead of 'lower case'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: (lastlog) fix minor wording inconsistency
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:39:30 +0000 (21:39 -0400)] 
man: (lastlog) fix minor wording inconsistency

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'filesystem(s)' instead of 'file system(s)'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:38:20 +0000 (21:38 -0400)] 
man: use 'filesystem(s)' instead of 'file system(s)'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'filename(s)' instead of 'file name(s)'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:34:37 +0000 (21:34 -0400)] 
man: use 'filename(s)' instead of 'file name(s)'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'Epoch' instead of 'epoch'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:29:59 +0000 (21:29 -0400)] 
man: use 'Epoch' instead of 'epoch'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoFix error message handling in sample/test code
Tobias Stoeckmann [Sat, 18 Apr 2026 08:24:04 +0000 (10:24 +0200)] 
Fix error message handling in sample/test code

- Remove extra newline in errx messages
- Use fprintf/exit for usage to avoid repeated program name
- Improve signal safety by using appropriate functions

This code is not installed, thus no functional change in final
installation of util-linux.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
8 weeks agoMerge branch 'scriptreplay-manpage-step-fix' of https://github.com/koraynilay/util...
Karel Zak [Tue, 21 Apr 2026 11:24:53 +0000 (13:24 +0200)] 
Merge branch 'scriptreplay-manpage-step-fix' of https://github.com/koraynilay/util-linux

* 'scriptreplay-manpage-step-fix' of https://github.com/koraynilay/util-linux:
  scriptreplay(man): Add right arrow documentation

8 weeks agoMerge branch 'hexdump_ll' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:22:22 +0000 (13:22 +0200)] 
Merge branch 'hexdump_ll' of https://github.com/stoeckmann/util-linux

* 'hexdump_ll' of https://github.com/stoeckmann/util-linux:
  hexdump: Cast %ll argument to long long

8 weeks agoMerge branch 'fallocate_checks' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:15:38 +0000 (13:15 +0200)] 
Merge branch 'fallocate_checks' of https://github.com/stoeckmann/util-linux

* 'fallocate_checks' of https://github.com/stoeckmann/util-linux:
  fallocate: Add range check
  fallocate: Improve argument range check
  fallocate: Use off_t instead of loff_t
  fallocate: Remove outdated copyright statement
  fallocate: Use correct formatters and casts

8 weeks agoMerge branch 'pidfd_get_inode' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:09:07 +0000 (13:09 +0200)] 
Merge branch 'pidfd_get_inode' of https://github.com/stoeckmann/util-linux

* 'pidfd_get_inode' of https://github.com/stoeckmann/util-linux:
  pidfd-utils: Fix pidfd_get_inode declaration

8 weeks agoMerge branch 'mkfs_cramfs_fsize' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:06:48 +0000 (13:06 +0200)] 
Merge branch 'mkfs_cramfs_fsize' of https://github.com/stoeckmann/util-linux

* 'mkfs_cramfs_fsize' of https://github.com/stoeckmann/util-linux:
  mkfs.cramfs: Improve file size check

8 weeks ago[po-man] Add missing languages to po4a.cfg
Mario Blättermann [Mon, 20 Apr 2026 16:42:12 +0000 (18:42 +0200)] 
[po-man] Add missing languages to po4a.cfg

8 weeks agoman: use 'built-in' instead of 'builtin'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:26:28 +0000 (21:26 -0400)] 
man: use 'built-in' instead of 'builtin'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoman: use 'bit mask' instead of 'bitmask'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:24:16 +0000 (21:24 -0400)] 
man: use 'bit mask' instead of 'bitmask'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 weeks agoscriptreplay(man): Add right arrow documentation
koraynilay [Sun, 19 Apr 2026 20:48:09 +0000 (22:48 +0200)] 
scriptreplay(man): Add right arrow documentation

This feature was added with PR #3015 (and issue #2999),
but it was missing from the docs/--help

Signed-off-by: koraynilay <koray.fra@gmail.com>
8 weeks agohexdump: Cast %ll argument to long long
Tobias Stoeckmann [Sat, 18 Apr 2026 19:14:24 +0000 (21:14 +0200)] 
hexdump: Cast %ll argument to long long

Cast off_t for F_ADDRESS to long long. In most cases, this should be
actually unsigned long long due to %llx or %llo, but since %lld is also
available and off_t is signed, keep it at that.

In theory, this might fix very intelligent static analysers which notice
that off_t is long int but %ll expects long long, but in reality, this
fixes 32 bit off_t builds. Without this, wrong addresses are shown.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>