Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!usc!apple!sun-barr!newstop!texsun!texbell!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.unix.wizards Subject: Re: Hard links to directories: why not? Keywords: ln, directories, security... Message-ID: <+CV4JB7@xds13.ferranti.com> Date: 23 Jul 90 21:10:56 GMT References: <5222@milton.u.washington.edu> <6940@eos.UUCP> <1990Jul19.115622.14015@mips2.cr.bull.com> <11070@alice.UUCP> <9007221600.AA00202@mindcrf.mindcraft.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 15 X-Local-Date: 23 Jul 90 14:10:56 PDT In article <9007221600.AA00202@mindcrf.mindcraft.com> karish@mindcrf.UUCP writes: > fsck can ignore symbolic links or treat them as ordinary files. > It can't ignore hard links. Sure it can: if(stat("subdir/..", &sbuf) != EOF) if(stat(".", &dbuf) != EOF) if(sbuf.d_ino != dbuf.d_ino) type = LINK; else type = DIR; else PANIC("can't stat ."); else type = UNKNOWN; -- Peter da Silva. `-_-' +1 713 274 5180. 'U`