Sockets and open()

Fredrik Tolf (fredrik@dolda2000.cjb.net)
Mon, 7 Apr 2003 05:11:39 +0200


Hi everyone!
This is an issue that I can hardly believe that I haven't found any references
for outside of here; it should be fundemental enough. I have searched far and
wide, without being able to find anything at all. If you know of any
references, please point me to them, so that I know where they have been
hiding from me all this time.
Anyway, here it comes: How comes you can't use an ordinary open() call to
connect to a UNIX domain socket? Although I haven't been able to afford the
POSIX standard, that would seem like the natural behaviour to me. If memory
serves me, the manpage for open on OpenBSD even suggests such a behaviour
(although it is "currently not supported"), right? Nontheless, it apparently
returns ENXIO under Linux. Is this _really_ the correct behaviour? It seems
so strange to me, although I can't believe that it hasn't been implemented
because it's too hard or something like that.
It would be so immensely practical to be able to open() UNIX sockets. Is it
some kind of security consideration that I fail to see?

Thank you in advance,
Fredrik Tolf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/