> what your test program was actually doing. But you seem to be assuming that > calling fchmod on a socket descriptor should affect the permissions on the > socket file (assuming the socket is bound). Is that documented anywhere? > POSIX > says that the behavior of fchmod on a socket descriptor is unspecified
The socket file descriptor for a bound UNIX sockets refers to an object in a filesystem (it's practically a file), which the bind() system call creates. The access to the socket is controlled by the permission bits, when someone actually tries to connect to it, so permissions should be working for these objects (otherwise, there's no other way!) And fchmod() for a bound Unix socket works on Linux and many other Unix flavors, actually. Anton Lavrentiev Contractor NIH/NLM/NCBI -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple