From mboxrd@z Thu Jan 1 00:00:00 1970 From: ron@ronnatalie.com (Ronald Natalie) Date: Wed, 23 Jan 2013 10:01:04 -0500 Subject: [TUHS] History of strncpy In-Reply-To: References: Message-ID: <5CE5BCC9-06CF-423D-AEBA-636952773EDA@ronnatalie.com> I agree with uh Clem. First off, Nevin's rememberence is wrong. The I-node number was the first two bytes of the V6 directory entry followed by a FIXED 14 spaces for the name (null terminated or not depending on whether the length was there). I can guarantee there was no STRNCPY in the kernel, and my memory is with Clem, the V6 and even the phototypesetter versions of the C compiler and libraries didn't have these functions. By the time Version 7 rolled around, the variable length directories had also appeared in the filesystem. I suspect strcpy arrived with the "portable I/O library", an abomination that eventually evolved into the stdio library and to this day is still stinking up the standard C language. Amusingly, removing a file only zeroed out the inumber field. This could lead the creative hacker to leave all sorts of fun messages in the directory by creating and removing files carefully. We had an alternate shell that was removed for security reasons and one day I found if you did "cat /tmp" there was some noise at the top for the current user of it but then a bunch of new lines and a message that said "Looking for a ghost of nosh?"