summaryrefslogtreecommitdiffstats
path: root/libexec/rlogind/rlogind.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-13 18:24:04 +0000
committered <ed@FreeBSD.org>2010-01-13 18:24:04 +0000
commit4215376d31438ae73e431a93cf88363c3c941e9d (patch)
tree727b23eb4fdb19dea59f107c0ca05777c4d0bc07 /libexec/rlogind/rlogind.c
parent57d10a6e95a4cdb97bc1a8c3125f1a2719736ccf (diff)
downloadFreeBSD-src-4215376d31438ae73e431a93cf88363c3c941e9d.zip
FreeBSD-src-4215376d31438ae73e431a93cf88363c3c941e9d.tar.gz
Remove `dead code' from rlogind.
- It shouldn't call logwtmp(). Applications like login(1) already make sure both login and logout entries are written to the storage. - There's no need to restore permissions on the pseudo-terminal, since it should be garbage collected by the kernel.
Diffstat (limited to 'libexec/rlogind/rlogind.c')
-rw-r--r--libexec/rlogind/rlogind.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index c4db3c7..5831a25 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -479,18 +479,7 @@ protocol(int f, int p)
void
cleanup(int signo)
{
- char *p;
-
- p = line + sizeof(_PATH_DEV) - 1;
- if (logout(p))
- logwtmp(p, "", "");
- (void)chflags(line, 0);
- (void)chmod(line, 0666);
- (void)chown(line, 0, 0);
- *p = 'p';
- (void)chflags(line, 0);
- (void)chmod(line, 0666);
- (void)chown(line, 0, 0);
+
shutdown(netf, SHUT_RDWR);
exit(1);
}
OpenPOWER on IntegriCloud