From ba4378f49914e65a7d687a872d9b938173841154 Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Fri, 1 Mar 2013 13:44:03 +0100 Subject: Make the SELinux refresh time configurable. Option ipa_selinux_refresh is added to basic ipa options. --- src/providers/ipa/ipa_selinux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/providers/ipa/ipa_selinux.c') diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c index 489c203d1..6705eea1e 100644 --- a/src/providers/ipa/ipa_selinux.c +++ b/src/providers/ipa/ipa_selinux.c @@ -811,6 +811,7 @@ ipa_get_selinux_send(TALLOC_CTX *mem_ctx, int ret = EOK; time_t now; time_t refresh_interval; + struct ipa_options *ipa_options = selinux_ctx->id_ctx->ipa_options; DEBUG(SSSDBG_TRACE_FUNC, ("Retrieving SELinux user mapping\n")); req = tevent_req_create(mem_ctx, &state, struct ipa_get_selinux_state); @@ -828,8 +829,8 @@ ipa_get_selinux_send(TALLOC_CTX *mem_ctx, offline ? "offline" : "online")); if (!offline) { - /* FIXME: Make the interval configurable */ - refresh_interval = 5; + refresh_interval = dp_opt_get_int(ipa_options->basic, + IPA_SELINUX_REFRESH); now = time(NULL); if (now < selinux_ctx->last_update + refresh_interval) { /* SELinux maps were recently updated -> force offline */ -- cgit