Karel Zak [Mon, 29 May 2023 09:29:19 +0000 (11:29 +0200)]
Merge branch 'mount/ntfs-segfault' of https://github.com/t-8ch/util-linux
* 'mount/ntfs-segfault' of https://github.com/t-8ch/util-linux:
mount: (tests) test mount helper with multiple filesystems
libmount: (tests) split helper tests
Karel Zak [Thu, 25 May 2023 09:48:24 +0000 (11:48 +0200)]
libmount: don't call hooks after mount.<type> helper
In case more filesystems are specified (or when libmount follows
/{etc,proc}/filesystems) then the library may try to use and
initialize the new API because for some filesystems, we need
exec(/sbin/mount.<type>) and for another fsopen().
The hooks that use the API have to smart and detect that the mount
operation was done in external /sbin/mount.<type> helper. And in this
case, the new API file descriptors must be ignored.
The exception is propagation flags, mount(8) can set the flags after
exec(/sbin/mount.<type>), for example, "mount -t ntfs --make-private".
Fixes: https://github.com/util-linux/util-linux/issues/2267 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 24 May 2023 09:41:59 +0000 (11:41 +0200)]
Merge branch 'enosys/arch-check' of https://github.com/t-8ch/util-linux
* 'enosys/arch-check' of https://github.com/t-8ch/util-linux:
enosys: add support for loongarch
enosys: only build if AUDIT_ARCH_NATIVE is defined
meson: require 0.57
enosys: split audit arch detection into dedicated header
enosys: add support for sparc
Karel Zak [Wed, 24 May 2023 09:41:42 +0000 (11:41 +0200)]
Merge branch 'lsfd--sysvipc-shmem' of https://github.com/masatake/util-linux
* 'lsfd--sysvipc-shmem' of https://github.com/masatake/util-linux:
tests: (lsfd) add a case for testing SOURCE column for SysV shmem mappings
tests: (mkfds) add a factory to make SysV shmem
lsfd: add tmpfs as source of sysvipc to the the nodev_table
lsfd: initialize pagesize in an earlier stage
lsfd: add "nsfs" to the nodev_table to fill SOURCE column for nsfs files
lsfd: add a helper function for adding a nodev to the nodev_table
lsfd: add a whitespace
lsfd: write more about nsfs in comment
Karel Zak [Tue, 23 May 2023 10:18:00 +0000 (12:18 +0200)]
Merge branch 'meson' of https://github.com/eworm-de/util-linux
* 'meson' of https://github.com/eworm-de/util-linux:
meson: install symlink for vigr man page
meson: include bash-completion for write
meson: include bash-completion for newgrp
Karel Zak [Tue, 23 May 2023 10:17:18 +0000 (12:17 +0200)]
Merge branch 'lsfd--mqueue' of https://github.com/masatake/util-linux
* 'lsfd--mqueue' of https://github.com/masatake/util-linux:
tests: (lsfd) add cases for POSIX Mqueue
tests: (mkfds) add mqueue factory
lsfd: fill ENDPOINTS column of POSIX Mqueue
lsfd: add a new type "mqueue", a type for POSIX Mqueue
Karel Zak [Tue, 23 May 2023 08:47:18 +0000 (10:47 +0200)]
mount: improve code readability
Static analyzers (e.g., Coverity) have a hard time understanding why
'optarg' is tested for NULL, and later in another place, code assumes
that it's non-NULL. For idmapping, the optarg is required.
Karel Zak [Mon, 22 May 2023 15:26:55 +0000 (17:26 +0200)]
libmount: don't call mount.<type> helper with usernames
This is v2.39 regression. The "user" mount option is internally
converted to "user=<name>", but this should not be exported to
the mount helpers.
The mount helper accepts the <name> only if specified in mount options
(cifs uses user=). The real username as generated by libmount is not
relevant in this case.
Karel Zak [Mon, 22 May 2023 11:42:48 +0000 (13:42 +0200)]
Merge branch 'agetty-creds' of https://github.com/DaanDeMeyer/util-linux
* 'agetty-creds' of https://github.com/DaanDeMeyer/util-linux:
Document new systemd credentials support for agetty and login
login: Initialize noauth from login.noauth credential
agetty: Load autologin user from agetty.autologin credential
Karel Zak [Mon, 22 May 2023 11:32:53 +0000 (13:32 +0200)]
Merge branch 'ci/openwrt' of https://github.com/t-8ch/util-linux
* 'ci/openwrt' of https://github.com/t-8ch/util-linux:
ci: add OpenWrt SDK based CI jobs
enosys: provide a nicer build message for syscalls.h generation
libsmartcols: (samples): fix format truncation warning
test_uuidd: make pthread_t formatting more robust
mkfs.minix: handle 64bit time on 32bit system
enosys: add support for MIPS, PowerPC and ARC
enosys: include sys/syscall.h
Karel Zak [Mon, 22 May 2023 10:39:59 +0000 (12:39 +0200)]
Merge branch 'lsfd--eventfd' of https://github.com/masatake/util-linux
* 'lsfd--eventfd' of https://github.com/masatake/util-linux:
test_mkfds: avoid "ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’"
tests: (lsfd) add cases for eventfd
tests: (mkfds) add eventfd factory
tests: (mkfds) provide the way to declare the number of extra printing values
tests: (mkfds) print a whitespace only when the running factory has "report" method
lsfd: fill ENDPOINTS column for eventfd
lsfd: add a helper macro, foreach_endpoint
lsfd: add a helper function, init_endpoint
lsfd: add a helper function, add_endpoint
lsfd: add a helper function, new_ipc
lsfd: add a back pointer as a member of anon_eventfd_data
lsfd: move a local variable to a narrower scope
lsfd: add EVENTFD.ID column
lsfd: delete redundant parentheses surrounding return value
ldfd: delete unnecessary ';'
lsfd: choose anon_ops declarative way
Thomas Weißschuh [Fri, 19 May 2023 15:34:00 +0000 (17:34 +0200)]
libsmartcols: (samples): fix format truncation warning
As this is only an example and the needed memory is not much just
hardcode a large enough number.
The previously computed value was wrong anyways.
libsmartcols/samples/continuous.c: In function 'main':
libsmartcols/samples/continuous.c:110:61: error: '%3d' directive output may be truncated writing between 3 and 11 bytes into a region of size between 0 and 7 [-Werror=format-truncation=]
110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
| ^~~
libsmartcols/samples/continuous.c:110:25: note: 'snprintf' output between 11 and 333 bytes into a destination of size 12
110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111 | done ? 100 : (int)(diff / (TIME_PERIOD / 100.0)));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libsmartcols/samples/continuous.c:110:61: error: '%3d' directive output may be truncated writing 3 bytes into a region of size between 0 and 7 [-Werror=format-truncation=]
110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
| ^~~
libsmartcols/samples/continuous.c:110:25: note: 'snprintf' output between 11 and 325 bytes into a destination of size 12
110 | snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111 | done ? 100 : (int)(diff / (TIME_PERIOD / 100.0)));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~