Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/networking/telnetd.c

    r2725 r3232  
    2121 * Set process group corrections, initial busybox port
    2222 */
     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
    2344#define DEBUG 0
    2445
     
    3152#endif
    3253#include <arpa/telnet.h>
    33 
    34 #if ENABLE_FEATURE_UTMP
    35 # include <utmp.h> /* LOGIN_PROCESS */
    36 #endif
    3754
    3855
     
    109126             * Many client implementations send \r\n when
    110127             * the user hits the CarriageReturn key.
     128             * See RFC 1123 3.3.1 Telnet End-of-Line Convention.
    111129             */
    112130            if (c == '\r' && ptr < end && (*ptr == '\n' || *ptr == '\0'))
     
    315333    bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
    316334
     335    pid = getpid();
     336
    317337    if (ENABLE_FEATURE_UTMP) {
    318338        len_and_sockaddr *lsa = get_peer_lsa(sock);
     
    336356    xdup2(0, 1);
    337357    xdup2(0, 2);
    338     pid = getpid();
    339358    tcsetpgrp(0, pid); /* switch this tty's process group to us */
    340359
Note: See TracChangeset for help on using the changeset viewer.