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:
commit
38e3e35c72
@ -870,8 +870,10 @@ int main (int argc, char **argv)
|
||||
/* Commit the change in the database if needed */
|
||||
close_files (changed);
|
||||
|
||||
nscd_flush_cache ("group");
|
||||
sssd_flush_cache (SSSD_DB_GROUP);
|
||||
if (!read_only) {
|
||||
nscd_flush_cache ("group");
|
||||
sssd_flush_cache (SSSD_DB_GROUP);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tell the user what we did and exit.
|
||||
|
@ -877,8 +877,10 @@ int main (int argc, char **argv)
|
||||
|
||||
close_files (changed);
|
||||
|
||||
nscd_flush_cache ("passwd");
|
||||
sssd_flush_cache (SSSD_DB_PASSWD);
|
||||
if (!read_only) {
|
||||
nscd_flush_cache ("passwd");
|
||||
sssd_flush_cache (SSSD_DB_PASSWD);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tell the user what we did and exit.
|
||||
|
Loading…
Reference in New Issue
Block a user