summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-05-10 18:19:12 +0200
committerSumit Bose <sbose@redhat.com>2013-05-23 17:55:44 +0200
commita1cbb3fefaa4f449dead983ee2e33e8afe5707b1 (patch)
tree09c3b8688023223cc17806e690e9945a4f7b6d8b /src/db
parent7c100872c56b3bc0bd820e600fefbcfedf179283 (diff)
downloadsssd-a1cbb3fefaa4f449dead983ee2e33e8afe5707b1.tar.gz
sssd-a1cbb3fefaa4f449dead983ee2e33e8afe5707b1.tar.xz
sssd-a1cbb3fefaa4f449dead983ee2e33e8afe5707b1.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 843c746d2..344ff6fae 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;