Symlinks on read-only FS
Deomid Ryabkov
myself at rojer.pp.ru
Tue Sep 19 22:00:59 PDT 2006
Perry Hutchison wrote:
> So the sort of write access being validated here would be writing to
> the symlink itself (i.e. the definition)?
symlinks are dereferenced during name lookup and are not affected by
the write mount options of the filesystems they reside on.
you can open a file for write by accessing a symlink pointing to it,
even though the symlink itself may reside on a read-only filesystem.
and you can disregard what i said in my previous post: there's no interface
to change the symlink after it was created.
actually, i'm not sure there is a real-world case in which this code
would be invoked with VLNK.
checking write permissions on a symlink? access(2)/eaccess(2) dereference symlinks.
but if, for whatever reason, someone calls VOP_ACCESS on read-only
UFS filesystem, checking if writing to symlink itself is ok, it will be denied.
which makes sense.
--
Deomid Ryabkov aka Rojer
myself at rojer.pp.ru
rojer at sysadmins.ru
ICQ: 8025844
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3295 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060920/2e4411a3/smime.bin
More information about the freebsd-hackers
mailing list