tests: fix remaining test failures under _FORTIFY_SOURCE

The getgroups test is a NetBSD tests, so just apply our larger hammer
and disable the feature entirely.  The audit test can take a more
surgical approach and use __ssp_real() appropriately, since it's a local
one.

PR:		294881
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56735
This commit is contained in:
Kyle Evans committed 2026-04-30 21:58:48 -05:00
1 parent d98f4f0698
commit 910f78a514
3 files changed
+11 -1

No files matched your search

+7
View File
@@ -75,6 +75,13 @@ __ssp_redirect_raw_impl(char *, gets_s, gets_s,
}
retbuf = __ssp_real(gets_s)(buf, len);
/*
* If the implementation did *not* handle the case correctly, then
* there's a risk that they could have corrupted us into not failing
* here. We have tests that cover this, so we'll just count on finding
* a broken implementation early on in a less hostile environmnt.
*/
if (need_fail && retbuf != NULL)
__chk_fail();
return (retbuf);