Page MenuHomeFreeBSD

Linuxulator: complete LOCAL_PEERCRED support.
ClosedPublic

Authored by dchagin on May 26 2019, 7:06 PM.
Tags
None
Referenced Files
F136958110: D20415.id.diff
Thu, Nov 20, 8:20 PM
F136957527: D20415.id58073.diff
Thu, Nov 20, 8:17 PM
F136957285: D20415.id57920.diff
Thu, Nov 20, 8:16 PM
F136957161: D20415.id57919.diff
Thu, Nov 20, 8:15 PM
F136955317: D20415.diff
Thu, Nov 20, 8:05 PM
Unknown Object (File)
Tue, Nov 18, 2:48 PM
Unknown Object (File)
Fri, Nov 14, 2:35 PM
Unknown Object (File)
Fri, Nov 7, 5:53 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.