summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/pwupd.c
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-06-20 10:34:32 +0000
committerbapt <bapt@FreeBSD.org>2014-06-20 10:34:32 +0000
commit85394787a6195a3f2d1e75a52848af755711da1b (patch)
treebc91ac46763297fdeb6b1b3a960757283eb7c1db /usr.sbin/pw/pwupd.c
parentc0cd28f92874c0ee4efaddd658bbb67a64200f47 (diff)
downloadFreeBSD-src-85394787a6195a3f2d1e75a52848af755711da1b.zip
FreeBSD-src-85394787a6195a3f2d1e75a52848af755711da1b.tar.gz
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
Diffstat (limited to 'usr.sbin/pw/pwupd.c')
-rw-r--r--usr.sbin/pw/pwupd.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c
index 22662db..735f385 100644
--- a/usr.sbin/pw/pwupd.c
+++ b/usr.sbin/pw/pwupd.c
@@ -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 const * user)
{
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);
OpenPOWER on IntegriCloud