From 4215376d31438ae73e431a93cf88363c3c941e9d Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 13 Jan 2010 18:24:04 +0000 Subject: 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. --- libexec/rlogind/rlogind.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'libexec') 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); } -- cgit v1.1