home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23853 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.1 KB  |  61 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!noc.near.net!mv!world!jrs
  3. From: jrs@world.std.com (Rick Sladkey)
  4. Subject: Re: rlogind & telnetd together act funny
  5. In-Reply-To: hns@regent.e-technik.tu-muenchen.dbp.de's message of Tue, 12 Jan 1993 08:26:52 GMT
  6. Message-ID: <JRS.93Jan12215238@lepton.world.std.com>
  7. Sender: jrs@world.std.com (Rick Sladkey)
  8. Organization: The Internet
  9. References: <1993Jan11.095603.6516@desire.wright.edu>
  10.     <hns.726827212@regent.e-technik.tu-muenchen.de>
  11. Date: Wed, 13 Jan 1993 02:52:38 GMT
  12. Lines: 47
  13.  
  14. >>>>> On 11 Jan 93 09:56:02 EST, gbothe@desire.wright.edu said:
  15.  
  16. Greg> Well, I got rlogind finally working from the net-bin-0.2
  17. Greg> distribution.  However, I have a small problem between telnetd
  18. Greg> and rlogind.  The two seem to use the same port!!  If I rlogin
  19. Greg> to my Linux machine, then telnet to my Linux machine, then log
  20. Greg> off the telnet session, my rlogin session logs off too!!!
  21. Greg> They both (for the first session) behave like they are using
  22. Greg> the same port (ex: ttyp0) for their communication.
  23.  
  24. >>>>> On Tue, 12 Jan 1993 08:26:52 GMT,
  25. >>>>> hns@regent.e-technik.tu-muenchen.dbp.de (Henning Spruth) said:
  26.  
  27. Henning> We have exactly the same problem (kernel 0.99pl2, net-bin-0.2).
  28.  
  29. There is a bug in the kernel's implementation of vhangup(2), here is a
  30. patch.
  31. -----
  32. *** linux/fs/open.c.orig    Sun Jan  3 16:25:06 1993
  33. --- linux/fs/open.c    Tue Jan 12 21:46:20 1993
  34. ***************
  35. *** 490,500 ****
  36.   
  37.       if (!suser())
  38.           return -EPERM;
  39. -     /* send the SIGHUP signal. */
  40. -     kill_pg(current->pgrp, SIGHUP, 0);
  41.       /* See if there is a controlling tty. */
  42.       if (current->tty < 0)
  43.           return 0;
  44.   
  45.       for (process = task + 0; process < task + NR_TASKS; process++) {
  46.           for (j = 0; j < NR_OPEN; j++) {
  47. --- 490,502 ----
  48.   
  49.       if (!suser())
  50.           return -EPERM;
  51.       /* See if there is a controlling tty. */
  52.       if (current->tty < 0)
  53.           return 0;
  54. +     /* send the SIGHUP signal. */
  55. +     tty = TTY_TABLE(current->tty);
  56. +     if (tty && tty->pgrp > 0)
  57. +         kill_pg(tty->pgrp, SIGHUP, 0);
  58.   
  59.       for (process = task + 0; process < task + NR_TASKS; process++) {
  60.           for (j = 0; j < NR_OPEN; j++) {
  61.