From: aps@ieee.org (Armando Stettner)
Subject: [TUHS] History of strncpy
Date: Wed, 23 Jan 2013 09:24:26 -0600 [thread overview]
Message-ID: <12408BE9-5FC8-4ECA-93C1-38D27EF1DA23@ieee.org> (raw)
In-Reply-To: <5CE5BCC9-06CF-423D-AEBA-636952773EDA@ronnatalie.com>
I also second/support Ron's and uh Clem's view. In addition to zeroing out the inumber field, "removing" a file decremented the reference count in the i-node causing it to be freed (not cleared) when the reference count went to zero. There was no strncpy() in the kernel. Was there a strcpy() (other than a macro) in the kernel?? Long live movtuc.
Begin forwarded message:
> From: Ronald Natalie <ron at ronnatalie.com>
> Subject: Re: [TUHS] History of strncpy
> Date: January 23, 2013 9:01:04 AM CST
> To: Clem Cole <clemc at ccc.com>
> Cc: tuhs at minnie.tuhs.org
>
> 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?"
>
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs
>
next prev parent reply other threads:[~2013-01-23 15:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 4:03 Nevin Liber
2013-01-23 4:41 ` Warren Toomey
2013-01-23 4:58 ` Warner Losh
2013-01-23 14:16 ` Clem Cole
2013-01-23 15:01 ` Ronald Natalie
2013-01-23 15:24 ` Armando Stettner [this message]
2013-01-23 17:49 ` scj
2013-01-23 18:19 ` Ronald Natalie
2013-01-23 19:33 ` Ronald Natalie
2013-01-23 19:59 ` Clem Cole
2013-01-23 22:43 ` Mary Ann Horton
2013-01-24 0:01 ` Clem Cole
2013-01-24 0:37 ` Jonathan Gevaryahu
2013-01-23 17:56 Michael Spacefalcon
2013-01-23 21:08 ` Larry McVoy
2013-01-23 21:39 ` Ronald Natalie
2013-01-23 21:46 ` John Cowan
2013-01-24 6:02 ` Larry McVoy
2013-01-24 6:34 ` Steve Nickolas
2013-01-24 14:42 ` Ronald Natalie
2013-01-24 14:52 ` Warner Losh
2013-01-24 16:01 ` Ronald Natalie
2013-01-24 18:31 ` Tom Ivar Helbekkmo
2013-01-25 2:06 ` Warner Losh
2013-01-24 16:21 ` Clem Cole
2013-02-01 0:28 ` Larry McVoy
2013-01-31 23:52 ` Random832
2013-02-01 0:06 ` Warner Losh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12408BE9-5FC8-4ECA-93C1-38D27EF1DA23@ieee.org \
--to=aps@ieee.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).