diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-07 20:10:42 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-15 10:53:01 +0100 |
commit | 99c0cfdc5f065ba38f1ee91701d1d27f9e4fdb96 (patch) | |
tree | 414ff429c11fbbc36b042286628f112f49871f69 /src/db | |
parent | 6ac396bebb4cd3124711d26dce54263f6f9c7c45 (diff) | |
download | sssd-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')
-rw-r--r-- | src/db/sysdb.h | 7 | ||||
-rw-r--r-- | src/db/sysdb_ops.c | 9 | ||||
-rw-r--r-- | src/db/sysdb_subdomains.c | 13 |
3 files changed, 6 insertions, 23 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h index 4e11fbe5..a3184bee 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -389,12 +389,6 @@ errno_t sysdb_delete_domuser(struct sss_domain_info *domain, const char *name, uid_t uid); -errno_t sysdb_store_domgroup(struct sss_domain_info *domain, - const char *name, - gid_t gid, - struct sysdb_attrs *attrs, - uint64_t cache_timeout, - time_t now); errno_t sysdb_delete_domgroup(struct sss_domain_info *domain, const char *name, gid_t gid); @@ -665,6 +659,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb, time_t now); int sysdb_store_group(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *name, gid_t gid, struct sysdb_attrs *attrs, 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) { diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c index 4a81b1df..6ec3e4f4 100644 --- a/src/db/sysdb_subdomains.c +++ b/src/db/sysdb_subdomains.c @@ -585,19 +585,6 @@ errno_t sysdb_delete_domuser(struct sss_domain_info *domain, return sysdb_delete_user(domain->sysdb, name, uid); } -errno_t sysdb_store_domgroup(struct sss_domain_info *domain, - const char *name, - gid_t gid, - struct sysdb_attrs *attrs, - uint64_t cache_timeout, - time_t now) -{ - CHECK_DOMAIN_INFO(domain); - - return sysdb_store_group(domain->sysdb, name, gid, attrs, cache_timeout, - now); -} - errno_t sysdb_delete_domgroup(struct sss_domain_info *domain, const char *name, gid_t gid) { |