df . (was: Re: It works everywhere else, but not on AIX)

Bill Baker web at farpoint.austin.ibm.com
Fri Apr 19 00:53:55 AEST 1991


>In article <3783 at d75.UUCP> woan at cactus.org writes:
>>In article <1991Apr16.210447.28136 at ibmpa.awdpa.ibm.com> jsalter at slo.awdpa.ibm.com (Jim Salter) writes:
>>>Sure enough, if the access mode for the directory doesn't have the user's
>>>executable bit on, df . doesn't work.  A defect has been opened.
>>Are you positive that this is a defect? 

In the old days, df had to grope the super block to determine the free
space in a file system.  As a result, df had to be set-uid root, set-uid
to the owner of the device files, or set-gid to the group id of the device
files.

Newer versions of Unix have a statfs (or statvfs) system call that returns
interesting file system statistics given the name of any file in the file
system.  That makes "df ." trivial to implement.  Df in AIX was coded to
use statfs.  However, it was mistakenly left set-uid bin.  This means that
df will fail in any directory that does not give search access to bin.

This has already been fixed in AIX V3.1.5.

web
-- 
Bill Baker             Internet: web at glasnost.austin.ibm.com
IBM PSP                AWD net: web at farpoint.austin.ibm.com
11400 Burnet Rd.       VNET: WEBAKER AT AUSVMQ
Austin, TX; 78758-2502



More information about the Comp.unix.aix mailing list