Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!mtune!codas!killer!jfh From: jfh@killer.UUCP (The Beach Bum) Newsgroups: comp.bugs.sys5,comp.unix.wizards Subject: Strange problem with root directories Message-ID: <1515@killer.UUCP> Date: Thu, 10-Sep-87 16:16:46 EDT Article-I.D.: killer.1515 Posted: Thu Sep 10 16:16:46 1987 Date-Received: Sat, 12-Sep-87 11:22:17 EDT Organization: Big "D" Home for Wayward Hackers Lines: 26 Keywords: bizarre root directory bug Xref: mnetor comp.bugs.sys5:207 comp.unix.wizards:4188 Okay, strange new bug (actually, _very_ old bug) occured to me last night while ruminating on the lost+found bug. Here is how you get this bizarre baby to show up. # cd / # /etc/link . a. # cd a. You tell me what is weird about that. So far it exists as far back as my Version 7 system at home. The 5.2 machine at work even has it ... This works in the root directory of any device/partition. The test that causes the bug in namei(sys/nami.c) seems to be NOT testing u.u_dent.d_name[0] for equality with `.', only u.u_dent.d_name[1] is checked! Oh, and the fix I posted earlier for the lost+found bug was wrong ... AFTER comparing u.u_dbuf[i] == u.u_dent.d_name[i], test for u.u_dent.d_name[i] for '\0', not before. (Doing it before causes early termination, so that /. gets found instead of /.profile.) That was yet-another interesting problem ... -- John F. Haugh II HECI Exploration Co. Inc. UUCP: ...!ihnp4!killer!jfh 11910 Greenville Ave, Suite 600 "Don't Have an Oil Well?" Dallas, TX. 75243 " ... Then Buy One!" (214) 231-0993