]>
git.ipfire.org Git - thirdparty/util-linux.git/log
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>
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>
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>
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>
Masatake YAMATO [Wed, 1 Mar 2023 13:42:49 +0000 (22:42 +0900)]
lsfd: make items in netns_tree extensible
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>
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>
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
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
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
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
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
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>
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>
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 .
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>
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>
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>
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>
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>
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
Yuri Chornoivan [Thu, 2 Mar 2023 13:38:22 +0000 (14:38 +0100)]
po-man: update uk.po (from translationproject.org)
Мирослав Николић [Thu, 2 Mar 2023 13:38:22 +0000 (14:38 +0100)]
po-man: update sr.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)
Temuri Doghonadze [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)]
po: add ka.po (from translationproject.org)
Yuri Chornoivan [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)]
po: update uk.po (from translationproject.org)
Takeshi Hamasaki [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)]
po: update ja.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)
Antonio Ceballos Roa [Thu, 2 Mar 2023 13:37:33 +0000 (14:37 +0100)]
po: update es.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)
Jordi Mas i Hernàndez [Thu, 2 Mar 2023 13:37:32 +0000 (14:37 +0100)]
po: update ca.po (from translationproject.org)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 $?
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.
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>
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>
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>
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>
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>
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>
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>
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
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
...
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>