Re: df shouldn't list mount points that it can't access
From:
n0dalus
Subject:
Re: df shouldn't list mount points that it can't access
Date:
Wed, 12 Oct 2005 15:53:21 +0930
On 10/12/05, Paul Eggert <address@hidden> wrote:
> No, people don't want to be able to see proc mounts by default. But
> for proc mounts, fsu.fsu_blocks should be zero so the following code
> in show_dev should prevent the mount from being listed:
>
> if (fsu.fsu_blocks == 0 && !show_all_fs && !show_listed_fs)
> return;
>
> Can you please investigate why that isn't happening for you?
> I'm worried that your fix masks out a more-fundamental bug.
> Thanks.
>
Hi,
I found that simply when the user has no permissions to access the
mount directory, statfs will return an error (errno = EACCES).
df then reports this error.
The attached patch should fix this.
n0dalus.