Copyright startup lines <was: SECURITY BUG IN ISC UNIX SYSV386>

Daniel A. Glasser dag at persoft.com
Sat Feb 23 08:53:11 AEST 1991


* This is not a flame directed at Jay.  The world of ANSI X3.64 style terminals
* and the programming thereof is not a black art but most people don't know
* much beyond what they read in manuals and treat it as such.

In article <375 at metran.UUCP> jay at metran.UUCP (Jay Ts) writes:
>The ANSI-standard "clear screen" escape sequence is ESC-c.  So all you have
>to do is modify your /etc/gettydefs file like this (for each entry you use):
>
>console# B9600 [ ... ] # B9600 [ ... ] #^[cConsole Login: #console
>
>                                        ^that ^[ is an ESC character
>
>Thus, the pre-login prompt stuff is cleared off the screen, and users always
>get the login prompt in the top left of a nice, clean screen.

YIKES!!!!

I RECOMMEND THAT YOU DON'T DO THIS!

The ANSI sequence that is "spelled" "\033c" ("^[c" or "<ESC>c") is not
defined as "clear screen".  It is defined as RIS (Reset to Initial State),
and in many terminals (notably DEC VTx, x >= 100) causes a disconnect.
This disconnect will cause a modem to hang up, and on some hardware/OS
combinations, signal a hangup to the host even if the terminal does not
hang up its end.  It may also change the baud rate setting on the terminal.
The DEC VT420 manual (which is not a standard, but is common practice) says
this about RIS (quoted without permission):

	This control function causes a nonvolatile memory (NVR) recall to
	occur.  RIS replaces all set-up features with their saved settings.
	...

	NOTE:
	Digital does not recommend using RIS to reset the terminal.  You
	should use a soft terminal reset (DECSTR) instead.  RIS usually
	causes a communication line disconnect and may change the current
	baud rate settings.  When performing a RIS, the terminal sends
	XOFF to the host to stop communication.  When the RIS is complete,
	the terminal sends XON to resume communciation.

(DECSTR, Soft Terminal Reset, does not clear the screen, so this isn't
 what is desired either, and it's only supported by VT3x0 and higher.)

I don't know of an ansi standard sequence for "clear screen".  There is
one that clears a portion (or all) of the display page, ED (Erase in Display),
which is "\033[J" or "\033[0J" for "erase from cursor to end of page",
"\033[1J" for "erase from beginning of page to cursor", and "\033[2J" for
"erase entire display."  None of these moves the cursor.

This is, however, not exactly what I thought the original query was asking,
since the drivel that you are clearing out still gets written, but then
gets cleared away.  It still uses up line time and might confuse some
calling uucico...

-- 
          Daniel A. Glasser  |  Persoft, Inc.  |  dag at persoft.com
                "Their brains were small, and they died."



More information about the Comp.unix.sysv386 mailing list