summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 17:32:08 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit1826891a4869450994ae82adb60215ca564f9f4d (patch)
treea59bb3c354084842a558939f7d1c19e48b21a79b /src/db
parenta0593a02a5d2c7a8b4dda330a69fb1f10cc12cdb (diff)
downloadsssd-1826891a4869450994ae82adb60215ca564f9f4d.tar.gz
sssd-1826891a4869450994ae82adb60215ca564f9f4d.tar.bz2
sssd-1826891a4869450994ae82adb60215ca564f9f4d.zip
Add domain option to sysdb_get/netgr/attrs() fns
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 fa6c2735..151cd7f9 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -501,6 +501,7 @@ struct sysdb_netgroup_ctx {
errno_t sysdb_getnetgr(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *netgroup,
struct ldb_result **res);
@@ -517,6 +518,7 @@ int sysdb_get_user_attr(TALLOC_CTX *mem_ctx,
int sysdb_get_netgroup_attr(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *netgrname,
const char **attributes,
struct ldb_result **res);
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 4a279526..34379d48 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -782,6 +782,7 @@ done:
errno_t sysdb_getnetgr(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *netgroup,
struct ldb_result **res)
{
@@ -801,7 +802,7 @@ errno_t sysdb_getnetgr(TALLOC_CTX *mem_ctx,
base_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
SYSDB_TMPL_NETGROUP_BASE,
- sysdb->domain->name);
+ domain->name);
if (!base_dn) {
ret = ENOMEM;
goto done;
@@ -813,7 +814,7 @@ errno_t sysdb_getnetgr(TALLOC_CTX *mem_ctx,
}
netgroup_dn = talloc_asprintf(tmp_ctx, SYSDB_TMPL_NETGROUP,
- sanitized_netgroup, sysdb->domain->name);
+ sanitized_netgroup, domain->name);
if (!netgroup_dn) {
ret = ENOMEM;
goto done;
@@ -839,6 +840,7 @@ done:
int sysdb_get_netgroup_attr(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *netgrname,
const char **attributes,
struct ldb_result **res)
@@ -855,7 +857,7 @@ int sysdb_get_netgroup_attr(TALLOC_CTX *mem_ctx,
}
base_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_TMPL_NETGROUP_BASE, sysdb->domain->name);
+ SYSDB_TMPL_NETGROUP_BASE, domain->name);
if (!base_dn) {
ret = ENOMEM;
goto done;