Subject: Re: misc/6166: No obvious documentation on symlink modes
To: None <gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 09/16/1998 15:35:43
>> The fact that the syscall is capable of setting the suid bits which
>> are meaningless does not reflect on the fact that the syscall is
>> capable of setting other bits which are meaningful.
This is very true; I was going to say something similar. (Realize
there is no separate syscall "set setuid bit"; it's part of chmod(2).
The setuid bit has no meaning for non-executable plain files; does this
mean it's STUPID to have chmod(2) capable of setting it?)
> Is the actual behaviour of _any_ of the mode bits on symlinks
> documented? The normal description of rwx don't really apply,
> because, well, symlinks are and always have been special...
Actually, the 0555 bits are very similar to their semantics for
directories: the r bit means you can readlink() the link, the x bit
means you can follow it during a path walk. (I think this happens only
if the filesystem in question is mounted with the symperm option, which
doesn't show up when you run "mount" because of a type size botch I've
been meaning to fix for a while now.)
As far as I know the 07222 bits mean nothing at present. I've got some
ideas for them, some more implementable than others...when I get some
time I may do some experimental implementation work.
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B