7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina Pavel Březina <pbrezina@redhat.com>
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina Copyright (C) 2016 Red Hat
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina This program is free software; you can redistribute it and/or modify
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina it under the terms of the GNU General Public License as published by
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina the Free Software Foundation; either version 3 of the License, or
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina (at your option) any later version.
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina This program is distributed in the hope that it will be useful,
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina but WITHOUT ANY WARRANTY; without even the implied warranty of
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina GNU General Public License for more details.
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina You should have received a copy of the GNU General Public License
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina along with this program. If not, see <http://www.gnu.org/licenses/>.
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina#include "responder/common/cache_req/cache_req_plugin.h"
2af80640f18966d65cf82106059ce3c060df93bfamitkumaerrno_t cache_req_idminmax_check(struct cache_req_data *data,
2af80640f18966d65cf82106059ce3c060df93bfamitkuma if (((domain->id_min != 0) && (data->id < domain->id_min)) ||
2af80640f18966d65cf82106059ce3c060df93bfamitkuma ((domain->id_max != 0) && (data->id > domain->id_max))) {
2af80640f18966d65cf82106059ce3c060df93bfamitkuma DEBUG(SSSDBG_FUNC_DATA, "id exceeds min/max boundaries\n");
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březinastatic struct ldb_message *
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březinacache_req_well_known_sid_msg(TALLOC_CTX *mem_ctx,
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina const char *sid,
0e238c259c066cf997aaa940d33d6bda96c15925Sumit Bose ldberr = ldb_msg_add_string(msg, SYSDB_OBJECTCATEGORY, SYSDB_GROUP_CLASS);
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina ldberr = ldb_msg_add_string(msg, SYSDB_NAME, dup_name);
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina ldberr = ldb_msg_add_string(msg, SYSDB_SID_STR, dup_sid);
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březinacache_req_well_known_sid_result(TALLOC_CTX *mem_ctx,
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina const char *sid,
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina msg = cache_req_well_known_sid_msg(NULL, sid, name);
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina domain = find_domain_by_name(cr->rctx->domains, domname, true);
7a2ca8d776df685bddbb64370181fb32d776f676Pavel Březina result = cache_req_create_result_from_msg(mem_ctx, domain, msg,
4df7aec645f87342f3a5146062abcb15f71f4fd9Pavel Březinacache_req_common_dp_recv(struct tevent_req *subreq,
4df7aec645f87342f3a5146062abcb15f71f4fd9Pavel Březina ret = sss_dp_req_recv(NULL, subreq, &err_maj, &err_min, &err_msg);
4df7aec645f87342f3a5146062abcb15f71f4fd9Pavel Březina "Could not get account info [%d]: %s\n",
4df7aec645f87342f3a5146062abcb15f71f4fd9Pavel Březina "Due to an error we will return cached data\n");
4df7aec645f87342f3a5146062abcb15f71f4fd9Pavel Březina "Data Provider Error: %u, %u, %s\n",
4df7aec645f87342f3a5146062abcb15f71f4fd9Pavel Březina (unsigned int)err_maj, (unsigned int)err_min, err_msg);
4df7aec645f87342f3a5146062abcb15f71f4fd9Pavel Březina "Due to an error we will return cached data\n");
aa8608253630d8f3679dba5771ed019051c96930Fabiano Fidênciocache_req_common_get_acct_domain_recv(TALLOC_CTX *mem_ctx,
a6eb9c4c3ff68d134bc745e8374f182737e9696bJakub Hrozek ret = sss_dp_get_account_domain_recv(mem_ctx, subreq, _domain);
a6eb9c4c3ff68d134bc745e8374f182737e9696bJakub Hrozek "Could not get account domain [%d]: %s\n",