🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.2bsd
Article #171

V1.17 (/etc/getty doesn't initialise local mode word bits properly)

#171
From: bostic
Date: Fri, 06 Nov 1987 19:49
60 lines
2282 bytes
Subject: /etc/getty doesn't initialise local mode word bits properly
Index: etc/getty/main.c 2.10BSD

Description:
	When getty initialises it itself from the /etc/gettytab file,
	it does not set up the local mode word bits properly.
Repeat-By:
	Try logging in without `stty ...' in your .login file -- ie just
	use it as getty set it up. Notice that none of the local mode stuff
	is enabled.
Fix:
	Apply the following patch to main.c, it's the old long vs. int
	problem again.

*** main.c.old	Wed Nov  4 14:51:19 1987
--- main.c	Wed Nov  4 14:51:49 1987
***************
*** 113,118 ****
--- 113,119 ----
  	char *tname;
  	long allflags;
  	int repcnt = 0;
+ 	int someflags;
  
  	signal(SIGINT, SIG_IGN);
  /*
***************
*** 221,227 ****
  				continue;
  			allflags = setflags(2);
  			tmode.sg_flags = allflags & 0xffff;
! 			allflags >>= 16;
  			if (crmod || NL)
  				tmode.sg_flags |= CRMOD;
  			if (upper || UC)
--- 222,228 ----
  				continue;
  			allflags = setflags(2);
  			tmode.sg_flags = allflags & 0xffff;
! 			someflags = allflags >> 16;
  			if (crmod || NL)
  				tmode.sg_flags |= CRMOD;
  			if (upper || UC)
***************
*** 230,236 ****
  				tmode.sg_flags &= ~LCASE;
  			ioctl(0, TIOCSETP, &tmode);
  			ioctl(0, TIOCSLTC, &ltc);
! 			ioctl(0, TIOCLSET, &allflags);
  			signal(SIGINT, SIG_DFL);
  			for (i = 0; environ[i] != (char *)0; i++)
  				env[i] = environ[i];
--- 231,237 ----
  				tmode.sg_flags &= ~LCASE;
  			ioctl(0, TIOCSETP, &tmode);
  			ioctl(0, TIOCSLTC, &ltc);
! 			ioctl(0, TIOCLSET, &someflags);
  			signal(SIGINT, SIG_DFL);
  			for (i = 0; environ[i] != (char *)0; i++)
  				env[i] = environ[i];
Technical Details
Message-ID: <8711061949.AA00510@okeeffe.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!ucbcad!ucbvax!OKEEFFE.BERKELEY.EDU!bostic

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!ucbcad!ucbvax!OKEEFFE.BERKELEY.EDU!bostic
From: bostic@OKEEFFE.BERKELEY.EDU.UUCP
Newsgroups: comp.bugs.2bsd
Subject: V1.17 (/etc/getty doesn't initialise local mode word bits properly)
Message-ID: <8711061949.AA00510@okeeffe.Berkeley.EDU>
Date: Fri, 6-Nov-87 14:49:19 EST
Article-I.D.: okeeffe.8711061949.AA00510
Posted: Fri Nov  6 14:49:19 1987
Date-Received: Sun, 8-Nov-87 17:40:24 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 60