From nobody@FreeBSD.org  Wed Mar 10 17:54:34 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A67EE16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Mar 2004 17:54:34 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A03DB43D39
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Mar 2004 17:54:34 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i2B1sY72043740
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Mar 2004 17:54:34 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i2B1sY13043739;
	Wed, 10 Mar 2004 17:54:34 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200403110154.i2B1sY13043739@www.freebsd.org>
Date: Wed, 10 Mar 2004 17:54:34 -0800 (PST)
From: "J.D. Bronson" <jd@aurora.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mount_mfs (md) refuses to use permissions when mounting
X-Send-Pr-Version: www-2.3

>Number:         64079
>Category:       bin
>Synopsis:       mount_mfs (md) refuses to use permissions when mounting
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    wes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 10 18:00:20 PST 2004
>Closed-Date:    Sun Jul 31 12:02:01 GMT 2005
>Last-Modified:  Sun Jul 31 12:02:01 GMT 2005
>Originator:     J.D. Bronson
>Release:        5.2.1
>Organization:
Aurora Health Care
>Environment:
shadow# uname -a
FreeBSD shadow 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Mon Mar  8 08:42:48 CST 2004     root@shadow:/usr/src/sys/i386/compile/SHADOW  i386
>Description:
mount_mfs commands '-p' and '-w' do not work as expected when setting up a RAM filesystem on 5.2.1 (md)
>How-To-Repeat:
/etc/fstab:

md /MIMEDefang  mfs  rw,-p 700,-w smmsp:smmsp,-s48m,noasync,noatime    0       0

When mounted it results in permissions such as:

drwxrwxrwt   3 root   wheel      512 

No matter what the dir was BEFORE trying this command. The only way to get the permissions correct is to mount the RAM slice without '-p' and '-w' and then chown/chmod them afterwords.


>Fix:
Unknown
>Release-Note:
>Audit-Trail:

From: Vasil Dimov <vd@datamax.bg>
To: freebsd-gnats-submit@FreeBSD.org, jd@aurora.org
Cc:  
Subject: Re: misc/64079: mount_mfs (md) refuses to use permissions when mounting
Date: Fri, 12 Mar 2004 14:39:08 +0200

 > >Description:
 > mount_mfs commands '-p' and '-w' do not work as expected when setting up a RAM filesystem on 5.2.1 (md)
 did you try running mount_mfs manually?
 
 > >How-To-Repeat:
 > /etc/fstab:
 > 
 > md /MIMEDefang  mfs  rw,-p 700,-w smmsp:smmsp,-s48m,noasync,noatime    0       0
 > 
 > When mounted it results in permissions such as:
 > 
 > drwxrwxrwt   3 root   wheel      512 
 > 
 > No matter what the dir was BEFORE trying this command. The only way to get the permissions correct is to mount the RAM slice without '-p' and '-w' and then chown/chmod them afterwords.
 Try the following:
 1. substitute `mfs' in fstab with `foo'
 2. ln -s /bin/echo /sbin/mount_foo
 3. mount /MIMEDefang
 ... hmmz
 man fstab:
 
 : Each file system is described on a separate line; fields on each line are
 : separated by tabs or spaces.
 
 Hope this will help.
State-Changed-From-To: open->feedback 
State-Changed-By: wes 
State-Changed-When: Mon Mar 15 11:00:31 PST 2004 
State-Changed-Why:  
Use (newly committed) 'ramdisk' rc.d script to create md's before 
fstab is processed.  The 'ramdisk' script allows the system admin 
to specify ownership and permissions on the md devices before the 
mount is processed. 


Responsible-Changed-From-To: freebsd-bugs->wes 
Responsible-Changed-By: wes 
Responsible-Changed-When: Mon Mar 15 11:00:31 PST 2004 
Responsible-Changed-Why:  
Use (newly committed) 'ramdisk' rc.d script to create md's before 
fstab is processed.  The 'ramdisk' script allows the system admin 
to specify ownership and permissions on the md devices before the 
mount is processed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64079 

From: "J.D. Bronson" <jbronson@wixb.com>
To: freebsd-gnats-submit@FreeBSD.org, jd@aurora.org
Cc:  
Subject: Re: misc/64079: mount_mfs (md) refuses to use permissions when
  mounting
Date: Sun, 21 Mar 2004 08:59:32 -0600

 This is a multi-part message in MIME format...
 
 ------------=_1079881173-394-246
 Content-Type: text/plain; charset="us-ascii"; format=flowed
 Content-Disposition: inline
 
 Wes offered a fix. It is close to working but not quite. I have emailed him 
 the issue and I am waiting for a corrected 'ramdisk' rc file.
 
 
 
 ** DISCLAIMER **
 Per Anti-Virus Policy, this e-email has been scanned for viruses.
 Scanned clean by F-PROT ANTIVIRUS 4.4.1 - http://www.f-prot.com 
 
 
 ------------=_1079881173-394-246--

From: Ben Kelly <ben.kelly@ieee.org>
To: jd@aurora.org, freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/64079: mount_mfs (md) refuses to use permissions when mounting
Date: Mon, 15 Nov 2004 01:56:29 -0500

 Wes appears to have addressed earlier concerns by splitting the rc.d 
 script into ramdisk and ramdisk-own.  I am currently using these 
 scripts successfully on 5.3, but I had to manually copy them into 
 /etc/rc.d.  Would it be possible to apply the following trivial patch 
 so that mergemaster picks up the files correctly?  (Note that the 
 ramdisk knobs are already documented in rc.conf(5).)
 
 Thanks.
 
 - Ben
 
 Index: etc/rc.d/Makefile
 ===================================================================
 RCS file: /usr/local/mirror/home/ncvs/src/etc/rc.d/Makefile,v
 retrieving revision 1.46
 diff -u -r1.46 Makefile
 --- etc/rc.d/Makefile   4 Nov 2004 12:59:16 -0000       1.46
 +++ etc/rc.d/Makefile   15 Nov 2004 06:43:40 -0000
 @@ -28,7 +28,7 @@
          pccard pcvt pf pflog \
          power_profile ppp-user pppoed preseedrandom pwcheck \
          quota \
 -       random rarpd rcconf.sh resolv root \
 +       ramdisk ramdisk-own random rarpd rcconf.sh resolv root \
          route6d routed routing rpcbind rtadvd rwho \
          savecore securelevel sendmail \
          serial sppp sshd swap1 \
 Index: etc/rc.d/ramdisk-own
 ===================================================================
 RCS file: /usr/local/mirror/home/ncvs/src/etc/rc.d/ramdisk-own,v
 retrieving revision 1.3
 diff -u -r1.3 ramdisk-own
 --- etc/rc.d/ramdisk-own        7 Oct 2004 13:55:26 -0000       1.3
 +++ etc/rc.d/ramdisk-own        4 Nov 2004 07:57:25 -0000
 @@ -39,7 +39,6 @@
 
   ramdisk_own_start()
   {
 -set -x
          for unit in $ramdisk_units; do
                  device="/dev/md$unit"
                  dir=`mount | grep $device | cut -d' ' -f3`
 
State-Changed-From-To: feedback->closed 
State-Changed-By: matteo 
State-Changed-When: Sun Jul 31 12:01:03 GMT 2005 
State-Changed-Why:  
Bug was fixed and the fix MFC'ed. The patch suggested by the submitter in the autid-trail was committed too. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64079 
>Unformatted:
