summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/ldap_common.c')
-rw-r--r--src/providers/ldap/ldap_common.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 737b9156c..cce3c0bcf 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -26,7 +26,6 @@
#include "providers/fail_over.h"
#include "providers/ldap/sdap_async_private.h"
#include "providers/krb5/krb5_common.h"
-#include "providers/ldap/sdap_sudo_timer.h"
#include "db/sysdb_sudo.h"
#include "db/sysdb_services.h"
@@ -596,65 +595,6 @@ int ldap_get_sudo_options(TALLOC_CTX *memctx,
return EOK;
}
-#ifdef BUILD_SUDO
-int sdap_sudo_setup_tasks(struct sdap_id_ctx *id_ctx)
-{
- struct sdap_sudo_refresh_ctx *refresh_ctx = NULL;
- struct timeval tv;
- int ret = EOK;
- bool refreshed = false;
- bool refresh_enabled = dp_opt_get_bool(id_ctx->opts->basic,
- SDAP_SUDO_REFRESH_ENABLED);
-
- /* set up periodical update of sudo rules */
- if (refresh_enabled) {
- refresh_ctx = sdap_sudo_refresh_ctx_init(id_ctx, id_ctx->be, id_ctx,
- id_ctx->opts,
- tevent_timeval_zero());
- if (refresh_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE,
- ("sdap_sudo_refresh_ctx_init() failed!\n"));
- return ENOMEM;
- }
-
- /* If this is the first startup, we need to kick off
- * an refresh immediately, to close a window where
- * clients requesting sudo information won't get an
- * immediate reply with no entries
- */
- ret = sysdb_sudo_get_refreshed(id_ctx->be->sysdb, &refreshed);
- if (ret != EOK) {
- return ret;
- }
- if (refreshed) {
- /* At least one update has previously run,
- * so clients will get cached data. We will delay
- * starting to enumerate by 10s so we don't slow
- * down the startup process if this is happening
- * during system boot.
- */
- tv = tevent_timeval_current_ofs(10, 0);
- DEBUG(SSSDBG_FUNC_DATA, ("Delaying first refresh of SUDO rules "
- "for 10 seconds\n"));
- } else {
- /* This is our first startup. Schedule the
- * update to start immediately once we
- * enter the mainloop.
- */
- tv = tevent_timeval_current();
- }
-
- ret = sdap_sudo_refresh_set_timer(refresh_ctx, tv);
- if (ret != EOK) {
- talloc_free(refresh_ctx);
- return ret;
- }
- }
-
- return EOK;
-}
-#endif
-
errno_t sdap_parse_search_base(TALLOC_CTX *mem_ctx,
struct dp_option *opts, int class,
struct sdap_search_base ***_search_bases)