*statfs exposure of file system IDs to non-root users

Ian Dowse iedowse at maths.tcd.ie
Sun Jul 20 08:01:03 PDT 2003


In message <3F1A8FBE.E0ACB134 at 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


More information about the freebsd-arch mailing list