access.c (xinetd-2.3.15) | : | access.c (xinetd-2.3.15.4.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
#include "sconf.h" | #include "sconf.h" | |||
#include "log.h" | #include "log.h" | |||
#include "main.h" /* for ps */ | #include "main.h" /* for ps */ | |||
#include "sconst.h" | #include "sconst.h" | |||
#include "sensor.h" | #include "sensor.h" | |||
#include "state.h" | #include "state.h" | |||
#include "timex.h" | #include "timex.h" | |||
#include "xconfig.h" | #include "xconfig.h" | |||
#include "xtimer.h" | #include "xtimer.h" | |||
#if !defined(NAME_MAX) | #ifdef NAME_MAX | |||
#ifdef FILENAME_MAX | #define NAME_MAX 256 | |||
#define NAME_MAX FILENAME_MAX | ||||
#else | ||||
#define NAME_MAX 256 | ||||
#endif | ||||
#endif | #endif | |||
const struct name_value access_code_names[] = | const struct name_value access_code_names[] = | |||
{ | { | |||
{ "address", (int) AC_ADDRESS }, | { "address", (int) AC_ADDRESS }, | |||
{ "time", (int) AC_TIME }, | { "time", (int) AC_TIME }, | |||
{ "fork", (int) AC_FORK }, | { "fork", (int) AC_FORK }, | |||
{ "service_limit", (int) AC_SERVICE_LIMIT }, | { "service_limit", (int) AC_SERVICE_LIMIT }, | |||
{ "per_source_limit", (int) AC_PER_SOURCE_LIMIT}, | { "per_source_limit", (int) AC_PER_SOURCE_LIMIT}, | |||
{ "process_limit", (int) AC_PROCESS_LIMIT }, | { "process_limit", (int) AC_PROCESS_LIMIT }, | |||
skipping to change at line 127 | skipping to change at line 123 | |||
static status_e remote_address_check(const struct service *sp, | static status_e remote_address_check(const struct service *sp, | |||
const union xsockaddr *sinp) | const union xsockaddr *sinp) | |||
{ | { | |||
/* | /* | |||
* of means only_from, na means no_access | * of means only_from, na means no_access | |||
*/ | */ | |||
const char *func = "remote_addr_chk"; | const char *func = "remote_addr_chk"; | |||
bool_int of_matched = FALSE; | bool_int of_matched = FALSE; | |||
bool_int na_matched = FALSE; | bool_int na_matched = FALSE; | |||
/* The IP address is unknown. Nothing to reject, so accept it. */ | ||||
if (sinp == NULL ) | if (sinp == NULL ) | |||
return FAILED; | return OK; | |||
if ( SC_SENSOR( SVC_CONF(sp) )) | if ( SC_SENSOR( SVC_CONF(sp) )) | |||
{ /* They hit a sensor...return FAILED since this isn't a real service */ | { /* They hit a sensor...return FAILED since this isn't a real service */ | |||
process_sensor( sp, sinp ) ; | process_sensor( sp, sinp ) ; | |||
return FAILED ; | return FAILED ; | |||
} | } | |||
/* They hit a real server...note, this is likely to be a child process. */ | /* They hit a real server...note, this is likely to be a child process. */ | |||
else if ( check_sensor( sinp ) == FAILED ) | else if ( check_sensor( sinp ) == FAILED ) | |||
return FAILED ; | return FAILED ; | |||
End of changes. 3 change blocks. | ||||
7 lines changed or deleted | 4 lines changed or added |