summaryrefslogtreecommitdiff
path: root/src/db/sysdb_ops.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 20:10:42 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commit99c0cfdc5f065ba38f1ee91701d1d27f9e4fdb96 (patch)
tree414ff429c11fbbc36b042286628f112f49871f69 /src/db/sysdb_ops.c
parent6ac396bebb4cd3124711d26dce54263f6f9c7c45 (diff)
downloadsssd-99c0cfdc5f065ba38f1ee91701d1d27f9e4fdb96.tar.gz
sssd-99c0cfdc5f065ba38f1ee91701d1d27f9e4fdb96.tar.bz2
sssd-99c0cfdc5f065ba38f1ee91701d1d27f9e4fdb96.zip
Add domain argument to sysdb_store_group()
Also remove sysdb_store_domgroup()
Diffstat (limited to 'src/db/sysdb_ops.c')
-rw-r--r--src/db/sysdb_ops.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 61a0e77d..6d0d5acf 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1779,6 +1779,7 @@ fail:
/* this function does not check that all user members are actually present */
int sysdb_store_group(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
gid_t gid,
struct sysdb_attrs *attrs,
@@ -1797,7 +1798,7 @@ int sysdb_store_group(struct sysdb_ctx *sysdb,
return ENOMEM;
}
- ret = sysdb_search_group_by_name(tmp_ctx, sysdb, sysdb->domain,
+ ret = sysdb_search_group_by_name(tmp_ctx, sysdb, domain,
name, src_attrs, &msg);
if (ret && ret != ENOENT) {
goto done;
@@ -1824,7 +1825,7 @@ int sysdb_store_group(struct sysdb_ctx *sysdb,
if (new_group) {
/* group doesn't exist, turn into adding a group */
- ret = sysdb_add_group(sysdb, sysdb->domain, name, gid,
+ ret = sysdb_add_group(sysdb, domain, name, gid,
attrs, cache_timeout, now);
if (ret == EEXIST) {
/* This may be a group rename. If there is a group with the
@@ -1842,7 +1843,7 @@ int sysdb_store_group(struct sysdb_ctx *sysdb,
DEBUG(SSSDBG_MINOR_FAILURE,
("A group with the same GID [%llu] was removed from the "
"cache\n", (unsigned long long) gid));
- ret = sysdb_add_group(sysdb, sysdb->domain, name, gid,
+ ret = sysdb_add_group(sysdb, domain, name, gid,
attrs, cache_timeout, now);
}
goto done;
@@ -1862,7 +1863,7 @@ int sysdb_store_group(struct sysdb_ctx *sysdb,
(now + cache_timeout) : 0));
if (ret) goto done;
- ret = sysdb_set_group_attr(sysdb, sysdb->domain, name, attrs, SYSDB_MOD_REP);
+ ret = sysdb_set_group_attr(sysdb, domain, name, attrs, SYSDB_MOD_REP);
done:
if (ret) {