🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by laman Wed, 11 Apr 1984 18:16
Bug in System V and System V.2 login.c
#197
Author: laman
Date: Wed, 11 Apr 1984 18:16
32 lines
1532 bytes
There is a bug in both System V and SystemV.2 login.c programs.  There are
two calls to strncmp with ONLY TWO arguments in terminal().  We changed ours
to "strcmp".  You can change yours by adding a sizeof for the third argument.
Either way will suffice.  A contextual diff follows.

*** login.c	Wed Apr 11 12:21:58 1984
--- oldlogin.c	Wed Apr 11 12:21:23 1984
***************
*** 563,570
  				continue;
  			if(pass1 && db.d_ino != fsb.st_ino)
  				continue;
! 			if (strcmp(&db.d_name[0],"syscon") == 0 ||
! 				strcmp(&db.d_name[0],"systty") == 0)
  				continue;
  			(void) strcpy(rbuf, dev);
  			(void) strcat(rbuf, db.d_name);

--- 563,570 -----
  				continue;
  			if(pass1 && db.d_ino != fsb.st_ino)
  				continue;
! 			if (strncmp(&db.d_name[0],"syscon") == 0 ||
! 				strncmp(&db.d_name[0],"systty") == 0)
  				continue;
  			(void) strcpy(rbuf, dev);
  			(void) strcat(rbuf, db.d_name);



			Mike Laman
			UUCP: {ucbvax,philabs,sdccsu3,sdcsla}!sdcsvax!laman
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads