Subject: Re: kern/35327: mount ignores read-only flag
To: None <yamt@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 12/27/2006 01:40:02
The following reply was made to PR kern/35327; it has been noted by GNATS.

From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/35327: mount ignores read-only flag
Date: Wed, 27 Dec 2006 02:44:44 +0100

 This seems to fix it:
 
 Index: vfs_syscalls.c
 ===================================================================
 RCS file: /cvsroot/src/sys/kern/vfs_syscalls.c,v
 retrieving revision 1.286
 diff -u -p -r1.286 vfs_syscalls.c
 --- vfs_syscalls.c	26 Dec 2006 12:39:01 -0000	1.286
 +++ vfs_syscalls.c	27 Dec 2006 01:36:53 -0000
 @@ -378,7 +379,7 @@ mount_domount(struct lwp *l, struct vnod
  	 * Set the mount level flags.
  	 */
  	mp->mnt_flag = flags &
 -	   (MNT_FORCE | MNT_NOSUID | MNT_NOEXEC | MNT_NODEV |
 +	   (MNT_FORCE | MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | MNT_RDONLY |
  	    MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_NOCOREDUMP |
  	    MNT_NOATIME | MNT_NODEVMTIME | MNT_SYMPERM | MNT_SOFTDEP |
  	    MNT_IGNORE);