From 41be4e3976cf66823ad2c6880671ac7fbafdc640 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Wed, 15 Aug 2012 13:59:37 +0200 Subject: Clean up cache on server reinitialization https://fedorahosted.org/sssd/ticket/734 We successfully detect when the server is reinitialized by testing the new lastUSN value. The maximum USN values are set to zero, but the current cache content remains. This patch removes records that were deleted from the server. It uses the following approach: 1. remove entryUSN attribute from all entries 2. run enumeration 3. remove records that doesn't have entryUSN attribute updated We don't need to do this for sudo rules, they will be refreshed automatically during next smart/full refresh, or when an expired rule is deleted. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 726a8589..571ea55c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1238,6 +1238,7 @@ libsss_ldap_common_la_SOURCES = \ src/providers/ldap/sdap_idmap.c \ src/providers/ldap/sdap_idmap.h \ src/providers/ldap/sdap_range.c \ + src/providers/ldap/sdap_reinit.c \ src/providers/ldap/sdap.c if BUILD_SUDO -- cgit