]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
2 years agolibuuid: fix lib internal cache size
Michael Trapp [Mon, 6 Mar 2023 10:40:20 +0000 (10:40 +0000)] 
libuuid: fix lib internal cache size

The lib internal cache improves throughput in high load
scenarios but for applications with a low request rate,
the cache size must be adapted to this situation.
Therefore the cache size should be changed to the current
requirements of the application during runtime.

2 years agolib/env: fix memory leak [coverity scan]
Karel Zak [Thu, 9 Mar 2023 12:10:41 +0000 (13:10 +0100)] 
lib/env: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'warning' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 9 Mar 2023 11:21:10 +0000 (12:21 +0100)] 
Merge branch 'warning' of https://github.com/t-8ch/util-linux

* 'warning' of https://github.com/t-8ch/util-linux:
  libmount: inhibit warning about mask being unused

2 years agoMerge branch 'libtool-workaround' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 9 Mar 2023 11:20:19 +0000 (12:20 +0100)] 
Merge branch 'libtool-workaround' of https://github.com/t-8ch/util-linux

* 'libtool-workaround' of https://github.com/t-8ch/util-linux:
  build-sys: work around broken cross-compiles on Debian

2 years agoMerge branch 'unshare' of https://github.com/jwilk-forks/util-linux
Karel Zak [Thu, 9 Mar 2023 11:19:10 +0000 (12:19 +0100)] 
Merge branch 'unshare' of https://github.com/jwilk-forks/util-linux

* 'unshare' of https://github.com/jwilk-forks/util-linux:
  mount: (man) add missing commas

2 years agoMerge branch 'waitpid/exclusive' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 9 Mar 2023 11:18:23 +0000 (12:18 +0100)] 
Merge branch 'waitpid/exclusive' of https://github.com/t-8ch/util-linux

* 'waitpid/exclusive' of https://github.com/t-8ch/util-linux:
  waitpid: detect exlusive options with standard mechanism

2 years agoMerge branch 'lsfd-packet' of https://github.com/masatake/util-linux
Karel Zak [Thu, 9 Mar 2023 11:17:46 +0000 (12:17 +0100)] 
Merge branch 'lsfd-packet' of https://github.com/masatake/util-linux

* 'lsfd-packet' of https://github.com/masatake/util-linux:
  tests: (lsfd) add more cases for packet sockets
  tests: (mkfds) don't specify a protocol in connect(2) for AF_PACKET socket
  lsfd: (man) write more about NAME column
  lsfd: use extra information loaded from /proc/net/packet
  lsfd: add a helper function decoding interface indexes
  lsfd: make items in netns_tree extensible
  lsfd: simplify functions for comparing items
  lsfd: (style) reformat colinfo array

2 years agoMerge branch 'fix_cal_num_months' of https://github.com/JadingTsunami/util-linux
Karel Zak [Thu, 9 Mar 2023 11:15:51 +0000 (12:15 +0100)] 
Merge branch 'fix_cal_num_months' of https://github.com/JadingTsunami/util-linux

* 'fix_cal_num_months' of https://github.com/JadingTsunami/util-linux:
  cal: Update column test to show full year output in 5-column mode.
  cal: fix multi-month printing.

2 years agolibfdisk: Fix randomly generated GPT UUID's
Toomas Losin [Sun, 5 Mar 2023 23:57:55 +0000 (15:57 -0800)] 
libfdisk: Fix randomly generated GPT UUID's

Fdisk commands that create random GPT UUID's result in values that are
not UEFI-compliant being written to disk: The "g" command creates a
new GPT whose in-core DiskGUID value is entirely big-endian; the "n"
command creates a GPT partition whose in-core UniquePartitionGUID
value is entirely big-endian.  Those big-endian values are written to
disk by the "w" command rather than the mix of little- and big-endian
spec'd by UEFI.

This was caused by a libfdisk patch in 2017 that was addressing
warnings about "taking address of packed member".  Reading gpt.c finds
two instances of dead code which suggests that perhaps there was some
confusion between a struct and a pointer to a struct.  The intent must
have been to convert the randomly generated big-endian RFC 4122 UUID
values to UEFI's mixed-endian but the confusion(?) resulted in some
dead code and non-conversion of the UUID's.

This patch corrects the breakage while still avoiding "taking address
of packed member" warnings.  The "w" command will once again write
UEFI-compliant values to disk.

Fixes: 92e486f80ef8 ("libfdisk: fix guid usage of packed struct gpt_entry")
Signed-off-by: Toomas Losin <tlo@lenrek.net>
2 years agobuild-sys: work around broken cross-compiles on Debian
Thomas Weißschuh [Tue, 7 Mar 2023 22:10:42 +0000 (22:10 +0000)] 
build-sys: work around broken cross-compiles on Debian

See #2102

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agomount: (man) add missing commas
Jakub Wilk [Mon, 6 Mar 2023 09:20:38 +0000 (10:20 +0100)] 
mount: (man) add missing commas

2 years agotests: (lsfd) add more cases for packet sockets
Masatake YAMATO [Fri, 3 Mar 2023 06:58:18 +0000 (15:58 +0900)] 
tests: (lsfd) add more cases for packet sockets

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agotests: (mkfds) don't specify a protocol in connect(2) for AF_PACKET socket
Masatake YAMATO [Fri, 3 Mar 2023 06:48:44 +0000 (15:48 +0900)] 
tests: (mkfds) don't specify a protocol in connect(2) for AF_PACKET socket

The protocol is specified in socket(2) stage already.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: (man) write more about NAME column
Masatake YAMATO [Sun, 5 Mar 2023 07:26:40 +0000 (16:26 +0900)] 
lsfd: (man) write more about NAME column

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: use extra information loaded from /proc/net/packet
Masatake YAMATO [Thu, 2 Mar 2023 07:45:59 +0000 (16:45 +0900)] 
lsfd: use extra information loaded from /proc/net/packet

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: add a helper function decoding interface indexes
Masatake YAMATO [Wed, 1 Mar 2023 14:34:09 +0000 (23:34 +0900)] 
lsfd: add a helper function decoding interface indexes

Thomas Weißschuh <thomas@t-8ch.de> suggested using arrays instead
of tree.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: make items in netns_tree extensible
Masatake YAMATO [Wed, 1 Mar 2023 13:42:49 +0000 (22:42 +0900)] 
lsfd: make items in netns_tree extensible

2 years agolsfd: simplify functions for comparing items
Masatake YAMATO [Sun, 5 Mar 2023 03:44:37 +0000 (12:44 +0900)] 
lsfd: simplify functions for comparing items

Suggested-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: (style) reformat colinfo array
Masatake YAMATO [Sun, 5 Mar 2023 00:50:51 +0000 (09:50 +0900)] 
lsfd: (style) reformat colinfo array

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolibmount: inhibit warning about mask being unused
Thomas Weißschuh [Sun, 5 Mar 2023 14:08:45 +0000 (14:08 +0000)] 
libmount: inhibit warning about mask being unused

2 years agocal: Update column test to show full year output in 5-column mode.
JadingTsunami [Fri, 3 Mar 2023 17:55:08 +0000 (09:55 -0800)] 
cal: Update column test to show full year output in 5-column mode.

2 years agowaitpid: detect exlusive options with standard mechanism
Thomas Weißschuh [Fri, 3 Mar 2023 15:54:26 +0000 (15:54 +0000)] 
waitpid: detect exlusive options with standard mechanism

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years agocal: fix multi-month printing.
JadingTsunami [Fri, 3 Mar 2023 06:13:45 +0000 (22:13 -0800)] 
cal: fix multi-month printing.

2 years 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>
2 years 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>
2 years 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.

2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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 $?

2 years 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.

2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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

2 years 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>
2 years 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

2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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
  ...

2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>