Re: Fix for ssh-1.2.27 symlink/bind problem

From: Casper Dik (casperat_private)
Date: Wed Oct 06 1999 - 02:06:07 PDT

  • Next message: Robert G. Ferrell: "Re: Time to update those CGIs again"

    >  It has always been my understanding of UNIX sockets that they need
    >not appear in the filesystem at all; whether inodes and directory
    >entries are allocated for them is an implementation detail.  The only
    >guarantee is that if one process is listen()ing on a socket, and
    >another process connect()s to a socket with the same path, they will
    >be talking to each other.
    
    Yes, that's in the 4.2 BSD manuals.
    
    
    >  If this is not the desired behavior, at least a mechanism needs to
    >be provided which can instruct the kernel not to follow symlinks (like
    >the O_EXCL or O_NOFOLLOW flags passed to open(2) on BSD or Linux) when
    >binding to a UNIX domain socket.
    
    It would be interesting to make a comparison between the various flavours
    of Unix and the various system calls that create non files to see whether
    they follow symlinks or not.
    
    On Solaris, only open(O_CREAT) (w/o O_EXCL) and creat() do so;
    the following do not follow symbolic links as the last component of
    the pathname:
    
    	mknod (making pipes or devices)
    	mkdir
    	bind
    
    	(others?)
    	
    	(doors are created as files followed by fattach, so the
    	user has control)
    
    Casper
    



    This archive was generated by hypermail 2b30 : Fri Apr 13 2001 - 15:06:52 PDT