GNU Core Utilities - Patches: patch #4065, df emits spurious errors
You are not allowed to post comments on this tracker with your current authentication level.
patch #4065: df emits spurious errors
Submitter: | None | ||
Submitted: | Tue 31 May 2005 04:33:05 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Email: | -email is unavailable- |
Open/Closed: | Open |
Attached Files
file #8913: df.patch added by None (3KiB - application/octet-stream - df patch)
Depends on the following items: None found
Items that depend on this one: None found
CC list is empty
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2005-05-31 | None | Attached File | - | Added df.patch, #4676 | |
Carbon-Copy | - | Added woodd --AT-- deshaw --DOT-- com |
Powered by Savane 3.13-02a9.
Corresponding source code
If the caller specifies a FILE, df will generate permission errors concerning other filesystems even though the caller has permission to stat() FILE. The problem occurs if you specify a FILE without a leading '/' or if FILE resides in a lofs filesystem. Example:
desa0001.nyc:/tmp > gnu df -k | egrep 'Filesystem|/tmp'
Filesystem 1K-blocks Used Available Use% Mounted on
swap 20055024 436 20054588 1% /tmp
desa0001.nyc:/tmp > gnu df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
df: `/fs/cache-1/usr_cache/.cfs_mnt_points/10.0.0.17:_vol_netboot_static_Solaris
-10_i386_live-20050520_usr': Permission denied
swap 20055188 436 20054752 1% /tmp
In this case, /fs/cache-1 is a cachefs directory and we really don't want the user to have permission to it. The user is not asking for a report on the /fs/cache-1 filesystem so it doesn't make sense to generate errors about it.
My solution to this problem is to stash the stat() errors in a simple linked list. If we never find the filesystem requested by the user we'll dump out the contents of the linked list; otherwise, all is well so there is no need to spew the stat() errors. The attached patch is against release v5.2.1. David