Xref: utzoo comp.unix.wizards:23160 alt.security:1217 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!texbell!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.unix.wizards,alt.security Subject: Re: Hard links to directories: why not? Message-ID: <5LX4IVA@xds13.ferranti.com> Date: 26 Jul 90 13:44:42 GMT References: <5222@milton.u.washington.edu> <10527@odin.corp.sgi.com> <1990Jul19.121048.16332@cbnews.att.com> <1990Jul22.111334.9996@jarvis.csri.toronto.edu> <18467@rpp386.cactus.org> <1990Jul25.115628.6385@jarvis.csri.toronto.edu> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Distribution: na Organization: Xenix Support, FICC Lines: 9 In article <1990Jul25.115628.6385@jarvis.csri.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes: > Do you have a method for detecting loops which doesn't involve searching the > whole i-list or the whole file graph? By explicitly examining ".." you can use the standard "pwd" algorithm to derive a canonical name for a directory. You can then compare prefixes to determine whether a loop exists, but it would be more efficient to check for each directory's inode while in the process of deriving the other's canonical path. -- Peter da Silva. `-_-' +1 713 274 5180. 'U`