81d182b21020b815887e9057959228546cf61b6bChristian Maeder Pavel Březina <pbrezina@redhat.com>
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu Copyright (C) 2016 Red Hat
3f69b6948966979163bdfe8331c38833d5d90ecdChristian Maeder This program is free software; you can redistribute it and/or modify
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder it under the terms of the GNU General Public License as published by
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder the Free Software Foundation; either version 3 of the License, or
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder (at your option) any later version.
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder This program is distributed in the hope that it will be useful,
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder but WITHOUT ANY WARRANTY; without even the implied warranty of
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder GNU General Public License for more details.
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder You should have received a copy of the GNU General Public License
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder along with this program. If not, see <http://www.gnu.org/licenses/>.
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder#include "responder/common/cache_req/cache_req_private.h"
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder data = talloc_zero(mem_ctx, struct cache_req_data);
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero() failed\n");
72b9099aeec0762bae4546db3bc4b48721027bf4Christian Maeder DEBUG(SSSDBG_CRIT_FAILURE, "Bug: name cannot be NULL!\n");
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder data->name.input = talloc_strdup(data, input->name.input);
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder DEBUG(SSSDBG_CRIT_FAILURE, "Bug: certificate cannot be NULL!\n");
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder data->cert = talloc_strdup(data, input->cert);
1600a2e47d5ed599df94d20411f0767fb6d68587Christian Maeder DEBUG(SSSDBG_CRIT_FAILURE, "Bug: id cannot be 0!\n");
84c37bab085e7818efde0a4db6033afa28d4ef80Christian Maeder DEBUG(SSSDBG_CRIT_FAILURE, "Bug: SID cannot be NULL!\n");
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder data->sid = talloc_strdup(data, input->sid);
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder DEBUG(SSSDBG_CRIT_FAILURE, "Invalid cache request type!\n");
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder data->attrs = dup_string_list(data, input->attrs);
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create cache_req data "
4550ee0c945684d86f2f129046f5abba97ecd4c4Christian Maeder return cache_req_data_create(mem_ctx, type, &input);
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder return cache_req_data_create(mem_ctx, type, &input);
struct cache_req_data *
const char *sid,
const char **attrs)