Re: Symlinks on read-only FS



Is the inclusion of VLNK here correct? I would think that
only the target of the symlink should matter: if it happens
to point onto a writable FS, the fact that the symlink itself
is on a ROFS should not matter.

yes, it is correct.
short symbolic links are stored in the inode itself, so if you
modify a short link, you'll be modifying metadata, which is
not allowed. it could be argued, that as long as the change is
restricted to one inode, it could be tolerable, but moreover,
if your short symbolic link is modified to be longer than fits
in inode, a disk block will need to be allocated, which would
involve a change to block map, which is certainly not desirable
for read-only mounts.

So the sort of write access being validated here would be writing to
the symlink itself (i.e. the definition)? I did not know that could
be done. I had expected that the caller would eventually dereference
the link, and write to its target.

Certainly we wouldn't want to allow changing what the link itself
contains if it is on a ROFS -- indeed this might not even be possible
(e.g. if the FS is recorded on a CDROM).
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • RE: Curious fileutils/coreutils behaviour.
    ... > it to operate on the target. ... Changing ownership of a symlink is rarely ... (change link rather than target) ... obvious ones - a common security error. ...
    (Bugtraq)
  • Re: slpath v0.001
    ... You have to string them all back together for the test. ... in positional parameters, there may be an efficient way to string them ... because I have to include the target of the symlink in the archive ...
    (comp.unix.shell)
  • Re: [RFC] fix sysfs symlinks
    ... >> it always sees the old target if target is renamed and obviously does not ... The page symlink operations as used by current sysfs ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: pax misbehavior
    ... not be a link without any target at all. ... So this looks like a POSIX ... AIX pax, for instance, doesn't do that. ... symlink target modification heuristic may be updated to exclude the ...
    (freebsd-stable)
  • Re: slpath v0.001
    ... Why care whether there is a symbolic link ... > after sorting the list and removing duplicates, ... because I have to include the target of the symlink in the archive ...
    (comp.unix.shell)