diff options
author | John Baldwin <jhb@FreeBSD.org> | 2008-07-17 13:47:59 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2008-07-17 13:47:59 +0000 |
commit | bcf07fcc9203db1a304746b745c46fd427aa8393 (patch) | |
tree | eabff39a3dc16a15ba6c7c64bbedebd7438dbd3f /pw/pwupd.c | |
parent | 589ea9a9ddfb5616b2443f7ec846e03e8077d616 (diff) | |
download | pw-darwin-bcf07fcc9203db1a304746b745c46fd427aa8393.tar.gz pw-darwin-bcf07fcc9203db1a304746b745c46fd427aa8393.tar.zst pw-darwin-bcf07fcc9203db1a304746b745c46fd427aa8393.zip |
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 'pw/pwupd.c')
-rw-r--r-- | pw/pwupd.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |