diff options
author | ed <ed@FreeBSD.org> | 2010-01-13 18:24:04 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-01-13 18:24:04 +0000 |
commit | 4215376d31438ae73e431a93cf88363c3c941e9d (patch) | |
tree | 727b23eb4fdb19dea59f107c0ca05777c4d0bc07 /libexec/rlogind | |
parent | 57d10a6e95a4cdb97bc1a8c3125f1a2719736ccf (diff) | |
download | FreeBSD-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')
-rw-r--r-- | libexec/rlogind/rlogind.c | 13 |
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); } |