]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
10 months agolibmount: support bind symlink over symlink
Karel Zak [Thu, 26 Sep 2024 12:44:36 +0000 (14:44 +0200)] 
libmount: support bind symlink over symlink

The new mount API allows for the use of AT_SYMLINK_NOFOLLOW when
opening a mount tree (aka the "mount source" for libmount).
As a result, you can now replace one symlink with another by using a
bind mount.

By default, the mount(8) command follows symlinks and canonicalizes
all paths. However, with the X-mount.nocanonicalize=source option, it
is possible to open the symlink itself. Similarly, with the
X-mount.nocanonicalize=target option, the path of the mount point can
be kept as the original symlink. (Using X-mount.nocanonicalize without
any argument works for both the "source" and "target".)

Example:

 # file /mnt/test/symlinkA /mnt/test/symlinkB
 /mnt/test/symlinkA: symbolic link to /mnt/test/fileA
 /mnt/test/symlinkB: symbolic link to /mnt/test/fileB

 # strace -e open_tree,move_mount \
   ./mount --bind -o X-mount.nocanonicalize /mnt/test/symlinkA /mnt/test/symlinkB
 ...
 open_tree(AT_FDCWD, "/mnt/test/symlinkA", OPEN_TREE_CLONE|OPEN_TREE_CLOEXEC|AT_SYMLINK_NOFOLLOW) = 3
 move_mount(3, "", AT_FDCWD, "/mnt/test/symlinkB", MOVE_MOUNT_F_EMPTY_PATH) = 0

 # ls -la  /mnt/test/symlinkB
 lrwxrwxrwx 1 root root 15 Sep 26 13:41 /mnt/test/symlinkB -> /mnt/test/fileA

The result is that 'symlinkB' is still a symlink, but it now points to
a different file.

This commit also modifies umount(8) because it does not work with
symlinks by default. The solution is to call umount2(UMOUNT_NOFOLLOW)
for symlinks after a failed regular umount(). For example:

 # strace -e umount,umount2 \
   ./umount /mnt/test/symlinkB
 ...
 umount2("/mnt/test/symlinkB", 0)        = -1 EINVAL (Invalid argument)
 umount2("/mnt/test/symlinkB", UMOUNT_NOFOLLOW) = 0

Signed-off-by: Karel Zak <kzak@redhat.com>
10 months agolibmount: add X-mount.nocanonicalize[=source|target]
Karel Zak [Thu, 19 Sep 2024 09:13:22 +0000 (11:13 +0200)] 
libmount: add X-mount.nocanonicalize[=source|target]

The new kernel mount API can bind-mount over a symlink. However, this
feature does not work with libmount because it canonicalizes all paths
by default. A possible workaround is to use the --no-canonicalize
option on the mount(8) command line, but this is a heavy-handed
solution as it disables all conversions for all paths and tags (such
as LABEL=) and fstab processing.

This commit introduces the X-mount.nocanonicalize userspace mount
option to control canonicalization. It only affects paths used for
mounting and does not affect tags and searching in fstab. Additionally,
this setting possible to use in fstab.

If the optional argument [=source|target] is not specified, then paths
canonicalization is disabled for both the source and target paths.

Adresses: https://github.com/util-linux/util-linux/issues/2370
Signed-off-by: Karel Zak <kzak@redhat.com>
10 months agoMerge branch 'test_mkfds--fix-typos' of https://github.com/masatake/util-linux
Karel Zak [Tue, 24 Sep 2024 10:39:35 +0000 (12:39 +0200)] 
Merge branch 'test_mkfds--fix-typos' of https://github.com/masatake/util-linux

* 'test_mkfds--fix-typos' of https://github.com/masatake/util-linux:
  tests: (test_mkfds) fix the way to detect errors in fork(2)

10 months agoMerge branch 'master' of https://github.com/hramrach/util-linux
Karel Zak [Tue, 24 Sep 2024 10:38:47 +0000 (12:38 +0200)] 
Merge branch 'master' of https://github.com/hramrach/util-linux

* 'master' of https://github.com/hramrach/util-linux:
  partx: Fix example in man page

10 months agobash-completion: add nsenter --net-socket
Karel Zak [Tue, 24 Sep 2024 10:34:17 +0000 (12:34 +0200)] 
bash-completion: add nsenter --net-socket

Signed-off-by: Karel Zak <kzak@redhat.com>
10 months agoMerge branch 'sock-netns' of https://github.com/0x7f454c46/util-linux
Karel Zak [Tue, 24 Sep 2024 10:31:39 +0000 (12:31 +0200)] 
Merge branch 'sock-netns' of https://github.com/0x7f454c46/util-linux

* 'sock-netns' of https://github.com/0x7f454c46/util-linux:
  lsns: List network namespaces that are held by a socket
  lsfd: Gather information on target socket's net namespace
  nsenter: Provide an option to join target process's socket net namespace

10 months agoMerge branch 'patch-2' of https://github.com/firasuke/util-linux
Karel Zak [Tue, 24 Sep 2024 10:28:59 +0000 (12:28 +0200)] 
Merge branch 'patch-2' of https://github.com/firasuke/util-linux

* 'patch-2' of https://github.com/firasuke/util-linux:
  Fix typos in TODO

10 months agoMerge branch 'patch-1' of https://github.com/firasuke/util-linux
Karel Zak [Tue, 24 Sep 2024 10:28:37 +0000 (12:28 +0200)] 
Merge branch 'patch-1' of https://github.com/firasuke/util-linux

* 'patch-1' of https://github.com/firasuke/util-linux:
  Update description of --disable-poman in configure.ac

10 months agoCI: Downgrade checkout version for compat build
Michal Suchanek [Tue, 24 Sep 2024 09:05:59 +0000 (11:05 +0200)] 
CI: Downgrade checkout version for compat build

The current checkout action does not run on Ubuntu 18.04

/usr/bin/docker exec  90a3de3652fb2e69b0cf70fc8567dba6b1a25bf1a6645236d19bb6f1486c6158 sh -c "cat /etc/*release | grep ^ID"
/__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)

Fixes: #3215
10 months agopartx: Fix example in man page
Michal Suchanek [Tue, 24 Sep 2024 07:19:39 +0000 (09:19 +0200)] 
partx: Fix example in man page

The example is:

  partx -d --nr :-1 /dev/sdd
  Removes the last partition on _/dev/sdd_.

The documentation says:

           M:
               Specifies the lower limit only (e.g. --nr 2:).

           :N
               Specifies the upper limit only (e.g. --nr :4).

In the above example the lower limit is not set and the upper is set to
the last partition, meaning all partitions. The lower limit should be
set instead.

  partx -d --nr -1: /dev/sdd

10 months agolsns: List network namespaces that are held by a socket
Dmitry Safonov [Wed, 18 Sep 2024 17:48:54 +0000 (18:48 +0100)] 
lsns: List network namespaces that are held by a socket

While parsing process's fds, check the network namespace of the socket.
That will provide fuller list of namespaces in the system.

Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
10 months agolsfd: Gather information on target socket's net namespace
Dmitry Safonov [Mon, 16 Sep 2024 23:18:12 +0000 (00:18 +0100)] 
lsfd: Gather information on target socket's net namespace

A sample of the output before (with SOCK.NETNS):
COMMAND     PID USER  ASSOC  XMODE TYPE SOURCE MNTID      INODE NAME                                                                                SOCK.NETNS
[..]
> tmp_ipv4 114075 root      0 rw----  CHR  pts:7    27         10 /dev/pts/7
> tmp_ipv4 114075 root      1 rw----  CHR  pts:7    27         10 /dev/pts/7
> tmp_ipv4 114075 root      2 rw----  CHR  pts:7    27         10 /dev/pts/7
> tmp_ipv4 114075 root      3 r-----  REG   nsfs     3 4026531840 net:[4026531840]
> tmp_ipv4 114075 root      4 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root      5 r-----  REG   nsfs     3 4026532864 net:[4026532864]
> tmp_ipv4 114075 root      6 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root      7 r-----  REG   nsfs     3 4026532947 net:[4026532947]
> tmp_ipv4 114075 root      8 rw----  TCP sockfs    10     100750 state=listen laddr=10.0.254.1:7010                                                  4026532947
> tmp_ipv4 114075 root      9 r-----  REG   nsfs     3 4026533109 net:[4026533109]
> tmp_ipv4 114075 root     10 rw----  TCP sockfs    10     100763 socket:[100763]
> tmp_ipv4 114075 root     11 rw----  TCP sockfs    10     100776 state=listen laddr=10.0.254.1:7012                                                  4026533109
> tmp_ipv4 114075 root     12 r-----  REG   nsfs     3 4026533271 net:[4026533271]
> tmp_ipv4 114075 root     13 rw----  TCP sockfs    10     100789 socket:[100789]
> tmp_ipv4 114075 root     14 rw----  TCP sockfs    10     100802 state=listen laddr=10.0.254.1:7014                                                  4026533271
> tmp_ipv4 114075 root     15 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     16 r-----  REG   nsfs     3 4026532783 net:[4026532783]
> tmp_ipv4 114075 root     17 rw----  TCP sockfs    10     100815 state=listen laddr=10.0.254.1:7015                                                  4026532783
> tmp_ipv4 114075 root     18 r-----  REG   nsfs     3 4026533511 net:[4026533511]
> tmp_ipv4 114075 root     19 rw----  TCP sockfs    10     100828 socket:[100828]
> tmp_ipv4 114075 root     20 rw----  TCP sockfs    10     100841 state=listen laddr=10.0.254.1:7017                                                  4026533511
> tmp_ipv4 114075 root     21 r-----  REG   nsfs     3 4026533673 net:[4026533673]
> tmp_ipv4 114075 root     22 rw----  TCP sockfs    10     100854 socket:[100854]
> tmp_ipv4 114075 root     23 rw----  TCP sockfs    10     100867 state=listen laddr=10.0.254.1:7019                                                  4026533673
> tmp_ipv4 114075 root     24 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     25 r-----  REG   nsfs     3 4026533754 net:[4026533754]
> tmp_ipv4 114075 root     26 rw----  TCP sockfs    10     100880 state=listen laddr=10.0.254.1:7020                                                  4026533754
> tmp_ipv4 114075 root     27 r-----  REG   nsfs     3 4026532504 net:[4026532504]
> tmp_ipv4 114075 root     28 rw----  TCP sockfs    10     100893 socket:[100893]
> tmp_ipv4 114075 root     29 rw----  TCP sockfs    10     100906 state=listen laddr=10.0.254.1:7022                                                  4026532504
> tmp_ipv4 114075 root     30 r-----  REG   nsfs     3 4026533999 net:[4026533999]
> tmp_ipv4 114075 root     31 rw----  TCP sockfs    10     100919 socket:[100919]
> tmp_ipv4 114075 root     32 rw----  TCP sockfs    10     100932 state=listen laddr=10.0.254.1:7024                                                  4026533999
> tmp_ipv4 114075 root     33 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     34 r-----  REG   nsfs     3 4026534080 net:[4026534080]
> tmp_ipv4 114075 root     35 rw----  TCP sockfs    10     100945 state=listen laddr=10.0.254.1:7025                                                  4026534080
> tmp_ipv4 114075 root     36 r-----  REG   nsfs     3 4026534242 net:[4026534242]
> tmp_ipv4 114075 root     37 rw----  TCP sockfs    10     100958 socket:[100958]
> tmp_ipv4 114075 root     38 rw----  TCP sockfs    10     100971 state=listen laddr=10.0.254.1:7027                                                  4026534242
> tmp_ipv4 114075 root     39 r-----  REG   nsfs     3 4026534404 net:[4026534404]
> tmp_ipv4 114075 root     40 rw----  TCP sockfs    10     100984 socket:[100984]
> tmp_ipv4 114075 root     41 rw----  TCP sockfs    10     100997 state=listen laddr=10.0.254.1:7029                                                  4026534404
> tmp_ipv4 114075 root     42 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     43 r-----  REG   nsfs     3 4026534484 net:[4026534484]
> tmp_ipv4 114075 root     44 rw----  TCP sockfs    10     101010 state=listen laddr=10.0.254.1:7030                                                  4026534484
> tmp_ipv4 114075 root     45 r-----  REG   nsfs     3 4026534646 net:[4026534646]
> tmp_ipv4 114075 root     46 rw----  TCP sockfs    10     101023 socket:[101023]
> tmp_ipv4 114075 root     47 rw----  TCP sockfs    10     101036 state=listen laddr=10.0.254.1:7032                                                  4026534646
> tmp_ipv4 114075 root     48 r-----  REG   nsfs     3 4026534808 net:[4026534808]
> tmp_ipv4 114075 root     49 rw----  TCP sockfs    10     101049 socket:[101049]
> tmp_ipv4 114075 root     50 rw----  TCP sockfs    10     101062 state=listen laddr=10.0.254.1:7034                                                  4026534808
> tmp_ipv4 114075 root     51 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     52 r-----  REG   nsfs     3 4026534889 net:[4026534889]
> tmp_ipv4 114075 root     53 rw----  TCP sockfs    10     101075 state=listen laddr=10.0.254.1:7035                                                  4026534889
> tmp_ipv4 114075 root     54 r-----  REG   nsfs     3 4026535051 net:[4026535051]
> tmp_ipv4 114075 root     55 rw----  TCP sockfs    10     101088 socket:[101088]
> tmp_ipv4 114075 root     56 rw----  TCP sockfs    10     101101 state=listen laddr=10.0.254.1:7037                                                  4026535051
> tmp_ipv4 114075 root     57 r-----  REG   nsfs     3 4026535213 net:[4026535213]
> tmp_ipv4 114075 root     58 rw----  TCP sockfs    10     101114 socket:[101114]
> tmp_ipv4 114075 root     59 rw----  TCP sockfs    10     101127 state=listen laddr=10.0.254.1:7039                                                  4026535213
> tmp_ipv4 114075 root     60 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     61 r-----  REG   nsfs     3 4026535294 net:[4026535294]
> tmp_ipv4 114075 root     62 rw----  TCP sockfs    10     101140 state=listen laddr=10.0.254.1:7040                                                  4026535294
[..]

A sample of the output after:
> COMMAND     PID USER  ASSOC  XMODE TYPE SOURCE MNTID      INODE NAME                                                                                SOCK.NETNS
[..]
> tmp_ipv4 114075 root      0 rw----  CHR  pts:7    27         10 /dev/pts/7
> tmp_ipv4 114075 root      1 rw----  CHR  pts:7    27         10 /dev/pts/7
> tmp_ipv4 114075 root      2 rw----  CHR  pts:7    27         10 /dev/pts/7
> tmp_ipv4 114075 root      3 r-----  REG   nsfs     3 4026531840 net:[4026531840]
> tmp_ipv4 114075 root      4 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root      5 r-----  REG   nsfs     3 4026532864 net:[4026532864]
> tmp_ipv4 114075 root      6 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root      7 r-----  REG   nsfs     3 4026532947 net:[4026532947]
> tmp_ipv4 114075 root      8 rw----  TCP sockfs    10     100750 state=listen laddr=10.0.254.1:7010                                                  4026532947
> tmp_ipv4 114075 root      9 r-----  REG   nsfs     3 4026533109 net:[4026533109]
> tmp_ipv4 114075 root     10 rw----  TCP sockfs    10     100763 state=listen laddr=10.0.254.1:7011                                                  4026533028
> tmp_ipv4 114075 root     11 rw----  TCP sockfs    10     100776 state=listen laddr=10.0.254.1:7012                                                  4026533109
> tmp_ipv4 114075 root     12 r-----  REG   nsfs     3 4026533271 net:[4026533271]
> tmp_ipv4 114075 root     13 rw----  TCP sockfs    10     100789 state=listen laddr=10.0.254.1:7013                                                  4026533190
> tmp_ipv4 114075 root     14 rw----  TCP sockfs    10     100802 state=listen laddr=10.0.254.1:7014                                                  4026533271
> tmp_ipv4 114075 root     15 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     16 r-----  REG   nsfs     3 4026532783 net:[4026532783]
> tmp_ipv4 114075 root     17 rw----  TCP sockfs    10     100815 state=listen laddr=10.0.254.1:7015                                                  4026532783
> tmp_ipv4 114075 root     18 r-----  REG   nsfs     3 4026533511 net:[4026533511]
> tmp_ipv4 114075 root     19 rw----  TCP sockfs    10     100828 state=listen laddr=10.0.254.1:7016                                                  4026533430
> tmp_ipv4 114075 root     20 rw----  TCP sockfs    10     100841 state=listen laddr=10.0.254.1:7017                                                  4026533511
> tmp_ipv4 114075 root     21 r-----  REG   nsfs     3 4026533673 net:[4026533673]
> tmp_ipv4 114075 root     22 rw----  TCP sockfs    10     100854 state=listen laddr=10.0.254.1:7018                                                  4026533592
> tmp_ipv4 114075 root     23 rw----  TCP sockfs    10     100867 state=listen laddr=10.0.254.1:7019                                                  4026533673
> tmp_ipv4 114075 root     24 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     25 r-----  REG   nsfs     3 4026533754 net:[4026533754]
> tmp_ipv4 114075 root     26 rw----  TCP sockfs    10     100880 state=listen laddr=10.0.254.1:7020                                                  4026533754
> tmp_ipv4 114075 root     27 r-----  REG   nsfs     3 4026532504 net:[4026532504]
> tmp_ipv4 114075 root     28 rw----  TCP sockfs    10     100893 state=listen laddr=10.0.254.1:7021                                                  4026533835
> tmp_ipv4 114075 root     29 rw----  TCP sockfs    10     100906 state=listen laddr=10.0.254.1:7022                                                  4026532504
> tmp_ipv4 114075 root     30 r-----  REG   nsfs     3 4026533999 net:[4026533999]
> tmp_ipv4 114075 root     31 rw----  TCP sockfs    10     100919 state=listen laddr=10.0.254.1:7023                                                  4026533918
> tmp_ipv4 114075 root     32 rw----  TCP sockfs    10     100932 state=listen laddr=10.0.254.1:7024                                                  4026533999
> tmp_ipv4 114075 root     33 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     34 r-----  REG   nsfs     3 4026534080 net:[4026534080]
> tmp_ipv4 114075 root     35 rw----  TCP sockfs    10     100945 state=listen laddr=10.0.254.1:7025                                                  4026534080
> tmp_ipv4 114075 root     36 r-----  REG   nsfs     3 4026534242 net:[4026534242]
> tmp_ipv4 114075 root     37 rw----  TCP sockfs    10     100958 state=listen laddr=10.0.254.1:7026                                                  4026534161
> tmp_ipv4 114075 root     38 rw----  TCP sockfs    10     100971 state=listen laddr=10.0.254.1:7027                                                  4026534242
> tmp_ipv4 114075 root     39 r-----  REG   nsfs     3 4026534404 net:[4026534404]
> tmp_ipv4 114075 root     40 rw----  TCP sockfs    10     100984 state=listen laddr=10.0.254.1:7028                                                  4026534323
> tmp_ipv4 114075 root     41 rw----  TCP sockfs    10     100997 state=listen laddr=10.0.254.1:7029                                                  4026534404
> tmp_ipv4 114075 root     42 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     43 r-----  REG   nsfs     3 4026534484 net:[4026534484]
> tmp_ipv4 114075 root     44 rw----  TCP sockfs    10     101010 state=listen laddr=10.0.254.1:7030                                                  4026534484
> tmp_ipv4 114075 root     45 r-----  REG   nsfs     3 4026534646 net:[4026534646]
> tmp_ipv4 114075 root     46 rw----  TCP sockfs    10     101023 state=listen laddr=10.0.254.1:7031                                                  4026534565
> tmp_ipv4 114075 root     47 rw----  TCP sockfs    10     101036 state=listen laddr=10.0.254.1:7032                                                  4026534646
> tmp_ipv4 114075 root     48 r-----  REG   nsfs     3 4026534808 net:[4026534808]
> tmp_ipv4 114075 root     49 rw----  TCP sockfs    10     101049 state=listen laddr=10.0.254.1:7033                                                  4026534727
> tmp_ipv4 114075 root     50 rw----  TCP sockfs    10     101062 state=listen laddr=10.0.254.1:7034                                                  4026534808
> tmp_ipv4 114075 root     51 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     52 r-----  REG   nsfs     3 4026534889 net:[4026534889]
> tmp_ipv4 114075 root     53 rw----  TCP sockfs    10     101075 state=listen laddr=10.0.254.1:7035                                                  4026534889
> tmp_ipv4 114075 root     54 r-----  REG   nsfs     3 4026535051 net:[4026535051]
> tmp_ipv4 114075 root     55 rw----  TCP sockfs    10     101088 state=listen laddr=10.0.254.1:7036                                                  4026534970
> tmp_ipv4 114075 root     56 rw----  TCP sockfs    10     101101 state=listen laddr=10.0.254.1:7037                                                  4026535051
> tmp_ipv4 114075 root     57 r-----  REG   nsfs     3 4026535213 net:[4026535213]
> tmp_ipv4 114075 root     58 rw----  TCP sockfs    10     101114 state=listen laddr=10.0.254.1:7038                                                  4026535132
> tmp_ipv4 114075 root     59 rw----  TCP sockfs    10     101127 state=listen laddr=10.0.254.1:7039                                                  4026535213
> tmp_ipv4 114075 root     60 r-----  REG   nsfs     3 4026532537 net:[4026532537]
> tmp_ipv4 114075 root     61 r-----  REG   nsfs     3 4026535294 net:[4026535294]
> tmp_ipv4 114075 root     62 rw----  TCP sockfs    10     101140 state=listen laddr=10.0.254.1:7040                                                  4026535294
[..]

Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
10 months agonsenter: Provide an option to join target process's socket net namespace
Dmitry Safonov [Fri, 13 Sep 2024 22:29:55 +0000 (23:29 +0100)] 
nsenter: Provide an option to join target process's socket net namespace

The network namespace of a socket can be different from the target
process. Previously there were some userspace issues where a
net-namespace was held alive by a socket leak. For this purpose Arista's
linux kernel has a patch to provide socket => netns map by procfs pid/fd
directory links.

Add nsenter option to join the network namespace of a target process'
socket.

Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
10 months agoFix typos in TODO
Firas Khalil Khana [Mon, 23 Sep 2024 20:41:01 +0000 (23:41 +0300)] 
Fix typos in TODO

10 months agoUpdate description of --disable-poman in configure.ac
Firas Khalil Khana [Mon, 23 Sep 2024 18:17:42 +0000 (21:17 +0300)] 
Update description of --disable-poman in configure.ac

10 months agoautotools: add Libs.private to uuid.pc
Karel Zak [Mon, 23 Sep 2024 10:01:40 +0000 (12:01 +0200)] 
autotools: add Libs.private to uuid.pc

Addresses: https://github.com/util-linux/util-linux/issues/3210
Signed-off-by: Karel Zak <kzak@redhat.com>
10 months agoMerge branch 'lsns--dont-close--1' of https://github.com/masatake/util-linux
Karel Zak [Mon, 23 Sep 2024 09:23:38 +0000 (11:23 +0200)] 
Merge branch 'lsns--dont-close--1' of https://github.com/masatake/util-linux

* 'lsns--dont-close--1' of https://github.com/masatake/util-linux:
  lsns: don't call close(2) if unnecessary

10 months agoMerge branch 'test_mkfds--describing-return-values' of https://github.com/masatake...
Karel Zak [Mon, 23 Sep 2024 09:21:17 +0000 (11:21 +0200)] 
Merge branch 'test_mkfds--describing-return-values' of https://github.com/masatake/util-linux

* 'test_mkfds--describing-return-values' of https://github.com/masatake/util-linux:
  test: (test_mkfds) add -O option for describing output values

10 months agomeson: don't install getopt examples if disabled
Rosen Penev [Sun, 22 Sep 2024 18:54:46 +0000 (11:54 -0700)] 
meson: don't install getopt examples if disabled

No need to do so.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
10 months agotest: (test_mkfds) add -O option for describing output values
Masatake YAMATO [Fri, 20 Sep 2024 21:11:36 +0000 (06:11 +0900)] 
test: (test_mkfds) add -O option for describing output values

Some factories prints some extra values in addition to the pid of
the process opening file descriptors.

Unlike parameters, test_mkfds didn't provide the way to explain
the extra values. The new option --output-values/-O provies it.

Example output:

  $ ./test_mkfds -O eventfd
  NTH DESCRIPTION
  0 the pid owning the file descriptor(s)
  1 the pid of child process

  $ ./test_mkfds -O cdev-tun
  NTH DESCRIPTION
  0 the pid owning the file descriptor(s)
  1 the network device name

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 months agolsns: don't call close(2) if unnecessary
Masatake YAMATO [Thu, 19 Sep 2024 16:15:11 +0000 (01:15 +0900)] 
lsns: don't call close(2) if unnecessary

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 months agotests: (test_mkfds) fix the way to detect errors in fork(2)
Masatake YAMATO [Wed, 18 Sep 2024 17:36:53 +0000 (02:36 +0900)] 
tests: (test_mkfds) fix the way to detect errors in fork(2)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 months agoMerge branch 'PR/sfdisk-discard' of https://github.com/karelzak/util-linux-work
Karel Zak [Wed, 18 Sep 2024 08:29:47 +0000 (10:29 +0200)] 
Merge branch 'PR/sfdisk-discard' of https://github.com/karelzak/util-linux-work

* 'PR/sfdisk-discard' of https://github.com/karelzak/util-linux-work:
  sfdisk: add --discard-free
  include/blkdev: share BLKDISCARD macros

10 months agobuild(deps): bump actions/checkout from 1 to 4
dependabot[bot] [Thu, 6 Jun 2024 07:37:46 +0000 (07:37 +0000)] 
build(deps): bump actions/checkout from 1 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 1 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v1...v4)

10 months agoMerge branch 'look/fix-completion' of https://github.com/ziyao233/util-linux
Karel Zak [Tue, 17 Sep 2024 11:57:19 +0000 (13:57 +0200)] 
Merge branch 'look/fix-completion' of https://github.com/ziyao233/util-linux

* 'look/fix-completion' of https://github.com/ziyao233/util-linux:
  bash-completion: look: rewrite completion logic

10 months agosfdisk: add --discard-free
Karel Zak [Mon, 16 Sep 2024 12:50:43 +0000 (14:50 +0200)] 
sfdisk: add --discard-free

Why do we need this? It can be difficult for end-users to discard
unpartitioned areas using blkdiscard, as it requires using fdisk to
obtain a list of free areas and then using blkdiscard with the correct
--offset and --length options. It is less risky for end-users to use
(s)fdisk, as they have a better understanding of the disk layout.

Addresses: https://github.com/util-linux/util-linux/issues/2804
Signed-off-by: Karel Zak <kzak@redhat.com>
10 months agoinclude/blkdev: share BLKDISCARD macros
Karel Zak [Mon, 16 Sep 2024 12:27:15 +0000 (14:27 +0200)] 
include/blkdev: share BLKDISCARD macros

Move BLKDISCARD* ioctl identifiers to the include/blkdev.h file to
prevent duplicate definitions.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 months agoci: use upload action v4
Thomas Weißschuh [Mon, 16 Sep 2024 17:55:46 +0000 (19:55 +0200)] 
ci: use upload action v4

The used v1 is deprecated and its usage generates errors.
Use the current v4 instead.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
10 months agobash-completion: look: rewrite completion logic
Yao Zi [Mon, 9 Sep 2024 18:08:30 +0000 (18:08 +0000)] 
bash-completion: look: rewrite completion logic

look(1) opens /usr/share/dict/words as dictionary by default. Doing TAB
completion for look(1) without the dictionary installed will result in
popups like

$ look look: /usr/share/dict/words: No such file or directory

messing up the terminal.

As /usr/share/dict/words is not shipped by quite a few distros nowadays
and it should not be listed as a hard dependency of util-linux, we make
sure the dictionary exists before calling look(1) when doing completion,
avoiding these error messages.

When completing the word without anything specified on the command line,
alphabets and numbers instead of all words are listed as a hint, for
better interacting experience.

Signed-off-by: Yao Zi <ziyao@disroot.org>
10 months agoMerge branch 'PR/hwclock-param' of github.com:karelzak/util-linux-work
Karel Zak [Tue, 10 Sep 2024 10:11:19 +0000 (12:11 +0200)] 
Merge branch 'PR/hwclock-param' of github.com:karelzak/util-linux-work

* 'PR/hwclock-param' of github.com:karelzak/util-linux-work:
  hwclock: add -param-index

10 months agolsblk: update bash-completion/lsblk
Karel Zak [Mon, 9 Sep 2024 10:02:34 +0000 (12:02 +0200)] 
lsblk: update bash-completion/lsblk

* update columns list
* add --properties-by

Signed-off-by: Karel Zak <kzak@redhat.com>
10 months agolsblk: update --help
Karel Zak [Mon, 9 Sep 2024 09:45:48 +0000 (11:45 +0200)] 
lsblk: update --help

* Add missing "--properties-by" parameter.
* Shorten some strings.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agohwclock: add -param-index
Karel Zak [Thu, 5 Sep 2024 10:23:15 +0000 (12:23 +0200)] 
hwclock: add -param-index

Addresses: https://github.com/util-linux/util-linux/issues/3180
Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoMerge branch 'sg' of https://github.com/tmpgnh/util-linux
Karel Zak [Thu, 5 Sep 2024 09:59:57 +0000 (11:59 +0200)] 
Merge branch 'sg' of https://github.com/tmpgnh/util-linux

* 'sg' of https://github.com/tmpgnh/util-linux:
  Optionally execute a program after group change

11 months agoMerge branch 'PR/env-whitelist' of github.com:karelzak/util-linux-work
Karel Zak [Thu, 5 Sep 2024 08:18:38 +0000 (10:18 +0200)] 
Merge branch 'PR/env-whitelist' of github.com:karelzak/util-linux-work

* 'PR/env-whitelist' of github.com:karelzak/util-linux-work:
  login: add LOGIN_ENV_SAFELIST /etc/login.def item
  su: use lib/env.c for --whitelist-environment
  env: add env_list_add_getenv() and env_list_add_getenvs()
  autotools: improve devel-non-docs config-gen scenario
  env: cleanup env_list API
  env: add "overwrite" argument to env_list_setenv()
  env: save parsed variables into ul_env_list
  tests: add su --whitelist-environment test

11 months agoMerge branch 'fix_more' of https://github.com/ikspress/util-linux
Karel Zak [Thu, 5 Sep 2024 08:17:24 +0000 (10:17 +0200)] 
Merge branch 'fix_more' of https://github.com/ikspress/util-linux

* 'fix_more' of https://github.com/ikspress/util-linux:
  more: fix compilation

11 months agolscpu: add procfs–sysfs dump from Milk-V Pioneer
Jan Engelhardt [Fri, 30 Aug 2024 20:44:56 +0000 (20:44 +0000)] 
lscpu: add procfs–sysfs dump from Milk-V Pioneer

already in tree:

 rv64-linux: just a BeagleV Starlight SBC (no longer in production)
 rv64-visionfive2 is interesting because it's a system with an odd CPU count / mix of core types (4+1)

new dump:

 rv64-milkvpioneer is interesting because it's arguably a server board, i.e. with a whole bunch of cores and NUMA nodes.

[kzak@redhat.com: - add this commit message]

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
11 months agomore: fix compilation
Yang Kun [Tue, 3 Sep 2024 14:38:57 +0000 (22:38 +0800)] 
more: fix compilation

11 months agologin: add LOGIN_ENV_SAFELIST /etc/login.def item
Karel Zak [Wed, 28 Aug 2024 10:10:50 +0000 (12:10 +0200)] 
login: add LOGIN_ENV_SAFELIST /etc/login.def item

It is possible to preserve the entire environment (-p), but it is
rarely a good idea. The new configuration file item allows for
specifying a list of variables to protect, such as locale-related
environment variables.

Addresses: https://github.com/util-linux/util-linux/pull/3159
Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agosu: use lib/env.c for --whitelist-environment
Karel Zak [Wed, 28 Aug 2024 10:08:30 +0000 (12:08 +0200)] 
su: use lib/env.c for --whitelist-environment

Do not use a local implementation, instead use code from the lib/
directory.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoenv: add env_list_add_getenv() and env_list_add_getenvs()
Karel Zak [Wed, 28 Aug 2024 09:23:31 +0000 (11:23 +0200)] 
env: add env_list_add_getenv() and env_list_add_getenvs()

* Add env_list_add_getenv() to import a single variable from the
  environ[] array. The function may accept a default value if getenv()
  does not return anything.

* Add env_list_add_getenvs() to import multiple variables from the
  environ[] array.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoautotools: improve devel-non-docs config-gen scenario
Karel Zak [Wed, 4 Sep 2024 10:30:47 +0000 (12:30 +0200)] 
autotools: improve devel-non-docs config-gen scenario

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoenv: cleanup env_list API
Karel Zak [Wed, 28 Aug 2024 08:24:41 +0000 (10:24 +0200)] 
env: cleanup env_list API

* rename env_from_fd() to env_list_from_fd()
* rename remove_entry() to ul_remove_entry()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoenv: add "overwrite" argument to env_list_setenv()
Karel Zak [Wed, 4 Sep 2024 10:19:41 +0000 (12:19 +0200)] 
env: add "overwrite" argument to env_list_setenv()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoenv: save parsed variables into ul_env_list
Karel Zak [Tue, 27 Aug 2024 11:07:56 +0000 (13:07 +0200)] 
env: save parsed variables into ul_env_list

The struct ul_env_list is currently only used to store the value of
env when sanitizing environ[]. It would be beneficial to also use the
functions related to ul_env_list for other purposes. In order to do
this, it is important to keep the NAME and VALUE components separate.

* Accept non-terminated name and value for env_list_add().

* Add env_list_add_from_string() to add item to the list from a
  "name=value" string.

* Add env_list_add_variable() to add item to the list using separate
  "name" and "value" strings.

* Update __sanitize_env() to use env_list_add_from_string().

* Modify the test to use "abc" as the value instead of copying the
  variable name (with '=') to the value.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agotests: add su --whitelist-environment test
Karel Zak [Wed, 28 Aug 2024 10:23:25 +0000 (12:23 +0200)] 
tests: add su --whitelist-environment test

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agochcpu(8): Document CPU deconfiguring behavior
Mete Durlu [Mon, 2 Sep 2024 15:05:53 +0000 (17:05 +0200)] 
chcpu(8): Document CPU deconfiguring behavior

If architecture supports (de)configuring CPUs, the user should
deconfigure disabled CPUs to prevent performance penalties.

Signed-off-by: Mete Durlu <meted@linux.ibm.com>
11 months agochcpu(8): Fix typo
Mete Durlu [Mon, 2 Sep 2024 15:05:52 +0000 (17:05 +0200)] 
chcpu(8): Fix typo

Signed-off-by: Mete Durlu <meted@linux.ibm.com>
11 months agolibfdisk: check alignment reset return codes
Karel Zak [Mon, 2 Sep 2024 12:21:40 +0000 (14:21 +0200)] 
libfdisk: check alignment reset return codes

Traditionally, there was only recalculation based on disk properties.
However, since libfdisk now supports additional script headers to
modify the default alignment, we need to check return codes. This is
because users can specify nonsensical values. If we ignore the return
codes, the library will report the issue multiple times and
return an error to the application when creating a new disk label.

Old version:
  >>> Script header accepted.
  >>> Last LBA specified by script is out of range.
      Last LBA specified by script is out of range.
      Last LBA specified by script is out of range.
  Failed to apply script headers, disk label not created: Numerical result out of range

Fixed version:
  >>> Script header accepted.
  >>> Last LBA specified by script is out of range.
  Failed to apply script headers, disk label not created: Numerical result out of range.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agosfdisk: ignore last-lba from script on --force
Karel Zak [Mon, 2 Sep 2024 12:04:18 +0000 (14:04 +0200)] 
sfdisk: ignore last-lba from script on --force

The last LBA depends on the disk size. It seems like a good idea to
ignore it when using the --force option, in order to make it possible
to apply the script on smaller disks.

Addresses: https://github.com/util-linux/util-linux/issues/3186
Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoMerge branch 'patch-1' of https://github.com/hmaarrfk/util-linux
Karel Zak [Thu, 29 Aug 2024 09:55:28 +0000 (11:55 +0200)] 
Merge branch 'patch-1' of https://github.com/hmaarrfk/util-linux

* 'patch-1' of https://github.com/hmaarrfk/util-linux:
  Define EXIT_ENOSYS in test helpers

11 months agoMerge branch 'PR/autotools-securelib' of github.com:karelzak/util-linux-work
Karel Zak [Thu, 29 Aug 2024 09:54:21 +0000 (11:54 +0200)] 
Merge branch 'PR/autotools-securelib' of github.com:karelzak/util-linux-work

* 'PR/autotools-securelib' of github.com:karelzak/util-linux-work:
  autotools: fix securedir and pam_lastlog2 install

11 months agoMerge branch 'spelling-and-typos' of https://github.com/mr-bronson/util-linux
Karel Zak [Thu, 29 Aug 2024 09:53:42 +0000 (11:53 +0200)] 
Merge branch 'spelling-and-typos' of https://github.com/mr-bronson/util-linux

* 'spelling-and-typos' of https://github.com/mr-bronson/util-linux:
  fix it's vs. its, and some adjacent errors

11 months agoMerge branch 'PR/buildsys-lsfd-bpf' of github.com:karelzak/util-linux-work
Karel Zak [Thu, 29 Aug 2024 09:52:31 +0000 (11:52 +0200)] 
Merge branch 'PR/buildsys-lsfd-bpf' of github.com:karelzak/util-linux-work

* 'PR/buildsys-lsfd-bpf' of github.com:karelzak/util-linux-work:
  meson: check for BPF_OBJ_NAME_LEN and linux/bpf.h
  autotools: Check for BPF_OBJ_NAME_LEN (required by lsfd)

11 months agoOptionally execute a program after group change
Gábor Németh [Thu, 29 Aug 2024 06:59:23 +0000 (08:59 +0200)] 
Optionally execute a program after group change

We accept a `-c` command option or possible second argument which is then
invoked through the user's shell after the group change, as by the `sg`
utility. The default is still running the shell itself.

11 months agoDefine EXIT_ENOSYS in test helpers
Mark Harfouche [Thu, 29 Aug 2024 02:02:06 +0000 (22:02 -0400)] 
Define EXIT_ENOSYS in test helpers

11 months agoMerge branch 'master' into spelling-and-typos
Bron Potomac [Tue, 27 Aug 2024 12:39:18 +0000 (12:39 +0000)] 
Merge branch 'master' into spelling-and-typos

11 months agoautotools: fix securedir and pam_lastlog2 install
Karel Zak [Tue, 27 Aug 2024 10:00:21 +0000 (12:00 +0200)] 
autotools: fix securedir and pam_lastlog2 install

Addresses: https://github.com/util-linux/util-linux/pull/3173
Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoMerge branch 'PR/findmnt-Q-tree' of github.com:karelzak/util-linux-work
Karel Zak [Tue, 27 Aug 2024 09:25:33 +0000 (11:25 +0200)] 
Merge branch 'PR/findmnt-Q-tree' of github.com:karelzak/util-linux-work

* 'PR/findmnt-Q-tree' of github.com:karelzak/util-linux-work:
  tests: update findmnt -Q tests
  findmnt: improve -Q to output tree

11 months agolibmount: cleanup comments
Karel Zak [Tue, 27 Aug 2024 09:14:01 +0000 (11:14 +0200)] 
libmount: cleanup comments

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agofix it's vs. its, and some adjacent errors
mr-bronson [Tue, 27 Aug 2024 06:19:47 +0000 (06:19 +0000)] 
fix it's vs. its, and some adjacent errors

But still need rewrite of opaque comments @ libmount/src/context_umount.c:350-353 and libmount/src/context.c:1149-1150.

11 months agomeson: check for BPF_OBJ_NAME_LEN and linux/bpf.h
Karel Zak [Mon, 26 Aug 2024 12:23:16 +0000 (14:23 +0200)] 
meson: check for BPF_OBJ_NAME_LEN and linux/bpf.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoautotools: Check for BPF_OBJ_NAME_LEN (required by lsfd)
Karel Zak [Mon, 26 Aug 2024 12:12:44 +0000 (14:12 +0200)] 
autotools: Check for BPF_OBJ_NAME_LEN (required by lsfd)

Addresses: https://github.com/util-linux/util-linux/issues/2945
Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agotests: update findmnt -Q tests
Karel Zak [Mon, 26 Aug 2024 11:46:54 +0000 (13:46 +0200)] 
tests: update findmnt -Q tests

Now the tree-like output is possible for "findmnt -Q".

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoMerge branch 'PR/more-stderr' of github.com:karelzak/util-linux-work
Karel Zak [Mon, 26 Aug 2024 10:26:34 +0000 (12:26 +0200)] 
Merge branch 'PR/more-stderr' of github.com:karelzak/util-linux-work

* 'PR/more-stderr' of github.com:karelzak/util-linux-work:
  more: make sure we have data on stderr

11 months agoMerge branch 'PR/lscpu-optimize' of github.com:karelzak/util-linux-work
Karel Zak [Mon, 26 Aug 2024 10:25:58 +0000 (12:25 +0200)] 
Merge branch 'PR/lscpu-optimize' of github.com:karelzak/util-linux-work

* 'PR/lscpu-optimize' of github.com:karelzak/util-linux-work:
  lscpu: optimize query virt pci device

11 months agoMerge branch 'libblkid/apfs/checksum' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 26 Aug 2024 10:24:36 +0000 (12:24 +0200)] 
Merge branch 'libblkid/apfs/checksum' of https://github.com/t-8ch/util-linux

* 'libblkid/apfs/checksum' of https://github.com/t-8ch/util-linux:
  libblkid: apfs: validate checksums

11 months agolibblkid: improve portability
Yang Kun [Sat, 24 Aug 2024 14:15:16 +0000 (22:15 +0800)] 
libblkid: improve portability

11 months agolibblkid: apfs: validate checksums
Thomas Weißschuh [Tue, 6 Aug 2024 17:07:48 +0000 (19:07 +0200)] 
libblkid: apfs: validate checksums

The apfs superblock contains a checksum based on Fletcher-64.
Validate the checksum to make the probing more robust.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
11 months agolscpu: optimize query virt pci device
Guixin Liu [Wed, 21 Aug 2024 08:49:54 +0000 (16:49 +0800)] 
lscpu: optimize query virt pci device

The lscpu command needs to traverse the /proc/bus/pci/devices file
three times to check for any PCI devices related to virtualization.
If there are many PCI devices on the machine, this can lead to
increased execution time for lscpu. It would be beneficial to
consolidate these queries into a single check to optimize the
execution time of lscpu.

Use time command to test on a machine with 13000 PCI devices:
before:
real  0m13.506s
user  0m0.028s
sys   0m13.409s
after:
real  0m5.834s
user  0m0.018s
sys   0m5.771s

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
11 months agofindmnt: improve -Q to output tree
Karel Zak [Thu, 22 Aug 2024 10:31:41 +0000 (12:31 +0200)] 
findmnt: improve -Q to output tree

$ findmnt -Q 'FSTYPE=="ext4"'
TARGET         SOURCE                  FSTYPE OPTIONS
/              /dev/sda4               ext4   rw,relatime
├─/var         /dev/sda3               ext4   rw,relatime
│ └─/var/cache /dev/sda5               ext4   rw,relatime
├─/mnt/virt    /dev/sdb1               ext4   rw,relatime
└─/boot        /dev/sda2               ext4   rw,relatime

Addresses: https://github.com/util-linux/util-linux/pull/3090
Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoMerge branch 'findmnt-Q' of https://github.com/masatake/util-linux
Karel Zak [Thu, 22 Aug 2024 09:31:21 +0000 (11:31 +0200)] 
Merge branch 'findmnt-Q' of https://github.com/masatake/util-linux

* 'findmnt-Q' of https://github.com/masatake/util-linux:
  tests: (findmnt) add a case testing -Q option
  findmnt: (man) write about -Q,--filter option
  findmnt: add -Q,--filter option
  findmnt: (refactor) convert add_column macro to a function
  findmnt: (refactor) add a helper function making an instance of libscols_table
  findmnt: (refactor) remove global variables shared between findmnt.c and fintmnt-verify.c

11 months agoMerge branch 'fix_generated_header_paths' of https://github.com/amibranch/util-linux
Karel Zak [Thu, 22 Aug 2024 09:19:39 +0000 (11:19 +0200)] 
Merge branch 'fix_generated_header_paths' of https://github.com/amibranch/util-linux

* 'fix_generated_header_paths' of https://github.com/amibranch/util-linux:
  meson: fix generated header paths

11 months agoMerge branch 'simplify' of https://github.com/ikspress/util-linux
Karel Zak [Thu, 22 Aug 2024 09:18:45 +0000 (11:18 +0200)] 
Merge branch 'simplify' of https://github.com/ikspress/util-linux

* 'simplify' of https://github.com/ikspress/util-linux:
  meson: simplify code
  ipcrm: simplify code

11 months agomore: make sure we have data on stderr
Karel Zak [Thu, 22 Aug 2024 06:56:52 +0000 (08:56 +0200)] 
more: make sure we have data on stderr

more(1) uses more_poll() to monitor data on stdin, stderr, and
signals. It is used before read_command(), but this function only
reads from stderr. Therefore, if any other non-stderr event occurs,
this function will wait on read(). In this case, more(1) will not
react to signals anymore. We need to ensure that more(1) only waits in
more_poll().

Try

 for x in {1..1000}; do echo "line $x"; done | more

to reproduce.

Reported-by: Radka Skvarilova <rskvaril@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agomeson: fix generated header paths
amibranch [Wed, 21 Aug 2024 15:30:55 +0000 (15:30 +0000)] 
meson: fix generated header paths

11 months agofix spelling and typos
mr-bronson [Wed, 21 Aug 2024 15:28:22 +0000 (15:28 +0000)] 
fix spelling and typos

A good start. Some lines moved because they were under a misspelled duplicate heading.

11 months agofix typos
Yang Hau [Tue, 20 Aug 2024 15:48:19 +0000 (23:48 +0800)] 
fix typos

Signed-off-by: Karel Zak <kzak@redhat.com>
11 months agoMerge branch 'tailing' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 20 Aug 2024 13:27:01 +0000 (15:27 +0200)] 
Merge branch 'tailing' of https://github.com/stoeckmann/util-linux

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

11 months agoMerge branch 'fdisk-sgi-bootfile' of https://github.com/mr-bronson/util-linux
Karel Zak [Tue, 20 Aug 2024 13:21:06 +0000 (15:21 +0200)] 
Merge branch 'fdisk-sgi-bootfile' of https://github.com/mr-bronson/util-linux

* 'fdisk-sgi-bootfile' of https://github.com/mr-bronson/util-linux:
  fdisk: fix sgi_menu_cb return value
  fdisk: fix fdisk_sgi_set_bootfile return value
  fdisk: fix sgi_check_bootfile name size minimum
  fdisk: fix SGI boot file prompt

11 months agomeson: simplify code
Yang Kun [Tue, 20 Aug 2024 12:43:11 +0000 (20:43 +0800)] 
meson: simplify code

11 months agoipcrm: simplify code
Yang Kun [Tue, 20 Aug 2024 12:38:15 +0000 (20:38 +0800)] 
ipcrm: simplify code

11 months agoAdd missing section comment
Uwe Seimet [Mon, 19 Aug 2024 15:56:44 +0000 (17:56 +0200)] 
Add missing section comment

11 months agoAdd GPT type for Minix filesystem
Uwe Seimet [Mon, 19 Aug 2024 08:49:02 +0000 (10:49 +0200)] 
Add GPT type for Minix filesystem

11 months agofdisk: fix sgi_menu_cb return value
mr-bronson [Sun, 18 Aug 2024 01:32:00 +0000 (01:32 +0000)] 
fdisk: fix sgi_menu_cb return value

Would otherwise return -EINVAL even on success after fdisk_sgi_set_bootfile.

11 months agofdisk: fix fdisk_sgi_set_bootfile return value
mr-bronson [Sun, 18 Aug 2024 01:06:44 +0000 (01:06 +0000)] 
fdisk: fix fdisk_sgi_set_bootfile return value

Supposed to be '0 on success, <0 on error'.

11 months agofdisk: fix sgi_check_bootfile name size minimum
mr-bronson [Sun, 18 Aug 2024 00:54:08 +0000 (00:54 +0000)] 
fdisk: fix sgi_check_bootfile name size minimum

The name does not contain newline, so the comment and logic was wrong.

11 months agofdisk: fix SGI boot file prompt
mr-bronson [Sun, 18 Aug 2024 00:49:27 +0000 (00:49 +0000)] 
fdisk: fix SGI boot file prompt

Prompt was clearly missing something.

11 months agoFix typos
Tobias Stoeckmann [Wed, 14 Aug 2024 19:37:39 +0000 (21:37 +0200)] 
Fix typos

These occurrences should be "trailing" instead of "tailing".

11 months agoMerge branch 'setpriv-ptracer' of https://github.com/geofft/util-linux
Karel Zak [Wed, 14 Aug 2024 09:07:23 +0000 (11:07 +0200)] 
Merge branch 'setpriv-ptracer' of https://github.com/geofft/util-linux

* 'setpriv-ptracer' of https://github.com/geofft/util-linux:
  setpriv: Add --ptracer, which calls PR_SET_PTRACER

11 months agoMerge branch 'lastlog2' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 14 Aug 2024 07:54:44 +0000 (09:54 +0200)] 
Merge branch 'lastlog2' of https://github.com/stoeckmann/util-linux

* 'lastlog2' of https://github.com/stoeckmann/util-linux:
  lastlog2: Improve comments and documentation
  Treat out of memory as error

11 months agoMerge branch 'meson' of https://github.com/ldv-alt/util-linux
Karel Zak [Wed, 14 Aug 2024 07:52:19 +0000 (09:52 +0200)] 
Merge branch 'meson' of https://github.com/ldv-alt/util-linux

* 'meson' of https://github.com/ldv-alt/util-linux:
  meson: use a / b instead of join_paths(a, b)

11 months agoMerge branch 'openwrt/23.05.4' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 14 Aug 2024 07:50:33 +0000 (09:50 +0200)] 
Merge branch 'openwrt/23.05.4' of https://github.com/t-8ch/util-linux

* 'openwrt/23.05.4' of https://github.com/t-8ch/util-linux:
  ci: use OpenWRT SDK v23.05.4

11 months agoMerge branch 'ts_helper_cap' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 14 Aug 2024 07:49:50 +0000 (09:49 +0200)] 
Merge branch 'ts_helper_cap' of https://github.com/t-8ch/util-linux

* 'ts_helper_cap' of https://github.com/t-8ch/util-linux:
  tests: properly look for ts_cap helper

11 months agosetpriv: Add --ptracer, which calls PR_SET_PTRACER
Geoffrey Thomas [Mon, 12 Aug 2024 23:02:05 +0000 (23:02 +0000)] 
setpriv: Add --ptracer, which calls PR_SET_PTRACER

This makes it easier to use a debugger on systems with Yama configured
without making the debugger binary itself privileged.

Signed-off-by: Geoffrey Thomas <geofft@ldpreload.com>
11 months agolastlog2: Improve comments and documentation
Tobias Stoeckmann [Mon, 12 Aug 2024 15:37:53 +0000 (17:37 +0200)] 
lastlog2: Improve comments and documentation

Fix grammar issues and unify style across documentation and code comments.
No functional change.

11 months agoTreat out of memory as error
Tobias Stoeckmann [Mon, 12 Aug 2024 15:37:03 +0000 (17:37 +0200)] 
Treat out of memory as error

Otherwise it might happen that a configured file location is not taken
into account. A NULL value would lead to default file location.

11 months agomeson: use a / b instead of join_paths(a, b)
Dmitry V. Levin [Sun, 11 Aug 2024 08:00:00 +0000 (08:00 +0000)] 
meson: use a / b instead of join_paths(a, b)

According to [1], since meson 0.49.0, using the / operator on strings
is equivalent to calling join_paths().

As the expressions written using the / operator are shorter and nicer
than their equivalents written using join_paths(), and given that
we've been using this new operator since commit
5f2c862a4aff19f5bc732e677405f04e2d07c211, let's convert remaining
join_paths() invocations to use the / operator instead.

[1] https://mesonbuild.com/Reference-manual_functions.html#join_paths

11 months agoci: use OpenWRT SDK v23.05.4
Thomas Weißschuh [Tue, 6 Aug 2024 19:32:42 +0000 (21:32 +0200)] 
ci: use OpenWRT SDK v23.05.4

Binary builds and SDKs for archs38 are not provided anymore.

The SDK now also requires STAGING_DIR_HOST to be set.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
11 months agotests: properly look for ts_cap helper
Thomas Weißschuh [Tue, 6 Aug 2024 17:44:00 +0000 (19:44 +0200)] 
tests: properly look for ts_cap helper

Helpers should use ts_check_test_command, not ts_check_prog.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>