Thread (20 messages) flat view 20 messages, 5 authors, 2012-08-14

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

From: H. Peter Anvin <hidden>
Date: 2012-08-10 18:31:48
Also in: linux-nfs, lkml

On 08/10/2012 11:26 AM, Alan Cox wrote:
quoted
On that whole subject...

Do we need a Unix domain socket equivalent to openat()?
I don't think so. The name is just a file system indexing trick, it's not
really the socket proper. It's little more than "ascii string with
permissions attached" - indeed we also support an abstract name space
which for a lot of uses is actually more convenient.
I don't really understand why Unix domain sockets is different than any
other pathname users in this sense.  (Actually, I have never understood
why open() on a Unix domain socket doesn't give the equivalent of a
socket() + connect() -- it would make logical sense and would provide
additional functionality).

It would be different if the Unix domain sockets simply required an
absolute pathname (it is not just about the root, it is also about the
cwd, which is where the -at() functions come into play), but that is not
the case.

The abstract namespace is irrelevant for this, obviously.
AF_UNIX between roots raises some interesting semantic questions when
you begin passing file descriptors down them as well.
Why is that?  A file descriptor carries all that information with it...

	-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help