From e1f68731525116ce686ffcdc07ad3a14e4fb1cd7 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Mon, 2 Sep 2013 15:15:59 +0200 Subject: util: add find_subdomain_by_sid() This function takes domain SID (doesn't have the last component) or object SID (have all components) and returns subdomain. The subdomain is found by comparing domain->domainid with the SID. E.g. domain SID: S-1-5-21-3940105347-3434501867-2690409756 object SID: S-1-5-21-3940105347-3434501867-2690409756-513 Resolves: https://fedorahosted.org/sssd/ticket/2034 --- src/util/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util/util.h') diff --git a/src/util/util.h b/src/util/util.h index cae4a49a..3a1da2dc 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -546,6 +546,8 @@ struct sss_domain_info *get_next_domain(struct sss_domain_info *domain, struct sss_domain_info *find_subdomain_by_name(struct sss_domain_info *domain, const char *name, bool match_any); +struct sss_domain_info *find_subdomain_by_sid(struct sss_domain_info *domain, + const char *sid); bool subdomain_enumerates(struct sss_domain_info *parent, const char *sd_name); -- cgit