diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 1996-12-09 23:55:27 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 1996-12-09 23:55:27 +0000 |
commit | a8af085a741562fec1e32f338ba723232832f523 (patch) | |
tree | 412f12f7649d44ca0c0ba886eac54ab8d1821cd0 /pw/pwupd.c | |
parent | 6329584bf610f8d5f44eed0d0c51f3df949807a1 (diff) | |
download | pw-darwin-a8af085a741562fec1e32f338ba723232832f523.tar.gz pw-darwin-a8af085a741562fec1e32f338ba723232832f523.tar.zst pw-darwin-a8af085a741562fec1e32f338ba723232832f523.zip |
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 <davidn@nserver.usn.blaze.net.au>
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); |