comparison svr-runopts.c @ 309:474c1a700b67 ucc-axis-hack

add inetd server mode
author Matt Johnston <matt@ucc.asn.au>
date Sun, 26 Mar 2006 08:26:39 +0000
parents 973fccb59ea4
children
comparison
equal deleted inserted replaced
308:6e5f8ce73bf2 309:474c1a700b67
73 "-p port Listen on specified tcp port, up to %d can be specified\n" 73 "-p port Listen on specified tcp port, up to %d can be specified\n"
74 " (default %s if none specified)\n" 74 " (default %s if none specified)\n"
75 #ifdef INETD_MODE 75 #ifdef INETD_MODE
76 "-i Start for inetd\n" 76 "-i Start for inetd\n"
77 #endif 77 #endif
78 #ifdef INETD_SERVER_MODE
79 "-x /path/to/binary Start in inetd server mode\n"
80 #endif
78 #ifdef DEBUG_TRACE 81 #ifdef DEBUG_TRACE
79 "-v verbose\n" 82 "-v verbose\n"
80 #endif 83 #endif
81 ,DROPBEAR_VERSION, progname, 84 ,DROPBEAR_VERSION, progname,
82 #ifdef DROPBEAR_DSS 85 #ifdef DROPBEAR_DSS
122 svr_opts.usingsyslog = 1; 125 svr_opts.usingsyslog = 1;
123 #endif 126 #endif
124 #ifdef ENABLE_SVR_REMOTETCPFWD 127 #ifdef ENABLE_SVR_REMOTETCPFWD
125 opts.listen_fwd_all = 0; 128 opts.listen_fwd_all = 0;
126 #endif 129 #endif
130 #ifdef INETD_SERVER_MODE
131 svr_opts.inetd_dropbear_path = NULL;
132 #endif
127 133
128 for (i = 1; i < (unsigned int)argc; i++) { 134 for (i = 1; i < (unsigned int)argc; i++) {
129 if (next) { 135 if (next) {
130 *next = argv[i]; 136 *next = argv[i];
131 if (*next == NULL) { 137 if (*next == NULL) {
135 continue; 141 continue;
136 } 142 }
137 143
138 if (argv[i][0] == '-') { 144 if (argv[i][0] == '-') {
139 switch (argv[i][1]) { 145 switch (argv[i][1]) {
146 #ifdef INETD_SERVER_MODE
147 case 'x':
148 next = &svr_opts.inetd_dropbear_path;
149 break;
150 #endif
140 case 'b': 151 case 'b':
141 next = &svr_opts.bannerfile; 152 next = &svr_opts.bannerfile;
142 break; 153 break;
143 #ifdef DROPBEAR_DSS 154 #ifdef DROPBEAR_DSS
144 case 'd': 155 case 'd':