From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 00:50:39 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55D6816A4CE for ; Mon, 8 Nov 2004 00:50:39 +0000 (GMT) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CE6443D46 for ; Mon, 8 Nov 2004 00:50:36 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: (qmail 28495 invoked by uid 207); 8 Nov 2004 00:50:35 -0000 Received: from keramida@freebsd.org by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.61):. Processed in 1.653066 secs); 08 Nov 2004 00:50:35 -0000 Received: from dialup61.ach.sch.gr (HELO gothmog.gr) ([81.186.70.61]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 8 Nov 2004 00:50:32 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id iA80o7e8066108 for ; Mon, 8 Nov 2004 02:50:07 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id iA80o7Y2066107 for freebsd-rc@freebsd.org; Mon, 8 Nov 2004 02:50:07 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Mon, 8 Nov 2004 02:50:07 +0200 From: Giorgos Keramidas To: freebsd-rc@freebsd.org Message-ID: <20041108005007.GB57736@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 00:50:39 -0000 Hi, Does the change outlined below seem like something I should commit? The most important part is the change in the mount_md function of rc.subr IMHO. If that's ok, then the rest is pretty straight-forward. ----- Forwarded message from "J.D. Bronson" ----- Date: Sun, 07 Nov 2004 18:38:29 -0600 From: "J.D. Bronson" Subject: Re: 5.3 tmpfs mount permissions To: Giorgos Keramidas Cc: freebsd-questions@freebsd.org At 06:06 PM 11/07/2004, Giorgos Keramidas wrote: >On 2004-11-07 14:52, "J.D. Bronson" wrote: >> I setup /etc/rc.conf as follows: >> >> tmpmfs="YES" >> tmpsize="512m" >> >> and it works - but I want to mount tmp with some additional >> options and wondering how to edit /etc/rc.d/tmp to accommodate this? >> >> I would like to add this: noexec,nosuid,nodev,nosymfollow >> when /tmp is mounted as tmpfs. > >I see no way to pass extra options to mdmfs from `/etc/rc.d/tmp'. One >way to do this is to modify /etc/rc.d/tmp locally, but this will create >maintenance work for every mergemaster run you do in the future. > >> Can anyone offer some advice - thanks :) > >The following patch is against CURRENT. Does this look like a good thing to >you? If it does, we could ask our rc.d gurus for their approval to commit >it >to the tree. > >Then, all you'd have to do to pass special options to the tmpmfs mount would >be to add something like this to your `rc.conf': > > tmpoptions="noexec,nosuid,nodev,nosymfollow" > >----- tmpmfs-options.patch begins here ----- >Index: etc/rc.subr >=================================================================== >RCS file: /home/ncvs/src/etc/rc.subr,v >retrieving revision 1.31 >diff -u -r1.31 rc.subr >--- etc/rc.subr 30 Jul 2004 17:19:35 -0000 1.31 >+++ etc/rc.subr 7 Nov 2004 23:55:27 -0000 >@@ -1290,11 +1290,15 @@ > # $1 = size > # $2 = mount point > # $3 = (optional) bytes-per-inode >+# $4 = extra options > mount_md() { >+ if [ -n "$4" ]; then >+ opt="-o $4" >+ fi > if [ -n "$3" ]; then > bpi="-i $3" > fi >- /sbin/mdmfs $bpi -s $1 -M md $2 >+ /sbin/mdmfs $bpi $opt -s $1 -M md $2 > } > > fi >Index: etc/defaults/rc.conf >=================================================================== >RCS file: /home/ncvs/src/etc/defaults/rc.conf,v >retrieving revision 1.229 >diff -u -r1.229 rc.conf >--- etc/defaults/rc.conf 4 Nov 2004 13:33:29 -0000 1.229 >+++ etc/defaults/rc.conf 7 Nov 2004 23:57:34 -0000 >@@ -40,6 +40,7 @@ > removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. > tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never > tmpsize="20m" # Size of mfs /tmp if created >+tmpoptions="noexec,nosuid,nodev" # extra mount options for tmpfs > varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never > varsize="32m" # Size of mfs /var if created > populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never >Index: etc/rc.d/tmp >=================================================================== >RCS file: /home/ncvs/src/etc/rc.d/tmp,v >retrieving revision 1.34 >diff -u -r1.34 tmp >--- etc/rc.d/tmp 7 Oct 2004 13:55:26 -0000 1.34 >+++ etc/rc.d/tmp 7 Nov 2004 23:56:31 -0000 >@@ -56,7 +56,7 @@ > echo "dropping into shell, ^D to continue anyway." > /bin/sh > else >- mount_md ${tmpsize} /tmp >+ mount_md ${tmpsize} /tmp ${tmpoptions} > chmod 01777 /tmp > fi > fi >Index: share/man/man5/rc.conf.5 >=================================================================== >RCS file: /home/ncvs/src/share/man/man5/rc.conf.5,v >retrieving revision 1.235 >diff -u -r1.235 rc.conf.5 >--- share/man/man5/rc.conf.5 4 Nov 2004 13:33:29 -0000 1.235 >+++ share/man/man5/rc.conf.5 8 Nov 2004 00:00:13 -0000 >@@ -240,6 +240,12 @@ > Controls the size of a created > .Pa /tmp > memory file system. >+.It Va tmpoptions >+Controls the >+.Xr mount 8 >+options of a created >+.Pa /tmp >+memory file system. > .It Va varmfs > Controls the creation of a > .Pa /var >@@ -3109,6 +3115,7 @@ > .Xr kldxref 8 , > .Xr lpd 8 , > .Xr mdconfig 8 , >+.Xr mount 8 , > .Xr mountd 8 , > .Xr moused 8 , > .Xr mrouted 8 , >----- tmpmfs-options.patch ends here ----- this looks GREAT. I think for security in mind, this would be a welcome addition to the FreeBSD OS - no ?? Thanks....I really appreciate this! -- J.D. Bronson Aurora Health Care // Information Services // Milwaukee, WI USA Office: 414.978.8282 // Email: jd@aurora.org // Pager: 414.314.8282 ----- End forwarded message ----- From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 10:51:56 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 231D716A4CE for ; Mon, 8 Nov 2004 10:51:56 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5338A43D3F for ; Mon, 8 Nov 2004 10:51:55 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])iA8ApRI0026899 for ; Mon, 8 Nov 2004 12:51:39 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) iA8ApK42000977 for ; Mon, 8 Nov 2004 12:51:20 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost)iA8ApKBE000976 for freebsd-rc@freebsd.org; Mon, 8 Nov 2004 12:51:20 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Mon, 8 Nov 2004 12:51:20 +0200 From: Giorgos Keramidas To: freebsd-rc@freebsd.org Message-ID: <20041108105120.GA952@orion.daedalusnetworks.priv> References: <20041108005007.GB57736@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108005007.GB57736@gothmog.gr> Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 10:51:56 -0000 On 2004-11-08 02:50, Giorgos Keramidas wrote: > Hi, > > Does the change outlined below seem like something I should commit? The patch posted previously had a few obvious bugs. Here's an updated version, which I have tested too :-) ----- tmpmfs-options.patch starts here --- Index: share/man/man5/rc.conf.5 =================================================================== RCS file: /home/ncvs/src/share/man/man5/rc.conf.5,v retrieving revision 1.232 diff -u -u -r1.232 rc.conf.5 --- share/man/man5/rc.conf.5 23 Oct 2004 18:35:35 -0000 1.232 +++ share/man/man5/rc.conf.5 8 Nov 2004 10:23:58 -0000 @@ -240,6 +240,12 @@ Controls the size of a created .Pa /tmp memory file system. +.It Va tmpoptions +Controls the +.Xr mount 8 +options of a created +.Pa /tmp +memory file system. .It Va varmfs Controls the creation of a .Pa /var @@ -3095,6 +3101,7 @@ .Xr kldxref 8 , .Xr lpd 8 , .Xr mdconfig 8 , +.Xr mount 8 , .Xr mountd 8 , .Xr moused 8 , .Xr mrouted 8 , Index: etc/rc.subr =================================================================== RCS file: /home/ncvs/src/etc/rc.subr,v retrieving revision 1.31 diff -u -u -r1.31 rc.subr --- etc/rc.subr 30 Jul 2004 17:19:35 -0000 1.31 +++ etc/rc.subr 8 Nov 2004 10:34:55 -0000 @@ -1290,11 +1290,15 @@ # $1 = size # $2 = mount point # $3 = (optional) bytes-per-inode +# $4 = (optional) extra mount options mount_md() { + if [ -n "$4" ]; then + opt="-o $4" + fi if [ -n "$3" ]; then bpi="-i $3" fi - /sbin/mdmfs $bpi -s $1 -M md $2 + /sbin/mdmfs $bpi $opt -s $1 -M md $2 } fi Index: etc/defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.226 diff -u -u -r1.226 rc.conf --- etc/defaults/rc.conf 20 Oct 2004 16:58:27 -0000 1.226 +++ etc/defaults/rc.conf 8 Nov 2004 10:33:25 -0000 @@ -40,6 +40,7 @@ removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never tmpsize="20m" # Size of mfs /tmp if created +tmpoptions="noexec,nosuid,nodev" # Extra mount options for the mfs /tmp varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never Index: etc/rc.d/tmp =================================================================== RCS file: /home/ncvs/src/etc/rc.d/tmp,v retrieving revision 1.34 diff -u -u -r1.34 tmp --- etc/rc.d/tmp 7 Oct 2004 13:55:26 -0000 1.34 +++ etc/rc.d/tmp 8 Nov 2004 10:33:37 -0000 @@ -42,7 +42,7 @@ # case "${tmpmfs}" in [Yy][Ee][Ss]) - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp '' ${tmpoptions} chmod 01777 /tmp ;; [Nn][Oo]) @@ -56,7 +56,7 @@ echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp '' ${tmpoptions} chmod 01777 /tmp fi fi ----- tmpmfs-options.patch ends here --- From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 11:02:02 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B13416A4D9 for ; Mon, 8 Nov 2004 11:02:02 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D6E943D39 for ; Mon, 8 Nov 2004 11:02:02 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id iA8B22As010280 for ; Mon, 8 Nov 2004 11:02:02 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iA8B21MQ010274 for freebsd-rc@freebsd.org; Mon, 8 Nov 2004 11:02:01 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 8 Nov 2004 11:02:01 GMT Message-Id: <200411081102.iA8B21MQ010274@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 11:02:02 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [2004/03/09] kern/63954 rc devfs loses permissions 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/08/29] conf/56144 rc [PATCH] /etc/rc.d/ipmon, /etc/rc.d/ipfilt o [2004/06/30] conf/68525 rc Loader's verbose boot mode has rc.d/local o [2004/07/07] conf/68745 rc /etc/rc.d/devfs runs after ntpd so links 3 problems total. From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 11:32:39 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70CA416A4CE; Mon, 8 Nov 2004 11:32:39 +0000 (GMT) Received: from zaphod.nitro.dk (port324.ds1-khk.adsl.cybercity.dk [212.242.113.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF8B243D54; Mon, 8 Nov 2004 11:32:38 +0000 (GMT) (envelope-from simon@zaphod.nitro.dk) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id E21BB119BD; Mon, 8 Nov 2004 12:01:05 +0100 (CET) Date: Mon, 8 Nov 2004 12:01:05 +0100 From: "Simon L. Nielsen" To: Giorgos Keramidas Message-ID: <20041108110105.GD756@zaphod.nitro.dk> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zbGR4y+acU1DwHSi" Content-Disposition: inline In-Reply-To: <20041108105120.GA952@orion.daedalusnetworks.priv> User-Agent: Mutt/1.5.6i cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 11:32:39 -0000 --zbGR4y+acU1DwHSi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2004.11.08 12:51:20 +0200, Giorgos Keramidas wrote: > On 2004-11-08 02:50, Giorgos Keramidas wrote: > > Hi, > > > > Does the change outlined below seem like something I should commit? >=20 > The patch posted previously had a few obvious bugs. Here's an updated > version, which I have tested too :-) For consistency shouldn't the same be done for a /var MFS? Other than that it looks really good to me (though I haven't tested it and cannot provide a src/ rubber approval stamp :-) ). --=20 Simon L. Nielsen FreeBSD Documentation Team --zbGR4y+acU1DwHSi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBj1Hxh9pcDSc1mlERAqsBAJwO0FKa89eNBjRGpJa4RbVIV+ySlQCgmYly R0zWN95cq4lBdMe9G+cjy8I= =BX7m -----END PGP SIGNATURE----- --zbGR4y+acU1DwHSi-- From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 11:48:42 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BE7616A4CE; Mon, 8 Nov 2004 11:48:42 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B18243D2D; Mon, 8 Nov 2004 11:48:40 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])iA8Bm597028583; Mon, 8 Nov 2004 13:48:24 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) iA8BlfBj035700; Mon, 8 Nov 2004 13:47:41 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)iA8BlQlh035531; Mon, 8 Nov 2004 13:47:26 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 8 Nov 2004 13:47:26 +0200 From: Giorgos Keramidas To: "Simon L. Nielsen" Message-ID: <20041108114726.GA16509@orion.daedalusnetworks.priv> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> <20041108110105.GD756@zaphod.nitro.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108110105.GD756@zaphod.nitro.dk> cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 11:48:42 -0000 On 2004-11-08 12:01, "Simon L. Nielsen" wrote: > On 2004.11.08 12:51:20 +0200, Giorgos Keramidas wrote: > > On 2004-11-08 02:50, Giorgos Keramidas wrote: > > > Hi, > > > > > > Does the change outlined below seem like something I should commit? > > > > The patch posted previously had a few obvious bugs. Here's an updated > > version, which I have tested too :-) > > For consistency shouldn't the same be done for a /var MFS? You're probably right. I saw varmfs near tmpfs in the rc.conf.5 manpage and thought about adding varoptions="" to rc.conf too. It's not very difficult, now that I found out how to do it for tmpfs. > Other than that it looks really good to me (though I haven't tested it > and cannot provide a src/ rubber approval stamp :-) ). I tested it on my personal workstation at work. It seemed to work as expected with a 20m mfs /tmp. orion# mount /dev/ad0s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/ad0s4g on /home (ufs, NFS exported, local, soft-updates) /dev/ad0s4f on /usr (ufs, local, soft-updates) /dev/ad0s4e on /var (ufs, local, soft-updates) /dev/md1 on /tmp (ufs, local, nodev, noexec, nosuid, soft-updates) orion# From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 13:31:33 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56FCA16A4D0; Mon, 8 Nov 2004 13:31:33 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58B5243D4C; Mon, 8 Nov 2004 13:31:30 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])iA8DUwd5020766; Mon, 8 Nov 2004 15:31:15 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) iA8DUpn5038159; Mon, 8 Nov 2004 15:30:51 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost)iA8DUpEt038158; Mon, 8 Nov 2004 15:30:51 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Mon, 8 Nov 2004 15:30:51 +0200 From: Giorgos Keramidas To: "Simon L. Nielsen" Message-ID: <20041108133051.GC24926@orion.daedalusnetworks.priv> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> <20041108110105.GD756@zaphod.nitro.dk> <20041108114726.GA16509@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108114726.GA16509@orion.daedalusnetworks.priv> cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 13:31:33 -0000 On 2004-11-08 13:47, Giorgos Keramidas wrote: > On 2004-11-08 12:01, "Simon L. Nielsen" wrote: > > On 2004.11.08 12:51:20 +0200, Giorgos Keramidas wrote: > > > On 2004-11-08 02:50, Giorgos Keramidas wrote: > > > > Hi, > > > > > > > > Does the change outlined below seem like something I should commit? > > > > > > The patch posted previously had a few obvious bugs. Here's an updated > > > version, which I have tested too :-) > > > > For consistency shouldn't the same be done for a /var MFS? > > You're probably right. I saw varmfs near tmpfs in the rc.conf.5 manpage > and thought about adding varoptions="" to rc.conf too. It's not very > difficult, now that I found out how to do it for tmpfs. Done, see below. Another tunable option that some users might find interesting at times is the softupdates support for the memory disks. The current behavior is to enable softupdates. If the change in behavior is not truly annoying or stupid for some reason that I haven't thought about, it would be nice if we used something like this: %%% Index: etc/rc.subr =================================================================== RCS file: /home/ncvs/src/etc/rc.subr,v retrieving revision 1.31 diff -u -u -r1.31 rc.subr --- etc/rc.subr 30 Jul 2004 17:19:35 -0000 1.31 +++ etc/rc.subr 8 Nov 2004 13:23:58 -0000 @@ -1290,11 +1290,24 @@ # $1 = size # $2 = mount point # $3 = (optional) bytes-per-inode +# $4 = (optional) extra mount options +# $5 = (optional) YES to enable softupdates mount_md() { + if [ -n "$5" ]; then + case $5 in + [Yy][Ee][Ss]) + sflag="-U" ;; + *) + sflag="-S" ;; + esac + fi + if [ -n "$4" ]; then + opt="-o $4" + fi if [ -n "$3" ]; then bpi="-i $3" fi - /sbin/mdmfs $bpi -s $1 -M md $2 + /sbin/mdmfs $bpi $opt $sflag -s $1 -M md $2 } fi Index: etc/defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.226 diff -u -u -r1.226 rc.conf --- etc/defaults/rc.conf 20 Oct 2004 16:58:27 -0000 1.226 +++ etc/defaults/rc.conf 8 Nov 2004 13:24:11 -0000 @@ -40,8 +40,12 @@ removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never tmpsize="20m" # Size of mfs /tmp if created +tmpoptions="noexec,nosuid,nodev" # Extra mount options for the mfs /tmp +tmpsoftupdates="NO" # Set to YES to enable softupdates on the mfs /tmp varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created +varoptions="" # Extra mount options for the mfs /var +varsoftupdates="NO" # Set to YES to enable softupdates on the mfs /var populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs. script_name_sep=" " # Change if your startup scripts' names contain spaces Index: etc/rc.d/tmp =================================================================== RCS file: /home/ncvs/src/etc/rc.d/tmp,v retrieving revision 1.34 diff -u -u -r1.34 tmp --- etc/rc.d/tmp 7 Oct 2004 13:55:26 -0000 1.34 +++ etc/rc.d/tmp 8 Nov 2004 13:20:47 -0000 @@ -42,7 +42,7 @@ # case "${tmpmfs}" in [Yy][Ee][Ss]) - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp '' ${tmpoptions} ${tmpsoftupdates} chmod 01777 /tmp ;; [Nn][Oo]) @@ -56,7 +56,7 @@ echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp '' ${tmpoptions} ${tmpsoftupdates} chmod 01777 /tmp fi fi Index: etc/rc.d/var =================================================================== RCS file: /home/ncvs/src/etc/rc.d/var,v retrieving revision 1.34 diff -u -u -r1.34 var --- etc/rc.d/var 7 Oct 2004 13:55:26 -0000 1.34 +++ etc/rc.d/var 8 Nov 2004 13:21:09 -0000 @@ -61,7 +61,7 @@ # case "${varmfs}" in [Yy][Ee][Ss]) - mount_md ${varsize} /var + mount_md ${varsize} /var '' ${varoptions} ${varsoftupdates} ;; [Nn][Oo]) ;; @@ -69,7 +69,7 @@ if (/bin/mkdir -p /var/.diskless 2> /dev/null); then rmdir /var/.diskless else - mount_md ${varsize} /var + mount_md ${varsize} /var '' ${varoptions} ${varsoftupdates} fi esac Index: share/man/man5/rc.conf.5 =================================================================== RCS file: /home/ncvs/src/share/man/man5/rc.conf.5,v retrieving revision 1.232 diff -u -u -r1.232 rc.conf.5 --- share/man/man5/rc.conf.5 23 Oct 2004 18:35:35 -0000 1.232 +++ share/man/man5/rc.conf.5 8 Nov 2004 13:18:43 -0000 @@ -240,6 +240,20 @@ Controls the size of a created .Pa /tmp memory file system. +.It Va tmpoptions +Controls the +.Xr mount 8 +options of a created +.Pa /tmp +memory file system. +.It Va tmpsoftupdates +.Pq Vt str +Set to +.Dq Li YES +to enable softupdates on the memory file system mounted as +.Pa /tmp . +The default is +.Dq Li NO . .It Va varmfs Controls the creation of a .Pa /var @@ -255,6 +269,20 @@ Controls the size of a created .Pa /var memory file system. +.It Va varoptions +Controls the +.Xr mount 8 +options of a created +.Pa /var +memory file system. +.It Va varsoftupdates +.Pq Vt str +Set to +.Dq Li YES +to enable softupdates on the memory file system mounted as +.Pa /var . +The default is +.Dq Li NO . .It Va populate_var Controls the automatic population of the .Pa /var @@ -3095,6 +3123,7 @@ .Xr kldxref 8 , .Xr lpd 8 , .Xr mdconfig 8 , +.Xr mount 8 , .Xr mountd 8 , .Xr moused 8 , .Xr mrouted 8 , %%% From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 13:42:00 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 373E916A4CE; Mon, 8 Nov 2004 13:42:00 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F2F343D53; Mon, 8 Nov 2004 13:41:59 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])iA8Dffsa027342; Mon, 8 Nov 2004 15:41:50 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) iA8DfY9P038309; Mon, 8 Nov 2004 15:41:34 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)iA8DfWao038308; Mon, 8 Nov 2004 15:41:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 8 Nov 2004 15:41:32 +0200 From: Giorgos Keramidas To: "Simon L. Nielsen" Message-ID: <20041108134132.GA38278@orion.daedalusnetworks.priv> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> <20041108110105.GD756@zaphod.nitro.dk> <20041108114726.GA16509@orion.daedalusnetworks.priv> <20041108133051.GC24926@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108133051.GC24926@orion.daedalusnetworks.priv> cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 13:42:00 -0000 On 2004-11-08 15:30, Giorgos Keramidas wrote: > On 2004-11-08 13:47, Giorgos Keramidas wrote: > > On 2004-11-08 12:01, "Simon L. Nielsen" wrote: > > > On 2004.11.08 12:51:20 +0200, Giorgos Keramidas wrote: > > > > On 2004-11-08 02:50, Giorgos Keramidas wrote: > > > > > Hi, > > > > > > > > > > Does the change outlined below seem like something I should commit? > > > > > > > > The patch posted previously had a few obvious bugs. Here's an updated > > > > version, which I have tested too :-) > > > > > > For consistency shouldn't the same be done for a /var MFS? > > > > You're probably right. I saw varmfs near tmpfs in the rc.conf.5 manpage > > and thought about adding varoptions="" to rc.conf too. It's not very > > difficult, now that I found out how to do it for tmpfs. > > Done, see below. > > Another tunable option that some users might find interesting at times is the > softupdates support for the memory disks. [...] Hmmm, now that I look at the changes to mound_md() again, I don't like the way it's headed. Would it make more sense to add a tmpmfs_flags="" variable that would surpass both the bytes-per-inode and the ones I tried adding? This introduces an incompatibility with the current state of mount_md(), but it's easily extensible to include other options of mdmfs without having to invent new funny ways of passing options to mdmfs through the rc.d scripts. From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 13:49:09 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFB7A16A4CE; Mon, 8 Nov 2004 13:49:09 +0000 (GMT) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BB2F43D46; Mon, 8 Nov 2004 13:49:02 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.104] (HELO rogue.acs.lan) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP id 62396609; Mon, 08 Nov 2004 16:41:35 +0300 Received: by rogue.acs.lan (Postfix, from userid 1000) id 98689B830; Mon, 8 Nov 2004 14:44:03 +0300 (EAT) Date: Mon, 8 Nov 2004 14:44:03 +0300 From: Mike Makonnen To: Giorgos Keramidas Message-ID: <20041108114402.GA2910@rogue.acs.lan> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108105120.GA952@orion.daedalusnetworks.priv> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/6.0-CURRENT (i386) cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 13:49:10 -0000 I haven't tested it, but I don't see anything obviously wrong with it. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon ! From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 14:29:19 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7807716A4CE; Mon, 8 Nov 2004 14:29:19 +0000 (GMT) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BEC243D1D; Mon, 8 Nov 2004 14:29:16 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.182] (HELO rogue.acs.lan) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP id 62400441; Mon, 08 Nov 2004 17:21:58 +0300 Received: by rogue.acs.lan (Postfix, from userid 1000) id C1B20B851; Mon, 8 Nov 2004 17:20:19 +0300 (EAT) Date: Mon, 8 Nov 2004 17:20:19 +0300 From: Mike Makonnen To: Giorgos Keramidas Message-ID: <20041108142019.GA5922@rogue.acs.lan> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> <20041108110105.GD756@zaphod.nitro.dk> <20041108114726.GA16509@orion.daedalusnetworks.priv> <20041108133051.GC24926@orion.daedalusnetworks.priv> <20041108134132.GA38278@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108134132.GA38278@orion.daedalusnetworks.priv> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/6.0-CURRENT (i386) cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 14:29:19 -0000 On Mon, Nov 08, 2004 at 03:41:32PM +0200, Giorgos Keramidas wrote: > > Hmmm, now that I look at the changes to mound_md() again, I don't like the way > it's headed. Would it make more sense to add a tmpmfs_flags="" variable that > would surpass both the bytes-per-inode and the ones I tried adding? This > introduces an incompatibility with the current state of mount_md(), but it's > easily extensible to include other options of mdmfs without having to invent > new funny ways of passing options to mdmfs through the rc.d scripts. If we're using mdmfs from more than one place, then we need to do some re-factoring. If you don't have the time I'll be playing with diskless machines at $real_job soon, so I'll probably have time to look at it. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon ! From owner-freebsd-rc@FreeBSD.ORG Mon Nov 8 14:37:54 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F421F16A4CE for ; Mon, 8 Nov 2004 14:37:53 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id A851343D54 for ; Mon, 8 Nov 2004 14:36:41 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])iA8EaFON031186; Mon, 8 Nov 2004 16:36:25 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) iA8EYxoP000883; Mon, 8 Nov 2004 16:36:03 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)iA8EXaed000869; Mon, 8 Nov 2004 16:33:36 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 8 Nov 2004 16:33:36 +0200 From: Giorgos Keramidas To: Mike Makonnen Message-ID: <20041108143336.GB784@orion.daedalusnetworks.priv> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> <20041108114402.GA2910@rogue.acs.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108114402.GA2910@rogue.acs.lan> cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 14:37:54 -0000 On 2004-11-08 14:44, Mike Makonnen wrote: > I haven't tested it, but I don't see anything obviously wrong with it. > > Cheers. How about this one? There are no tricky parts in mount_md() anymore and the tmpfs_flags variable is passed to mdmfs. I just rebooted with it, with tmpfs=30m and tmpfs=YES in my rc.conf and all seemed to work fine. I've kept the tmpsize and varsize options too. I know they can be replaced by a properly tweaked tmpmfs_flags, but this isn't really necessary. %%% Index: etc/rc.subr =================================================================== RCS file: /home/ncvs/src/etc/rc.subr,v retrieving revision 1.31 diff -u -u -r1.31 rc.subr --- etc/rc.subr 30 Jul 2004 17:19:35 -0000 1.31 +++ etc/rc.subr 8 Nov 2004 13:55:04 -0000 @@ -1289,12 +1289,12 @@ # as close as possible between 5-current and 4-stable. # $1 = size # $2 = mount point -# $3 = (optional) bytes-per-inode +# $3 = (optional) extra mdmfs flags mount_md() { if [ -n "$3" ]; then - bpi="-i $3" + flags="$3" fi - /sbin/mdmfs $bpi -s $1 -M md $2 + /sbin/mdmfs $flags -s $1 -M md $2 } fi Index: etc/defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.226 diff -u -u -r1.226 rc.conf --- etc/defaults/rc.conf 20 Oct 2004 16:58:27 -0000 1.226 +++ etc/defaults/rc.conf 8 Nov 2004 13:58:23 -0000 @@ -40,8 +40,10 @@ removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never tmpsize="20m" # Size of mfs /tmp if created +tmpmfs_flags="-S -o noexec,nosuid,nodev" # Extra mdmfs options for the mfs /tmp varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created +varmfs_flags="-S" # Extra mount options for the mfs /var populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs. script_name_sep=" " # Change if your startup scripts' names contain spaces Index: etc/rc.d/tmp =================================================================== RCS file: /home/ncvs/src/etc/rc.d/tmp,v retrieving revision 1.34 diff -u -u -r1.34 tmp --- etc/rc.d/tmp 7 Oct 2004 13:55:26 -0000 1.34 +++ etc/rc.d/tmp 8 Nov 2004 14:27:55 -0000 @@ -42,7 +42,7 @@ # case "${tmpmfs}" in [Yy][Ee][Ss]) - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" chmod 01777 /tmp ;; [Nn][Oo]) @@ -56,7 +56,7 @@ echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" chmod 01777 /tmp fi fi Index: etc/rc.d/var =================================================================== RCS file: /home/ncvs/src/etc/rc.d/var,v retrieving revision 1.34 diff -u -u -r1.34 var --- etc/rc.d/var 7 Oct 2004 13:55:26 -0000 1.34 +++ etc/rc.d/var 8 Nov 2004 14:28:19 -0000 @@ -61,7 +61,7 @@ # case "${varmfs}" in [Yy][Ee][Ss]) - mount_md ${varsize} /var + mount_md ${varsize} /var "${varmfs_flags}" ;; [Nn][Oo]) ;; @@ -69,7 +69,7 @@ if (/bin/mkdir -p /var/.diskless 2> /dev/null); then rmdir /var/.diskless else - mount_md ${varsize} /var + mount_md ${varsize} /var "${varmfs_flags}" fi esac Index: share/man/man5/rc.conf.5 =================================================================== RCS file: /home/ncvs/src/share/man/man5/rc.conf.5,v retrieving revision 1.232 diff -u -u -r1.232 rc.conf.5 --- share/man/man5/rc.conf.5 23 Oct 2004 18:35:35 -0000 1.232 +++ share/man/man5/rc.conf.5 8 Nov 2004 14:04:58 -0000 @@ -240,6 +240,22 @@ Controls the size of a created .Pa /tmp memory file system. +.It Va tmpmfs_flags +Extra options passed to the +.Xr mdmfs 8 +utility when the memory file system for +.Pa /tmp +is created. +The default is +.Dq Li -S -o noexec,nosuid,nodev , +which inhibits the use of softupdates on +.Pa /tmp +to waste as little space as possible and mounts the memory file system +.Dq Li noexec,nosuid,nodev . +See +.Xr mdmfs 8 +for other options you can use in +.Li tmpmfs_flags . .It Va varmfs Controls the creation of a .Pa /var @@ -255,6 +271,21 @@ Controls the size of a created .Pa /var memory file system. +.It Va varmfs_flags +Extra options passed to the +.Xr mdmfs 8 +utility when the memory file system for +.Pa /var +is created. +The default is +.Dq Li -S , +which inhibits the use of softupdates on +.Pa /var +to waste as little space as possible. +See +.Xr mdmfs 8 +for other options you can use in +.Li varmfs_flags . .It Va populate_var Controls the automatic population of the .Pa /var @@ -3095,6 +3126,7 @@ .Xr kldxref 8 , .Xr lpd 8 , .Xr mdconfig 8 , +.Xr mdmfs 8 , .Xr mountd 8 , .Xr moused 8 , .Xr mrouted 8 , %%% From owner-freebsd-rc@FreeBSD.ORG Tue Nov 9 06:49:42 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A15716A4CE for ; Tue, 9 Nov 2004 06:49:42 +0000 (GMT) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C0DF43D2F for ; Tue, 9 Nov 2004 06:49:40 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.226] (HELO rogue.acs.lan) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP id 62460045; Tue, 09 Nov 2004 09:42:10 +0300 Received: by rogue.acs.lan (Postfix, from userid 1000) id D6C0CB86E; Tue, 9 Nov 2004 09:49:00 +0300 (EAT) Date: Tue, 9 Nov 2004 09:48:59 +0300 From: Mike Makonnen To: Giorgos Keramidas Message-ID: <20041109064859.GA69017@rogue.acs.lan> References: <20041108005007.GB57736@gothmog.gr> <20041108105120.GA952@orion.daedalusnetworks.priv> <20041108114402.GA2910@rogue.acs.lan> <20041108143336.GB784@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041108143336.GB784@orion.daedalusnetworks.priv> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/6.0-CURRENT (i386) cc: freebsd-rc@freebsd.org Subject: Re: RFC (fwd) Re: 5.3 tmpfs mount permissions X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 06:49:42 -0000 On Mon, Nov 08, 2004 at 04:33:36PM +0200, Giorgos Keramidas wrote: > On 2004-11-08 14:44, Mike Makonnen wrote: > > I haven't tested it, but I don't see anything obviously wrong with it. > > > > Cheers. > > How about this one? There are no tricky parts in mount_md() anymore and the > tmpfs_flags variable is passed to mdmfs. I just rebooted with it, with > tmpfs=30m and tmpfs=YES in my rc.conf and all seemed to work fine. > > I've kept the tmpsize and varsize options too. I know they can be replaced by > a properly tweaked tmpmfs_flags, but this isn't really necessary. Yes, this one looks better. Forget what I said about refactoring. I misread the diff and thought there were two mount_md() type routines. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !