summaryrefslogtreecommitdiff
path: root/src/db
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/db
parentb36153ce4c3eeb19274ce32e82949da446184406 (diff)
downloadsssd-1987bff88e01c74d647dd2db4f541ac311537e1a.tar.gz
sssd-1987bff88e01c74d647dd2db4f541ac311537e1a.tar.bz2
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/db')
-rw-r--r--src/db/sysdb_search.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 843c746d..344ff6fa 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -57,8 +57,7 @@ int sysdb_getpwnam(TALLOC_CTX *mem_ctx,
* search as well by default */
if (IS_SUBDOMAIN(domain) && domain->fqnames) {
ret = ENOMEM;
- src_name = talloc_asprintf(tmp_ctx, domain->names->fq_fmt,
- name, domain->name);
+ src_name = sss_tc_fqname(tmp_ctx, domain->names, domain, name);
} else {
ret = EINVAL;
src_name = name;
@@ -245,8 +244,7 @@ int sysdb_getgrnam(TALLOC_CTX *mem_ctx,
* search as well by default */
if (IS_SUBDOMAIN(domain) && domain->fqnames) {
ret = ENOMEM;
- src_name = talloc_asprintf(tmp_ctx, domain->names->fq_fmt,
- name, domain->name);
+ src_name = sss_tc_fqname(tmp_ctx, domain->names, domain, name);
} else {
ret = EINVAL;
src_name = name;