i386 unix with NFS - getcwd() & /bin/pwd inode problem

Roger Fujii rmf at media.uucp
Wed Jul 11 15:08:56 AEST 1990


dougm at ico.isc.com (Doug McCallum) writes:

>In article <DENNY.90Jul8193643 at atlas.tss.com> denny at tss.com (Denny Page) writes:
>>When you are in a directory which is mounted via nfs, and the inode of
>>the current directory is > 65535 (such as on a sun), /bin/pwd reports
>>"read error in .."  Getcwd() uses /bin/pwd to do its work, and as such
>>doesn't function.  Is anyone aware of a fix or a work around for this?

>This is a difficult problem to work around.  AT&T changed internal inode
>numbers to long's but left the "stat" system call version of the inode
>number a short.  Just changing it and rebuilding the world would solve
>the problem but would then break every application that comes from
>somewhere else.  Fixes have to be made such that they are compatible
>with previous systems and systems from other vendors.  I expect that
>some type of fix will be made in a future release of our (ISC) version
>once we have one which will let the binary work on other systems that
>don't have the fix.

Ahhh.... Someone else found this too....
Solution:
	1) Fix /bin/pwd (see the bsd getpwd).  I have it somewhere....
		Unfortunatly, there is a lose if there just happens
		to be two files in the same directory with the inode
		numbers separated by 2^16 or greater.
	2) Patch /bin/sh to disable the builtin pwd (change it to owd)

-- 
Roger Fujii - Media Cybernetics		Phone: (301)495-3305
Internet: rmf%media at uunet.uu.net 	UUCP: {uunet,hqda-ai}!media!rmf



More information about the Comp.unix.wizards mailing list