From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 3 06:36:07 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 C5B8316A41F; Mon, 3 Apr 2006 06:36:07 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3594E43D48; Mon, 3 Apr 2006 06:36:06 +0000 (GMT) (envelope-from simon@zaphod.nitro.dk) Received: from zaphod.nitro.dk (unknown [192.168.3.18]) by mx.nitro.dk (Postfix) with ESMTP id 67E882D4891; Mon, 3 Apr 2006 06:35:00 +0000 (UTC) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id 9025D11433; Mon, 3 Apr 2006 08:36:01 +0200 (CEST) Date: Mon, 3 Apr 2006 08:36:01 +0200 From: "Simon L. Nielsen" To: Joe Marcus Clarke Message-ID: <20060403063601.GB852@zaphod.nitro.dk> References: <1144042356.824.16.camel@shumai.marcuscom.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y7xTucakfITjPcLV" Content-Disposition: inline In-Reply-To: <1144042356.824.16.camel@shumai.marcuscom.com> User-Agent: Mutt/1.5.11 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: Mon, 03 Apr 2006 06:36:07 -0000 --Y7xTucakfITjPcLV Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2006.04.03 01:32:36 -0400, Joe Marcus Clarke wrote: > I know we have vfs.usermount, but this is not always sufficient since > the user has to own the mount point in question. What I propose is to > add a ``user'' mount option =E0 la Linux. This would make mount and > umount setuid root, but would allow much more flexibility when it comes > to removable media and desktop systems. Any reason you can't just use sudo... ? I simply have lines like: simon ALL=3DNOPASSWD:/sbin/mount /mnt/cdrom,/sbin/umount /mnt/cdrom in my sudoers file [1]. This way I can also restrict exactly who can mount. I really dislike setuid root binaries, so I really prefer if we could avoid adding more. As Colin noted, if this is to be done via a setuid program, it probably should be a new program, since setuid programs has to have a lot of special handling of things like file descriptors etc. which normal programs can safely ignore. [1] Note I haven't checked if this opens new and interesting holes, but it doesn't matter too much on my laptop, since if somebody has access to "simon" that's just as bad as someone getting root. --=20 Simon L. Nielsen --Y7xTucakfITjPcLV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEMMJRh9pcDSc1mlERAtFNAKClPempIs/Y2olnueRBBGu9CBGmpwCdHFwT LodPHgrAGHFZW76s445LCPQ= =4DYX -----END PGP SIGNATURE----- --Y7xTucakfITjPcLV--