From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 4 11:50:21 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3296A16A422; Tue, 4 Apr 2006 11:50:21 +0000 (UTC) (envelope-from stsp@stsp.in-berlin.de) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6784A43D79; Tue, 4 Apr 2006 11:50:12 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) X-Envelope-From: stsp@stsp.in-berlin.de Received: from dice.stsp.lan (brln-d9ba6190.pool.mediaWays.net [217.186.97.144]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id k34Bo0cT015860 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Apr 2006 13:50:02 +0200 Received: by dice.stsp.lan (nbSMTP-1.01-cvs) for uid 1001 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) stsp@stsp.in-berlin.de; Tue, 4 Apr 2006 13:50:03 +0200 (CEST) Date: Tue, 4 Apr 2006 13:45:47 +0200 From: Stefan Sperling To: Joe Marcus Clarke Message-ID: <20060404114547.GA1613@dice.stsp.lan> References: <1144042356.824.16.camel@shumai.marcuscom.com> <4430BA79.2030403@freebsd.org> <44316387.1090609@FreeBSD.org> <44321277.7040904@FreeBSD.org> <1144133238.9725.32.camel@shumai.marcuscom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1144133238.9725.32.camel@shumai.marcuscom.com> User-Agent: Mutt/1.4.2.1i X-Spam-Score: (0.793) AWL,BAYES_50,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Cc: hackers@freebsd.org Subject: Re: RFC: Adding a ``user'' mount option X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Apr 2006 11:50:21 -0000 On Tue, Apr 04, 2006 at 02:47:18AM -0400, Joe Marcus Clarke wrote: > On Tue, 2006-04-04 at 08:30 +0200, Alex Dupre wrote: > > Joe Marcus Clarke wrote: > > > What I'd like to achieve is a simple out-of-the-box way of mounting > > > media such as CDs, and floppy disks without users necessarily needing to > > > know about sysctl. While I can't speak for KDE, I know GNOME already > > > has the ability to detect user-mountable media, and gives the users > > > icons on the desktop to mount said volumes. > > > > I don't know what exactly you mean with 'detect user-mountable media', > > but a KDE user may have desktop icons for every device/fs listed in > > /etc/fstab. I assume GNOME works in a similar way. And clicking on the > > icon of course will mount the media with the 'mount' command. KDE also > > monitor changes to the fstab file and can open a dialog window when a > > new media appears, but since the fstab file is not automatically updated > > on FreeBSD (I don't know how it works exactly on Linux) this feature is > > quite useless. > > GNOME works in a similar fashion. Currently if vfs.usermount=1, FreeBSD > scans the fstab list, and if the mount point is owned by the current > user, it adds an icon for it. Why do GNOME/KDE rely on /etc/fstab on FreeBSD? What are admins supposed to do on systems with more than, say, a hundred users. Having to add a line to /etc/fstab for every user is of course scriptable, but that does not make it less insane. As far as I got it, the current design boils down to the user creating a mount point, and then mounting the media "manually", e.g. mount /dev/cd0 ~/cdrom. Granted the admin has set vfs.usermount to 1, of course. I don't really think that user mount has been designed with /etc/fstab in mind. So why not have GNOME/KDE create mount points for the user if vfs.usermount is 1? Since FreeBSD uses devfs, every device in /dev that usually represents a device with removable media can assumed to be present in hardware. GNOME/KDE could be patched to create mount points somewhere in the user's home directory, and issue a 'mount device mount_point' instead of 'mount mount_point' if the user clicks the device icon. This still requires novice home desktop users to set vfs.usermount to 1 though, so it's not a perfect solution. But it prevents having another suid binary just for convinience, and is suitable for large multi user installations. > For dynamic updates, Linux has mtab. For FreeBSD (in GNOME, that is), > we just periodically check for changes in the list of available file > systems. Where? In /etc/fstab or /dev ? -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0