svn commit: r202928 - head/usr.sbin/lastlogin

Ed Schouten ed at FreeBSD.org
Sun Jan 24 14:29:40 UTC 2010


Author: ed
Date: Sun Jan 24 14:29:40 2010
New Revision: 202928
URL: http://svn.freebsd.org/changeset/base/202928

Log:
  Remove unneeded setpassent() calls.
  
  lastlogin no longer requires the use of the passwd database.

Modified:
  head/usr.sbin/lastlogin/lastlogin.c

Modified: head/usr.sbin/lastlogin/lastlogin.c
==============================================================================
--- head/usr.sbin/lastlogin/lastlogin.c	Sun Jan 24 14:13:56 2010	(r202927)
+++ head/usr.sbin/lastlogin/lastlogin.c	Sun Jan 24 14:29:40 2010	(r202928)
@@ -37,7 +37,6 @@ __RCSID("$NetBSD: lastlogin.c,v 1.4 1998
 #endif
 
 #include <err.h>
-#include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
@@ -58,8 +57,6 @@ main(int argc, char *argv[])
 		usage();
 	}
 
-	setpassent(1);	/* Keep passwd file pointers open */
-
 	/* Process usernames given on the command line. */
 	if (argc > 1) {
 		for (i = 1; i < argc; ++i) {
@@ -85,7 +82,6 @@ main(int argc, char *argv[])
 		endutxent();
 	}
 
-	setpassent(0);	/* Close passwd file pointers */
 	exit(0);
 }
 


More information about the svn-src-all mailing list