Subject: kern/7430: unionfs ignores mount flag MNT_RDONLY.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <minoura@flab.fujitsu.co.jp>
List: netbsd-bugs
Date: 04/20/1999 20:23:21
>Number:         7430
>Category:       kern
>Synopsis:       unionfs ignores mount flag MNT_RDONLY.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 20 20:20:01 1999
>Last-Modified:
>Originator:     Minoura Makoto
>Organization:
Minoura Makoto
<minoura@flab.fujitsu.co.jp> / <minoura@netbsd.org>
>Release:        1.4_ALPHA
>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.
>Audit-Trail:
>Unformatted: