Re: /proc filesystem allows bypassing directory permissions on



On 03.11.2009 2:33, Martin Rex wrote:
Doing it for a socket might be a bad idea -- and usually impossible,
one cannot undo the shutdown(SHUT_WR) of a socket...

Nobody will ever need that, since sockets are bidirectional and their file descriptors are in fact both readable and writable. But changing access mode of regular and special files, directories and even pipes file descriptors is in fact possible and could be accomplished rather easily by checking the corresponding inode (this is true at least for Linux).
--

Sincerely Your, Dan.



Relevant Pages

  • Re: Socket leak (Was: Re: What triggers "No Buffer Space) Available"?
    ... :*groan* why couldn't this be happening on a server that I have better remote ... the processes that might be using sockets. ... you could just be running out of file descriptors ... Check your mbuf allocation statistics ...
    (freebsd-stable)
  • Re: trouble with socket programming and select()
    ... Once you have file descriptors hooked up to the sockets, ... accept new connections, too. ... Create the server socket. ... Process the sockets that need to be read from, written to, or fixed ...
    (comp.unix.programmer)
  • File Descriptors With High Values
    ... running out of file descriptors. ... "-1" checks and I'm nearly positive that all open sockets are being ... most of the sockets are valued over 100 and on runs where it ...
    (comp.unix.programmer)
  • Re: open fd management
    ... possibly so many as to endanger the rest of the ... > system and leave it without enough file descriptors to run. ... > number of sockets this process has open. ... Why don't you use setrlimit() to limit the number of file descriptor ...
    (comp.unix.programmer)
  • Re: write() and send() or sendto() ?
    ... > selectin Winsock works like the Unix selectas long as it is being ... > anything else but sockets. ... there can be file descriptors for which selectdoes not ...
    (comp.unix.programmer)