aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/telnetd.c
AgeCommit message (Collapse)Author
2021-03-18telnetd: don't exit if waitpid() returns 0.Elliott Hughes
Noticed while using telnetd to manually test some telnet fixes: telnetd would sometimes exit when I'd disconnect because it couldn't find pid 0 on its list of sessions. I've not seen obscure exits because select() times out, but I've also changed that `return` to an error_exit() so we'll at least know what's happened if that ever occurs. Also use <arpa/telnet.h> rather than manually #define'ing its constants, use the FLAG() macro throughout, and xsetsockopt(). Don't pointlessly set errno to 0 at the start of main and then never look at it again.
2020-04-16Weed-whack a few warnings out of pending so allyesconfig is less noisy.Rob Landley
2019-07-11bind/connect cleanup.Elliott Hughes
Rename the existing xbind/xconnect to xbindany/xconnectany, to make room for new xbind/xconnect that are more like 'x' versions of the regular bind and connect. Move explicit bind/connect callers over to xbind/xconnect. Of the affected commands, only netcat is actually used by Android. It was the most recent patch to netcat that made the lack of a more traditional xbind/xconnect apparent.
2015-01-16AOSP master has <pty.h> and builds netcat/nc.Elliott Hughes
2014-11-19probe for getspnam(), forkpty(), utmpx, replace sethostname()Isaac Dunham
Android is missing all of these; we need to probe for some so we have a config symbol to depend on. sethostname() is easily replaced. We got termios.h via pty.h; now it's not included in configure-step tools, so we need termios.h to generate globals.
2014-07-17Use libc daemon() instead of pending daemonize.Rob Landley
2014-05-21Make telnetd use generic_signal(), inline kill_session(), close race window ↵Rob Landley
where a SIGCHLD could get lost.
2013-12-23telnet and telnetd from Ashwini Sharma's guys.Rob Landley