From: krewat@kilonet.net (Arthur Krewat)
Subject: [TUHS] Bourne shell and comments
Date: Wed, 19 Apr 2017 16:35:40 -0400 [thread overview]
Message-ID: <2428566d-5998-1688-1bf5-2c369d99350e@kilonet.net> (raw)
In-Reply-To: <20170419203647.710e856a@heffalump.sk2.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1968 bytes --]
This is all very interesting. Back when I was in high school, I
exploited a daemon on the PDP-10 we used. MIC. It allowed you to
basically run a "shell script" using a PTY as yourself, and it would
generate a log, and you could peruse it at your leisure. The exploit had
to do with the fact that PTYs had special privileges because of some
custom security alterations the consulting firm made to TOPS-10.
After the consulting firm got wind of what I did, they asked me to write
a replacement that was more secure. While the original MIC had a lot of
functionality in it, including labels like GOTHERE: (not the trailing
colon), and it was used to compile the monitor (TOPS-10), they just
needed something quick-and-dirty that students could use that wouldn't
open up a security hole. I basically just forced the script into the
terminals input buffer and let the monitor execute it line-by-line,
instead of using a PTY.
So while I was creating this new MIC, I figured why not put the colon at
the beginning of the line, it was easier to find on-the-fly.
Imagine my surprise when I got into DOS a year or two later and they
used leading colons for labels in batch files.
Not having any access whatsoever to any flavor of UNIX at the time, this
is the first I've heard that leading colons were used for labels outside
of DOS and my MIC-lite :)
On 4/19/2017 2:36 PM, Stephen Kitt wrote:
> On Tue, 18 Apr 2017 15:45:36 -0600, Grant Taylor <gtaylor at tnetconsulting.net>
> wrote:
>> On 04/18/2017 02:51 PM, Ron Natalie wrote:
>>> Was also the label for goto.
>> Does that mean that the (so called) comment was really an (unused) label?
> Not Unix, but on DOS (on PCs) this was a common trick — it was especially
> appreciated because : as a comment prefix (often doubled, so it couldn’t be
> mistaken for a goto label) was faster to process than the official REM (which
> was a command which had to be executed).
>
> Regards,
>
> Stephen
>
>
next prev parent reply other threads:[~2017-04-19 20:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 20:48 Warren Toomey
2017-04-18 20:51 ` Ron Natalie
2017-04-18 21:45 ` Grant Taylor
2017-04-18 22:16 ` Ron Natalie
2017-04-18 22:40 ` Toby Thain
2017-04-19 18:36 ` Stephen Kitt
2017-04-19 20:35 ` Arthur Krewat [this message]
2017-04-19 0:50 ` Lyndon Nerenberg
2017-04-19 8:35 ` Andreas Kusalananda Kähäri
2017-04-19 16:31 ` Grant Taylor
2017-04-19 16:59 ` Andreas Kusalananda Kähäri
2017-04-19 17:36 ` Bakul Shah
2017-04-19 17:59 ` Grant Taylor
2017-04-20 20:13 ` Clem Cole
2017-04-20 20:17 ` Chet Ramey
2017-04-21 3:28 ` arnold
2017-04-21 3:43 ` Bakul Shah
2017-04-21 6:07 ` Steve Nickolas
2017-04-21 11:18 ` Clem cole
2017-04-21 13:20 ` Michael Kjörling
2017-04-18 20:56 ` Chet Ramey
2017-04-19 21:02 ` Sven Mascheck
2017-04-19 22:07 ` Steffen Nurpmeso
2017-04-20 0:31 ` shawn wilson
2017-04-20 0:35 ` shawn wilson
2017-04-20 3:50 ` Andy Kosela
2017-04-20 4:47 ` Warner Losh
2017-04-21 1:42 ` Nemo
2017-04-21 10:54 ` Ron Natalie
2017-04-21 14:22 ` Andy Kosela
2017-04-21 14:45 ` Ron Natalie
2017-04-22 2:46 ` Dave Horsfall
2017-04-20 16:39 ` Sven Mascheck
2017-04-20 21:42 ` Steffen Nurpmeso
2017-04-19 19:18 Doug McIlroy
2017-04-21 17:03 Doug McIlroy
2017-04-21 18:15 ` Clem Cole
2017-04-21 19:13 ` Steve Johnson
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=2428566d-5998-1688-1bf5-2c369d99350e@kilonet.net \
--to=krewat@kilonet.net \
/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).