Hi,
the attached patches add support for using flat name in the FQDN output
specifier.
The problem with this RFE was that the format is a printf-like format
specifier and backwards compatibility must be maintained. I used an idea
that originally came from Sumit to add a new expansion to the existing
name and domain ones. But in order to avoid compile-time warnings, I had
to make sure the format specifier and the arguments match 1:1 -- so the
code adds the unused format specifier and defaults the unused arguments
to "".
[PATCH 1/3] Add utility functions for formatting fully-qualified names
Instead of using printf-like functions directly, provide two wrappers
that would encapsulate formatting the fully-qualified names. No
functional change is present in this patch.
[PATCH 2/3] Check the validity of FQname format prior to using it
Adds a sanity check of the fqname pattern. Fails if the username pattern
is not specified at all and warns if the domain pattern is not
specified.
[PATCH 3/3] Allow flat name in the FQname format
https://fedorahosted.org/sssd/ticket/1648
Adds another expansion in the printf format that allows the user to use
the domain flat name in the format. Includes a unit test.