From cb39d6c9763eb9cc95aaba2fd326ec3d45637ab0 Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 9 Dec 1996 23:55:27 +0000 Subject: Upgrade from the author, reflecting all my wishes resulting out of the sysinstall use of this tool (plus some bug fixes). 2.2 candidate... Submitted by: David Nugent --- usr.sbin/pw/pwupd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'usr.sbin/pw/pwupd.c') diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index e13ce5f..43e0968 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/pw/pwupd.c @@ -45,6 +45,8 @@ #include "pwupd.h" +#define HAVE_PWDB_C 1 + static int pwdb(char *arg,...) { @@ -114,8 +116,13 @@ pw_update(struct passwd * pwd, char const * user, int mode) /* * 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 if (pwdb("-c", NULL) == 0) { /* Check only */ +#else + { /* No -c */ +#endif char pfx[32]; char pwbuf[MAXPWLINE]; int l = sprintf(pfx, "%s:", user); -- cgit v1.1