Page MenuHomeFreeBSD

linuxulator: fix SO_PEERCRED emulation after 1d24638d3e8
ClosedPublic

Authored by asomers on May 16 2026, 6:09 PM.
Tags
None
Referenced Files
F163208345: D57032.id177931.diff
Tue, Jul 21, 1:54 AM
F163182610: D57032.diff
Mon, Jul 20, 8:01 PM
F163162712: D57032.id177931.diff
Mon, Jul 20, 4:04 PM
F163125154: D57032.id177961.diff
Mon, Jul 20, 7:29 AM
Unknown Object (File)
Mon, Jul 20, 3:07 AM
Unknown Object (File)
Wed, Jul 15, 7:22 AM
Unknown Object (File)
Wed, Jul 15, 7:22 AM
Unknown Object (File)
Fri, Jul 10, 5:56 AM
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