619bd403265ce0880989ba6f8324b010949851bcSumit Bose/*
619bd403265ce0880989ba6f8324b010949851bcSumit Bose SSSD
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose LDAP Identity Backend Module - Netgroup support
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose Authors:
619bd403265ce0880989ba6f8324b010949851bcSumit Bose Sumit Bose <sbose@redhat.com>
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose Copyright (C) 2010 Red Hat
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose This program is free software; you can redistribute it and/or modify
619bd403265ce0880989ba6f8324b010949851bcSumit Bose it under the terms of the GNU General Public License as published by
619bd403265ce0880989ba6f8324b010949851bcSumit Bose the Free Software Foundation; either version 3 of the License, or
619bd403265ce0880989ba6f8324b010949851bcSumit Bose (at your option) any later version.
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose This program is distributed in the hope that it will be useful,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose but WITHOUT ANY WARRANTY; without even the implied warranty of
619bd403265ce0880989ba6f8324b010949851bcSumit Bose MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
619bd403265ce0880989ba6f8324b010949851bcSumit Bose GNU General Public License for more details.
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose You should have received a copy of the GNU General Public License
619bd403265ce0880989ba6f8324b010949851bcSumit Bose along with this program. If not, see <http://www.gnu.org/licenses/>.
619bd403265ce0880989ba6f8324b010949851bcSumit Bose*/
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose#include <errno.h>
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose#include "util/util.h"
619bd403265ce0880989ba6f8324b010949851bcSumit Bose#include "db/sysdb.h"
619bd403265ce0880989ba6f8324b010949851bcSumit Bose#include "providers/ldap/ldap_common.h"
619bd403265ce0880989ba6f8324b010949851bcSumit Bose#include "providers/ldap/sdap_async.h"
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystruct ldap_netgroup_get_state {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct tevent_context *ev;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct sdap_id_ctx *ctx;
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05dJakub Hrozek struct sdap_domain *sdom;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct sdap_id_op *op;
9aa117a93e315f790a1922d9ac7bd484878b621eJakub Hrozek struct sdap_id_conn_ctx *conn;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct sysdb_ctx *sysdb;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct sss_domain_info *domain;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose const char *name;
a530a96721d8106a6839b6b643b0abc5d7a7b9e0Sumit Bose int timeout;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose char *filter;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose const char **attrs;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose size_t count;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct sysdb_attrs **netgroups;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose int dp_error;
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek int sdap_ret;
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek bool noexist_delete;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose};
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystatic int ldap_netgroup_get_retry(struct tevent_req *req);
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystatic void ldap_netgroup_get_connect_done(struct tevent_req *subreq);
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystatic void ldap_netgroup_get_done(struct tevent_req *subreq);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystruct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx,
9aa117a93e315f790a1922d9ac7bd484878b621eJakub Hrozek struct tevent_context *ev,
9aa117a93e315f790a1922d9ac7bd484878b621eJakub Hrozek struct sdap_id_ctx *ctx,
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05dJakub Hrozek struct sdap_domain *sdom,
9aa117a93e315f790a1922d9ac7bd484878b621eJakub Hrozek struct sdap_id_conn_ctx *conn,
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek const char *name,
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek bool noexist_delete)
619bd403265ce0880989ba6f8324b010949851bcSumit Bose{
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct tevent_req *req;
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state *state;
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher char *clean_name;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose int ret;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny req = tevent_req_create(memctx, &state, struct ldap_netgroup_get_state);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (!req) return NULL;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->ev = ev;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->ctx = ctx;
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05dJakub Hrozek state->sdom = sdom;
9aa117a93e315f790a1922d9ac7bd484878b621eJakub Hrozek state->conn = conn;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->dp_error = DP_ERR_FATAL;
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek state->noexist_delete = noexist_delete;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
9aa117a93e315f790a1922d9ac7bd484878b621eJakub Hrozek state->op = sdap_id_op_create(state, state->conn->conn_cache);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (!state->op) {
83bf46f4066e3d5e838a32357c201de9bd6ecdfdNikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create failed\n");
619bd403265ce0880989ba6f8324b010949851bcSumit Bose ret = ENOMEM;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose goto fail;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05dJakub Hrozek state->domain = sdom->dom;
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05dJakub Hrozek state->sysdb = sdom->dom->sysdb;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->name = name;
a530a96721d8106a6839b6b643b0abc5d7a7b9e0Sumit Bose state->timeout = dp_opt_get_int(ctx->opts->basic, SDAP_SEARCH_TIMEOUT);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher ret = sss_filter_sanitize(state, name, &clean_name);
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher if (ret != EOK) {
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher goto fail;
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher }
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->filter = talloc_asprintf(state, "(&(%s=%s)(objectclass=%s))",
619bd403265ce0880989ba6f8324b010949851bcSumit Bose ctx->opts->netgroup_map[SDAP_AT_NETGROUP_NAME].name,
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher clean_name,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose ctx->opts->netgroup_map[SDAP_OC_NETGROUP].name);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (!state->filter) {
83bf46f4066e3d5e838a32357c201de9bd6ecdfdNikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "Failed to build filter\n");
619bd403265ce0880989ba6f8324b010949851bcSumit Bose ret = ENOMEM;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose goto fail;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
85e8cbdd79359ae1f330c8b84f7b58d4fc6fda6eStephen Gallagher talloc_zfree(clean_name);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
64ddff90c7fcc02ccb06824ac93af7d5f361a88fJan Zeleny ret = build_attrs_from_map(state, ctx->opts->netgroup_map, SDAP_OPTS_NETGROUP,
64ddff90c7fcc02ccb06824ac93af7d5f361a88fJan Zeleny NULL, &state->attrs, NULL);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (ret != EOK) goto fail;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny ret = ldap_netgroup_get_retry(req);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (ret != EOK) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose goto fail;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return req;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bosefail:
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_error(req, ret);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_post(req, ev);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return req;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose}
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystatic int ldap_netgroup_get_retry(struct tevent_req *req)
619bd403265ce0880989ba6f8324b010949851bcSumit Bose{
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state *state = tevent_req_data(req,
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct tevent_req *subreq;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose int ret = EOK;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose subreq = sdap_id_op_connect_send(state->op, state, &ret);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (!subreq) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return ret;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny tevent_req_set_callback(subreq, ldap_netgroup_get_connect_done, req);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return EOK;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose}
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystatic void ldap_netgroup_get_connect_done(struct tevent_req *subreq)
619bd403265ce0880989ba6f8324b010949851bcSumit Bose{
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct tevent_req *req = tevent_req_callback_data(subreq,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct tevent_req);
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state *state = tevent_req_data(req,
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose int dp_error = DP_ERR_FATAL;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose int ret;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose ret = sdap_id_op_connect_recv(subreq, &dp_error);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose talloc_zfree(subreq);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (ret != EOK) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->dp_error = dp_error;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_error(req, ret);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose subreq = sdap_get_netgroups_send(state, state->ev,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->domain, state->sysdb,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->ctx->opts,
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05dJakub Hrozek state->sdom->netgroup_search_bases,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose sdap_id_op_handle(state->op),
a530a96721d8106a6839b6b643b0abc5d7a7b9e0Sumit Bose state->attrs, state->filter,
a530a96721d8106a6839b6b643b0abc5d7a7b9e0Sumit Bose state->timeout);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (!subreq) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_error(req, ENOMEM);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny tevent_req_set_callback(subreq, ldap_netgroup_get_done, req);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose}
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zelenystatic void ldap_netgroup_get_done(struct tevent_req *subreq)
619bd403265ce0880989ba6f8324b010949851bcSumit Bose{
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct tevent_req *req = tevent_req_callback_data(subreq,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose struct tevent_req);
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state *state = tevent_req_data(req,
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose int dp_error = DP_ERR_FATAL;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose int ret;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose ret = sdap_get_netgroups_recv(subreq, state, NULL, &state->count,
619bd403265ce0880989ba6f8324b010949851bcSumit Bose &state->netgroups);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose talloc_zfree(subreq);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose ret = sdap_id_op_done(state->op, ret, &dp_error);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (dp_error == DP_ERR_OK && ret != EOK) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose /* retry */
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny ret = ldap_netgroup_get_retry(req);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (ret != EOK) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_error(req, ret);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek state->sdap_ret = ret;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (ret && ret != ENOENT) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->dp_error = dp_error;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_error(req, ret);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (ret == EOK && state->count > 1) {
83bf46f4066e3d5e838a32357c201de9bd6ecdfdNikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE,
83bf46f4066e3d5e838a32357c201de9bd6ecdfdNikolai Kondrashov "Found more than one netgroup with the name [%s].\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov state->name);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_error(req, EINVAL);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek if (ret == ENOENT && state->noexist_delete == true) {
d115f40c7a3999e3cbe705a2ff9cf0fd493f80fbMichal Zidek ret = sysdb_delete_netgroup(state->domain, state->name);
6a03b2a9c967d250825d614607d0bb7b901e8696Stephen Gallagher if (ret != EOK && ret != ENOENT) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_error(req, ret);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose state->dp_error = DP_ERR_OK;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose tevent_req_done(req);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose}
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozekint ldap_netgroup_get_recv(struct tevent_req *req, int *dp_error_out, int *sdap_ret)
619bd403265ce0880989ba6f8324b010949851bcSumit Bose{
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state *state = tevent_req_data(req,
7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2Jan Zeleny struct ldap_netgroup_get_state);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose if (dp_error_out) {
619bd403265ce0880989ba6f8324b010949851bcSumit Bose *dp_error_out = state->dp_error;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose }
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek if (sdap_ret) {
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek *sdap_ret = state->sdap_ret;
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek }
ca344fdecdf127c80ad1074047aeba21e1165313Jakub Hrozek
619bd403265ce0880989ba6f8324b010949851bcSumit Bose TEVENT_REQ_RETURN_ON_ERROR(req);
619bd403265ce0880989ba6f8324b010949851bcSumit Bose
619bd403265ce0880989ba6f8324b010949851bcSumit Bose return EOK;
619bd403265ce0880989ba6f8324b010949851bcSumit Bose}