diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-10 18:19:12 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-30 13:44:35 +0200 |
commit | 1987bff88e01c74d647dd2db4f541ac311537e1a (patch) | |
tree | 5b74ee7f10bc033009a1822b69010b64b249c718 /src/responder/pac | |
parent | b36153ce4c3eeb19274ce32e82949da446184406 (diff) | |
download | sssd-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/responder/pac')
-rw-r--r-- | src/responder/pac/pacsrv_cmd.c | 4 | ||||
-rw-r--r-- | src/responder/pac/pacsrv_utils.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c index 2b6cd965..8f5617c7 100644 --- a/src/responder/pac/pacsrv_cmd.c +++ b/src/responder/pac/pacsrv_cmd.c @@ -204,8 +204,8 @@ static errno_t pac_add_user_next(struct pac_req_ctx *pr_ctx) /* this is a subdomain so we need to search for the fully qualified * name in the database */ - pr_ctx->fq_name = talloc_asprintf(pr_ctx, pr_ctx->dom->names->fq_fmt, - pr_ctx->user_name, pr_ctx->dom->name); + pr_ctx->fq_name= sss_tc_fqname(pr_ctx, pr_ctx->dom->names, + pr_ctx->dom, pr_ctx->user_name); if (!pr_ctx->fq_name) { ret = ENOMEM; DEBUG(SSSDBG_OP_FAILURE, ("talloc_sprintf failed.\n")); diff --git a/src/responder/pac/pacsrv_utils.c b/src/responder/pac/pacsrv_utils.c index cb480d3e..bcea640b 100644 --- a/src/responder/pac/pacsrv_utils.c +++ b/src/responder/pac/pacsrv_utils.c @@ -765,8 +765,7 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx, ret = ENOMEM; goto done; } - pwd->pw_name = talloc_asprintf(pwd, dom->names->fq_fmt, - lname, dom->name); + pwd->pw_name = sss_tc_fqname(pwd, dom->names, dom, lname); if (!pwd->pw_name) { DEBUG(SSSDBG_OP_FAILURE, ("talloc_sprintf failed.\n")); ret = ENOMEM; |