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