Page MenuHomeFreeBSD

Linuxulator: complete LOCAL_PEERCRED support.
ClosedPublic

Authored by dchagin on May 26 2019, 7:06 PM.
Tags
None
Referenced Files
F147583539: D20415.id57920.diff
Thu, Mar 12, 2:39 AM
F147528588: D20415.diff
Wed, Mar 11, 4:06 PM
F147495046: D20415.diff
Wed, Mar 11, 10:28 AM
Unknown Object (File)
Wed, Mar 11, 12:37 AM
Unknown Object (File)
Jan 25 2026, 1:24 AM
Unknown Object (File)
Jan 22 2026, 11:34 PM
Unknown Object (File)
Dec 12 2025, 3:05 AM
Unknown Object (File)
Dec 8 2025, 2:22 PM
Subscribers

Details

Summary

Cache pid of the remote process in the struct xucred. Do not bump XUCRED_VERSION as struct layout is not changed.

PR: 215202

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Also cache client process pid

I assume you used a union in struct xucred because a pointer has a different size on different architectures? You could use something like this:

pid_t cr_pid;
u_char _cr_unused1[sizeof(void *)-sizeof(pid_t)];

But perhaps that's not really an improvement.

This revision is now accepted and ready to land.May 27 2019, 1:07 PM
In D20415#440959, @tijl wrote:

I assume you used a union in struct xucred because a pointer has a different size on different architectures? You could use something like this:

sure

pid_t cr_pid;
u_char _cr_unused1[sizeof(void *)-sizeof(pid_t)];

But perhaps that's not really an improvement.

my variant is better for static struct xucred initialization
thanks

This revision was automatically updated to reflect the committed changes.