"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xinetd/int.c" between
xinetd-2.3.15.tar.gz and xinetd-2.3.15.4.tar.xz

About: xinetd is a secure replacement for inetd, the internet services daemon (openSUSE fork).

int.c  (xinetd-2.3.15):int.c  (xinetd-2.3.15.4.tar.xz)
skipping to change at line 105 skipping to change at line 105
} }
/* /*
* Create a socket and bind it to (INADDR_LOOPBACK,0) * Create a socket and bind it to (INADDR_LOOPBACK,0)
*/ */
static int get_server_socket( struct intercept_s *ip ) static int get_server_socket( struct intercept_s *ip )
{ {
struct service *sp = SERVER_SERVICE( INT_SERVER( ip ) ) ; struct service *sp = SERVER_SERVICE( INT_SERVER( ip ) ) ;
union xsockaddr *sinp = INT_LOCALADDR( ip ) ; union xsockaddr *sinp = INT_LOCALADDR( ip ) ;
int sd ; int sd ;
socklen_t size ; socklen_t size = AF_UNIX ;
const char *func = "get_server_socket" ; const char *func = "get_server_socket" ;
if( SC_IPV6(SVC_CONF(sp)) ) { if( SC_IPV6(SVC_CONF(sp)) ) {
struct addrinfo hint, *res = NULL; struct addrinfo hint, *res = NULL;
memset(&hint, 0, sizeof(struct addrinfo)); memset(&hint, 0, sizeof(struct addrinfo));
hint.ai_family = AF_INET6; hint.ai_family = AF_INET6;
hint.ai_flags = AI_NUMERICHOST; hint.ai_flags = AI_NUMERICHOST;
sinp->sa_in6.sin6_family = AF_INET6; sinp->sa_in6.sin6_family = AF_INET6;
sinp->sa_in6.sin6_port = 0; sinp->sa_in6.sin6_port = 0;
if( getaddrinfo("::1", NULL, &hint, &res) != 0 ) if( getaddrinfo("::1", NULL, &hint, &res) != 0 )
skipping to change at line 206 skipping to change at line 207
if ( pid == -1 ) if ( pid == -1 )
{ {
if ( errno != EINTR ) if ( errno != EINTR )
{ {
msg( LOG_ERR, func, "wait: %m" ) ; msg( LOG_ERR, func, "wait: %m" ) ;
return( ret ) ; return( ret ) ;
} }
} }
else if ( pid == SERVER_PID( INT_SERVER( ip ) ) ) else if ( pid == SERVER_PID( INT_SERVER( ip ) ) )
{ {
if ( PROC_STOPPED( status ) ) if ( PROC_STOPPED( status ) ) {
ret = FAILED; ret = FAILED;
return( ret ) ;
}
SERVER_SET_EXIT_STATUS( INT_SERVER( ip ), status ) ; SERVER_SET_EXIT_STATUS( INT_SERVER( ip ), status ) ;
ret = OK; ret = OK;
} }
else else
{ {
unsigned u; unsigned u;
/* Ideally, this will never be executed */ /* Ideally, this will never be executed */
msg( LOG_ERR, func, msg( LOG_ERR, func,
"wait returned pid of unknown process: %d", pid ) ; "wait returned pid of unknown process: %d", pid ) ;
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)