[comp.unix.sysv386] Copyright startup lines <was: SECURITY BUG IN ISC UNIX SYSV386>

shwake@raysnec.UUCP (Ray Shwake) (02/16/91)

davidg@aegis.UUCP (Dave McLane) writes:

>New, but related subject: when ISC fires up after the login it puts
>this really grotesque series of lines about copyrights and such
>which I would like to get rid of. Anybody know if this is possible?

	This assault of the copyright credit lines is not limited to ISC.
We have a copy of SCO's ODT in the office which credits the sources for
all the ODT components, EVEN IF NOT INSTALLED! Strange, on the old System III
and V.2 boxes I'd played with, which included copyrighted contributions from
UCB, for example, all I encountered was a clean login prompt. I suspect
these references are all coming out of /bin/login.

	On a related issue, both ISC and SCO UNIX *prefix* the login prompt
with a node name reference and a couple of new lines. *This* one, I believe,
comes out of getty.

-----------  
uunet!media!ka3ovk!raysnec!shwake				shwake@rsxtech

cpcahil@virtech.uucp (Conor P. Cahill) (02/17/91)

shwake@raysnec.UUCP (Ray Shwake) writes:
>	On a related issue, both ISC and SCO UNIX *prefix* the login prompt
>with a node name reference and a couple of new lines. *This* one, I believe,
>comes out of getty.

yes, they come out of getty.  Most of it comes out of the /etc/issue file
that getty reads, so changing that file will get rid of most of the pre-login
prompt stuff.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

mju@mudos.ann-arbor.mi.us (Marc Unangst) (02/18/91)

In article <248@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes:
>	This assault of the copyright credit lines is not limited to ISC.
>We have a copy of SCO's ODT in the office which credits the sources for
>all the ODT components, EVEN IF NOT INSTALLED! Strange, on the old System III
>and V.2 boxes I'd played with, which included copyrighted contributions from
>UCB, for example, all I encountered was a clean login prompt. I suspect
>these references are all coming out of /bin/login.

If you're referring to the long list of copyrights that come up after
the date prompt, the list is generated by one of the rc scripts, and the
actual text comes out of files in the /etc/copyrights directory.  You
can take it out by editing the rc scripts, or moving the contents of
/etc/copyrights somewhere else, but be warned that you're probably
invalidating your license or something silly like that.  I don't really
consider it a large problem, so I haven't bothered to do anything about
it.

If you're referring to the list that gets displayed after your last
login information, and before the /etc/motd file, then yes, it comes
from /bin/login.  You could probably null out the text if you wanted
to, but it's much easier to either (a) ignore it; or (b) replace
/bin/login with one of your own creation.  The only problem with
(b) is that it doesn't set your LUID, so you'll either have to use
the PD library for that, or write your own.

>	On a related issue, both ISC and SCO UNIX *prefix* the login prompt
>with a node name reference and a couple of new lines. *This* one, I believe,
>comes out of getty.

No, that comes out of /etc/gettydefs, and can be rather easily changed
to your own favorite message.  My only beef is that SCO getty doesn't
seem to support /etc/issue or a similar file, and limits the "identification
field" of /etc/gettydefs to 89 characters.  Yuk.

-- 
Marc Unangst                | "I think I have a bad disk.  Even though I
mju@mudos.ann-arbor.mi.us   |  folded it to fit into my drive, it still
...!umich!leebai!mudos!mju  |  doesn't work..." -Caller to a tech support line

jay@metran.UUCP (Jay Ts) (02/22/91)

In article <1991Feb17.130459.29719@virtech.uucp>, cpcahil@virtech.uucp (Conor P. Cahill) writes:
> shwake@raysnec.UUCP (Ray Shwake) writes:
> >	On a related issue, both ISC and SCO UNIX *prefix* the login prompt
> >with a node name reference and a couple of new lines. *This* one, I believe,
> >comes out of getty.
> 
> yes, they come out of getty.  Most of it comes out of the /etc/issue file
> that getty reads, so changing that file will get rid of most of the pre-login
> prompt stuff.

If you don't want anything to be printed out of /etc/issue, there is a quick
fix to "get rid" of the "pre-login prompt stuff".  I realize this is kind of
a hack, but I think it's worth mentioning anyway.

NOTE: This problably will not work on all terminals; I use it for the console
and virtual consoles on my own system.

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.

It's also possible for the gettydefs login string to print newlines (I've
never tried it myself, but I've seen it in operation) so you can replace
an /etc/issue message with a login string to have messages customized for
each terminal.

If you want to get really fancy (like me) you can put in an escape sequence
to also set screen colors.  Each of my virtual consoles has a differently-
colored login prompt.

				Jay Ts, Director
				Metran Technology
				uunet!pdn!tscs!metran!jay

peter@ficc.ferranti.com (Peter da Silva) (02/23/91)

In article <375@metran.UUCP> jay@metran.UUCP (Jay Ts) writes:
> The ANSI-standard "clear screen" escape sequence is ESC-c.

The ANSI standard "clear screen" sequence is <ESC>[2J. <ESC>c is the
"reset terminal" sequence. Urban Legend has it that at least one freeware
PC terminal emulator used to reboot the computer when you sent it this
one. At any rate, it's not a good thing to send down a serial line to
an unknown terminal.

In any case, don't you suppose someone dialling in and wanting to crack the
system would know enough to capture this stuff?
-- 
Peter da Silva.  `-_-'  peter@ferranti.com
+1 713 274 5180.  'U`  "Have you hugged your wolf today?"

dag@persoft.com (Daniel A. Glasser) (02/23/91)

* 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@metran.UUCP> jay@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@persoft.com
                "Their brains were small, and they died."