]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility
authorAndrei Gherzan <andrei.gherzan@canonical.com>
Thu, 26 Jan 2023 16:55:48 +0000 (16:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:42 +0000 (12:59 +0100)
commit15aa6a4274fbbd595435dea72c193f95543c756d
treec4e9de006b26d399c601c8a5ee8d84d2cff1a0ad
parentad549f06e3de3f1e7dac857fb629845fee3423a5
selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility

[ Upstream commit a6efc42a86c0c87cfe2f1c3d1f09a4c9b13ba890 ]

"tcpdump" is used to capture traffic in these tests while using a random,
temporary and not suffixed file for it. This can interfere with apparmor
configuration where the tool is only allowed to read from files with
'known' extensions.

The MINE type application/vnd.tcpdump.pcap was registered with IANA for
pcap files and .pcap is the extension that is both most common but also
aligned with standard apparmor configurations. See TCPDUMP(8) for more
details.

This improves compatibility with standard apparmor configurations by
using ".pcap" as the file extension for the tests' temporary files.

Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/cmsg_ipv6.sh