Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Sep 06 20:56:49 PDT
From:      perryh@pluto.rain.com (Perry Hutchison)
To:        myself@rojer.pp.ru
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Symlinks on read-only FS
Message-ID:  <10609200356.AA21953@pluto.rain.com>
In-Reply-To: <4510AF6D.2060809@rojer.pp.ru>
References:  <10609200101.AA21405@pluto.rain.com> <4510AF6D.2060809@rojer.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10609200356.AA21953>