home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17031 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.9 KB  |  49 lines

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!ub!galileo.cc.rochester.edu!uhura.cc.rochester.edu!ctne_ltd
  2. From: ctne_ltd@uhura.cc.rochester.edu (Chris Newbold)
  3. Newsgroups: comp.os.linux
  4. Subject: Fix for getty/uugetty under pl5
  5. Message-ID: <1992Nov18.011322.9917@galileo.cc.rochester.edu>
  6. Date: 18 Nov 92 01:13:22 GMT
  7. Sender: news@galileo.cc.rochester.edu
  8. Organization: University of Rochester - Rochester, New York
  9. Lines: 37
  10. Nntp-Posting-Host: uhura.cc.rochester.edu
  11.  
  12. I've found the problem with the getty/uugetty from getty_ps203.
  13.  
  14. The culprit is the code which attempts to add an entry into utmp
  15. for uugetty. Notice that the ifdef explicitly excludes the code
  16. which initializes utmp; the subsequent strncopys try to copy 
  17. stuff to a NULL structure:
  18.  
  19. From main.c:585:
  20.  
  21. #ifndef linux
  22.         while ((utmp = getutent()) != (struct utmp *) NULL) 
  23.                 if (utmp->ut_type == INIT_PROCESS && utmp->ut_pid == pid)
  24. #endif
  25.                         {
  26.                         debug2(D_UTMP, "logutmp entry made\n");
  27.                         /* show login process in utmp
  28.                          */
  29.                         strncopy(utmp->ut_line, Device);
  30.                         strncopy(utmp->ut_id, Device+3);
  31.  
  32. ...
  33.  
  34. I don't know enough about this to say what the real fix is (maybe
  35. it should be "#ifdef", I dunno. Perhaps the person who did the 
  36. original port can comment.
  37.  
  38. For now, just edit tune.h and #undef LOGUTMP, so it doesn't try
  39. to change the log file. I perfer it this way myself, so that all
  40. the logins don't appear in a 'w' listing.
  41.  
  42. -Chris
  43.  
  44. -- 
  45. >>>> Chris Newbold <<<< * "If you fool around with a thing for very long you *
  46. University of Rochester    *            will screw it up."             *
  47. Disclaimer: "All warranties expire upon payment of invoice."                
  48. ctne_ltd@uhura.cc.rochester.edu * uhura.cc.rochester.edu!ctne_ltd@uunet
  49.