• Luca Bruno's avatar
    syscall: drop dummy byte for oob in unixgram SendmsgN · 93da0b6e
    Luca Bruno authored
    This commit relaxes SendmsgN behavior of introducing a dummy 1-byte
    payload when sending ancillary-only messages.
    The fake payload is not needed for SOCK_DGRAM type sockets, and actually
    breaks interoperability with other fd-passing software (journald is one
    known example). This introduces an additional check to avoid injecting
    dummy payload in such case.
    
    Full reference at https:/golang.org/issue/6476#issue-51285243
    
    Fixes #6476
    
    Change-Id: I19a974b4e7920e002bd0556259ab766572358520
    Reviewed-on: https://go-review.googlesource.com/45872Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    93da0b6e
creds_test.go 3.26 KB