diff options
Diffstat (limited to 'pw/pwupd.c')
-rw-r--r-- | pw/pwupd.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |