tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mount_union(8) vs. open(O_RDWR)



On Thu, Dec 02, 2021 at 05:23:37PM +0100, J. Hannken-Illjes wrote:
 > This behaviour comes from sys/fs/union/union_vnops.c::union_access():
 > 
 >  /*
 >   * Check access permission on the union vnode.
 >   * The access check being enforced is to check
 >   * against both the underlying vnode, and any
 >   * copied vnode.  This ensures that no additional
 >   * file permissions are given away simply because
 >   * the user caused an implicit file copy.
 >   */
 >  int
 >  union_access(void *v)
 > 
 > As the underlying node is on a ro-mounted file system this will
 > always fail with EROFS if the underlying node exists.

That seems like the wrong thing, since one of the original and fairly
clear use cases for onionfs is providing a read-write layer over a
read-only volume.

What the right thing is, I don't know. At one point I was going to try
to come up with a coherent semantic model for onionfs that satisfies
all the known use cases (or determine that none exists, which is more
likely) but that was a long time ago and I've forgotten all the
details.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index