diff options
author | Sumit Bose <sbose@redhat.com> | 2012-10-11 12:35:32 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-10-12 16:42:17 +0200 |
commit | 70eaade10feedd7845e39170d0b7eebf3a030af1 (patch) | |
tree | 5c78acb29cdbc356ec5621210400dbe3661a411e /src/providers/ipa/ipa_s2n_exop.c | |
parent | 1774ee9a61b9d691dadd1a0538f32bcdcc84f72f (diff) | |
download | sssd-70eaade10feedd7845e39170d0b7eebf3a030af1.tar.gz sssd-70eaade10feedd7845e39170d0b7eebf3a030af1.tar.xz sssd-70eaade10feedd7845e39170d0b7eebf3a030af1.zip |
Allow extdom exop to return flat domain name as well
There are case where the extdom extended operation will return the flat
or NetBIOS name of a domain instead of the DNS domain name. If this name
is available for the current domain we accept it as well.
Related to https://fedorahosted.org/sssd/ticket/1561
Diffstat (limited to 'src/providers/ipa/ipa_s2n_exop.c')
-rw-r--r-- | src/providers/ipa/ipa_s2n_exop.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c index 26cb0aad8..a96304d43 100644 --- a/src/providers/ipa/ipa_s2n_exop.c +++ b/src/providers/ipa/ipa_s2n_exop.c @@ -599,10 +599,14 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq) goto done; } - if (strcasecmp(state->dom->name, attrs->domain_name) != 0) { + if (!(strcasecmp(state->dom->name, attrs->domain_name) == 0 || + (state->dom->flat_name != NULL && + strcasecmp(state->dom->flat_name, attrs->domain_name) == 0))) { DEBUG(SSSDBG_OP_FAILURE, ("Unexpected domain name returned, " - "expected [%s], got [%s].\n", - state->dom->name, attrs->domain_name)); + "expected [%s] or [%s], got [%s].\n", + state->dom->name, + state->dom->flat_name == NULL ? "" : state->dom->flat_name, + attrs->domain_name)); ret = EINVAL; goto done; } |