diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-29 00:56:18 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-07 00:14:13 +0200 |
commit | 02d1cb8935d5c9b57cd05dfdbfe6ed38e0d61c28 (patch) | |
tree | 99eba160bfb608f08dc3f38e3524a3badff3ed67 /src/util/util.h | |
parent | c51f7a064b0d7ef86110bdeb6dc09fa6c08be7d3 (diff) | |
download | sssd-02d1cb8935d5c9b57cd05dfdbfe6ed38e0d61c28.tar.gz sssd-02d1cb8935d5c9b57cd05dfdbfe6ed38e0d61c28.tar.xz sssd-02d1cb8935d5c9b57cd05dfdbfe6ed38e0d61c28.zip |
New utility function sss_get_domain_name
Instead of copying a block of code that checks whether domain is a subdomain
and uses only name of FQDN as appropriate, wrap the logic into a function.
Diffstat (limited to 'src/util/util.h')
-rw-r--r-- | src/util/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/util.h b/src/util/util.h index e55c0b4d3..8ae85f4f1 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -390,6 +390,13 @@ size_t sss_fqdom_len(struct sss_names_ctx *nctx, struct sss_domain_info *domain); +/* Subdomains use fully qualified names in the cache while primary domains use + * just the name. Return either of these for a specified domain or subdomain + */ +char * +sss_get_domain_name(TALLOC_CTX *mem_ctx, const char *orig_name, + struct sss_domain_info *dom); + /* from backup-file.c */ int backup_file(const char *src, int dbglvl); |