Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/networking/telnetd.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/networking/telnetd.c
r2725 r3232 21 21 * Set process group corrections, initial busybox port 22 22 */ 23 24 //usage:#define telnetd_trivial_usage 25 //usage: "[OPTIONS]" 26 //usage:#define telnetd_full_usage "\n\n" 27 //usage: "Handle incoming telnet connections" 28 //usage: IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" 29 //usage: "\n -l LOGIN Exec LOGIN on connect" 30 //usage: "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" 31 //usage: "\n -K Close connection as soon as login exits" 32 //usage: "\n (normally wait until all programs close slave pty)" 33 //usage: IF_FEATURE_TELNETD_STANDALONE( 34 //usage: "\n -p PORT Port to listen on" 35 //usage: "\n -b ADDR[:PORT] Address to bind to" 36 //usage: "\n -F Run in foreground" 37 //usage: "\n -i Inetd mode" 38 //usage: IF_FEATURE_TELNETD_INETD_WAIT( 39 //usage: "\n -w SEC Inetd 'wait' mode, linger time SEC" 40 //usage: "\n -S Log to syslog (implied by -i or without -F and -w)" 41 //usage: ) 42 //usage: ) 43 23 44 #define DEBUG 0 24 45 … … 31 52 #endif 32 53 #include <arpa/telnet.h> 33 34 #if ENABLE_FEATURE_UTMP35 # include <utmp.h> /* LOGIN_PROCESS */36 #endif37 54 38 55 … … 109 126 * Many client implementations send \r\n when 110 127 * the user hits the CarriageReturn key. 128 * See RFC 1123 3.3.1 Telnet End-of-Line Convention. 111 129 */ 112 130 if (c == '\r' && ptr < end && (*ptr == '\n' || *ptr == '\0')) … … 315 333 bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL); 316 334 335 pid = getpid(); 336 317 337 if (ENABLE_FEATURE_UTMP) { 318 338 len_and_sockaddr *lsa = get_peer_lsa(sock); … … 336 356 xdup2(0, 1); 337 357 xdup2(0, 2); 338 pid = getpid();339 358 tcsetpgrp(0, pid); /* switch this tty's process group to us */ 340 359
Note:
See TracChangeset
for help on using the changeset viewer.