NetBSD Problem Report #7430
Received: (qmail 1929 invoked from network); 21 Apr 1999 03:05:21 -0000
Message-Id: <199904210257.LAA05125@ecology.dream.flab.fujitsu.co.jp>
Date: Wed, 21 Apr 1999 11:57:31 +0900 (JST)
From: minoura@flab.fujitsu.co.jp
Reply-To: minoura@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Cc: minoura@hauN.org
Subject: unionfs ignores mount flag MNT_RDONLY.
X-Send-Pr-Version: 3.95
>Number: 7430
>Category: kern
>Synopsis: unionfs ignores mount flag MNT_RDONLY.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: sommerfeld
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 20 20:20:01 +0000 1999
>Closed-Date: Fri Sep 10 14:34:12 +0000 1999
>Last-Modified: Fri Sep 10 14:34:42 +0000 1999
>Originator: Minoura Makoto
>Release: 1.4_ALPHA
>Organization:
Minoura Makoto
<minoura@flab.fujitsu.co.jp> / <minoura@netbsd.org>
>Environment:
System: NetBSD ecology 1.4_ALPHA NetBSD 1.4_ALPHA (ECOLOGY) #16: Thu Apr 15 19:58:49 JST 1999 root@ecology:/usr/obj/sys/arch/sparc/compile/ECOLOGY sparc
>Description:
union filesystem seems to ignore the mount flag MNT_RDONLY.
>How-To-Repeat:
ecology[101]% cd /tmp
ecology[102]% mkdir upper lower
ecology[103]% mount -o ro -t union /tmp/upper /tmp/lower
ecology[104]% touch /tmp/lower/aaaa <- should cause EROFS
ecology[105]% ls /tmp/lower
aaaa
ecology[106]% ls /tmp/upper
aaaa
ecology[107]%
>Fix:
Check mnt_flag somewhere in union_vnops.
union_lookup is one place, but might be not the only place.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: sommerfeld
State-Changed-When: Sun Aug 1 15:58:32 PDT 1999
State-Changed-Why:
I believe I've tracked down all the places in the code which need this
(union_lookup, union_access, and union_setattr) and am testing a fix
Responsible-Changed-From-To: kern-bug-people->sommerfeld
Responsible-Changed-By: sommerfeld
Responsible-Changed-When: Sun Aug 1 15:58:32 PDT 1999
Responsible-Changed-Why:
State-Changed-From-To: analyzed->feedback
State-Changed-By: sommerfeld
State-Changed-When: Sun Aug 1 16:21:35 PDT 1999
State-Changed-Why:
I believe that htis is now fixed in -current (with the proviso that unionfs
will still create directories in the upper layer to shadow lower-layer
directories even if mounted read-only)
State-Changed-From-To: feedback->closed
State-Changed-By: sommerfeld
State-Changed-When: Fri Sep 10 07:34:12 PDT 1999
State-Changed-Why:
submitter confirms that fix is correct.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.