From nbm@rucus.ru.ac.za Tue Aug 24 12:41:08 1999
Return-Path: <nbm@rucus.ru.ac.za>
Received: from rucus.ru.ac.za (rucus.ru.ac.za [146.231.29.2])
	by hub.freebsd.org (Postfix) with SMTP id 3C06C15216
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 24 Aug 1999 12:40:58 -0700 (PDT)
	(envelope-from nbm@rucus.ru.ac.za)
Received: (qmail 6849 invoked by uid 1003); 24 Aug 1999 19:38:57 -0000
Message-Id: <19990824193857.6846.qmail@rucus.ru.ac.za>
Date: 24 Aug 1999 19:38:57 -0000
From: nbm@rucus.ru.ac.za
Reply-To: nbm@rucus.ru.ac.za
To: FreeBSD-gnats-submit@freebsd.org
Subject: add flag in rc.conf to automatically turn on vfs.usermount
X-Send-Pr-Version: 3.2

>Number:         13357
>Category:       conf
>Synopsis:       add flag in rc.conf to automatically turn on vfs.usermount
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jkoshy
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 24 12:50:01 PDT 1999
>Closed-Date:    Wed Sep 22 21:44:00 PDT 1999
>Last-Modified:  Wed Sep 22 21:48:23 PDT 1999
>Originator:     Neil Blakey-Milner
>Release:        FreeBSD 3.0-STABLE i386
>Organization:
Rhodes University Computer Users' Society
>Environment:

FreeBSD rucus.ru.ac.za 3.0-STABLE FreeBSD 3.0-STABLE #0: Tue Feb  9 22:52:23 GMT 1999     grahams@rucus.ru.ac.za:/usr/src/sys/compile/RUCUS-SMP  i386

>Description:

An easy way to turn on user mounting from rc.conf, including update to
rc.conf.5 (and sneaked in vinum description in there too)

>How-To-Repeat:

Read -questions mail and explain sysctls to them.

>Fix:

Relative to src/etc:

Index: rc
===================================================================
RCS file: /usr/home/nbm/ncvs/src/etc/rc,v
retrieving revision 1.193
diff -u -r1.193 rc
--- rc	1999/08/06 06:22:43	1.193
+++ rc	1999/08/24 13:44:12
@@ -178,6 +178,10 @@
 mount -a -t nfs
 echo .
 
+if [ X"$user_mount" = X"YES" ]; then
+	sysctl -w vfs.usermount=1 >/dev/null
+fi
+
 # Whack the pty perms back into shape.
 chflags 0 /dev/tty[pqrsPQRS]*
 chmod 666 /dev/tty[pqrsPQRS]*
Index: defaults/rc.conf
===================================================================
RCS file: /usr/home/nbm/ncvs/src/etc/defaults/rc.conf,v
retrieving revision 1.30
diff -u -r1.30 rc.conf
--- rc.conf	1999/08/22 23:26:05	1.30
+++ rc.conf	1999/08/24 14:15:55
@@ -223,6 +223,7 @@
 start_vinum=""		# set to YES to start vinum
 vinum_drives=""		# put in names of disks containing vinum drives
 			# to start vinum on only specific disks.
+user_mount="NO"		# allow users to mount filesystems (or NO)
 
 ##############################################################
 ### Allow local configuration override at the very end here ##
Index: ../share/man/man5/rc.conf.5
===================================================================
RCS file: /usr/home/nbm/ncvs/src/share/man/man5/rc.conf.5,v
retrieving revision 1.42
diff -u -r1.42 rc.conf.5
--- rc.conf.5	1999/08/22 23:25:35	1.42
+++ rc.conf.5	1999/08/24 15:21:20
@@ -1018,6 +1018,24 @@
 .Xr init 8
 for the list of possible security levels and their effect
 on system operation.
+.It Ar start_vinum
+(bool) Set to
+.Ar YES
+if you want to start
+.Xr vinum 8 .
+.It Ar vinum_drives
+(str) If 
+.Ar start_vinum 
+is set to
+.Ar YES ,
+then if this list is not empty, 
+.Xr vinum 8
+is only started on the disks contained in it.
+.It Ar user_mount
+(bool) Set to
+.Ar YES
+if you wish to allow non-root users to mount filesystems if the
+permissions allow it.
 .Sh FILES
 .Bl -tag -width /etc/defaults/rc.conf -compact
 .It Pa /etc/defaults/rc.conf
@@ -1066,6 +1084,7 @@
 .Xr swapon 8 ,
 .Xr tickadj 8 ,
 .Xr timed 8 ,
+.Xr vinum 8 ,
 .Xr vnconfig 8 ,
 .Xr xntpd 8 ,
 .Xr xtend 8 ,


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkoshy 
Responsible-Changed-By: jkoshy 
Responsible-Changed-When: Wed Aug 25 01:21:01 PDT 1999 
Responsible-Changed-Why:  
Will take this one. 

From: <jkoshy@FreeBSD.org>
To: freebsd-gnats-submit@freebsd.org
Cc: bde@FreeBSD.org, sheldonh@FreeBSD.org, nbm@mithrandr.moria.org
Subject: Re: conf/13357: add flag in rc.conf to automatically turn on vfs.usermount
Date: Wed, 22 Sep 1999 00:06:36 -0700 (PDT)

 On further reflection, I feel that having an easy to tweak rc.conf knob 
 to allow user mounts is not a good idea.  There seem to be a few
 definite downsides to enabling vfs.usermount.
 
 We now have a FAQ entry which describes how to enable user mounts for
 those who absolutely must have this functionality.
 
 The documentation patch in this PR for documenting start_vinum has 
 been committed, thanks!
 
 Regards,
 Koshy
 <jkoshy@freebsd.org>
 
 
State-Changed-From-To: open->closed 
State-Changed-By: jkoshy 
State-Changed-When: Wed Sep 22 21:44:00 PDT 1999 
State-Changed-Why:  
vfs.usermount is not ready for general consumption so an easy to 
tweak knob is probably not a good idea.  However the relevant info 
on how to use it is present now in the FAQ for those who want to use it. 
The vinum specific portions ofn the submitted patch have been committed, 
thanks! 
>Unformatted:
