summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_sudo.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-04-23 16:37:08 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-06-29 11:37:17 -0400
commitd16b3f456d1100f4058d9a73ee59397f964b8760 (patch)
tree867a64f4fddeb13ef774c93f4c01a4b96cdf5cc8 /src/providers/ldap/sdap_sudo.c
parentb8f6f1e105f323b0debfcf1bb09aead6b3914472 (diff)
downloadsssd-d16b3f456d1100f4058d9a73ee59397f964b8760.tar.gz
sssd-d16b3f456d1100f4058d9a73ee59397f964b8760.tar.bz2
sssd-d16b3f456d1100f4058d9a73ee59397f964b8760.zip
sudo ldap provider: add support for on demand refresh of specific rules
Diffstat (limited to 'src/providers/ldap/sdap_sudo.c')
-rw-r--r--src/providers/ldap/sdap_sudo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 227d57c0..ba96f2cb 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -171,6 +171,9 @@ static void sdap_sudo_reply(struct tevent_req *req)
case BE_REQ_SUDO_FULL:
ret = sdap_sudo_full_refresh_recv(req, &dp_error, &error);
break;
+ case BE_REQ_SUDO_RULES:
+ ret = sdap_sudo_rules_refresh_recv(req, &dp_error, &error);
+ break;
default:
DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid request type: %d\n",
sudo_req->type));
@@ -203,6 +206,11 @@ void sdap_sudo_handler(struct be_req *be_req)
DEBUG(SSSDBG_TRACE_FUNC, ("Issuing a full refresh of sudo rules\n"));
req = sdap_sudo_full_refresh_send(be_req, id_ctx);
break;
+ case BE_REQ_SUDO_RULES:
+ DEBUG(SSSDBG_TRACE_FUNC, ("Issuing a refresh of specific sudo rules\n"));
+ req = sdap_sudo_rules_refresh_send(be_req, id_ctx->be, id_ctx->opts,
+ id_ctx->conn_cache, sudo_req->rules);
+ break;
default:
DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid request type: %d\n",
sudo_req->type));