Merge pull request #156 from cvuillemez/no_flush_in_read_only

Do not flush nscd and sssd cache in read-only mode
This commit is contained in:
Serge Hallyn 2019-04-15 00:17:32 -05:00 committed by GitHub
commit 38e3e35c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -870,8 +870,10 @@ int main (int argc, char **argv)
/* Commit the change in the database if needed */ /* Commit the change in the database if needed */
close_files (changed); close_files (changed);
nscd_flush_cache ("group"); if (!read_only) {
sssd_flush_cache (SSSD_DB_GROUP); nscd_flush_cache ("group");
sssd_flush_cache (SSSD_DB_GROUP);
}
/* /*
* Tell the user what we did and exit. * Tell the user what we did and exit.

View File

@ -877,8 +877,10 @@ int main (int argc, char **argv)
close_files (changed); close_files (changed);
nscd_flush_cache ("passwd"); if (!read_only) {
sssd_flush_cache (SSSD_DB_PASSWD); nscd_flush_cache ("passwd");
sssd_flush_cache (SSSD_DB_PASSWD);
}
/* /*
* Tell the user what we did and exit. * Tell the user what we did and exit.