Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1a 7/7/83; site rlgvax.UUCP Path: utzoo!linus!philabs!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.lang.c,net.unix-wizards Subject: Re: strncpy() Message-ID: <1086@rlgvax.UUCP> Date: Thu, 1-Sep-83 12:48:57 EDT Article-I.D.: rlgvax.1086 Posted: Thu Sep 1 12:48:57 1983 Date-Received: Fri, 2-Sep-83 13:13:44 EDT References: druxu.677, <716@bronze.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 10 The kernel does not use "strncmp" at all for comparing directory entries. Given this, there is a bug in "fsck" (V7, S3, 4.1BSD) where it will NOT zero out the full d_name portion of a directory entry when it is reattaching an orphan file to "lost+found". If the slot being used for that had a pathname longer than the (6 or 7, depending on which UNIX) characters used by the reattachment name, you will end up with a totally inaccessible file with a null character in the middle of its name. Guy Harris {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy