--- passdb/pdb_tdb.c Mon Jan 30 21:45:07 2006 +++ passdb/pdb_tdb.c.fixed Thu Apr 20 20:34:18 2006 @@ -420,7 +420,7 @@ * TDB file doesn't exist, so try to create new one. This is useful to avoid * confusing error msg when adding user account first time */ - if (!(pwd_tdb = tdbsam_tdbopen(tdb_state->tdbsam_location, O_CREAT ))) { + if ((pwd_tdb = tdbsam_tdbopen(tdb_state->tdbsam_location, O_CREAT ))) { DEBUG(0, ("pdb_getsampwnam: TDB passwd (%s) did not exist. File successfully created.\n", tdb_state->tdbsam_location)); tdb_close(pwd_tdb);