From owner-freebsd-current Wed Aug 1 9:40: 7 2001 Delivered-To: freebsd-current@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 5EC6537B401 for ; Wed, 1 Aug 2001 09:40:04 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: by bazooka.unixfreak.org (Postfix, from userid 1000) id 34FE13E28; Wed, 1 Aug 2001 09:40:03 -0700 (PDT) Received: from bazooka.unixfreak.org (localhost [127.0.0.1]) by bazooka.unixfreak.org (Postfix) with ESMTP id 292773C12B; Wed, 1 Aug 2001 09:40:03 -0700 (PDT) To: Kris Kennaway Cc: current@FreeBSD.ORG Subject: Re: md/mdmfs bugs In-Reply-To: <20010730022420.B55959@xor.obsecurity.org>; from kris@obsecurity.org on "Mon, 30 Jul 2001 02:24:20 -0700" Date: Wed, 01 Aug 2001 09:39:58 -0700 From: Dima Dorfman Message-Id: <20010801164003.34FE13E28@bazooka.unixfreak.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kris Kennaway writes: > On Mon, Jul 30, 2001 at 02:03:31AM -0700, Dima Dorfman wrote: > > Kris Kennaway 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