]> Cypherpunks repositories - gostls13.git/commit
syscall: drop dummy byte for oob in unixgram SendmsgN
authorLuca Bruno <luca.bruno@coreos.com>
Thu, 15 Jun 2017 11:35:43 +0000 (11:35 +0000)
committerIan Lance Taylor <iant@golang.org>
Tue, 29 Aug 2017 23:30:21 +0000 (23:30 +0000)
commit93da0b6e66f24c4c307e0df37ceb102a33306174
tree9e7a2337639f230ed4650abcdeeb4eea655f6dc7
parent5a7283f1467014fb1f5e149b76f61e0a3138accf
syscall: drop dummy byte for oob in unixgram SendmsgN

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/45872
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/syscall/creds_test.go
src/syscall/syscall_linux.go