home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume30 / log_tcp / patch01 < prev    next >
Encoding:
Text File  |  1992-07-06  |  1.4 KB  |  53 lines

  1. Newsgroups: comp.sources.misc
  2. From: wietse@wzv.win.tue.nl (Wietse Venema)
  3. Subject:  v30i094:  log_tcp - TCP/IP daemon wrapper, Patch01
  4. Message-ID: <1992Jun30.205654.5788@sparky.imd.sterling.com>
  5. X-Md4-Signature: 1d2c4d0ea9eb6df518aea5b3cfbf5463
  6. Date: Tue, 30 Jun 1992 20:56:54 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: wietse@wzv.win.tue.nl (Wietse Venema)
  10. Posting-number: Volume 30, Issue 94
  11. Archive-name: log_tcp/patch01
  12. Environment: UNIX
  13. Patch-To: log_tcp: Volume 30, Issue 79-80
  14.  
  15. Mathew LIM (M.Lim@anu.edu.au) found a mistake in my RFC 931 remote user
  16. name lookup code. The result is that daemons may sometimes die with an
  17. alarm signal (for example, the SunOS 4.x telnetd). The error, a missing
  18. alarm(0) call, is corrected by the patch below.
  19.  
  20.     Wietse
  21. ----
  22. *** rfc931.c.orig    Thu Jun 11 22:21:42 1992
  23. --- rfc931.c    Mon Jun 22 16:32:15 1992
  24. ***************
  25. *** 11,17 ****
  26.     */
  27.   
  28.   #ifndef lint
  29. ! static char sccsid[] = "@(#) rfc931.c 1.1 92/06/11 22:21:41";
  30.   #endif
  31.   
  32.   #include <stdio.h>
  33. --- 11,17 ----
  34.     */
  35.   
  36.   #ifndef lint
  37. ! static char sccsid[] = "@(#) rfc931.c 1.2 92/06/22 16:32:14";
  38.   #endif
  39.   
  40.   #include <stdio.h>
  41. ***************
  42. *** 80,85 ****
  43. --- 80,86 ----
  44.       if (connect(s, (struct sockaddr *) & sin, sizeof(sin)) == -1
  45.       || (fp = fdopen(s, "w+")) == 0) {
  46.       close(s);
  47. +     alarm(0);
  48.       return (result);
  49.       }
  50.       /* Query the RFC 931 server. Would 13-byte writes ever be broken up? */
  51.  
  52. exit 0 # Just in case...
  53.