]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Karel Zak [Mon, 2 Jan 2023 12:06:41 +0000 (13:06 +0100)]
Merge branch 'part-csum' of https://github.com/t-8ch/util-linux
* 'part-csum' of https://github.com/t-8ch/util-linux:
libblkid: bsd: add checksum support
libblkid: sun: use generic checksum handling
libblkid: sgi: use generic checksum handling
libblkid: gpt: use generic checksum handling
Karel Zak [Mon, 2 Jan 2023 12:05:13 +0000 (13:05 +0100)]
Merge branch 'lsns-ioctl-check' of https://github.com/t-8ch/util-linux
* 'lsns-ioctl-check' of https://github.com/t-8ch/util-linux:
Revert "tests: use KNOWN_FAIL for lsns/ioctl_ns"
Karel Zak [Mon, 2 Jan 2023 12:04:38 +0000 (13:04 +0100)]
Merge branch 'lsblk-nvme' of https://github.com/mbroz/util-linux
* 'lsblk-nvme' of https://github.com/mbroz/util-linux:
Update email.
lsblk: add revision output to --nvme list
lsblk: read firmware revision from udev
Karel Zak [Mon, 2 Jan 2023 12:02:51 +0000 (13:02 +0100)]
Merge branch 'stat-parsing' of https://github.com/t-8ch/util-linux
* 'stat-parsing' of https://github.com/t-8ch/util-linux:
procfs: get_stat_nth: handle braces in process name
lib: procfs: add parsing cmd containing newline
lib: procfs: add unittests
lib: procfs: prefix support for tests
lib: procfs: fix error message during test
lib: procfs: fix typo in argument specification
lib: procfs: clarify name of procfs_process_get_data_for()
Karel Zak [Mon, 2 Jan 2023 11:44:57 +0000 (12:44 +0100)]
Merge branch 'mmc' of https://github.com/t-8ch/util-linux
* 'mmc' of https://github.com/t-8ch/util-linux:
lsblk: add mmc transport
Karel Zak [Mon, 2 Jan 2023 11:44:23 +0000 (12:44 +0100)]
Merge branch 'address_bits' of https://github.com/t-8ch/util-linux
* 'address_bits' of https://github.com/t-8ch/util-linux:
setarch: use kernel address size if possible
sysfs: add helper for /sys/kernel/address_bits
Karel Zak [Mon, 2 Jan 2023 11:24:18 +0000 (12:24 +0100)]
Merge branch 'bst/hwclock-ret-param-get' of https://github.com/Bastian-Krause/util-linux
* 'bst/hwclock-ret-param-get' of https://github.com/Bastian-Krause/util-linux:
hwclock: fix return value on successful --param-get
Karel Zak [Mon, 2 Jan 2023 11:23:11 +0000 (12:23 +0100)]
Merge branch 'meson-debian' of https://github.com/zeha/util-linux
* 'meson-debian' of https://github.com/zeha/util-linux:
meson: install uuidd.rc with -Dsysvinit=enabled
meson: fix pkg-config name of libaudit
meson: fix build with -Dselinux=enabled
Karel Zak [Mon, 2 Jan 2023 11:22:11 +0000 (12:22 +0100)]
Merge branch 'misc-utils-rename-documentation' of https://github.com/ChickenProp/util-linux
* 'misc-utils-rename-documentation' of https://github.com/ChickenProp/util-linux:
rename.1: document edge cases.
Thomas Weißschuh [Mon, 26 Dec 2022 23:57:34 +0000 (23:57 +0000)]
libblkid: bsd: add checksum support
Thomas Weißschuh [Mon, 26 Dec 2022 23:07:58 +0000 (23:07 +0000)]
libblkid: sun: use generic checksum handling
Thomas Weißschuh [Mon, 26 Dec 2022 23:07:54 +0000 (23:07 +0000)]
libblkid: sgi: use generic checksum handling
Thomas Weißschuh [Mon, 26 Dec 2022 23:04:40 +0000 (23:04 +0000)]
libblkid: gpt: use generic checksum handling
Thomas Weißschuh [Sun, 25 Dec 2022 05:28:59 +0000 (05:28 +0000)]
Revert "tests: use KNOWN_FAIL for lsns/ioctl_ns"
The check introduced in
249ba69c introduced a proper feature check.
This reverts commit
857038d4512a5f2e9a1fd4a3d89c2c27eae456fd .
Thomas Weißschuh [Thu, 22 Dec 2022 23:54:41 +0000 (23:54 +0000)]
procfs: get_stat_nth: handle braces in process name
In procfs_process_get_stat_nth() we skip to the end of the process name
by looking for the ')' after it.
However if the process name itself contains a ')' then find that instead
of the correct one.
By searching the ')' from the end of the file we can make sure to always
find the correct one.
Link: https://www.openwall.com/lists/oss-security/2022/12/21/6
Thomas Weißschuh [Sat, 24 Dec 2022 16:53:32 +0000 (16:53 +0000)]
lib: procfs: add parsing cmd containing newline
Thomas Weißschuh [Sat, 24 Dec 2022 16:43:29 +0000 (16:43 +0000)]
lib: procfs: add unittests
Thomas Weißschuh [Sat, 24 Dec 2022 16:09:24 +0000 (16:09 +0000)]
lib: procfs: prefix support for tests
This will be used in the unitttests.
Thomas Weißschuh [Sat, 24 Dec 2022 16:32:50 +0000 (16:32 +0000)]
lib: procfs: fix error message during test
procfs_process_get_stat_nth() returns the error and does not set errno.
Thomas Weißschuh [Sat, 24 Dec 2022 16:06:41 +0000 (16:06 +0000)]
lib: procfs: fix typo in argument specification
Thomas Weißschuh [Fri, 23 Dec 2022 21:05:02 +0000 (21:05 +0000)]
lib: procfs: clarify name of procfs_process_get_data_for()
The previous name "procfs_process_get_line_for()" indicates that only a
single line would be read from the file.
In fact the function always returns the full file contents.
This behavior is necessary are various procfs files can contain
legitimate newlines.
Rename the function to match its behavior.
Milan Broz [Thu, 22 Dec 2022 22:26:33 +0000 (23:26 +0100)]
Update email.
This email no longer works.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Milan Broz [Thu, 22 Dec 2022 22:19:36 +0000 (23:19 +0100)]
lsblk: add revision output to --nvme list
This is similar to --scsi output now.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Milan Broz [Thu, 22 Dec 2022 22:18:38 +0000 (23:18 +0100)]
lsblk: read firmware revision from udev
This supports more device types like NVMEs.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Thomas Weißschuh [Wed, 21 Dec 2022 18:46:46 +0000 (18:46 +0000)]
lsblk: add mmc transport
Thomas Weißschuh [Wed, 21 Dec 2022 13:42:05 +0000 (13:42 +0000)]
setarch: use kernel address size if possible
If setarch is running as 32bit userspace on a 64bit kernel we should use
the kernel personality.
Thomas Weißschuh [Wed, 21 Dec 2022 13:39:35 +0000 (13:39 +0000)]
sysfs: add helper for /sys/kernel/address_bits
Frantisek Sumsal [Thu, 24 Nov 2022 09:34:54 +0000 (10:34 +0100)]
ci: build & test util-linux on Fedora Rawhide via Packit
Let's run at least the unit-tests on Fedora Rawhide via Packit, as it
supports a couple of alternative architectures (aarch64, ppc64le, s390x)
as well as i*86, which were source of issues in the past.
Bastian Krause [Wed, 21 Dec 2022 10:44:23 +0000 (11:44 +0100)]
hwclock: fix return value on successful --param-get
hwclock should return 0 on sucessful --param-get.
Fixes: 6097b12df ("hwclock: add --param-get option")
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Karel Zak [Wed, 21 Dec 2022 09:20:44 +0000 (10:20 +0100)]
Merge branch 'lsns-ioctl-enotty' of https://github.com/t-8ch/util-linux
* 'lsns-ioctl-enotty' of https://github.com/t-8ch/util-linux:
lsns: report unsupported ioctl
Karel Zak [Wed, 21 Dec 2022 09:19:17 +0000 (10:19 +0100)]
Merge branch 'mkswap/endianness' of https://github.com/t-8ch/util-linux
* 'mkswap/endianness' of https://github.com/t-8ch/util-linux:
mkswap: create files with specific endianness
mkswap: add tests
Karel Zak [Wed, 21 Dec 2022 09:16:34 +0000 (10:16 +0100)]
Merge branch 'fssize-swap' of https://github.com/t-8ch/util-linux
* 'fssize-swap' of https://github.com/t-8ch/util-linux:
blkid: swap: test big endian swapfile
libblkid: swap: report fssize
libblkid: swap: report fsblocksize
libblkid: swap: report endianess
Karel Zak [Wed, 21 Dec 2022 09:15:07 +0000 (10:15 +0100)]
Merge branch 'fssize' of https://github.com/t-8ch/util-linux
* 'fssize' of https://github.com/t-8ch/util-linux:
libblkid: iso9660: read block size from superblock
iso9660.h: avoid undefined signed integer shift
iso9660.h: use more correct function types
libblkid: ntfs: report fssize
libblkid: ubifs: report fssize
libblkid: f2fs: report fssize
libblkid: erofs: report fssize
libblkid: vfat: report fssize
Karel Zak [Wed, 21 Dec 2022 09:06:46 +0000 (10:06 +0100)]
Merge branch 'proc/byteorder' of https://github.com/t-8ch/util-linux
* 'proc/byteorder' of https://github.com/t-8ch/util-linux:
lscpu: add testcase for Linux 6.2 x86_64
tests: make mk-input.sh scripts executable
tests: add ts_check_native_byteorder
lscpu: test endianess
sysfs: sysfs_get_byteorder: add context parameter
lsfd: use runtime byteorder
lscpu: use runtime byteorder
sysfs: read runtime byteorder
Thomas Weißschuh [Thu, 15 Dec 2022 16:26:51 +0000 (16:26 +0000)]
lsns: report unsupported ioctl
Chris Hofstaedtler [Sun, 18 Dec 2022 18:42:04 +0000 (18:42 +0000)]
meson: install uuidd.rc with -Dsysvinit=enabled
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Chris Hofstaedtler [Sun, 18 Dec 2022 18:39:56 +0000 (18:39 +0000)]
meson: fix pkg-config name of libaudit
Fedora and Debian seem to use "audit", not "libaudit".
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Chris Hofstaedtler [Sun, 18 Dec 2022 18:55:01 +0000 (18:55 +0000)]
meson: fix build with -Dselinux=enabled
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Philip Hazelden [Sun, 18 Dec 2022 16:40:34 +0000 (16:40 +0000)]
rename.1: document edge cases.
Document the behaviour of an empty `expression` argument, and of `/` in
the `expression` and `replacement` arguments.
I also tried to make it slightly clearer that `-s` changes where a
symlink points, but doesn't change the thing that it points at.
Thomas Weißschuh [Thu, 15 Dec 2022 13:32:31 +0000 (13:32 +0000)]
mkswap: create files with specific endianness
Thomas Weißschuh [Thu, 15 Dec 2022 13:08:18 +0000 (13:08 +0000)]
mkswap: add tests
Thomas Weißschuh [Wed, 14 Dec 2022 01:04:45 +0000 (01:04 +0000)]
blkid: swap: test big endian swapfile
Thomas Weißschuh [Wed, 30 Nov 2022 03:17:19 +0000 (04:17 +0100)]
libblkid: iso9660: read block size from superblock
Thomas Weißschuh [Tue, 13 Dec 2022 02:40:02 +0000 (02:40 +0000)]
iso9660.h: avoid undefined signed integer shift
When the high bit in p[3] is set we would overflow our signed 4-byte
integer result value.
Force an unsigned type instead.
Thomas Weißschuh [Tue, 13 Dec 2022 02:38:27 +0000 (02:38 +0000)]
iso9660.h: use more correct function types
Thomas Weißschuh [Tue, 29 Nov 2022 03:26:02 +0000 (04:26 +0100)]
libblkid: swap: report fssize
Thomas Weißschuh [Wed, 14 Dec 2022 00:30:25 +0000 (00:30 +0000)]
libblkid: swap: report fsblocksize
Thomas Weißschuh [Wed, 14 Dec 2022 00:13:19 +0000 (00:13 +0000)]
libblkid: swap: report endianess
Thomas Weißschuh [Wed, 30 Nov 2022 03:49:04 +0000 (04:49 +0100)]
libblkid: ntfs: report fssize
Thomas Weißschuh [Wed, 30 Nov 2022 03:11:39 +0000 (04:11 +0100)]
libblkid: ubifs: report fssize
Thomas Weißschuh [Wed, 30 Nov 2022 02:38:16 +0000 (03:38 +0100)]
libblkid: f2fs: report fssize
Thomas Weißschuh [Wed, 30 Nov 2022 03:33:00 +0000 (04:33 +0100)]
libblkid: erofs: report fssize
Thomas Weißschuh [Tue, 29 Nov 2022 03:14:33 +0000 (04:14 +0100)]
libblkid: vfat: report fssize
Karel Zak [Tue, 13 Dec 2022 16:59:35 +0000 (17:59 +0100)]
build0sys: fix make dist
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 13 Dec 2022 15:46:42 +0000 (16:46 +0100)]
chsh: add -V, update usage()
* don't use deprecated -u in usage() (deprecated since
631a195412 , v2.30)
* use -V for --version; deprecate -v
* add info about deprecated options to the man page
Addresses: https://github.com/util-linux/util-linux/pull/1954
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 13 Dec 2022 15:41:34 +0000 (16:41 +0100)]
chfn: use -V for version
Let's use more compatible -V for --version and mark -v as deprecated.
Addresses: https://github.com/util-linux/util-linux/pull/1954
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 13 Dec 2022 15:15:00 +0000 (16:15 +0100)]
Merge branch 'master' of https://github.com/kraptor/util-linux
* 'master' of https://github.com/kraptor/util-linux:
tests: fix typo in comment
Karel Zak [Tue, 13 Dec 2022 15:14:03 +0000 (16:14 +0100)]
Merge branch 'ci/llvm' of https://github.com/t-8ch/util-linux
* 'ci/llvm' of https://github.com/t-8ch/util-linux:
ci: update llvm to version 15
libfdisk: remove unused variable ct
clang: ignore -Wunused-but-set-variable
build: warn about old-style definitions
lsblk: align function prototype
Karel Zak [Tue, 13 Dec 2022 15:10:08 +0000 (16:10 +0100)]
Merge branch 'shells.c' of https://github.com/t-8ch/util-linux
* 'shells.c' of https://github.com/t-8ch/util-linux:
meson: link shells.c into users of is_known_shell
meson: remove leftover explicit mentions of logindefs.c
Karel Zak [Tue, 13 Dec 2022 15:09:03 +0000 (16:09 +0100)]
Merge branch 'blkid-fvault2' of https://github.com/mbroz/util-linux
* 'blkid-fvault2' of https://github.com/mbroz/util-linux:
libblkid: Add detection of FileVault2 partitions
David Anes [Tue, 13 Dec 2022 08:55:03 +0000 (09:55 +0100)]
tests: fix typo in comment
Thomas Weißschuh [Mon, 12 Dec 2022 19:34:23 +0000 (19:34 +0000)]
ci: update llvm to version 15
Version 10 is not available from their apt repo anymore.
Update to the latest available version.
Thomas Weißschuh [Mon, 12 Dec 2022 21:07:31 +0000 (21:07 +0000)]
libfdisk: remove unused variable ct
Thomas Weißschuh [Mon, 12 Dec 2022 20:33:39 +0000 (20:33 +0000)]
clang: ignore -Wunused-but-set-variable
Thomas Weißschuh [Mon, 12 Dec 2022 20:11:56 +0000 (20:11 +0000)]
build: warn about old-style definitions
Thomas Weißschuh [Mon, 12 Dec 2022 19:54:59 +0000 (19:54 +0000)]
lsblk: align function prototype
Thomas Weißschuh [Mon, 12 Dec 2022 19:07:03 +0000 (19:07 +0000)]
meson: link shells.c into users of is_known_shell
Thomas Weißschuh [Mon, 12 Dec 2022 19:04:21 +0000 (19:04 +0000)]
meson: remove leftover explicit mentions of logindefs.c
This is now handled as part of the logindefs_c library.
Milan Broz [Mon, 12 Dec 2022 15:45:15 +0000 (16:45 +0100)]
libblkid: Add detection of FileVault2 partitions
FileVault is full disk encryption format based on Apple
Core Storage, used in older macOS versions.
This patch allows automatic detection of Core Storage partition
to be later used with existing cryptsetup support for FileVault2.
Note that we intentionally ignore generic Core Storage; only
specific configuration is detected as cs_fvault2 type here.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Seth Bromberger [Mon, 12 Dec 2022 14:23:40 +0000 (09:23 -0500)]
Update fstrim.8.adoc
The `-v` option is for "verbose", and the mountpoint is generally required if none of the "all" options are specified.
Karel Zak [Mon, 12 Dec 2022 09:05:04 +0000 (10:05 +0100)]
lib/shells: make sure line does not start with '#'
It's probably unnecessary, but better safe than sorry. The original
is_restricted_shell() from su(1) uses this check.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 12 Dec 2022 09:03:50 +0000 (10:03 +0100)]
Merge branch 'usr_etc_shells' of https://github.com/schubi2/util-linux
* 'usr_etc_shells' of https://github.com/schubi2/util-linux:
Supporting vendor given "shells" configuration file
David Anes [Mon, 12 Dec 2022 06:06:05 +0000 (07:06 +0100)]
tests: fix typo in comment
David Anes [Fri, 9 Dec 2022 17:09:31 +0000 (18:09 +0100)]
tests: allow paths in tests to contain '@' char
Tests fail when the build directory contains
'@' in its path, as its sent to 'sed' unescaped.
This patch allows to build in such environments,
which typically happen on automated systems (for
example, when building concurrently with Jenkins).
Karel Zak [Fri, 9 Dec 2022 10:28:25 +0000 (11:28 +0100)]
tests: use KNOWN_FAIL for lsns/ioctl_ns
It seems 32bit userspace on 64bit kernel return ENOTTY for
NS_GET_USERNS ioctl (for example when execute tests in mock
environment).
Addresses: https://github.com/util-linux/util-linux/pull/1924
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 8 Dec 2022 10:12:47 +0000 (11:12 +0100)]
hardlink: cleanup options
* add missing stuff to bash-completion
* reorder --help output
* reorder man page
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 8 Dec 2022 09:49:45 +0000 (10:49 +0100)]
hardlink: add --respect-dir
Fixes: https://github.com/util-linux/util-linux/issues/1942
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 7 Dec 2022 10:43:20 +0000 (11:43 +0100)]
blkdiscard: add extra exit code when device does not support discard
Fixes: https://github.com/util-linux/util-linux/issues/1941
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 7 Dec 2022 10:13:48 +0000 (11:13 +0100)]
bash-completion: add blkdiscard --quiet
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 7 Dec 2022 10:12:13 +0000 (11:12 +0100)]
blkdiscard: sort options
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 7 Dec 2022 10:11:08 +0000 (11:11 +0100)]
blkdiscard: add --quiet
Addresses: https://github.com/util-linux/util-linux/issues/1941
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 7 Dec 2022 09:17:07 +0000 (10:17 +0100)]
build-sys: add hint to have_pty check
Fixes: https://github.com/util-linux/util-linux/issues/1943
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 5 Dec 2022 11:51:03 +0000 (12:51 +0100)]
tests: add SPDX-License-Identifier to helper
The default util-linux license is GPL-2.0-or-later. The header is
missing in some files or quotation from the license is incomplete. It
seem the best is to use the License-Identifier header to make things
more obvious and readable for code analyzers, etc.
Fixes: https://github.com/util-linux/util-linux/issues/1932
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 5 Dec 2022 11:36:42 +0000 (12:36 +0100)]
ldattach: fix --intro-command and --pause
The long version of the command line options should not ignore arguments.
Fixes: https://github.com/util-linux/util-linux/issues/1940
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 5 Dec 2022 11:03:19 +0000 (12:03 +0100)]
libblkid: add BLKID_SUBLKS_FSINFO to docs
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 5 Dec 2022 10:57:13 +0000 (11:57 +0100)]
libblkid: cleanup definitions and add docs for return values
* make it possible to use #ifdef for the return values
* add docs for the return values
Addresses: https://github.com/util-linux/util-linux/issues/1939
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 2 Dec 2022 08:20:18 +0000 (09:20 +0100)]
libblkid: define probing return values
Don't use magic numbers in library and applications code.
Fixes: https://github.com/util-linux/util-linux/issues/1939
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 1 Dec 2022 15:40:57 +0000 (16:40 +0100)]
tests: be explicit with ext2 block size
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 1 Dec 2022 14:56:45 +0000 (15:56 +0100)]
Merge branch 'autotools/show-diff' of https://github.com/t-8ch/util-linux
* 'autotools/show-diff' of https://github.com/t-8ch/util-linux:
autotools: show test failure diff
Karel Zak [Thu, 1 Dec 2022 14:55:24 +0000 (15:55 +0100)]
Merge branch 'lsfd--fix-format-to-scan-maps' of https://github.com/masatake/util-linux
* 'lsfd--fix-format-to-scan-maps' of https://github.com/masatake/util-linux:
lsfd: consider 64bit addresses when scanning /proc/pid/map_files dir
Karel Zak [Thu, 1 Dec 2022 14:54:53 +0000 (15:54 +0100)]
Merge branch 'meson/econf' of https://github.com/t-8ch/util-linux
* 'meson/econf' of https://github.com/t-8ch/util-linux:
meson: logindefs.c: handle libeconf dependency
Karel Zak [Thu, 1 Dec 2022 14:08:19 +0000 (15:08 +0100)]
tests: add blkid --offset test
Signed-off-by: Karel Zak <kzak@redhat.com>
Thomas Weißschuh [Wed, 30 Nov 2022 04:57:12 +0000 (05:57 +0100)]
autotools: show test failure diff
This helps investigating issues, especially spurious errors only
happening during CI like the failure of "hardlink/options-maximum-size-8192"
Masatake YAMATO [Wed, 30 Nov 2022 05:55:32 +0000 (14:55 +0900)]
lsfd: consider 64bit addresses when scanning /proc/pid/map_files dir
Close #1930.
The original code assumed 48bit addresses. This assumption came
from linux running on x86_64. As reported in #1930, Linux on
sparc64 uses 64bit addresses.
Tested-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Thomas Weißschuh [Wed, 30 Nov 2022 04:30:31 +0000 (05:30 +0100)]
meson: logindefs.c: handle libeconf dependency
Stefan Schubert [Tue, 29 Nov 2022 15:55:04 +0000 (16:55 +0100)]
Supporting vendor given "shells" configuration file
Ian Kent [Thu, 24 Nov 2022 08:54:19 +0000 (16:54 +0800)]
libmount: use autofs mount hint to ignore autofs mount entries
Historically autofs mounts were not included in mount table listings.
This is the case in other SysV autofs implementations and was also
the case with Linux autofs.
But now that /etc/mtab is a symlink to the proc filesystem mount
table the autofs mount entries appear in the mount table on Linux.
Prior to the symlinking of /etc/mtab mount table it was sufficient
to call mount(2) and simply not update /etc/mtab to exclude autofs
mounts from mount listings.
Also, with this symlinking of /etc/mtab we have seen a shift in usage
toward using the proc mount tables directly.
But the autofs mount entries need to be retained when coming from the
proc file system for applications that need them (such as systemd) so
filtering out these entries within the kernel itself can't be done,
it needs be done in user space.
There are three reasons to omit the autofs mount entries.
One is that certain types of auto-mounts have an autofs mount for every
entry in their autofs mount map (autofs direct mounts) and these maps
can be quite large. This leads to mount table listings containing a lot
of unnecessary entries.
Also, this difference in behaviour between autofs implementations can
cause problems for applications that need to use the mount table and
expect autofs entries aren't present.
Lastly, there's very little that user space can do with autofs mount
entries since this must be left to the autofs mount owner, typically
the automount daemon. And it can also lead to attempts to access
automount managed paths resulting in mounts being triggered when they
aren't needed or mounts staying mounted for much longer thay they
need to be.
So the Linux autofs file system has been modified to accept a pseudo
mount option of "ignore" (as is used in other OS implementations) so
that user space utilities can use this as a hint to skip these autofs
entries on reading the mount table.
The Linux autofs automount daemon used getmntent(3) itself and has been
modified to use the proc file system directly so that it isn't affected
by the presence of the "ignore" mount option.
The use of the "ignore" mount option is opt-in by autofs users and a
configuration option has been added which defaults to not use the option
so if there are applications that need these entries, other than autofs
itself, they can be retained. Also, since this filtering is based on an
added mount option earlier versions of Linux autofs and other autofs file
system users will not use the option and so won't be affected by the change.
Changes in v2:
- make naming consistent with util-linux conventions.
- make ignoring autofs mount entries the default since it will only
have an effect if it has been enabled in the autofs configuration.
- drop patch to set ingore autofs mounts for mount(8) since it's now
default.
Signed-off-by: Ian Kent <raven@themaw.net>
Thomas Weißschuh [Tue, 29 Nov 2022 02:46:18 +0000 (03:46 +0100)]
libblkid: squashfs: report filesystem size
Thomas Weißschuh [Tue, 29 Nov 2022 02:44:11 +0000 (03:44 +0100)]
libblkid: squashfs: report block sizes
Thomas Weißschuh [Tue, 29 Nov 2022 02:41:37 +0000 (03:41 +0100)]
libblkid: squashfs: add more superblock fields
Also rename the existing fields to match the documentation.
We use the Version 4 fields because we will use those in a future
commit.
Field names taken from
https://dr-emann.github.io/squashfs/squashfs.html#_the_superblock