diff options
author | jhb <jhb@FreeBSD.org> | 2008-07-17 13:47:59 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-07-17 13:47:59 +0000 |
commit | 42cd7531f94de815bdca60224317e04570181bfe (patch) | |
tree | b1798a502fb052242b022aa2c36d80838908a751 /usr.sbin/pw | |
parent | f25eee8d084ce366e923c31de49ee7b70e45eb7b (diff) | |
download | FreeBSD-src-42cd7531f94de815bdca60224317e04570181bfe.zip FreeBSD-src-42cd7531f94de815bdca60224317e04570181bfe.tar.gz |
Before updating the password database, the pw(8) utility first performs a
sanity check by invoking "pwd_mkdb -C". However, if this failed it
silently returned success. Fix this so it fails the update operation
instead.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/pwupd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index 7e0e3cf..cb8456d 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/pw/pwupd.c @@ -148,7 +148,8 @@ pw_update(struct passwd * pwd, char const * user, int mode) * Note: -C is only available in FreeBSD 2.2 and above */ #ifdef HAVE_PWDB_C - if (pwdb("-C", (char *)NULL) == 0) { /* Check only */ + rc = pwdb("-C", (char *)NULL); /* Check only */ + if (rc == 0) { #else { /* No -C */ #endif |