On OpenIndiana (illumos) with Samba 4.25.0 as an AD domain member, winbindd contacts the DC, but every request forwarded to a domain child fails: wbinfo -t, -P and all user and group lookups fail. The child logs: winbindd_dual_ndr.c:492 set_remote_addresses: tsocket_address_bsd_from_sockaddr failed: NT_STATUS_ACCESS_DENIED set_remote_addresses() calls getpeername() and getsockname() on the unnamed AF_UNIX socketpair between the winbindd parent and the child. On illumos both succeed with a zero length address (Linux returns the address family only, length 2). tsocket_address_bsd_from_sockaddr() rejects an address shorter than sa_family with EINVAL. The error path then passes the return value -1, not errno, to map_nt_error_from_unix(), which maps unknown values to NT_STATUS_ACCESS_DENIED, hence the misleading status. The code is unchanged in current master. Two patches against master are attached: the first passes errno, the second fills in AF_UNIX when the returned address is shorter than the family. Tested on OpenIndiana 2026.04 with current master (6365593b), winbindd from the build tree joined to a Samba AD domain: - master: wbinfo -P, -t, -n and -i fail, the log shows the error above; - with the first patch: same failures, the log now says NT_STATUS_INVALID_PARAMETER; - with both patches: wbinfo -P, -t, -n and -i succeed and set_remote_addresses logs nothing. The same changes applied to 4.25.0 are in production since 2026-10-06 (Windows clients): net ads testjoin, wbinfo -t/-P/-r, id and getent.
Created attachment 19298 [details] Patches for master