diff options
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb.h | 6 | ||||
-rw-r--r-- | src/db/sysdb_ops.c | 7 | ||||
-rw-r--r-- | src/db/sysdb_subdomains.c | 11 | ||||
-rw-r--r-- | src/db/sysdb_sudo.c | 2 |
4 files changed, 6 insertions, 20 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h index 9f9dd973..eab3ce07 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_gid(TALLOC_CTX *mem_ctx, - struct sss_domain_info *domain, - gid_t gid, - const char **attrs, - struct ldb_message **msg); errno_t sysdb_store_domgroup(struct sss_domain_info *domain, const char *name, gid_t gid, @@ -559,6 +554,7 @@ int sysdb_search_group_by_name(TALLOC_CTX *mem_ctx, int sysdb_search_group_by_gid(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, gid_t gid, const char **attrs, struct ldb_message **msg); diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 3f216d35..654aa2cf 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -381,6 +381,7 @@ done: int sysdb_search_group_by_gid(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, gid_t gid, const char **attrs, struct ldb_message **msg) @@ -399,7 +400,7 @@ int sysdb_search_group_by_gid(TALLOC_CTX *mem_ctx, } basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, - SYSDB_TMPL_GROUP_BASE, sysdb->domain->name); + SYSDB_TMPL_GROUP_BASE, domain->name); if (!basedn) { ret = ENOMEM; goto done; @@ -1308,7 +1309,7 @@ int sysdb_add_group(struct sysdb_ctx *sysdb, /* check no other groups with the same gid exist */ if (gid != 0) { - ret = sysdb_search_group_by_gid(tmp_ctx, sysdb, + ret = sysdb_search_group_by_gid(tmp_ctx, sysdb, domain, gid, NULL, &msg); if (ret != ENOENT) { if (ret == EOK) ret = EEXIST; @@ -2549,7 +2550,7 @@ int sysdb_delete_group(struct sysdb_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, + ret = sysdb_search_group_by_gid(tmp_ctx, sysdb, sysdb->domain, gid, NULL, &msg); } if (ret) { diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c index f98dbd29..ef6b0ad3 100644 --- a/src/db/sysdb_subdomains.c +++ b/src/db/sysdb_subdomains.c @@ -603,17 +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_gid(TALLOC_CTX *mem_ctx, - struct sss_domain_info *domain, - gid_t gid, - const char **attrs, - struct ldb_message **msg) -{ - CHECK_DOMAIN_INFO(domain); - - return sysdb_search_group_by_gid(mem_ctx, domain->sysdb, gid, attrs, msg); -} - errno_t sysdb_store_domgroup(struct sss_domain_info *domain, const char *name, gid_t gid, diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c index 43c17bd6..2e0738eb 100644 --- a/src/db/sysdb_sudo.c +++ b/src/db/sysdb_sudo.c @@ -378,7 +378,7 @@ sysdb_get_sudo_user_info(TALLOC_CTX *mem_ctx, const char *username, /* resolve primary group */ gid = ldb_msg_find_attr_as_uint64(msg, SYSDB_GIDNUM, 0); if (gid != 0) { - ret = sysdb_search_group_by_gid(tmp_ctx, sysdb, gid, + ret = sysdb_search_group_by_gid(tmp_ctx, sysdb, sysdb->domain, gid, group_attrs, &group_msg); if (ret == EOK) { primary_group = ldb_msg_find_attr_as_string(group_msg, SYSDB_NAME, |