summaryrefslogtreecommitdiffstats
path: root/src/util/domain_info_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/domain_info_utils.c')
-rw-r--r--src/util/domain_info_utils.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c
index 88b322b41..3c33ad9da 100644
--- a/src/util/domain_info_utils.c
+++ b/src/util/domain_info_utils.c
@@ -670,78 +670,6 @@ done:
return ret;
}
-errno_t fix_domain_in_name_list(TALLOC_CTX *mem_ctx,
- struct sss_domain_info *dom,
- char **in, char ***_out)
-{
- int ret;
- size_t c;
- TALLOC_CTX *tmp_ctx;
- char **out;
- struct sss_domain_info *head;
- struct sss_domain_info *out_domain;
- char *in_name;
- char *in_domain;
-
- head = get_domains_head(dom);
-
- tmp_ctx = talloc_new(NULL);
- if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
- return ENOMEM;
- }
-
- /* count elements */
- for (c = 0; in[c] != NULL; c++);
-
- out = talloc_zero_array(tmp_ctx, char *, c + 1);
- if (out == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, "talloc_array failed.\n");
- ret = ENOMEM;
- goto done;
- }
-
- for (c = 0; in[c] != NULL; c++) {
- ret = sss_parse_name(tmp_ctx, head->names, in[c], &in_domain,
- &in_name);
- if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, "sss_parse_name failed for [%s].\n",
- in[c]);
- goto done;
- }
-
- if (in_domain == NULL) {
- out[c] = talloc_strdup(out, in_name);
- } else {
- out_domain = find_domain_by_name(head, in_domain, true);
- if (out_domain == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE,
- "Cannot find domain with name [%s].\n", in_domain);
- ret = EINVAL;
- goto done;
- }
-
- out[c] = sss_get_domain_name(out, in_name, out_domain);
- }
-
- if (out[c] == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, "%s failed.\n",
- in_domain == NULL ? "talloc_strdup" : "sss_tc_fqname");
- ret = ENOMEM;
- goto done;
- }
- }
-
- *_out = talloc_steal(mem_ctx, out);
-
- ret = EOK;
-
-done:
- talloc_free(tmp_ctx);
-
- return ret;
-}
-
enum sss_domain_state sss_domain_get_state(struct sss_domain_info *dom)
{
return dom->state;