On Mon, Nov 24, 2014 at 10:35:42PM +0100, Lukas Slebodnik wrote:
>>I don't think problem was in function sss_parse_name.
>>The problem is how it this function used (indirectly)
>>
>>sss_parse_name was called twice.
>>the 1st time with fully qualified user name user@domain.
>>and the 2nd time with extracted name(which was not fqdn) from 1st call.
>>
>>LS
>
>I disagree. You are right that the function was called twice,
>once with the FQDN and once with the extracted name. But the
>function sss_get_domain_name should not fail on simple check if
>the name has/has not domain part (and it uses sss_parse_name
>for this check). So the problem indeed was in the way
>sss_get_domain_name was behaving.
>
>I do not know when this check was added to this function,
>but it makes sense that the function should accept both
>FQDN and non-FQDN names (so the check makes sense).
>
How would you distiguish between two situations?
1st - the name is not fqdn
2nd - sss_parse_name was called twice
Why should the caller care about the difference?