Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2014 10:34:33 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267669 - head/usr.sbin/pw
Message-ID:  <201406201034.s5KAYXnc031007@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Jun 20 10:34:32 2014
New Revision: 267669
URL: http://svnweb.freebsd.org/changeset/base/267669

Log:
  Removed compatibility with pre FreeBSD 2.2 pw_mkdb command
  Fix some broken indentattion
  
  PR:		189173
  Submitted by:	fullermd@over-yonder.net
  MFC after:	1 week

Modified:
  head/usr.sbin/pw/pwupd.c

Modified: head/usr.sbin/pw/pwupd.c
==============================================================================
--- head/usr.sbin/pw/pwupd.c	Fri Jun 20 09:57:27 2014	(r267668)
+++ head/usr.sbin/pw/pwupd.c	Fri Jun 20 10:34:32 2014	(r267669)
@@ -45,9 +45,6 @@ static const char rcsid[] =
 
 #include "pwupd.h"
 
-#define HAVE_PWDB_C	1
-#define	HAVE_PWDB_U	1
-
 static char pathpwd[] = _PATH_PWD;
 static char * pwpath = pathpwd;
  
@@ -112,22 +109,14 @@ pw_update(struct passwd * pwd, char cons
 {
 	int             rc = 0;
 
-	/*
-	 * First, let's check the see if the database is alright
-	 * Note: -C is only available in FreeBSD 2.2 and above
-	 */
-#ifdef HAVE_PWDB_C
 	rc = pwdb("-C", (char *)NULL);	/* Check only */
 	if (rc == 0) {
-#else
-	{				/* No -C */
-#endif
 		int pfd, tfd;
 		struct passwd *pw = NULL;
 		struct passwd *old_pw = NULL;
 
-	       	if (pwd != NULL)
-		       pw = pw_dup(pwd);
+		if (pwd != NULL)
+			pw = pw_dup(pwd);
 
 		if (user != NULL)
 			old_pw = GETPWNAM(user);



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