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.
This commit is contained in:
Ed Schouten 2010-01-13 18:24:04 +00:00
parent b5810e9449
commit 426f89600c

View File

@ -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);
}