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
This commit is contained in:
John Baldwin 2008-07-17 13:47:59 +00:00
parent 04f0f225dd
commit c746f22dea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180565

View File

@ -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