summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 17:18:42 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:52:53 +0100
commit3187afe4aafa562f2a6747846181ac06d0659dff (patch)
treed39bd6c04a9c665c1752e3322d3367c9c3990edc /src
parent20d2466dbce2bb950813e3f739bc40b511020efb (diff)
downloadsssd-3187afe4aafa562f2a6747846181ac06d0659dff.tar.gz
sssd-3187afe4aafa562f2a6747846181ac06d0659dff.tar.bz2
sssd-3187afe4aafa562f2a6747846181ac06d0659dff.zip
Add domain argument to sysdb_set_netgroup_attr()
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_ops.c5
-rw-r--r--src/tests/sysdb-tests.c2
-rw-r--r--src/tools/sss_cache.c2
4 files changed, 6 insertions, 4 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index e96bc5a3..04f35e22 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -589,6 +589,7 @@ int sysdb_set_group_attr(struct sysdb_ctx *sysdb,
/* Replace netgroup attrs */
int sysdb_set_netgroup_attr(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
struct sysdb_attrs *attrs,
int mod_op);
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 80dd3e08..13eb46e5 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -619,6 +619,7 @@ done:
/* =Replace-Attributes-On-Netgroup=========================================== */
int sysdb_set_netgroup_attr(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
struct sysdb_attrs *attrs,
int mod_op)
@@ -632,7 +633,7 @@ int sysdb_set_netgroup_attr(struct sysdb_ctx *sysdb,
return ENOMEM;
}
- dn = sysdb_netgroup_dn(sysdb, tmp_ctx, sysdb->domain, name);
+ dn = sysdb_netgroup_dn(sysdb, tmp_ctx, domain, name);
if (!dn) {
ret = ENOMEM;
goto done;
@@ -1573,7 +1574,7 @@ int sysdb_add_netgroup(struct sysdb_ctx *sysdb,
(now + cache_timeout) : 0));
if (ret) goto done;
- ret = sysdb_set_netgroup_attr(sysdb, name, attrs, SYSDB_MOD_REP);
+ ret = sysdb_set_netgroup_attr(sysdb, sysdb->domain, name, attrs, SYSDB_MOD_REP);
if (missing) {
ret = sysdb_remove_attrs(sysdb, name,
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 25d5fc9c..fa9dbe0a 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -516,7 +516,7 @@ static int test_set_netgroup_attr(struct test_data *data)
return ret;
}
- ret = sysdb_set_netgroup_attr(data->ctx->sysdb,
+ ret = sysdb_set_netgroup_attr(data->ctx->sysdb, data->ctx->domain,
data->netgrname, attrs, SYSDB_MOD_REP);
return ret;
}
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
index 97657430..180ed02d 100644
--- a/src/tools/sss_cache.c
+++ b/src/tools/sss_cache.c
@@ -369,7 +369,7 @@ static errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
SYSDB_MOD_REP);
break;
case TYPE_NETGROUP:
- ret = sysdb_set_netgroup_attr(sysdb, name,
+ ret = sysdb_set_netgroup_attr(sysdb, domain, name,
sys_attrs, SYSDB_MOD_REP);
break;
case TYPE_SERVICE: