On Mon Jun 5 04:55:14 2023 +0000, Zebediah Figura wrote:
Wow, that is awkward. I would opine that getpeername() should be stubbed out for all AF_UNIX sockets, regardless of who created the peer. Even if it's possible to trace the peer back to a struct sock, it strikes me as an extra bit of complication that probably won't be used.
I feel that having correct `getpeername` functionality is worthwhile, and the implementation does not cause regressions elsewhere. While it does require a somewhat significant restructuring, it fixed a few unrelated TODOs in other tests.
That being said, since little that was specific to Unix sockets needed to be changed to achieve correct `getpeername` functionality, I think it would be best to explore this further in a separate merge request more focused on `getpeername` itself.
I will push a new revision without the changes to `getpeername` and wineserver's `struct sock`, and without the new tests of `getpeername` in `test_afunix` (this will be almost identical to the revision before the most recent one).