diff --git a/contrib/telnet/telnetd/sys_term.c b/contrib/telnet/telnetd/sys_term.c index 498c3427b26d..a7b0075f387d 100644 --- a/contrib/telnet/telnetd/sys_term.c +++ b/contrib/telnet/telnetd/sys_term.c @@ -1303,24 +1303,7 @@ scrub_env(void) void cleanup(int sig __unused) { - char *p; - sigset_t mask; - p = line + sizeof(_PATH_DEV) - 1; - /* - * Block all signals before clearing the utmp entry. We don't want to - * be called again after calling logout() and then not add the wtmp - * entry because of not finding the corresponding entry in utmp. - */ - sigfillset(&mask); - sigprocmask(SIG_SETMASK, &mask, NULL); - if (logout(p)) - logwtmp(p, "", ""); - (void)chmod(line, 0666); - (void)chown(line, 0, 0); - *p = 'p'; - (void)chmod(line, 0666); - (void)chown(line, 0, 0); - (void) shutdown(net, 2); + (void) shutdown(net, SHUT_RDWR); _exit(1); } diff --git a/contrib/telnet/telnetd/telnetd.c b/contrib/telnet/telnetd/telnetd.c index ad1e45953e9e..7833a6b82621 100644 --- a/contrib/telnet/telnetd/telnetd.c +++ b/contrib/telnet/telnetd/telnetd.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include