From 8d9e0547a864cee05ab36bc988300c0cfa986025 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 16 Nov 2012 20:25:42 +0000 Subject: Refactor the way subdomain accounts are saved The original sysdb code had a strong assumption that only users from one domain are saved in the databse, with the subdomain feature, we have changed reality, but have not adjusted all the code arund the sysdb calls to not rely on the original assumption. One of the side effects of this incongrunece is that currently group memberships do not return fully qualified names for subdomain users as they should. In oreder to fix this and other potential issues surrounding the violation of the original assumption, we need to fully qualify subdomain user names. By savin them fully qualified we do not risk aliasing local users and have group memberhips or other name based matching code mistake a domain user with subdomain usr or vice versa. --- src/db/sysdb.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/db/sysdb.h') diff --git a/src/db/sysdb.h b/src/db/sysdb.h index c701717f9..6bfe30664 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -437,6 +437,15 @@ errno_t sysdb_store_domgroup(struct sss_domain_info *domain, errno_t sysdb_delete_domgroup(struct sss_domain_info *domain, const char *name, gid_t gid); +int sysdb_subdom_getpwnam(TALLOC_CTX *mem_ctx, + struct sysdb_ctx *sysdb, + const char *name, + struct ldb_result **res); +int sysdb_subdom_getgrnam(TALLOC_CTX *mem_ctx, + struct sysdb_ctx *sysdb, + const char *name, + struct ldb_result **res); + errno_t sysdb_get_ranges(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, size_t *range_count, struct range_info ***range_list); -- cgit