summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 17:24:07 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit2d66c2eee2e4364a52d5436b61759ef990108230 (patch)
tree0172ec34bb3775338eed05ab5f3ee5493f2f4321 /src/db
parent58fd3aa25c5292bc67432647ab7e5059439fcc6d (diff)
downloadsssd-2d66c2eee2e4364a52d5436b61759ef990108230.tar.gz
sssd-2d66c2eee2e4364a52d5436b61759ef990108230.tar.bz2
sssd-2d66c2eee2e4364a52d5436b61759ef990108230.zip
Pass domain to sysdb_get<pwu/grg><id() functions
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.h2
-rw-r--r--src/db/sysdb_search.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 0c15cc66..350bb8db 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -461,6 +461,7 @@ int sysdb_getpwnam(TALLOC_CTX *mem_ctx,
int sysdb_getpwuid(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
uid_t uid,
struct ldb_result **res);
@@ -476,6 +477,7 @@ int sysdb_getgrnam(TALLOC_CTX *mem_ctx,
int sysdb_getgrgid(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
gid_t gid,
struct ldb_result **res);
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 902a2637..03fef2ed 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -89,6 +89,7 @@ done:
int sysdb_getpwuid(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
uid_t uid,
struct ldb_result **_res)
{
@@ -105,7 +106,7 @@ int sysdb_getpwuid(TALLOC_CTX *mem_ctx,
}
base_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_TMPL_USER_BASE, sysdb->domain->name);
+ SYSDB_TMPL_USER_BASE, domain->name);
if (!base_dn) {
ret = ENOMEM;
goto done;
@@ -280,6 +281,7 @@ done:
int sysdb_getgrgid(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
gid_t gid,
struct ldb_result **_res)
{
@@ -299,11 +301,11 @@ int sysdb_getgrgid(TALLOC_CTX *mem_ctx,
if (sysdb->mpg) {
fmt_filter = SYSDB_GRGID_MPG_FILTER;
base_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_DOM_BASE, sysdb->domain->name);
+ SYSDB_DOM_BASE, domain->name);
} else {
fmt_filter = SYSDB_GRGID_FILTER;
base_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_TMPL_GROUP_BASE, sysdb->domain->name);
+ SYSDB_TMPL_GROUP_BASE, domain->name);
}
if (!base_dn) {
ret = ENOMEM;