205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek/*
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek Authors:
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek Pavel Březina <pbrezina@redhat.com>
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek Copyright (C) 2017 Red Hat
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek This program is free software; you can redistribute it and/or modify
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek it under the terms of the GNU General Public License as published by
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek the Free Software Foundation; either version 3 of the License, or
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek (at your option) any later version.
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek This program is distributed in the hope that it will be useful,
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek but WITHOUT ANY WARRANTY; without even the implied warranty of
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek GNU General Public License for more details.
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek You should have received a copy of the GNU General Public License
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek along with this program. If not, see <http://www.gnu.org/licenses/>.
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek*/
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek#include "util/util.h"
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek#include "sbus/sssd_dbus.h"
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek#include "responder/common/responder.h"
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek#include "responder/common/negcache.h"
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek#include "responder/common/iface/responder_iface.h"
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozekint sss_resp_reset_ncache_users(struct sbus_request *req, void *data)
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek{
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek struct resp_ctx *rctx = talloc_get_type(data, struct resp_ctx);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek sss_ncache_reset_users(rctx->ncache);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek return iface_responder_ncache_ResetUsers_finish(req);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek}
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozekint sss_resp_reset_ncache_groups(struct sbus_request *req, void *data)
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek{
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek struct resp_ctx *rctx = talloc_get_type(data, struct resp_ctx);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek sss_ncache_reset_groups(rctx->ncache);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek return iface_responder_ncache_ResetGroups_finish(req);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek}