summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-05-10 18:19:12 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-30 13:44:35 +0200
commit1987bff88e01c74d647dd2db4f541ac311537e1a (patch)
tree5b74ee7f10bc033009a1822b69010b64b249c718 /src/providers
parentb36153ce4c3eeb19274ce32e82949da446184406 (diff)
downloadsssd-1987bff88e01c74d647dd2db4f541ac311537e1a.tar.gz
sssd-1987bff88e01c74d647dd2db4f541ac311537e1a.tar.xz
sssd-1987bff88e01c74d647dd2db4f541ac311537e1a.zip
Add utility functions for formatting fully-qualified names
Instead of using printf-like functions directly, provide two wrappers that would encapsulate formatting the fully-qualified names. No functional change is present in this patch.
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index 02a7bc229..f589a06fe 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -757,8 +757,8 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
}
/* we always use the fully qualified name for subdomain users */
- name = talloc_asprintf(state, state->dom->names->fq_fmt,
- attrs->a.user.pw_name, state->dom->name);
+ name = sss_tc_fqname(state, state->dom->names, state->dom,
+ attrs->a.user.pw_name);
if (!name) {
DEBUG(SSSDBG_OP_FAILURE, ("failed to format user name.\n"));
ret = ENOMEM;
@@ -822,8 +822,8 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
break;
case RESP_GROUP:
/* we always use the fully qualified name for subdomain users */
- name = talloc_asprintf(state, state->dom->names->fq_fmt,
- attrs->a.group.gr_name, state->dom->name);
+ name = sss_tc_fqname(state, state->dom->names, state->dom,
+ attrs->a.group.gr_name);
if (!name) {
DEBUG(SSSDBG_OP_FAILURE, ("failed to format user name,\n"));
ret = ENOMEM;