Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/networking/telnetd.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/telnetd.c
r3232 r3621 45 45 46 46 #include "libbb.h" 47 #include "common_bufsiz.h" 47 48 #include <syslog.h> 48 49 … … 83 84 int maxfd; 84 85 } FIX_ALIASING; 85 #define G (*(struct globals*) &bb_common_bufsiz1)86 #define G (*(struct globals*)bb_common_bufsiz1) 86 87 #define INIT_G() do { \ 88 setup_common_bufsiz(); \ 87 89 G.loginpath = "/bin/login"; \ 88 90 G.issuefile = "/etc/issue.net"; \ … … 266 268 267 269 /* SO_KEEPALIVE by popular demand */ 268 setsockopt (sock, SOL_SOCKET, SO_KEEPALIVE, &const_int_1, sizeof(const_int_1));270 setsockopt_keepalive(sock); 269 271 #if ENABLE_FEATURE_TELNETD_STANDALONE 270 272 ts->sockfd_read = sock; … … 463 465 if (ts->shell_pid == pid) { 464 466 ts->shell_pid = -1; 465 // man utmp: 466 // When init(8) finds that a process has exited, it locates its utmp entry 467 // by ut_pid, sets ut_type to DEAD_PROCESS, and clears ut_user, ut_host 468 // and ut_time with null bytes. 469 // [same applies to other processes which maintain utmp entries, like telnetd] 470 // 471 // We do not bother actually clearing fields: 472 // it might be interesting to know who was logged in and from where 473 update_utmp(pid, DEAD_PROCESS, /*tty_name:*/ NULL, /*username:*/ NULL, /*hostname:*/ NULL); 467 update_utmp_DEAD_PROCESS(pid); 474 468 break; 475 469 } … … 740 734 kill_session: 741 735 if (ts->shell_pid > 0) 742 update_utmp (ts->shell_pid, DEAD_PROCESS, /*tty_name:*/ NULL, /*username:*/ NULL, /*hostname:*/ NULL);736 update_utmp_DEAD_PROCESS(ts->shell_pid); 743 737 free_session(ts); 744 738 ts = next;
Note:
See TracChangeset
for help on using the changeset viewer.