[erlang-questions] unix domain sockets with abstract namespace: can't use all 108 bytes
Richard A. O'Keefe
ok@REDACTED
Wed May 3 06:14:41 CEST 2017
> On 2/05/2017, at 11:33 PM, Raimo Niskanen <raimo+erlang-questions@REDACTED> wrote:
>
> If the first byte is NUL and the length is larger than 0 then it must be an
> abstract address. But when this comes from above (from Erlang) and since
> we do not know if the host supports abstract addresses; if we give
> the kernel a first byte NUL but address length longer than SUN_LEN(su),
> will then we cause harm on some OS?
I'm puzzled here. First, I thought the context was *receiving* a name,
> when you get an address from e.g getsockname()
which presumably must be acceptable to the system.
Second, why don't we know if the host supports the Linux-only
abstract address extension or not?
Amongst other things, it is possible to find out by trying to
a Linux domain socket with abstract address #[0 1] and length
including two bytes. If that doesn't work, abstract addresses
are not supported. This would be done just once, at installation.
Wouldn't that work?
More information about the erlang-questions
mailing list