Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2010 18:24:04 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202207 - head/libexec/rlogind
Message-ID:  <201001131824.o0DIO46j086219@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001131824.o0DIO46j086219>