Subject: Re: why a double login??
To: None <noud@knot.nl>
From: None <greywolf@defender.VAS.viewlogic.com>
List: current-users
Date: 04/24/1996 13:27:11
   X-Sender: noud@pop.knot.nl
   Mime-Version: 1.0
   Content-Type: text/plain; charset="us-ascii"
   From: noud@knot.nl (noud de brouwer)
   Cc: current-users@netbsd.org, tsarna@endicor.com
   Date: Wed, 24 Apr 1996 21:37:56 +0200

   >AHA!  All UPPER CASE LOGINS!  I remember *THIS* problem from the old 4.2
   >days at the local community college (VAX 11/750 running 4.[123] BSD).

   Teletype terminals and the like(?)
   Is a VAX 11/750 a pdp 11?

   >I'll bet you get things like:
   >
   >NetBSD/xxxx 1.1 (pop) (console)
   >
   >login: FOOBAR
   >\PASSWORD:

   Actually:

   login: FOOBAR
   password:
   login: FOOBAR
   password:

   and then we're inside.

   >Traditionally, if the entire login was UPPERCASE, getty would think that
   >you were on a funny kind of terminal only capable of typing uppercase
   >characters, such as a real old TTY, or a TI silentwriter or something,
   >and it would switch your tty mode to (sg.sg_flags | O_LCASE) (or something,
   >I haven't hacked a tty-switcher in a while).

   #if XXX
			   if (upper || UC)
				   tmode.sg_flags |= LCASE;
			   if (lower || LC)
				   tmode.sg_flags &= ~LCASE;
   #endif

   I don't know why #if XXX is there. Why is it there?
   UC is like the /etc/gettytab: uc bool false      terminal is known upper
   case only
   LC is like the /etc/gettytab: lc bool false      terminal has lower case
   ???

   >If you're getting lowercase responses, then only half the problem has been
   >fixed.

   That's what it does, convert to lowercase, but not letting you in.
   Then the second time, behind getname(), it does let you in with the
   uppper-case name.

   >Another fix would be to not use ALL uppercase logins; i.e. maybe capitalize
   >them if necessary?  (This would be The Right Way, actually.)

   All uppercase logins are a 'no no' in the unix-world??
   Just change them with vipw, and leave it to that??
   (creating a discrepance between RW and passwd.master)
   Shouldn't i trace again, using f.i. syslog() after getname()??
   Shouldn't it be: upper && (UC && !LC) => tolower => inside and
		    upper && !(UC && !LC) => upper && (!UC || LC) => inside?
   I don't know the precidence of those &&/|| things,
   but that's diff. from the source:
		    upper && !LC || UC => tolower

   so i have to check my gettytab (i think U/LC are set to default) and
   retrace the getty code...

   please comment,
   ~n





-- 

				--*greywolf;
--
"Well, it's _two_ drummers, and we're not marching,   *. .* *. .*  *. .*
we're dancing, but that's the general idea, yes."       v     v      v
	-- unknown.                                   <) )_ /) )_  /) )-'
						       >>_   /_\,   /_-'