Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/networking/inetd.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/networking/inetd.c
r3232 r3621 171 171 172 172 #include "libbb.h" 173 #include "common_bufsiz.h" 173 174 174 175 #if ENABLE_FEATURE_INETD_RPC … … 328 329 char line[256]; /* _at least_ 256, see LINE_SIZE */ 329 330 } FIX_ALIASING; 330 #define G (*(struct globals*) &bb_common_bufsiz1)331 #define G (*(struct globals*)bb_common_bufsiz1) 331 332 enum { LINE_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line) }; 332 struct BUG_G_too_big {333 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];334 };335 333 #define rlim_ofile_cur (G.rlim_ofile_cur ) 336 334 #define rlim_ofile (G.rlim_ofile ) … … 353 351 #define line (G.line ) 354 352 #define INIT_G() do { \ 353 setup_common_bufsiz(); \ 354 BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ 355 355 rlim_ofile_cur = OPEN_MAX; \ 356 356 global_queuelen = 128; \ … … 646 646 647 647 /* gcc generates much more code if this is inlined */ 648 static servtab_t *parse_one_line(void)648 static NOINLINE servtab_t *parse_one_line(void) 649 649 { 650 650 int argc; … … 676 676 free(default_local_hostname); 677 677 default_local_hostname = sep->se_local_hostname; 678 /*sep->se_local_hostname = NULL; - redundant */ 679 /* (we'll overwrite this field anyway) */ 678 680 goto more; 679 681 } … … 689 691 bb_error_msg("parse error on line %u, line is ignored", 690 692 parser->lineno); 691 free_servtab_strings(sep);692 693 /* Just "goto more" can make sep to carry over e.g. 693 694 * "rpc"-ness (by having se_rpcver_lo != 0). 694 695 * We will be more paranoid: */ 696 free_servtab_strings(sep); 695 697 free(sep); 696 698 goto new; … … 726 728 #endif 727 729 } 728 if ( strncmp(arg, "rpc/", 4) == 0) {730 if (is_prefixed_with(arg, "rpc/")) { 729 731 #if ENABLE_FEATURE_INETD_RPC 730 732 unsigned n; … … 816 818 #endif 817 819 argc = 0; 818 while ( (arg = token[6+argc]) != NULL && argc < MAXARGV)820 while (argc < MAXARGV && (arg = token[6+argc]) != NULL) 819 821 sep->se_argv[argc++] = xstrdup(arg); 820 822 /* Some inetd.conf files have no argv's, not even argv[0]. … … 835 837 } 836 838 837 // bb_info_msg(838 //"ENTRY[%s][%s][%s][%d][%d][%d][%d][%d][%s][%s][%s]",839 //sep->se_local_hostname, sep->se_service, sep->se_proto, sep->se_wait, sep->se_proto_no,840 //sep->se_max, sep->se_count, sep->se_time, sep->se_user, sep->se_group, sep->se_program);839 //bb_error_msg( 840 // "ENTRY[%s][%s][%s][%d][%d][%d][%d][%d][%s][%s][%s]", 841 // sep->se_local_hostname, sep->se_service, sep->se_proto, sep->se_wait, sep->se_proto_no, 842 // sep->se_max, sep->se_count, sep->se_time, sep->se_user, sep->se_group, sep->se_program); 841 843 842 844 /* check if the hostname specifier is a comma separated list … … 1655 1657 time_t t; 1656 1658 1657 t = time(NULL);1659 time(&t); 1658 1660 fdprintf(s, "%.24s\r\n", ctime(&t)); 1659 1661 }
Note:
See TracChangeset
for help on using the changeset viewer.