Hard links to directories: why not?

Michael Richardson michael at fts1.uucp
Tue Jul 31 16:38:20 AEST 1990


In article <1906 at ns-mx.uiowa.edu> jones at pyrite.cs.uiowa.edu (Douglas W. Jones,201H MLH,3193350740,3193382879) writes:
>The CAP file system was capability based, but the decision to allow
>directories to be circularly linked is independent of the access control
>mechanisms they used on their capabilities.  In UNIX terms, the CAP
>file system can be thought of as having an access rights field like that
>in each UNIX I-node, but this was stored in the link to the file, so each
>link could confer different access rights to the file.

  Hmm. Couldn't something like that be done with symbolic links?
  I've never seen a symbolic link that was other than:
  'lrwxrwxrwx' (0777) 

  I'm curious as to what meaning the flags have to a symbolic link? 
_MY_ guess (not having access to a BSD machine, or manuals anymore, I can't 
check and/or do experiments) is that the reading would refer to being allowed to
find out what the symbolic link refers to, write being able to change it what
it refers to, and search/execute, being able to follow it.
  Seems to me that this is a HUGE security hole (0777 mode that is), so my 
guess is that I'm wrong, are the mode bits simply ignored? 
  If above is true (or other permissions are needed to modify a symbolic link,
such as write permission to directory [changing a symbolic link is not possible,
and one must delete it, and re-create it], or at least only the creator can change it),
has anyone ever set the mode to anything other than my equivalent of 0555? To what
purpose?

-- 
   :!mcr!:            | < political commentary currently undergoing Senate >
   Michael Richardson | < committee review. Returning next house session.  >
 Play: mcr at julie.UUCP Work: michael at fts1.UUCP Fido: 1:163/109.10 1:163/138
    Amiga----^     - Pay attention only to _MY_ opinions. -   ^--Amiga--^



More information about the Comp.unix.wizards mailing list