Xref: utzoo comp.unix.wizards:22976 alt.security:1134 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!att!cbnews!mvadh From: mvadh@cbnews.att.com (andrew.d.hay) Newsgroups: comp.unix.wizards,alt.security Subject: Re: Hard links to directories: why not? Keywords: ln, directories, security... Message-ID: <1990Jul19.121048.16332@cbnews.att.com> Date: 19 Jul 90 12:10:48 GMT References: <5222@milton.u.washington.edu> <10527@odin.corp.sgi.com> Distribution: na Organization: AT&T Bell Laboratories Lines: 17 In article <10527@odin.corp.sgi.com> schuman@sgi.com (Aaron Schuman) writes: [] "A foolish user could create loops in the directory structure. it would be easy to have ln disallow this: 1) resolve argv[1] and argv[2] to absolute paths 2) determine which path is shorter 3) strncmp() both paths for the shorter length 4) if you have a match, you're trying to create a loop this would also let you safely mv directories... -- Andrew Hay +------------------------------------------------------+ Ragged Individualist | But I thought we were *ALL* iconoclasts! | AT&T-BL Ward Hill MA | I was just trying to fit in!!! | a.d.hay@att.com +------------------------------------------------------+