]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
15 months agoMerge branch 'lsfd--inet-optimize' of https://github.com/masatake/util-linux
Karel Zak [Fri, 3 Mar 2023 12:03:33 +0000 (13:03 +0100)] 
Merge branch 'lsfd--inet-optimize' of https://github.com/masatake/util-linux

* 'lsfd--inet-optimize' of https://github.com/masatake/util-linux:
  lsfd: optimize -i/--inet option

15 months agoMerge branch 'waitpid/count' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 3 Mar 2023 12:01:18 +0000 (13:01 +0100)] 
Merge branch 'waitpid/count' of https://github.com/t-8ch/util-linux

* 'waitpid/count' of https://github.com/t-8ch/util-linux:
  waitpid: allow to only wait for a specific number of process exits

15 months agoMerge branch 'agetty/plain' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 3 Mar 2023 11:50:06 +0000 (12:50 +0100)] 
Merge branch 'agetty/plain' of https://github.com/t-8ch/util-linux

* 'agetty/plain' of https://github.com/t-8ch/util-linux:
  TODO: drop agetty LOGIN_PLAIN_PROMPT todo

15 months agoMerge branch 'libblkid/nvidia-raid' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 3 Mar 2023 11:49:40 +0000 (12:49 +0100)] 
Merge branch 'libblkid/nvidia-raid' of https://github.com/t-8ch/util-linux

* 'libblkid/nvidia-raid' of https://github.com/t-8ch/util-linux:
  libblkid: nvidia_raid: validate full signature
  libblkid: nvidia_raid: validate checksum
  libblkid: nvidia_raid: verify superblock size

15 months agoMerge branch 'nsenter/target-uid-gid' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 3 Mar 2023 11:45:57 +0000 (12:45 +0100)] 
Merge branch 'nsenter/target-uid-gid' of https://github.com/t-8ch/util-linux

[kzak@redhat.com: - resolve conflict with 4e9ec856a1b91fb3ff10de10f2dac94f711705e1
                  - fix --help output]

* 'nsenter/target-uid-gid' of https://github.com/t-8ch/util-linux:
  nsenter: read default UID and GID from target process

15 months agolsfd: optimize -i/--inet option
Masatake YAMATO [Fri, 3 Mar 2023 05:58:06 +0000 (14:58 +0900)] 
lsfd: optimize -i/--inet option

The original code filters sockets in convert() stage.
This code adds weak-filtering in collect_processes() stage to improve
the performe.

Without this optimization:

    # time ./lsfd --json -i > /tmp/lsfd.txt
    0.43user 0.57system 0:01.02elapsed 99%CPU (0avgtext+0avgdata 52724maxresident)k
    0inputs+0outputs (0major+14263minor)pagefaults 0swaps

With this optimization:

    # time ./lsfd --json -i > /tmp/lsfd-i.txt
    0.08user 0.27system 0:00.36elapsed 98%CPU (0avgtext+0avgdata 7060maxresident)k
    0inputs+0outputs (0major+2831minor)pagefaults 0swaps

About three times faster.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agonsenter: read default UID and GID from target process
Thomas Weißschuh [Fri, 3 Mar 2023 01:39:27 +0000 (01:39 +0000)] 
nsenter: read default UID and GID from target process

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agoTODO: drop agetty LOGIN_PLAIN_PROMPT todo
Thomas Weißschuh [Fri, 3 Mar 2023 01:19:52 +0000 (01:19 +0000)] 
TODO: drop agetty LOGIN_PLAIN_PROMPT todo

It was implemented in 556925fe.

15 months agowaitpid: allow to only wait for a specific number of process exits
Thomas Weißschuh [Thu, 2 Mar 2023 21:06:31 +0000 (21:06 +0000)] 
waitpid: allow to only wait for a specific number of process exits

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agolibblkid: nvidia_raid: validate full signature
Thomas Weißschuh [Thu, 2 Mar 2023 21:27:12 +0000 (21:27 +0000)] 
libblkid: nvidia_raid: validate full signature

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agolibblkid: nvidia_raid: validate checksum
Thomas Weißschuh [Thu, 2 Mar 2023 15:54:39 +0000 (15:54 +0000)] 
libblkid: nvidia_raid: validate checksum

See #1843

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agolibblkid: nvidia_raid: verify superblock size
Thomas Weißschuh [Thu, 2 Mar 2023 15:27:58 +0000 (15:27 +0000)] 
libblkid: nvidia_raid: verify superblock size

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agonsenter: add --env for allowing environment variables inheritance
u2386 [Mon, 27 Feb 2023 02:18:31 +0000 (02:18 +0000)] 
nsenter: add --env for allowing environment variables inheritance

This commit adds support for the -e or --env option in nsenter, allowing a new process to inherit the environment va

If the option is not given, the environment variables will stay the same as in the current namespace.

Example:
    Setup the namespace:
        $ docker run -d -e PROJECT='util linux' --rm alpine sleep 10000
        cb0b69aa7aec
        $ docker inspect --format '{{ .State.Pid }}' cb0b69aa7aec
        470012

    Enter the namespace:
        $ nsenter --all -t 470012 --env env
        PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        HOSTNAME=cb0b69aa7aec
        PROJECT=util linux
        HOME=/root

Reviewed-by: Thomas Weißschuh <thomas@t-8ch.de>
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: u2386 <hugo.cavan2386@gmail.com>
15 months agoMerge branch 'wdctl/sysfs-firmware_version' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 2 Mar 2023 13:42:29 +0000 (14:42 +0100)] 
Merge branch 'wdctl/sysfs-firmware_version' of https://github.com/t-8ch/util-linux

* 'wdctl/sysfs-firmware_version' of https://github.com/t-8ch/util-linux:
  wdctl: read options from sysfs
  wdctl: read firmware version from sysfs

15 months agopo-man: update uk.po (from translationproject.org)
Yuri Chornoivan [Thu, 2 Mar 2023 13:38:22 +0000 (14:38 +0100)] 
po-man: update uk.po (from translationproject.org)

15 months agopo-man: update sr.po (from translationproject.org)
Мирослав Николић [Thu, 2 Mar 2023 13:38:22 +0000 (14:38 +0100)] 
po-man: update sr.po (from translationproject.org)

15 months agopo-man: update fr.po (from translationproject.org)
Frédéric Marchal [Thu, 2 Mar 2023 13:38:22 +0000 (14:38 +0100)] 
po-man: update fr.po (from translationproject.org)

15 months agopo: add ka.po (from translationproject.org)
Temuri Doghonadze [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)] 
po: add ka.po (from translationproject.org)

15 months agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)] 
po: update uk.po (from translationproject.org)

15 months agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)] 
po: update ja.po (from translationproject.org)

15 months agopo: update hr.po (from translationproject.org)
Božidar Putanec [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)] 
po: update hr.po (from translationproject.org)

15 months agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)] 
po: update es.po (from translationproject.org)

15 months agopo: update de.po (from translationproject.org)
Mario Blättermann [Thu, 2 Mar 2023 13:37:32 +0000 (14:37 +0100)] 
po: update de.po (from translationproject.org)

15 months agopo: update ca.po (from translationproject.org)
Jordi Mas i Hernàndez [Thu, 2 Mar 2023 13:37:32 +0000 (14:37 +0100)] 
po: update ca.po (from translationproject.org)

15 months agogithub: call checklibdoc and checkxalloc
Karel Zak [Thu, 2 Mar 2023 13:33:18 +0000 (14:33 +0100)] 
github: call checklibdoc and checkxalloc

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolsfd: use xstrdup() if included xalloc.h
Karel Zak [Thu, 2 Mar 2023 13:16:33 +0000 (14:16 +0100)] 
lsfd: use xstrdup() if included xalloc.h

This commit improves code consistence.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibmount: (optstr) do not use xalloc.h in test
Karel Zak [Thu, 2 Mar 2023 13:08:38 +0000 (14:08 +0100)] 
libmount: (optstr) do not use xalloc.h in test

It's technically valid to use xalloc.h in the tests, but then we mix
regular malloc and xalloc in the same source file, and it makes
"make checkxalloc" using difficult.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoinclude/c: make err_oom() usable everywhere
Karel Zak [Thu, 2 Mar 2023 13:07:38 +0000 (14:07 +0100)] 
include/c: make err_oom() usable everywhere

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoinclude/fileutils: remove duplicated include
Karel Zak [Thu, 2 Mar 2023 12:48:21 +0000 (13:48 +0100)] 
include/fileutils: remove duplicated include

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoinclude/c: remove duplicate include, improve readablity
Karel Zak [Thu, 2 Mar 2023 12:47:14 +0000 (13:47 +0100)] 
include/c: remove duplicate include, improve readablity

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibmount: add missing symbols to docs
Karel Zak [Thu, 2 Mar 2023 12:38:15 +0000 (13:38 +0100)] 
libmount: add missing symbols to docs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibmount: add missing symbols to docs
Karel Zak [Thu, 2 Mar 2023 12:38:08 +0000 (13:38 +0100)] 
libmount: add missing symbols to docs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibmount: remove unimplemented symbol
Karel Zak [Thu, 2 Mar 2023 12:36:39 +0000 (13:36 +0100)] 
libmount: remove unimplemented symbol

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoMerge branch 'lsfds-netlink' of https://github.com/masatake/util-linux
Karel Zak [Thu, 2 Mar 2023 11:34:04 +0000 (12:34 +0100)] 
Merge branch 'lsfds-netlink' of https://github.com/masatake/util-linux

* 'lsfds-netlink' of https://github.com/masatake/util-linux:
  tests: (lsfd) add cases for NETLINK sockets
  lsfd: use extra information loaded from /proc/net/netlink
  tests: (mkfds) add netlink factory
  tests: (lsfd,mkfds) define new error code for EPROTONOSUPPORT
  tests: (mkfds) add unsigned int parameter type
  tests: (lsfd) use ${PIPESTATUS[]} instead of $?

15 months agolibmount: idmap: fix sock write to child
Pedro Tammela [Wed, 1 Mar 2023 16:09:47 +0000 (17:09 +0100)] 
libmount: idmap: fix sock write to child

The current code writes to sock_fds[0], which is set to -1 on line 227, instead of the correct sock_fds[1].
As a cause, a simple `mount` command which uses idmapping and doesn't specify a user ns hangs indefinitely.

15 months agotests: (lsfd) add cases for NETLINK sockets
Masatake YAMATO [Mon, 27 Feb 2023 14:47:11 +0000 (23:47 +0900)] 
tests: (lsfd) add cases for NETLINK sockets

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: use extra information loaded from /proc/net/netlink
Masatake YAMATO [Mon, 20 Feb 2023 15:12:13 +0000 (00:12 +0900)] 
lsfd: use extra information loaded from /proc/net/netlink

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) add netlink factory
Masatake YAMATO [Sun, 26 Feb 2023 21:23:13 +0000 (06:23 +0900)] 
tests: (mkfds) add netlink factory

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd,mkfds) define new error code for EPROTONOSUPPORT
Masatake YAMATO [Wed, 1 Mar 2023 14:42:51 +0000 (23:42 +0900)] 
tests: (lsfd,mkfds) define new error code for EPROTONOSUPPORT

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) add unsigned int parameter type
Masatake YAMATO [Tue, 28 Feb 2023 08:41:42 +0000 (17:41 +0900)] 
tests: (mkfds) add unsigned int parameter type

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) use ${PIPESTATUS[]} instead of $?
Masatake YAMATO [Tue, 28 Feb 2023 01:45:13 +0000 (10:45 +0900)] 
tests: (lsfd) use ${PIPESTATUS[]} instead of $?

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agomount: (man) add note about options order
Karel Zak [Wed, 1 Mar 2023 12:11:42 +0000 (13:11 +0100)] 
mount: (man) add note about options order

Fixes: https://github.com/util-linux/util-linux/issues/2087
Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoMerge branch 'hardlink/options-failure' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 1 Mar 2023 11:59:57 +0000 (12:59 +0100)] 
Merge branch 'hardlink/options-failure' of https://github.com/t-8ch/util-linux

* 'hardlink/options-failure' of https://github.com/t-8ch/util-linux:
  hardlink: (tests) do not assert amount of compared files

15 months agolsfd: align --help output
Karel Zak [Wed, 1 Mar 2023 11:55:18 +0000 (12:55 +0100)] 
lsfd: align --help output

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoMerge branch 'lsfd--inet-option' of https://github.com/masatake/util-linux
Karel Zak [Wed, 1 Mar 2023 11:53:02 +0000 (12:53 +0100)] 
Merge branch 'lsfd--inet-option' of https://github.com/masatake/util-linux

* 'lsfd--inet-option' of https://github.com/masatake/util-linux:
  tests: (lsfd) add a case for testing -i/--inet options
  lsfd: implement -i/--inet option
  lsfd: adjust whitespaces in the help message

15 months agohardlink: (tests) do not assert amount of compared files
Thomas Weißschuh [Tue, 28 Feb 2023 18:24:16 +0000 (18:24 +0000)] 
hardlink: (tests) do not assert amount of compared files

Depending on external circumstances the exact amount of compared files
can vary.
So don't test for this statistics as otherwise spurious test failures
will occurr.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agotests: (lsfd) add a case for testing -i/--inet options
Masatake YAMATO [Tue, 28 Feb 2023 15:14:18 +0000 (00:14 +0900)] 
tests: (lsfd) add a case for testing -i/--inet options

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: implement -i/--inet option
Masatake YAMATO [Tue, 28 Feb 2023 13:56:57 +0000 (22:56 +0900)] 
lsfd: implement -i/--inet option

Reviewed-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: adjust whitespaces in the help message
Masatake YAMATO [Tue, 28 Feb 2023 13:55:53 +0000 (22:55 +0900)] 
lsfd: adjust whitespaces in the help message

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agokill: fix buffer overflow
Karel Zak [Tue, 28 Feb 2023 12:11:05 +0000 (13:11 +0100)] 
kill: fix buffer overflow

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibmount: treat comma as terminator in mnt_match_options()
Karel Zak [Tue, 28 Feb 2023 10:56:44 +0000 (11:56 +0100)] 
libmount: treat comma as terminator in mnt_match_options()

An alone "no" in the pattern is interpreted as an error; it should be also
valid in case the keyword is followed by a comma, e.g.

mnt_match_options("bla", "no,,");

Suggested-by: Sören Tempel <soeren@soeren-tempel.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoagetty: support simplified color sequences in \e{name}
Karel Zak [Mon, 27 Feb 2023 16:52:45 +0000 (17:52 +0100)] 
agetty: support simplified color sequences in \e{name}

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibsmartcols: support simplified color sequences
Karel Zak [Mon, 27 Feb 2023 16:50:39 +0000 (17:50 +0100)] 
libsmartcols: support simplified color sequences

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolib/colors: move colors canonicalization to lib/color-names.c
Karel Zak [Mon, 27 Feb 2023 16:43:11 +0000 (17:43 +0100)] 
lib/colors: move colors canonicalization to lib/color-names.c

* let's make simplified sequences (e.g. "35;4")  used without
  lib/colors.c (without color schemes)

* add function to detect already usable esc sequence

* support this new feature in "test_colors --color <name|seq|...>"

  ./test_colors --color "red"
  ./test_colors --color "35;5"

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoMerge branch 'lsfd-more-inet-1' of https://github.com/masatake/util-linux
Karel Zak [Mon, 27 Feb 2023 13:51:39 +0000 (14:51 +0100)] 
Merge branch 'lsfd-more-inet-1' of https://github.com/masatake/util-linux

* 'lsfd-more-inet-1' of https://github.com/masatake/util-linux: (26 commits)
  tests: (lsfd) skip if the platform doesn't permit to use ioctl(fd, SIOCGSKNS)
  tests: (lsfd) skip if the platform doesn't permit to use unshare(2)
  tests: (lsfd) skip if the platform doesn't attach a buffer to a packet socket
  tests: (lsfd) skip if the platform doesn't provide pidfd_open(2)
  tests: (mkfds) introduce constants representing the limitation of the test environment
  tests: (lsfd) send a signal only if the target PID is know
  tests: (lsfd) add comments about the reason using ts_skip_qemu_user()
  tests: (mkfds) fix minor typo in comment
  tests: (lsfd) add a case for PING and PINGv6 sockets
  lsfd: use extra information loaded from /proc/net/icmp6
  lsfd: use extra information loaded from /proc/net/icmp
  tests: (mkfds) add ping and ping6 factories
  tests: (lsfd) add a case for UDPLITEv6 sockets
  tests: (lsfd) add a case for UDP-Lite sockets
  lsfd: use extra information loaded from /proc/net/udplite6
  lsfd: use extra information loaded from /proc/net/udplite
  tests: (mkfds) add "lite" parameter to udp and udp6 factories
  tests: (lsfd) add a case for RAWv6 sockets
  tests: (mkfds) add raw6 factory
  lsfd: use extra information loaded from /proc/net/raw6
  ...

15 months agolibmount: make mnt_match_options() more robust
Karel Zak [Mon, 27 Feb 2023 10:33:54 +0000 (11:33 +0100)] 
libmount: make mnt_match_options() more robust

* don't allocate and use a buffer for the pattern if the pattern is empty

* make it more obvious how empty pattern and empty optstr is evaluated

* add regression test

Reported-by: Sören Tempel <soeren@soeren-tempel.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agotests: (lsfd) skip if the platform doesn't permit to use ioctl(fd, SIOCGSKNS)
Masatake YAMATO [Sat, 25 Feb 2023 17:44:49 +0000 (02:44 +0900)] 
tests: (lsfd) skip if the platform doesn't permit to use ioctl(fd, SIOCGSKNS)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) skip if the platform doesn't permit to use unshare(2)
Masatake YAMATO [Sat, 25 Feb 2023 17:35:13 +0000 (02:35 +0900)] 
tests: (lsfd) skip if the platform doesn't permit to use unshare(2)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) skip if the platform doesn't attach a buffer to a packet socket
Masatake YAMATO [Sat, 25 Feb 2023 16:33:17 +0000 (01:33 +0900)] 
tests: (lsfd) skip if the platform doesn't attach a buffer to a packet socket

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) skip if the platform doesn't provide pidfd_open(2)
Masatake YAMATO [Sat, 25 Feb 2023 15:58:47 +0000 (00:58 +0900)] 
tests: (lsfd) skip if the platform doesn't provide pidfd_open(2)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) introduce constants representing the limitation of the test environment
Masatake YAMATO [Thu, 13 Oct 2022 06:23:26 +0000 (15:23 +0900)] 
tests: (mkfds) introduce constants representing the limitation of the test environment

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) send a signal only if the target PID is know
Masatake YAMATO [Wed, 26 Oct 2022 15:23:58 +0000 (00:23 +0900)] 
tests: (lsfd) send a signal only if the target PID is know

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) add comments about the reason using ts_skip_qemu_user()
Masatake YAMATO [Wed, 26 Oct 2022 17:14:27 +0000 (02:14 +0900)] 
tests: (lsfd) add comments about the reason using ts_skip_qemu_user()

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) fix minor typo in comment
Masatake YAMATO [Fri, 24 Feb 2023 17:22:04 +0000 (02:22 +0900)] 
tests: (mkfds) fix minor typo in comment

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) add a case for PING and PINGv6 sockets
Masatake YAMATO [Fri, 24 Feb 2023 17:24:51 +0000 (02:24 +0900)] 
tests: (lsfd) add a case for PING and PINGv6 sockets

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: use extra information loaded from /proc/net/icmp6
Masatake YAMATO [Thu, 23 Feb 2023 15:21:48 +0000 (00:21 +0900)] 
lsfd: use extra information loaded from /proc/net/icmp6

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: use extra information loaded from /proc/net/icmp
Masatake YAMATO [Thu, 23 Feb 2023 15:09:54 +0000 (00:09 +0900)] 
lsfd: use extra information loaded from /proc/net/icmp

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) add ping and ping6 factories
Masatake YAMATO [Thu, 23 Feb 2023 13:29:36 +0000 (22:29 +0900)] 
tests: (mkfds) add ping and ping6 factories

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) add a case for UDPLITEv6 sockets
Masatake YAMATO [Wed, 22 Feb 2023 17:03:23 +0000 (02:03 +0900)] 
tests: (lsfd) add a case for UDPLITEv6 sockets

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) add a case for UDP-Lite sockets
Masatake YAMATO [Wed, 22 Feb 2023 16:46:15 +0000 (01:46 +0900)] 
tests: (lsfd) add a case for UDP-Lite sockets

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: use extra information loaded from /proc/net/udplite6
Masatake YAMATO [Tue, 21 Feb 2023 15:05:00 +0000 (00:05 +0900)] 
lsfd: use extra information loaded from /proc/net/udplite6

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: use extra information loaded from /proc/net/udplite
Masatake YAMATO [Tue, 21 Feb 2023 14:56:18 +0000 (23:56 +0900)] 
lsfd: use extra information loaded from /proc/net/udplite

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) add "lite" parameter to udp and udp6 factories
Masatake YAMATO [Tue, 21 Feb 2023 14:58:37 +0000 (23:58 +0900)] 
tests: (mkfds) add "lite" parameter to udp and udp6 factories

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) add a case for RAWv6 sockets
Masatake YAMATO [Sat, 18 Feb 2023 20:10:43 +0000 (05:10 +0900)] 
tests: (lsfd) add a case for RAWv6 sockets

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) add raw6 factory
Masatake YAMATO [Sat, 18 Feb 2023 20:01:26 +0000 (05:01 +0900)] 
tests: (mkfds) add raw6 factory

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: use extra information loaded from /proc/net/raw6
Masatake YAMATO [Fri, 3 Feb 2023 05:23:04 +0000 (14:23 +0900)] 
lsfd: use extra information loaded from /proc/net/raw6

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) add a case for UDPv6 sockets
Masatake YAMATO [Sat, 18 Feb 2023 15:53:05 +0000 (00:53 +0900)] 
tests: (lsfd) add a case for UDPv6 sockets

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (mkfds) add udp6 factory
Masatake YAMATO [Sat, 18 Feb 2023 15:52:27 +0000 (00:52 +0900)] 
tests: (mkfds) add udp6 factory

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: use extra information loaded from /proc/net/udp6
Masatake YAMATO [Thu, 2 Feb 2023 01:28:48 +0000 (10:28 +0900)] 
lsfd: use extra information loaded from /proc/net/udp6

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: revise the comment for UNIX_LINE_LEN
Masatake YAMATO [Sat, 18 Feb 2023 15:11:45 +0000 (00:11 +0900)] 
lsfd: revise the comment for UNIX_LINE_LEN

The orignal comment was not understandable.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agotests: (lsfd) delete an unused variable
Masatake YAMATO [Sat, 18 Feb 2023 15:40:19 +0000 (00:40 +0900)] 
tests: (lsfd) delete an unused variable

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agolsfd: delete an unnecessary cast operation
Masatake YAMATO [Mon, 20 Feb 2023 15:10:53 +0000 (00:10 +0900)] 
lsfd: delete an unnecessary cast operation

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
15 months agodmesg: (tests) prevent loading of custom colorscheme
Thomas Weißschuh [Thu, 23 Feb 2023 02:30:36 +0000 (02:30 +0000)] 
dmesg: (tests) prevent loading of custom colorscheme

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agocal: (tests) prevent loading of custom colorschemes
Thomas Weißschuh [Thu, 23 Feb 2023 02:28:23 +0000 (02:28 +0000)] 
cal: (tests) prevent loading of custom colorschemes

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agotests: add function to inhibit loading of custom colorschemes
Thomas Weißschuh [Thu, 23 Feb 2023 02:37:55 +0000 (02:37 +0000)] 
tests: add function to inhibit loading of custom colorschemes

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agolib/colors: ensure fallback to system directory
Thomas Weißschuh [Thu, 23 Feb 2023 02:20:28 +0000 (02:20 +0000)] 
lib/colors: ensure fallback to system directory

The return value from colors_readdir(homedir) is used to determine if
the system directory should be searched.
Previously the mere existence of `~/.config/terminal-colors.d/` would
inhibit all lookups in `/etc/terminal-colors.d`.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
15 months agolib/randutils: drop unnecessary fcntl() in random_get_fd()
Thomas Haller [Wed, 22 Feb 2023 15:32:03 +0000 (16:32 +0100)] 
lib/randutils: drop unnecessary fcntl() in random_get_fd()

We already pass O_CLOEXEC flag to open(), no need to modify
the file descriptor with FD_CLOEXEC afterwards.

This was a left over from commit b1fa3e2234fa ('lib: use O_CLOEXEC in
libcommon').

Signed-off-by: Thomas Haller <thaller@redhat.com>
15 months agolibmount: move selinux stuff to hook module
Karel Zak [Wed, 22 Feb 2023 20:26:11 +0000 (21:26 +0100)] 
libmount: move selinux stuff to hook module

 * convert selinux contexts to raw format during "prep-options" stage

 * convert rootcontext=@target to raw context when final mountpoint
   path is available (after mkdir).

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibmount: make it possible to define order of hooks
Karel Zak [Wed, 22 Feb 2023 20:22:32 +0000 (21:22 +0100)] 
libmount: make it possible to define order of hooks

In some cases we have more hooks in the same stage and it's necessary
to call some hooks after another.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agolibmount: create a hook to set rootcontext=@target
Karel Zak [Wed, 22 Feb 2023 12:00:29 +0000 (13:00 +0100)] 
libmount: create a hook to set rootcontext=@target

The final target (mountpoint) depends on others libmount functionality
(X-mount.mkdir or --target-prefix). It means we cannot assume target
when the library calls fix_opts() and translates selinux contexts.

The solution is extra hook executed after mkdir.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoMerge branch 'auto_rootcontext' of https://github.com/cgzones/util-linux
Karel Zak [Wed, 22 Feb 2023 10:42:17 +0000 (11:42 +0100)] 
Merge branch 'auto_rootcontext' of https://github.com/cgzones/util-linux

* 'auto_rootcontext' of https://github.com/cgzones/util-linux:
  mount: add rootcontext=@target
  libmount: declare array of LSM options const

15 months agoMerge branch 'test_mkfds_getopt' of https://github.com/masatake/util-linux
Karel Zak [Wed, 22 Feb 2023 10:39:52 +0000 (11:39 +0100)] 
Merge branch 'test_mkfds_getopt' of https://github.com/masatake/util-linux

* 'test_mkfds_getopt' of https://github.com/masatake/util-linux:
  test_mkfds: add missing terminator of the option spec list

15 months agolslogins: (man) reorder login statuses
Karel Zak [Wed, 22 Feb 2023 10:36:03 +0000 (11:36 +0100)] 
lslogins: (man) reorder login statuses

It's better to keep the order in the man page the same as used in the lslogins output.

Reported-by: Radka Skvarilova <rskvaril@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 months agoMerge branch 'blkid_opal_io' of https://github.com/bluca/util-linux
Karel Zak [Wed, 22 Feb 2023 10:32:05 +0000 (11:32 +0100)] 
Merge branch 'blkid_opal_io' of https://github.com/bluca/util-linux

* 'blkid_opal_io' of https://github.com/bluca/util-linux:
  libblkid: try LUKS2 first when probing
  libblkid: check if device is OPAL locked on I/O error

15 months agolibblkid: try LUKS2 first when probing
Luca Boccassi [Thu, 9 Feb 2023 01:21:07 +0000 (01:21 +0000)] 
libblkid: try LUKS2 first when probing

If a device is locked with OPAL we'll get an I/O error when probing
past the LUKS2 header. Try it first to avoid this issue. It is
useful regardless, as when we find a LUKS superblock we stop there
anyway, no need to check futher.

Signed-off-by: Luca Boccassi <bluca@debian.org>
15 months agolibblkid: check if device is OPAL locked on I/O error
Luca Boccassi [Wed, 22 Feb 2023 01:33:36 +0000 (01:33 +0000)] 
libblkid: check if device is OPAL locked on I/O error

Use the appropriate ioctl, if available, to check if a device is locked
when we get an I/O error. Save the information so that we don't have to
repeat the ioctl.

Before:

LIBBLKID_DEBUG=all blkid -p /dev/sdd2
206326: libblkid:     INIT: library debug mask: 0xffff
206326: libblkid:     INIT: library version: 2.38.1 [04-Aug-2022]
Available "LIBBLKID_DEBUG=<name>[,...]|<mask>" debug masks:
   all      [0xffff] : info about all subsystems
   cache    [0x0004] : blkid tags cache
   config   [0x0008] : config file utils
   dev      [0x0010] : device utils
   devname  [0x0020] : /proc/partitions evaluation
   devno    [0x0040] : conversions to device name
   evaluate [0x0080] : tags resolving
   help     [0x0001] : this help
   lowprobe [0x0100] : superblock/raids/partitions probing
   buffer   [0x2000] : low-probing buffers
   probe    [0x0200] : devices verification
   read     [0x0400] : cache parsing
   save     [0x0800] : cache writing
   tag      [0x1000] : tags utils
206326: libblkid: LOWPROBE: allocate a new probe
206326: libblkid: LOWPROBE: zeroize wiper
206326: libblkid: LOWPROBE: ready for low-probing, offset=0, size=234584276992, zonesize=0
206326: libblkid: LOWPROBE: whole-disk: NO, regfile: NO
206326: libblkid: LOWPROBE: start probe
206326: libblkid: LOWPROBE: zeroize wiper
206326: libblkid: LOWPROBE: chain safeprobe superblocks ENABLED
206326: libblkid: LOWPROBE: --> starting probing loop [SUBLKS idx=-1]
206326: libblkid: LOWPROBE: [0] linux_raid_member:
206326: libblkid: LOWPROBE:  call probefunc()
206326: libblkid: LOWPROBE:  read: off=234584211456 len=64
206326: libblkid: LOWPROBE:  read failed: Input/output error
206326: libblkid: LOWPROBE: <-- leaving probing loop (failed=-5) [SUBLKS idx=0]
206326: libblkid: LOWPROBE: freeing values list
206326: libblkid: LOWPROBE: end probe
206326: libblkid: LOWPROBE: zeroize wiper
206326: libblkid: LOWPROBE: free probe

After:

LIBBLKID_DEBUG=all blkid -p /dev/sdd2
206221: libblkid:     INIT: library debug mask: 0xffff
206221: libblkid:     INIT: library version: 2.38.1119 [28-Mar-2022]
Available "LIBBLKID_DEBUG=<name>[,...]|<mask>" debug masks:
   all      [0x00ffff] : info about all subsystems
   cache    [0x000004] : blkid tags cache
   config   [0x000008] : config file utils
   dev      [0x000010] : device utils
   devname  [0x000020] : /proc/partitions evaluation
   devno    [0x000040] : conversions to device name
   evaluate [0x000080] : tags resolving
   help     [0x000001] : this help
   lowprobe [0x000100] : superblock/raids/partitions probing
   buffer   [0x002000] : low-probing buffers
   probe    [0x000200] : devices verification
   read     [0x000400] : cache parsing
   save     [0x000800] : cache writing
   tag      [0x001000] : tags utils
206221: libblkid: LOWPROBE: allocate a new probe
206221: libblkid: LOWPROBE: zeroize wiper
206221: libblkid: LOWPROBE: ready for low-probing, offset=0, size=234584276992, zonesize=0
206221: libblkid: LOWPROBE: whole-disk: NO, regfile: NO
206221: libblkid: LOWPROBE: start probe
206221: libblkid: LOWPROBE: zeroize wiper
206221: libblkid: LOWPROBE: chain safeprobe superblocks ENABLED
206221: libblkid: LOWPROBE: --> starting probing loop [SUBLKS idx=-1]
206221: libblkid: LOWPROBE: [0] linux_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE:  read: off=234584211456 len=64
206221: libblkid: LOWPROBE:  read failed: Input/output error
206221: libblkid: LOWPROBE:  read: off=234584268800 len=256
206221: libblkid: LOWPROBE:  read failed: Input/output error
206221: libblkid: LOWPROBE:  read: off=0 len=256
206221: libblkid: LOWPROBE:  read: off=4096 len=256
206221: libblkid: LOWPROBE: [1] ddf_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE:  read: off=234584276480 len=512
206221: libblkid: LOWPROBE:  read failed: Input/output error
206221: libblkid: LOWPROBE: [2] isw_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [3] lsi_mega_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [4] via_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [5] silicon_medley_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [6] nvidia_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [7] promise_fasttrack_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [8] hpt45x_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [9] hpt37x_raid_member:
206221: libblkid: LOWPROBE:  read: off=4096 len=1024
206221: libblkid:   BUFFER:  reuse: off=4096 len=1024 (for off=4096 len=1024)
206221: libblkid: LOWPROBE: [10] adaptec_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [11] jmicron_raid_member:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE: [12] bcache:
206221: libblkid:   BUFFER:  reuse: off=4096 len=1024 (for off=4096 len=1024)
206221: libblkid: LOWPROBE: [13] bcachefs:
206221: libblkid:   BUFFER:  reuse: off=4096 len=1024 (for off=4096 len=1024)
206221: libblkid:   BUFFER:  reuse: off=4096 len=1024 (for off=4096 len=1024)
206221: libblkid: LOWPROBE: [14] ceph_bluestore:
206221: libblkid: LOWPROBE:  read: off=0 len=1024
206221: libblkid: LOWPROBE: [15] drbd:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid: LOWPROBE:  read: off=234584272896 len=104
206221: libblkid: LOWPROBE:  read failed: Input/output error
206221: libblkid: LOWPROBE:  read: off=234584272896 len=1392
206221: libblkid: LOWPROBE:  read failed: Input/output error
206221: libblkid: LOWPROBE: [16] drbdmanage_control_volume:
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: [17] drbdproxy_datalog:
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: [18] LVM2_member:
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE:  read: off=1024 len=1024
206221: libblkid:   BUFFER:  reuse: off=1024 len=1024 (for off=1024 len=1024)
206221: libblkid: LOWPROBE: [19] LVM1_member:
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: [20] DM_snapshot_cow:
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: [21] DM_verity_hash:
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: [22] DM_integrity:
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: [23] crypto_LUKS:
206221: libblkid: LOWPROBE:  call probefunc()
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=512)
206221: libblkid: LOWPROBE: assigning VERSION [superblocks]
206221: libblkid: LOWPROBE: assigning UUID [superblocks]
206221: libblkid: LOWPROBE: assigning LABEL [superblocks]
206221: libblkid: LOWPROBE:  free value LABEL
206221: libblkid: LOWPROBE: assigning SUBSYSTEM [superblocks]
206221: libblkid: LOWPROBE: assigning TYPE [superblocks]
206221: libblkid: LOWPROBE: assigning USAGE [superblocks]
206221: libblkid: LOWPROBE: <-- leaving probing loop (type=crypto_LUKS) [SUBLKS idx=23]
206221: libblkid: LOWPROBE: freeing values list
206221: libblkid: LOWPROBE: chain safeprobe topology DISABLED
206221: libblkid: LOWPROBE: chain safeprobe partitions ENABLED
206221: libblkid: LOWPROBE: Resetting partitions values
206221: libblkid: LOWPROBE: --> starting probing loop [PARTS idx=-1]
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: gpt: ---> call probefunc()
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=512)
206221: libblkid: LOWPROBE: gpt: <--- (rc = 1)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: ultrix: ---> call probefunc()
206221: libblkid: LOWPROBE:  read: off=15872 len=512
206221: libblkid: LOWPROBE: ultrix: <--- (rc = 1)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE:  read: off=28672 len=1024
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE: atari: ---> call probefunc()
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=512)
206221: libblkid: LOWPROBE: atari: <--- (rc = 1)
206221: libblkid: LOWPROBE: <-- leaving probing loop (failed=1) [PARTS idx=12]
206221: libblkid: LOWPROBE: parts: start probing for partition entry
206221: libblkid:    DEVNO: found devno 0x0830 as /dev/sdd
206221: libblkid: LOWPROBE: allocate a wholedisk probe
206221: libblkid: LOWPROBE: allocate a new probe
206221: libblkid: LOWPROBE: zeroize wiper
206221: libblkid: LOWPROBE: ready for low-probing, offset=0, size=256060514304, zonesize=0
206221: libblkid: LOWPROBE: whole-disk: YES, regfile: NO
206221: libblkid: LOWPROBE: partlist reset
206221: libblkid: LOWPROBE: parts: initialized partitions list (size=0)
206221: libblkid: LOWPROBE: --> starting probing loop [PARTS idx=-1]
206221: libblkid: LOWPROBE:  read: off=0 len=1024
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=1024)
206221: libblkid: LOWPROBE:  magic sboff=510, kboff=0
206221: libblkid: LOWPROBE: dos: ---> call probefunc()
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=512)
206221: libblkid: LOWPROBE: probably GPT -- ignore
206221: libblkid: LOWPROBE: dos: <--- (rc = 1)
206221: libblkid: LOWPROBE: gpt: ---> call probefunc()
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=0 len=512)
206221: libblkid: LOWPROBE:  #1 valid PMBR partition
206221: libblkid: LOWPROBE:  checking for GPT header at 1
206221: libblkid:   BUFFER:  reuse: off=0 len=1024 (for off=512 len=512)
206221: libblkid: LOWPROBE:  read: off=1024 len=16384
206221: libblkid: LOWPROBE: parts: create a new partition table (type=gpt, offset=512)
206221: libblkid: LOWPROBE: parts: add partition (start=2048, size=41943040)
206221: libblkid: LOWPROBE: parts: add partition (start=41945088, size=458172416)
206221: libblkid: LOWPROBE: gpt: <--- (rc = 0)
206221: libblkid: LOWPROBE: <-- leaving probing loop (type=gpt) [PARTS idx=4]
206221: libblkid: LOWPROBE: partitions probe done [rc=0]
206221: libblkid: LOWPROBE: returning partitions binary data
206221: libblkid: LOWPROBE: trying to convert devno 0x832 to partition
206221: libblkid: LOWPROBE: searching by offset/size
206221: libblkid: LOWPROBE: assigning PART_ENTRY_SCHEME [partitions]
206221: libblkid: LOWPROBE: assigning PART_ENTRY_UUID [partitions]
206221: libblkid: LOWPROBE: assigning PART_ENTRY_TYPE [partitions]
206221: libblkid: LOWPROBE: assigning PART_ENTRY_NUMBER [partitions]
206221: libblkid: LOWPROBE: assigning PART_ENTRY_OFFSET [partitions]
206221: libblkid: LOWPROBE: assigning PART_ENTRY_SIZE [partitions]
206221: libblkid: LOWPROBE: assigning PART_ENTRY_DISK [partitions]
206221: libblkid: LOWPROBE: parts: end probing for partition entry [success]
206221: libblkid: LOWPROBE: partitions probe done [rc=0]
206221: libblkid: LOWPROBE: end probe
206221: libblkid: LOWPROBE: zeroize wiper
206221: libblkid: LOWPROBE: returning VERSION value
206221: libblkid: LOWPROBE: returning UUID value
206221: libblkid: LOWPROBE: returning SUBSYSTEM value
206221: libblkid: LOWPROBE: returning TYPE value
206221: libblkid: LOWPROBE: returning USAGE value
206221: libblkid: LOWPROBE: returning PART_ENTRY_SCHEME value
206221: libblkid: LOWPROBE: returning PART_ENTRY_UUID value
206221: libblkid: LOWPROBE: returning PART_ENTRY_TYPE value
206221: libblkid: LOWPROBE: returning PART_ENTRY_NUMBER value
206221: libblkid: LOWPROBE: returning PART_ENTRY_OFFSET value
206221: libblkid: LOWPROBE: returning PART_ENTRY_SIZE value
206221: libblkid: LOWPROBE: returning PART_ENTRY_DISK value
/dev/sdd2: VERSION="2" UUID="a918f1d0-f1de-44f5-9d93-ce9dc15cc2c7" SUBSYSTEM="HW-OPAL" TYPE="crypto_LUKS" USAGE="crypto" PART_ENTRY_SCHEME="gpt" PART_ENTRY_UUID="39ed5135-46e4-ca44-837e-da3c0781367b" PART_ENTRY_TYPE="0fc63daf-8483-4772-8e79-3d69d8477de4" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="41945088" PART_ENTRY_SIZE="458172416" PART_ENTRY_DISK="8:48"
206221: libblkid:   BUFFER: Resetting probing buffers
206221: libblkid:   BUFFER:  remove buffer: [off=0, len=256]
206221: libblkid:   BUFFER:  remove buffer: [off=4096, len=256]
206221: libblkid:   BUFFER:  remove buffer: [off=4096, len=1024]
206221: libblkid:   BUFFER:  remove buffer: [off=0, len=1024]
206221: libblkid:   BUFFER:  remove buffer: [off=1024, len=1024]
206221: libblkid:   BUFFER:  remove buffer: [off=15872, len=512]
206221: libblkid:   BUFFER:  remove buffer: [off=28672, len=1024]
206221: libblkid: LOWPROBE:  buffers summary: 5120 bytes by 7 read() calls
206221: libblkid: LOWPROBE: resetting results
206221: libblkid: LOWPROBE:  free value VERSION
206221: libblkid: LOWPROBE:  free value UUID
206221: libblkid: LOWPROBE:  free value SUBSYSTEM
206221: libblkid: LOWPROBE:  free value TYPE
206221: libblkid: LOWPROBE:  free value USAGE
206221: libblkid: LOWPROBE:  free value PART_ENTRY_SCHEME
206221: libblkid: LOWPROBE:  free value PART_ENTRY_UUID
206221: libblkid: LOWPROBE:  free value PART_ENTRY_TYPE
206221: libblkid: LOWPROBE:  free value PART_ENTRY_NUMBER
206221: libblkid: LOWPROBE:  free value PART_ENTRY_OFFSET
206221: libblkid: LOWPROBE:  free value PART_ENTRY_SIZE
206221: libblkid: LOWPROBE:  free value PART_ENTRY_DISK
206221: libblkid:   BUFFER: Resetting probing buffers
206221: libblkid:   BUFFER:  remove buffer: [off=0, len=1024]
206221: libblkid:   BUFFER:  remove buffer: [off=1024, len=16384]
206221: libblkid: LOWPROBE:  buffers summary: 17408 bytes by 2 read() calls
206221: libblkid: LOWPROBE: free probe
206221: libblkid: LOWPROBE: free probe

Signed-off-by: Luca Boccassi <bluca@debian.org>
16 months agomount: add rootcontext=@target
Christian Göttsche [Tue, 21 Feb 2023 14:29:59 +0000 (15:29 +0100)] 
mount: add rootcontext=@target

Add a special value for rootcontext=, namely `@target`, to set the root
context of the new filesystem to the current context of the target
mountpoint.  Useful for in-memory filesystems, like tmpfs and ramfs.

Closes: #1830
16 months agolibmount: declare array of LSM options const
Christian Göttsche [Tue, 21 Feb 2023 14:28:45 +0000 (15:28 +0100)] 
libmount: declare array of LSM options const

16 months agoMerge branch 'lsfd-tcp6' of https://github.com/masatake/util-linux
Karel Zak [Tue, 21 Feb 2023 12:01:47 +0000 (13:01 +0100)] 
Merge branch 'lsfd-tcp6' of https://github.com/masatake/util-linux

* 'lsfd-tcp6' of https://github.com/masatake/util-linux:
  lsfd: use PRIu16 instead of SCNu16 in xasprintf
  lsfd: specify variables instead of types in sizeof operator
  lsfd: (test) add a case for TCPv6 sockets
  tests: (mkfds) add tcp6 factory
  lsfd: (man) write about TCP6 related columns
  lsfd: use extra information loaded from /proc/net/tcp6
  lsfd: (man) fix typos

16 months agolsfd: use PRIu16 instead of SCNu16 in xasprintf
Masatake YAMATO [Mon, 20 Feb 2023 15:19:19 +0000 (00:19 +0900)] 
lsfd: use PRIu16 instead of SCNu16 in xasprintf

Signed-off-by: Masatake YAMATO <yamato@redhat.com>