dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek Sumit Bose <sbose@redhat.com>
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek Copyright (C) 2013 Red Hat
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek This program is free software; you can redistribute it and/or modify
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek it under the terms of the GNU General Public License as published by
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek the Free Software Foundation; either version 3 of the License, or
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek (at your option) any later version.
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek This program is distributed in the hope that it will be useful,
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek but WITHOUT ANY WARRANTY; without even the implied warranty of
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek GNU General Public License for more details.
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek You should have received a copy of the GNU General Public License
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek along with this program. If not, see <http://www.gnu.org/licenses/>.
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozekstatic errno_t ipa_idmap_check_posix_child(struct sdap_idmap_ctx *idmap_ctx,
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek err = sss_idmap_domain_has_algorithmic_mapping(idmap_ctx->map, dom_sid_str,
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek "Idmap of domain [%s] already known, nothing to do.\n",
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek err = sss_idmap_domain_by_name_has_algorithmic_mapping(idmap_ctx->map,
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose "Idmap of domain [%s] already known, nothing to do.\n",
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose DEBUG(SSSDBG_TRACE_ALL, "Trying to add idmap for domain [%s].\n",
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose if (err != IDMAP_SID_UNKNOWN && err != IDMAP_NAME_UNKNOWN) {
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose "sss_idmap_domain_has_algorithmic_mapping failed.\n");
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose dom = find_domain_by_sid(idmap_ctx->id_ctx->be->domain, dom_sid_str);
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose "find_domain_by_sid failed with SID [%s].\n", dom_sid_str);
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose DEBUG(SSSDBG_MINOR_FAILURE, "No forest available for domain [%s].\n",
15a1519ec9c23f598716ffa89e533cd9bfb2a4f3Sumit Bose forest_root = find_domain_by_name(idmap_ctx->id_ctx->be->domain,
return ENOENT;
return EINVAL;
return ENOMEM;
for (c = 0; c < range_count; c++) {
r = range_list[c];
goto done;
goto done;
goto done;
found = true;
if (!found) {
goto done;
done:
return ret;
bool *_external_mapping)
*_rid = 0;
*_external_mapping = true;
&& r->secondary_base_rid == 0) {
*_external_mapping = false;
r->name);
return EINVAL;
*_rid = 0;
*_external_mapping = true;
*_rid = 0;
*_external_mapping = true;
*_external_mapping = false;
return EINVAL;
return EOK;
const char *dom_name,
const char *dom_sid_str,
bool allow_collisions)
size_t c;
return ENOMEM;
goto done;
for (c = 0; c < range_count; c++) {
goto done;
goto done;
done:
return ret;
const char *dom_name,
const char *dom_sid_str)
if (!idmap_ctx) {
goto done;
goto done;
goto done;
done:
return ret;