Page MenuHomeFreeBSD

linuxulator: fix SO_PEERCRED emulation after 1d24638d3e8
ClosedPublic

Authored by asomers on May 16 2026, 6:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 19, 2:31 PM
Unknown Object (File)
Fri, Jun 19, 6:41 AM
Unknown Object (File)
Wed, Jun 17, 9:08 AM
Unknown Object (File)
Wed, Jun 17, 1:00 AM
Unknown Object (File)
Tue, Jun 16, 5:44 PM
Unknown Object (File)
Sat, Jun 13, 7:16 PM
Unknown Object (File)
Mon, Jun 8, 12:48 PM
Unknown Object (File)
Thu, Jun 4, 6:10 PM
Subscribers

Details

Summary

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@protonmail.com>
Fixes: 1d24638d3e8 ("Fix LOCAL_PEERCRED in 32-bit compat mode")
MFC after: 3 days

Test Plan

Tested with Rust's Nix crate's test suite, built for Linux,

		both 64-bit and 32-bit.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable