diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-07 15:24:40 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-15 10:49:20 +0100 |
commit | b23539e420b9962ad3bfd8f305b9d5acf47e7efb (patch) | |
tree | 666dad57e8cc8c166eddd4b4ba5b865322fae309 /src/db | |
parent | a5a4e5b4836fdd693bab6e1c7f9d633d1440447d (diff) | |
download | sssd-b23539e420b9962ad3bfd8f305b9d5acf47e7efb.tar.gz sssd-b23539e420b9962ad3bfd8f305b9d5acf47e7efb.tar.bz2 sssd-b23539e420b9962ad3bfd8f305b9d5acf47e7efb.zip |
Add domain to sysdb_search_group_by_name()
Also remove unused sysdb_search_domgroup_by_name()
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb.h | 6 | ||||
-rw-r--r-- | src/db/sysdb_ops.c | 9 | ||||
-rw-r--r-- | src/db/sysdb_subdomains.c | 12 |
3 files changed, 6 insertions, 21 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h index 333c94ae..9f9dd973 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -400,11 +400,6 @@ errno_t sysdb_delete_domuser(struct sss_domain_info *domain, const char *name, uid_t uid); -errno_t sysdb_search_domgroup_by_name(TALLOC_CTX *mem_ctx, - struct sss_domain_info *domain, - const char *name, - const char **attrs, - struct ldb_message **msg); errno_t sysdb_search_domgroup_by_gid(TALLOC_CTX *mem_ctx, struct sss_domain_info *domain, gid_t gid, @@ -557,6 +552,7 @@ int sysdb_search_user_by_uid(TALLOC_CTX *mem_ctx, /* Search Group (by gid or name) */ int sysdb_search_group_by_name(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *name, const char **attrs, struct ldb_message **msg); diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 2e361ec8..3f216d35 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -337,6 +337,7 @@ done: int sysdb_search_group_by_name(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *name, const char **attrs, struct ldb_message **msg) @@ -353,7 +354,7 @@ int sysdb_search_group_by_name(TALLOC_CTX *mem_ctx, return ENOMEM; } - basedn = sysdb_group_dn(sysdb, tmp_ctx, sysdb->domain, name); + basedn = sysdb_group_dn(sysdb, tmp_ctx, domain, name); if (!basedn) { ret = ENOMEM; goto done; @@ -1120,7 +1121,7 @@ int sysdb_add_user(struct sysdb_ctx *sysdb, * Don't worry about users, if we try to add a user with the same * name the operation will fail */ - ret = sysdb_search_group_by_name(tmp_ctx, sysdb, + ret = sysdb_search_group_by_name(tmp_ctx, sysdb, domain, name, NULL, &msg); if (ret != ENOENT) { if (ret == EOK) ret = EEXIST; @@ -1785,7 +1786,7 @@ int sysdb_store_group(struct sysdb_ctx *sysdb, return ENOMEM; } - ret = sysdb_search_group_by_name(tmp_ctx, sysdb, + ret = sysdb_search_group_by_name(tmp_ctx, sysdb, sysdb->domain, name, src_attrs, &msg); if (ret && ret != ENOENT) { goto done; @@ -2545,7 +2546,7 @@ int sysdb_delete_group(struct sysdb_ctx *sysdb, } if (name) { - ret = sysdb_search_group_by_name(tmp_ctx, sysdb, + ret = sysdb_search_group_by_name(tmp_ctx, sysdb, sysdb->domain, name, NULL, &msg); } else { ret = sysdb_search_group_by_gid(tmp_ctx, sysdb, diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c index 5943c1d1..f98dbd29 100644 --- a/src/db/sysdb_subdomains.c +++ b/src/db/sysdb_subdomains.c @@ -603,18 +603,6 @@ errno_t sysdb_delete_domuser(struct sss_domain_info *domain, return sysdb_delete_user(domain->sysdb, name, uid); } -errno_t sysdb_search_domgroup_by_name(TALLOC_CTX *mem_ctx, - struct sss_domain_info *domain, - const char *name, - const char **attrs, - struct ldb_message **msg) -{ - CHECK_DOMAIN_INFO(domain); - - return sysdb_search_group_by_name(mem_ctx, domain->sysdb, - name, attrs, msg); -} - errno_t sysdb_search_domgroup_by_gid(TALLOC_CTX *mem_ctx, struct sss_domain_info *domain, gid_t gid, |