linuxulator: fix SO_PEERCRED emulation after 1d24638d3e8
For Linux binaries, sopt->sopt_td may be null. And there's also no
need to check it, since struct l_ucred has the same layout on 32-bit
systems as on 64-bit ones.
PR: 295333
Reported by: Miguel Gomes <miguel.dias.gomes at protonmail.com>
Fixes: 1d24638d3e8 ("Fix LOCAL_PEERCRED in 32-bit compat mode")
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D57032
(cherry picked from commit 4cee16d471d47f4673e4d2c66f7a96d4e6d86ee9)
ping: fix listing test cases when scapy is not installed
The ATF-python test program was attempting to list test cases that
require scapy. But it attempted to import the scapy module before the
test cases had been listed, resulting in an ImportError that kyua
interpreted as a test program crash.
Fix this behavior by handling that ImportError well enough to list test
cases, but not run them. If scapy isn't present, Kyua will refuse to
run the test cases. But it needs to be able to list them in order to
know to skip them.
Sponsored by: ConnectWise
Reviewed by: maxim
Differential Revision: https://reviews.freebsd.org/D56765
(cherry picked from commit 3e845b1090565912375c5578cf0399d27b7fa70c)
nfs_clsubs.c: Fix ncl_getcookie() when "pos" is negative
In ncl_getcookie(), a very large value for "off" for
a directory can result in "pos" being set to a bogus
value (including a negative one), due to truncation.
When "pos" is negative, is can skip past the
while (pos >= NFSNUMCOOKIES) loop and return a
bogus pointer instead of NULL.
This patch changes the type to u_int and also adds
a sanity check for a very large "off" to ensure that
a NULL pointer is returned for this case.
This bug has been in the code for decades and I am
not aware of any report of it causing a problem for
users.
(cherry picked from commit 448b4c3f7f7dd4c7e1707d7b833a26294c297182)
nfs_clsubs.c: Fix ncl_getcookie() when "pos" is negative
In ncl_getcookie(), a very large value for "off" for
a directory can result in "pos" being set to a bogus
value (including a negative one), due to truncation.
When "pos" is negative, is can skip past the
while (pos >= NFSNUMCOOKIES) loop and return a
bogus pointer instead of NULL.
This patch changes the type to u_int and also adds
a sanity check for a very large "off" to ensure that
a NULL pointer is returned for this case.
This bug has been in the code for decades and I am
not aware of any report of it causing a problem for
users.
(cherry picked from commit 448b4c3f7f7dd4c7e1707d7b833a26294c297182)
cap_net: do not allow new limits to drop keys from the old ones
If the old limit had family/hosts/sockaddr set, the new limit must
have them too. Before, a missing key in the new limit was treated as
"allow any", which let a caller silently extend their limits.
Reported by: Joshua Rogers of AISLE Research Team
Reviewed by: markj
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D56991
(cherry picked from commit d705a519525f2acae3c1efba11436ec6ee8aea0a)
cap_net: do not allow new limits to drop keys from the old ones
If the old limit had family/hosts/sockaddr set, the new limit must
have them too. Before, a missing key in the new limit was treated as
"allow any", which let a caller silently extend their limits.
Reported by: Joshua Rogers of AISLE Research Team
Reviewed by: markj
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D56991
(cherry picked from commit d705a519525f2acae3c1efba11436ec6ee8aea0a)
net-mgmt/thanos: Fix BUILD_DATE syntax to fix build
* Change the syntax of BUILD_DATE after switching to GO_LDFLAGS as
port was using double quotes but Uses/go.mk has single quotes where it
interpolates GO_LDFLAGS, which requires use of different syntax.
* Also switch date format of BUILD_DATE to classic ISO 8601.
PR: 295384
Reported by: Chad Jacob Milios <milios at ccsys.com>
Approved by: db@, yuri@ (Mentors, implicit)
Fixes: 2af7cdf6fd59 * net-mgmt/thanos: improve port