summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2016-07-05 15:16:42 +0200
committerSumit Bose <sbose@redhat.com>2016-07-06 20:45:39 +0200
commit31e86e284383594be9eb34a37c9d07296a50675d (patch)
tree71558535c6024b6a5bfc0770aa0ef0f5763731c5
parentf36b15d2b55e28a8aa5da501a34815d2ad52295b (diff)
downloadsssd-jhrozek_sysdb_fqdn.tar.gz
sssd-jhrozek_sysdb_fqdn.tar.xz
sssd-jhrozek_sysdb_fqdn.zip
expand name in ipa_add_ad_memberships_get_next()jhrozek_sysdb_fqdn
-rw-r--r--src/providers/ipa/ipa_subdomains_ext_groups.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_subdomains_ext_groups.c b/src/providers/ipa/ipa_subdomains_ext_groups.c
index 93ef1f4a1..ec05a828c 100644
--- a/src/providers/ipa/ipa_subdomains_ext_groups.c
+++ b/src/providers/ipa/ipa_subdomains_ext_groups.c
@@ -829,6 +829,8 @@ static void ipa_add_ad_memberships_get_next(struct tevent_req *req)
int ret;
const struct ldb_val *val;
bool missing_groups;
+ const char *fq_name;
+ char *tmp_str;
while (state->groups[state->iter] != NULL
&& state->groups[state->iter][0] == '\0') {
@@ -870,12 +872,22 @@ static void ipa_add_ad_memberships_get_next(struct tevent_req *req)
goto fail;
}
+ fq_name = (const char *) val->data;
+ if (strchr(fq_name, '@') == NULL) {
+ tmp_str = sss_create_internal_fqname(state, fq_name,
+ state->group_dom->name);
+ /* keep using val->data if sss_create_internal_fqname() fails */
+ if (tmp_str != NULL) {
+ fq_name = tmp_str;
+ }
+ }
+
/* TODO: here is would be useful for have a filter type like BE_FILTER_DN to
* directly fetch the group with the corresponding DN. */
subreq = groups_get_send(state, state->ev,
state->sdap_id_ctx, state->group_sdom,
state->sdap_id_ctx->conn,
- (const char *) val->data,
+ fq_name,
BE_FILTER_NAME, BE_ATTR_CORE,
false, false);
if (subreq == NULL) {