summaryrefslogtreecommitdiffstats
path: root/server/infopipe/infopipe_groups.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-04-07 19:25:48 -0400
committerSimo Sorce <ssorce@redhat.com>2009-04-08 10:55:03 -0400
commit6b5d45693f01eec55128eb3508266cda73071d93 (patch)
treec51ca00f2fb243e5eaf06128e8092583fba1bd8c /server/infopipe/infopipe_groups.c
parente8a7526b06acf4af322fdab593c8bafbd9f4a103 (diff)
downloadsssd-6b5d45693f01eec55128eb3508266cda73071d93.tar.gz
sssd-6b5d45693f01eec55128eb3508266cda73071d93.tar.xz
sssd-6b5d45693f01eec55128eb3508266cda73071d93.zip
Change the way we retrieve domains
To be able to correctly filter out duplicate names when multiple non-fully qualified domains are in use we need to be able to specify the domains order. This is now accomplished by the configuration paramets 'domains' in the config/domains entry. 'domains' is a comma separated list of domain names. This paramter allows also to have disbaled domains in the configuration without requiring to completely delete them. The domains list is now kept in a linked list of sss_domain_info objects. The first domain is also the "default" domain.
Diffstat (limited to 'server/infopipe/infopipe_groups.c')
-rw-r--r--server/infopipe/infopipe_groups.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/server/infopipe/infopipe_groups.c b/server/infopipe/infopipe_groups.c
index 4b2c881c2..34e789581 100644
--- a/server/infopipe/infopipe_groups.c
+++ b/server/infopipe/infopipe_groups.c
@@ -150,9 +150,8 @@ int infp_groups_create(DBusMessage *message, struct sbus_conn_ctx *sconn)
}
grcreate_req->infp_req->domain =
- btreemap_get_value(grcreate_req->infp_req->infp->domain_map,
- (const void *)arg_domain);
- if(grcreate_req->infp_req->domain == NULL) {
+ infp_get_domain_obj(grcreate_req->infp_req->infp, arg_domain);
+ if (grcreate_req->infp_req->domain == NULL) {
einval_msg = talloc_strdup(grcreate_req, "Invalid domain.");
goto einval;
}
@@ -319,9 +318,8 @@ int infp_groups_delete(DBusMessage *message, struct sbus_conn_ctx *sconn)
}
grdel_req->infp_req->domain =
- btreemap_get_value(grdel_req->infp_req->infp->domain_map,
- (const void *)arg_domain);
- if(grdel_req->infp_req->domain == NULL) {
+ infp_get_domain_obj(grdel_req->infp_req->infp, arg_domain);
+ if (grdel_req->infp_req->domain == NULL) {
einval_msg = talloc_strdup(grdel_req, "Invalid domain.");
goto einval;
}
@@ -546,10 +544,9 @@ static int infp_groups_modify_members(DBusMessage *message,
}
grmod_req->infp_req->domain =
- btreemap_get_value(grmod_req->infp_req->infp->domain_map,
- (const void *)arg_domain);
+ infp_get_domain_obj(grmod_req->infp_req->infp, arg_domain);
/* Check for a valid domain */
- if(grmod_req->infp_req->domain == NULL) {
+ if (grmod_req->infp_req->domain == NULL) {
einval_msg = talloc_strdup(grmod_req, "Invalid domain.");
goto einval;
}
@@ -772,11 +769,9 @@ int infp_groups_set_gid(DBusMessage *message, struct sbus_conn_ctx *sconn)
}
grmod_req->infp_req->domain =
- btreemap_get_value(grmod_req->infp_req->infp->domain_map,
- (const void *)arg_domain);
-
+ infp_get_domain_obj(grmod_req->infp_req->infp, arg_domain);
/* Check for a valid domain */
- if(grmod_req->infp_req->domain == NULL) {
+ if (grmod_req->infp_req->domain == NULL) {
einval_msg = talloc_strdup(grmod_req, "Invalid domain.");
goto einval;
}