[comp.sources.wanted] WANTED: real path routine

lwv@n8emr.UUCP (Larry W. Virden) (05/31/89)

I am working with a routine which ATTEMPTS to provide me with the real
machine and pathname of a file when a file is NFS and/or NFS-automounted.
The problem is that I need this code to work in multiple environments.
I had the routine working untill I tried moving it to Ultrix, at which time
it broke due to several unfortunate design decisions - such as the method
for reading the mount table and the use of a subroutine called realpath()
which takes an arbitrary pathname and turns it into a fully resolved pathname
with symbolic link names resolved into hard links (interesting quirk - the
man page says NOTHING about the symbolic link angle - so one doesnt realize
that one is getting that benefit until one goes to replace it on another
more hostile environment)...

Anyways, does anyone out there know of a routine which takes a relative
pathname, possibly containing symbolic links, and which turns it into
a hard link path?  Doesnt have to be any particular hardlink path - just
a real one. 

As for the purpose in such a routine to de-black box a NFS file -- I recently
noticed some 'heat' concerning folks doing this type of thing.  In my case,
I have a number of routines which do some parameter set up locally, then
issue an rsh to a file server to perform some action on the files.  The
file server doesnt want to see what MY machine thinks the file is called - it
wants to see what IT thinks the file is called.
-- 
Larry W. Virden	 674 Falls Place, Reynoldsburg, OH 43068 (614) 864-8817
n8emr!lwv@cis.ohio-state.edu (Internet) <-- expiring June 4th, 1989
75046,606 (CIS) ; LVirden (ALPE) ; lwv@cmhgate.fidonet.org <-- New ID!