[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#645469: bind() fails for AF_UNIX sockets with EINVAL



On Sun, 2011-10-16 at 13:44:29 +0200, Robert Millan wrote:
> 2011/10/16 Jonathan Nieder <jrnieder@gmail.com>:
> > More importantly, there is the question you raised of whether this
> > should be done in userspace by libc instead.  That would avoid
> > upstream having to wonder, "why should we care what happens when
> > someone using a BSD4.3-style bind() calls our BSD4.4-style kernel"?
> > So it's tempting.

Yes, I think this should be handled in glibc, and the sockaddr_un be
fixed to match what the kernel expects, the compat code would be there
to fix applications built against the bogus sockaddr_un type.

> I guess upstream would appreciate if we get rid of the length limit.
> It sets the maximum path length for sockets to 104 chars, is that so?

I'm not entirely sure what you mean with that. If you mean making
sockaddr_un variable size, well that cannot be done, as it's expected
that sockaddr_storage can hold space for any sockaddr type.

regards,
guillem



Reply to: