domain_info_utils.c revision 58dd26b1c5b60ee992dd5d1214bb168aebb42d54
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive Sumit Bose <sbose@redhat.com>
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive Copyright (C) 2012 Red Hat
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive This program is free software; you can redistribute it and/or modify
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive it under the terms of the GNU General Public License as published by
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars the Free Software Foundation; either version 3 of the License, or
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars (at your option) any later version.
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive This program is distributed in the hope that it will be useful,
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive but WITHOUT ANY WARRANTY; without even the implied warranty of
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6cced120094ad0ee645247fbcdbac5dae2f5da98slive GNU General Public License for more details.
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive You should have received a copy of the GNU General Public License
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive along with this program. If not, see <http://www.gnu.org/licenses/>.
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive/* the directory domain - realm mappings are written to */
a27e9e05958bc51ea09edb8d8d862fe8b125313bslivestruct sss_domain_info *get_next_domain(struct sss_domain_info *domain,
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars } else if (descend && IS_SUBDOMAIN(dom) && dom->parent->next) {
a27e9e05958bc51ea09edb8d8d862fe8b125313bslivestruct sss_domain_info *find_subdomain_by_name(struct sss_domain_info *domain,
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive const char *name,
a27e9e05958bc51ea09edb8d8d862fe8b125313bslivestruct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx,
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive const char *name,
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive const char *realm,
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars const char *flat_name,
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive const char *id)
a27e9e05958bc51ea09edb8d8d862fe8b125313bslive ("Creating [%s] as subdomain of [%s]!\n", name, parent->name));
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars DEBUG(SSSDBG_OP_FAILURE, ("Failed to copy domain name.\n"));
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars DEBUG(SSSDBG_OP_FAILURE, ("Failed to copy provider name.\n"));
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars dom->conn_name = talloc_strdup(dom, parent->conn_name);
f6d0bff0e95a7e6dd97f871582a1f091477c45c9lars DEBUG(SSSDBG_OP_FAILURE, ("Failed to copy connection name.\n"));
222f0f03c2f9ee6343c18f80f0cb6e9aad21bc58slive DEBUG(SSSDBG_OP_FAILURE, ("Failed to copy realm name.\n"));
222f0f03c2f9ee6343c18f80f0cb6e9aad21bc58slive DEBUG(SSSDBG_OP_FAILURE, ("Failed to copy flat name.\n"));
222f0f03c2f9ee6343c18f80f0cb6e9aad21bc58slive /* FIXME: get ranges from the server */
1f2a7403f1389cbf2da0a53a2b2fb425dea75506erikabele dom->pwd_expiration_warning = parent->pwd_expiration_warning;
1f2a7403f1389cbf2da0a53a2b2fb425dea75506erikabele dom->cache_credentials = parent->cache_credentials;
1f2a7403f1389cbf2da0a53a2b2fb425dea75506erikabele dom->subdomain_homedir = parent->subdomain_homedir;
1f2a7403f1389cbf2da0a53a2b2fb425dea75506erikabele DEBUG(SSSDBG_OP_FAILURE, ("Missing sysdb context in parent domain.\n"));
const char *domain_name,
const char *db_path,
int ret;
return ret;
return EEXIST;
return ret;
return EOK;
static errno_t
sss_krb5_touch_config(void)
return ret;
return EOK;
const char *mapping_file;
char *sanitized_domain;
return EINVAL;
return ENOMEM;
if (!mapping_file) {
goto done;
goto done;
if (fd < 0) {
goto done;
if (!fstream) {
if (ret != 0) {
goto done;
if (ret < 0) {
goto done;
if (ret < 0) {
goto done;
if (ret != 0) {
goto done;
goto done;
goto done;
done:
"of krb5.conf. Created mappings may not be loaded.\n"));
if (fstream) {
if (err != 0) {
if (tmp_file) {
if (err < 0) {
return ret;