In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: |> In article <[EMAIL PROTECTED]>, |> Michael Butscher <[EMAIL PROTECTED]> wrote: |> |> >Normally any user could connect to an open socket on a machine |> >regardless which user established the socket (the user's program, to be |> >precise). |> |> That's not true. On *nix systems, a socket is a file, and is subject to |> the usual file ownership and protection mechanisms.
I am afraid that BOTH answers are badly wrong! Sockets are often accessed via special files, but are not files. They may also be accessed by port numbers, for example. Secondly, even when they are accessed via files, FIFOs generally do NOT use the usual file ownership and protection mechanisms to control access. Blame Berkeley for that :-( It is normal for the actual file ownership and permissions to be ignored, and a similar set (hidden internally) to be used. You are right that there is almost always such control. While any user can attempt to open any socket accessed by port number, the rules for when it is permitted are complicated to a degree, and depend on the system, configuration and program that is listening on that port. Regards, Nick Maclaren. -- http://mail.python.org/mailman/listinfo/python-list