Do not rewrite the group and gshadow file in case of error.

This commit is contained in:
nekral-guest
2008-03-08 16:23:22 +00:00
parent 9e07fec6ba
commit a2242f6f1b
3 changed files with 12 additions and 5 deletions

View File

@ -340,9 +340,10 @@ int main (int argc, char **argv)
open_files ();
grp_update ();
close_files ();
nscd_flush_cache ("group");
if (errors == 0) {
close_files ();
nscd_flush_cache ("group");
}
#ifdef USE_PAM
if (retval == PAM_SUCCESS)