svn commit: r202207 - head/libexec/rlogind

Ed Schouten ed at FreeBSD.org
Wed Jan 13 18:24:04 UTC 2010


Author: ed
Date: Wed Jan 13 18:24:04 2010
New Revision: 202207
URL: http://svn.freebsd.org/changeset/base/202207

Log:
  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.

Modified:
  head/libexec/rlogind/rlogind.c

Modified: head/libexec/rlogind/rlogind.c
==============================================================================
--- head/libexec/rlogind/rlogind.c	Wed Jan 13 18:17:53 2010	(r202206)
+++ head/libexec/rlogind/rlogind.c	Wed Jan 13 18:24:04 2010	(r202207)
@@ -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);
 }


More information about the svn-src-all mailing list