Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.sys.att Subject: Re: C compiler bugs on 386 and 3B2 Message-ID: <4087@auspex.auspex.com> Date: 24 Sep 90 19:23:47 GMT References: <522@mtndew.Tustin.CA.US> <1990Sep21.224449.20599@cfctech.cfc.com> Organization: Auspex Systems, Santa Clara Lines: 24 >I just tested this myself (3B2/1000 Model 80, 3.2.2), and... ZOWIE!! It's way >beyond unfriendly! It breaks one of the "sacred" rules of Unix - no direct >writes to (block-device, mounted) filesystem directories. All "ld" has to do to produce that behavior is to unlink any existing target file and create a new one; most versions of UNIX allow the super-user to unlink directories (yes, I know, SunOS doesn't; however, it doesn't disallow making hard links to directories - if it's going to disallow removing hard links to them, it should bloody well disallow making them in the first place). It most definitely doesn't have to do "direct writes to ... directories". >This is one of the few things which is (usually) denied even to root. Writing to directories is. Unlinking them isn't. >But somehow, ld bypasses the safeguards. There is no safeguard to bypass. >Is ld writing on the raw device? Probably not; there's no reason for it to do so (unless you ask it do, somehow).