diff options
author | Pavel Březina <pbrezina@redhat.com> | 2012-08-15 13:59:37 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-08-23 14:27:51 +0200 |
commit | 41be4e3976cf66823ad2c6880671ac7fbafdc640 (patch) | |
tree | a70acd87acba86cd935bd150b66b58b0524d534b /src/providers/ldap/ldap_common.h | |
parent | e4c29d1f8e3b2c2b268105f169e5156a0a36aebf (diff) | |
download | sssd-41be4e3976cf66823ad2c6880671ac7fbafdc640.tar.gz sssd-41be4e3976cf66823ad2c6880671ac7fbafdc640.tar.xz sssd-41be4e3976cf66823ad2c6880671ac7fbafdc640.zip |
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.
Diffstat (limited to 'src/providers/ldap/ldap_common.h')
-rw-r--r-- | src/providers/ldap/ldap_common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_common.h b/src/providers/ldap/ldap_common.h index 1773f37e7..034dc995b 100644 --- a/src/providers/ldap/ldap_common.h +++ b/src/providers/ldap/ldap_common.h @@ -76,6 +76,12 @@ int sssm_ldap_id_init(struct be_ctx *bectx, void sdap_check_online(struct be_req *breq); void sdap_do_online_check(struct be_req *be_req, struct sdap_id_ctx *ctx); +struct tevent_req* sdap_reinit_cleanup_send(TALLOC_CTX *mem_ctx, + struct be_ctx *be_ctx, + struct sdap_id_ctx *id_ctx); + +errno_t sdap_reinit_cleanup_recv(struct tevent_req *req); + /* id */ void sdap_account_info_handler(struct be_req *breq); void sdap_handle_account_info(struct be_req *breq, struct sdap_id_ctx *ctx); @@ -140,6 +146,9 @@ int ldap_get_autofs_options(TALLOC_CTX *memctx, int ldap_id_enumerate_set_timer(struct sdap_id_ctx *ctx, struct timeval tv); int ldap_id_cleanup_set_timer(struct sdap_id_ctx *ctx, struct timeval tv); +struct tevent_req *ldap_id_enumerate_send(struct tevent_context *ev, + struct sdap_id_ctx *ctx); + void sdap_mark_offline(struct sdap_id_ctx *ctx); struct tevent_req *users_get_send(TALLOC_CTX *memctx, |