Skip site navigation (1)Skip section navigation (2)
Date:      24 Aug 1999 19:38:57 -0000
From:      nbm@rucus.ru.ac.za
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/13357: add flag in rc.conf to automatically turn on vfs.usermount
Message-ID:  <19990824193857.6846.qmail@rucus.ru.ac.za>

next in thread | raw e-mail | index | archive | help

>Number:         13357
>Category:       conf
>Synopsis:       add flag in rc.conf to automatically turn on vfs.usermount
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 24 12:50:01 PDT 1999
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


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




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