From owner-freebsd-arch@FreeBSD.ORG Sun Jul 20 08:01:03 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0266C37B401 for ; Sun, 20 Jul 2003 08:01:03 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id E407743F85 for ; Sun, 20 Jul 2003 08:01:01 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 20 Jul 2003 16:01:01 +0100 (BST) To: Terry Lambert In-Reply-To: Your message of "Sun, 20 Jul 2003 05:49:02 PDT." <3F1A8FBE.E0ACB134@mindspring.com> Date: Sun, 20 Jul 2003 16:00:58 +0100 From: Ian Dowse Message-ID: <200307201601.aa07561@salmon.maths.tcd.ie> cc: arch@freebsd.org Subject: Re: *statfs exposure of file system IDs to non-root users X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 15:01:03 -0000 In message <3F1A8FBE.E0ACB134@mindspring.com>, Terry Lambert writes: >Ian Dowse wrote: >> In changing umount(8) to use statfs(2), I just noticed that the >> various *statfs calls hide the filesystem IDs from non-root users: >The real question is "Why do you need this information?". > >If you can answer that, we can probably tell you a different >approach to solving your problem. See previous posts here on the subject of unmounting by filesystem ID. The filesystem ID is a way of unambiguously specifying which file system is to be unmounted, whereas the mountpoint or device node may not be unique. The umount utility now passes a filesystem ID to unmount(2), which works fine when run by root and when umount is extracting an entry from the list obtained from getfsstat(2), but it doesn't work as a normal user when the ID comes from statfs(2). Ian