summaryrefslogtreecommitdiff
path: root/src/providers/ldap/ldap_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/ldap_init.c')
-rw-r--r--src/providers/ldap/ldap_init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index 76167ad4..38d4fa71 100644
--- a/src/providers/ldap/ldap_init.c
+++ b/src/providers/ldap/ldap_init.c
@@ -30,6 +30,7 @@
#include "providers/ldap/sdap_autofs.h"
#include "providers/ldap/sdap_idmap.h"
#include "providers/fail_over_srv.h"
+#include "providers/dp_refresh.h"
static void sdap_shutdown(struct be_req *req);
@@ -179,6 +180,16 @@ int sssm_ldap_id_init(struct be_ctx *bectx,
goto done;
}
+ /* setup periodical refresh of expired records */
+ ret = be_refresh_add_cb(bectx->refresh_ctx, BE_REFRESH_TYPE_NETGROUPS,
+ sdap_refresh_netgroups_send,
+ sdap_refresh_netgroups_recv,
+ ctx);
+ if (ret != EOK && ret != EEXIST) {
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Periodical refresh of netgroups "
+ "will not work [%d]: %s\n", ret, strerror(ret)));
+ }
+
*ops = &sdap_id_ops;
*pvt_data = ctx;
ret = EOK;