home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume27
/
xinetd-2.1.1
/
patch03
< prev
next >
Wrap
Text File
|
1994-03-29
|
3KB
|
117 lines
Newsgroups: comp.sources.unix
From: panos@cs.colorado.edu (Panos Tsirigotis)
Subject: v27i209: xinetd-2.1.1 - inetd replacement with access control and logging, Patch03
Sender: unix-sources-moderator@gw.home.vix.com
Approved: vixie@gw.home.vix.com
Submitted-By: panos@cs.colorado.edu (Panos Tsirigotis)
Posting-Number: Volume 27, Issue 209
Archive-Name: xinetd-2.1.1/patch03
1. What this patch fixes
>From the CHANGELOG file:
1) in dgram_echo(), sin_len was not being set before the invocation of
recvfrom
2) in finger_shutdown(), it was possible for Srdline() to return NULL
(if the remote end would close the socket without sending anything).
If the RECORD option was set in the log_on_failure flags, this
would cause the forked xinetd process which did the recording to
die since it would try to dereference a NULL pointer.
2. How to apply this patch
Cd to the xinetd directory and use the command:
patch < "name of this file"
This patch will modify the files
Makefile
CHANGELOG
builtins.c
shutdown.c
The VERSION variable in the Makefile will be changed to 2.1.4.
You will need to recompile xinetd after applying this patch.
The accompanying libraries are *not* affected by this patch.
Prereq: 2.1.3
*** /tmp/p/xinetd.old/Makefile Sat Jan 22 13:30:38 1994
--- Makefile Sat Jan 22 13:45:03 1994
***************
*** 22,28 ****
#
NAME = xinetd
! VERSION = 2.1.3
#
# Possible flags that can be defined in DEFS:
--- 22,28 ----
#
NAME = xinetd
! VERSION = 2.1.4
#
# Possible flags that can be defined in DEFS:
*** /tmp/p/xinetd.old/CHANGELOG Sat Jan 22 13:30:32 1994
--- CHANGELOG Sat Jan 22 13:45:01 1994
***************
*** 96,98 ****
--- 96,108 ----
A work around for the bug would be to use the factorized address
notation (for example, 128.138.45.{3})
+ 2.1.4:
+ Bug fixes:
+ 1) in dgram_echo(), sin_len was not being set before the invocation of
+ recvfrom
+ 2) in finger_shutdown(), it was possible for Srdline() to return NULL
+ (if the remote end would close the socket without sending anything).
+ If the RECORD option was set in the log_on_failure flags, this
+ would cause the forked xinetd process which did the recording to
+ die since it would try to dereference a NULL pointer.
+
*** /tmp/p/xinetd.old/builtins.c Sat Jan 22 13:30:38 1994
--- builtins.c Sat Jan 22 13:45:03 1994
***************
*** 126,133 ****
{
char buf[ DATAGRAM_SIZE ] ;
struct sockaddr_in sin ;
- int sin_len ;
int cc ;
int descriptor = SERVER_FD( serp ) ;
cc = recvfrom( descriptor, buf, sizeof( buf ), 0, SA( &sin ), &sin_len ) ;
--- 126,133 ----
{
char buf[ DATAGRAM_SIZE ] ;
struct sockaddr_in sin ;
int cc ;
+ int sin_len = sizeof( sin ) ;
int descriptor = SERVER_FD( serp ) ;
cc = recvfrom( descriptor, buf, sizeof( buf ), 0, SA( &sin ), &sin_len ) ;
*** /tmp/p/xinetd.old/shutdown.c Sat Jan 22 13:30:38 1994
--- shutdown.c Sat Jan 22 13:45:04 1994
***************
*** 468,473 ****
--- 468,479 ----
return ;
line = Srdline( sd ) ;
+ if ( line == NULL )
+ {
+ *pp = "EMPTY-LINE" ;
+ return ;
+ }
+
line_len = SIOLINELEN( sd ) ;
if ( line_len > 0 && line[ line_len-1 ] == '\r' )