Xref: utzoo comp.sources.wanted:7609 comp.unix.questions:13951 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!n8emr!lwv From: lwv@n8emr.UUCP (Larry W. Virden) Newsgroups: comp.sources.wanted,comp.unix.questions Subject: WANTED: real path routine Message-ID: <1116@n8emr.UUCP> Date: 30 May 89 19:53:46 GMT Reply-To: lwv@n8emr.UUCP (Larry W. Virden) Organization: Ham BBS, 614-457-4227 (1200/2400/19.2 telebit,8N1) Lines: 28 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!