Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Aug 2001 09:39:58 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: md/mdmfs bugs 
Message-ID:  <20010801164003.34FE13E28@bazooka.unixfreak.org>
In-Reply-To: <20010730022420.B55959@xor.obsecurity.org>; from kris@obsecurity.org on "Mon, 30 Jul 2001 02:24:20 -0700"

next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway <kris@obsecurity.org> writes:
> On Mon, Jul 30, 2001 at 02:03:31AM -0700, Dima Dorfman wrote:
> > Kris Kennaway <kris@obsecurity.org> writes:
> > > 1) For some reason, my mdmfs line in /etc/fstab always does a chmod
> > > 777 /tmp at mount-time
> > >
> > > /dev/md0                /tmp            mfs     rw,-s=3D65536     0        0
> >
> > I can't reproduce this.  You say it "does a chmod"; does that mean you
> > see it caling chmod(2) (see as in using truss(1), or the undocumented
> > -X option), or is the symptom that it "winds up with mode 777"?  Also,
> > does it happen when you run mdmfs from the command line, and/or with
> > directories other than /tmp?
> 
> I haven't tracked it down, except that every time I reboot my /tmp
> winds up mode 777 again.

Okay, this is a bug in mdmfs in the sense that it doesn't do what
mount_mfs did, but what mount_mfs used to do is silly.  It sets mode
1777 on its mountpoint regardless of where it is (this would make
sense if it was called "tmpfs").  mdmfs doesn't duplicate this
behavior (I wasn't aware of it), but it does provide a way to set the
mode:

	/dev/md0		/tmp	mfs	rw,-s=65536,-p1777	0 0

Since mdmfs can be used for things other than fstab processing, the
idea of setting 1777 on the mountpoint by default doesn't sound very
good, but it is meant to be compatible with mount_mfs.  How about
fixing mdmfs to be bug-compatible (eew, Microsoft term) with mount_mfs
if it's called as "mount_*" (e.g., argv[0] is "mount_"), and be sane
otherwise?  I'll do this if people think that'd be okay.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010801164003.34FE13E28>