"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xinetd/parse.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).

parse.c  (xinetd-2.3.15):parse.c  (xinetd-2.3.15.4.tar.xz)
skipping to change at line 93 skipping to change at line 93
#endif #endif
#ifdef RLIMIT_AS #ifdef RLIMIT_AS
{ "rlimit_as", A_RLIMIT_AS, 1, rlim_as_parser }, { "rlimit_as", A_RLIMIT_AS, 1, rlim_as_parser },
#endif #endif
#ifdef RLIMIT_CPU #ifdef RLIMIT_CPU
{ "rlimit_cpu", A_RLIMIT_CPU, 1, rlim_cpu_parser }, { "rlimit_cpu", A_RLIMIT_CPU, 1, rlim_cpu_parser },
#endif #endif
#ifdef RLIMIT_DATA #ifdef RLIMIT_DATA
{ "rlimit_data", A_RLIMIT_DATA, 1, rlim_data_parser }, { "rlimit_data", A_RLIMIT_DATA, 1, rlim_data_parser },
#endif #endif
#ifdef RLIMIT_NOFILE
{ "rlimit_files", A_RLIMIT_FILES, 1, rlim_files_parser },
#endif
#ifdef RLIMIT_RSS #ifdef RLIMIT_RSS
{ "rlimit_rss", A_RLIMIT_RSS, 1, rlim_rss_parser }, { "rlimit_rss", A_RLIMIT_RSS, 1, rlim_rss_parser },
#endif #endif
#ifdef RLIMIT_STACK #ifdef RLIMIT_STACK
{ "rlimit_stack", A_RLIMIT_STACK, 1, rlim_stack_parser }, { "rlimit_stack", A_RLIMIT_STACK, 1, rlim_stack_parser },
#endif #endif
{ "v6only", A_V6ONLY, 1, v6only_parser }, { "v6only", A_V6ONLY, 1, v6only_parser },
{ "deny_time", A_DENY_TIME, 1, deny_time_parser }, { "deny_time", A_DENY_TIME, 1, deny_time_parser },
{ "umask", A_UMASK, 1, umask_parser }, { "umask", A_UMASK, 1, umask_parser },
#ifdef HAVE_MDNS
{ "mdns", A_MDNS, 1, mdns_parser },
#endif
#ifdef LIBWRAP #ifdef LIBWRAP
{ "libwrap", A_LIBWRAP, 1, libwrap_parser }, { "libwrap", A_LIBWRAP, 1, libwrap_parser },
#endif #endif
{ NULL, A_NONE, -1, NULL } { NULL, A_NONE, -1, NULL }
} ; } ;
static const struct attribute default_attributes[] = static const struct attribute default_attributes[] =
{ {
{ "log_type", A_LOG_TYPE, -2, log_type_parser }, { "log_type", A_LOG_TYPE, -2, log_type_parser },
{ "log_on_success", A_LOG_ON_SUCCESS, -2, log_on_success_parser }, { "log_on_success", A_LOG_ON_SUCCESS, -2, log_on_success_parser },
skipping to change at line 135 skipping to change at line 135
{ "groups", A_GROUPS, 1, groups_parser }, { "groups", A_GROUPS, 1, groups_parser },
{ "banner_success", A_BANNER_SUCCESS, 1, banner_success_parser }, { "banner_success", A_BANNER_SUCCESS, 1, banner_success_parser },
{ "banner_fail", A_BANNER_FAIL, 1, banner_fail_parser }, { "banner_fail", A_BANNER_FAIL, 1, banner_fail_parser },
{ "cps", A_CPS, 2, cps_parser }, { "cps", A_CPS, 2, cps_parser },
{ "enabled", A_ENABLED, -2, enabled_parser }, { "enabled", A_ENABLED, -2, enabled_parser },
#ifdef HAVE_LOADAVG #ifdef HAVE_LOADAVG
{ "max_load", A_MAX_LOAD, 1, max_load_parser }, { "max_load", A_MAX_LOAD, 1, max_load_parser },
#endif #endif
{ "v6only", A_V6ONLY, 1, v6only_parser }, { "v6only", A_V6ONLY, 1, v6only_parser },
{ "umask", A_UMASK, 1, umask_parser }, { "umask", A_UMASK, 1, umask_parser },
#ifdef HAVE_MDNS
{ "mdns", A_MDNS, 1, mdns_parser },
#endif
{ NULL, A_NONE, 0, NULL } { NULL, A_NONE, 0, NULL }
} ; } ;
#define MODIFIABLE( ap ) ( (ap)->a_nvalues == -2 ) #define MODIFIABLE( ap ) ( (ap)->a_nvalues == -2 )
#define FIXED_VALUES( ap ) ( (ap)->a_nvalues > 0 ) #define FIXED_VALUES( ap ) ( (ap)->a_nvalues > 0 )
int line_count ; int line_count ;
const char *current_file = NULL; const char *current_file = NULL;
static void get_service_entry( int fd, pset_h, const char *, static void get_service_entry( int fd, pset_h, const char *,
skipping to change at line 654 skipping to change at line 651
* Use defaults to initialize modifiable entry fields. * Use defaults to initialize modifiable entry fields.
*/ */
static status_e parse_entry( entry_e entry_type, static status_e parse_entry( entry_e entry_type,
int fd, int fd,
struct service_config *scp ) struct service_config *scp )
{ {
static pset_h attr_values = NULL; static pset_h attr_values = NULL;
char *line ; char *line ;
char *attr_name ; char *attr_name ;
enum assign_op op ; enum assign_op op ;
const char *func = "get_attributes" ; const char *func = "parse_entry" ;
if ( ! attr_values && ( attr_values = pset_create( 10, 10 ) ) == NULL ) if ( ! attr_values && ( attr_values = pset_create( 10, 10 ) ) == NULL )
{ {
out_of_memory( func ) ; out_of_memory( func ) ;
return( FAILED ) ; return( FAILED ) ;
} }
for ( ;; ) for ( ;; )
{ {
line = next_line( fd ) ; line = next_line( fd ) ;
skipping to change at line 694 skipping to change at line 691
* An error was detected in the default section. We will terminate * An error was detected in the default section. We will terminate
* since whatever attribute being specified cannot be propagated. * since whatever attribute being specified cannot be propagated.
*/ */
msg(LOG_ERR, func, msg(LOG_ERR, func,
"A fatal error was encountered while parsing the default section." "A fatal error was encountered while parsing the default section."
" xinetd will exit."); " xinetd will exit.");
Sclose( fd ); Sclose( fd );
terminate_program(); terminate_program();
} }
pset_clear( attr_values ) ; pset_clear( attr_values ) ;
/*
* As soon as we realize that the service is disabled
* we don't continue parsing its config
*/
if (EQ(attr_name, "disable") && SC_IS_DISABLED(scp))
return( FAILED );
} }
} }
 End of changes. 5 change blocks. 
7 lines changed or deleted 11 lines changed or added

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