[SSSD] [PATCH] NSS: replace with space with specified character in names.

Lukas Slebodnik lslebodn at redhat.com
Wed Aug 6 09:43:49 UTC 2014


On (06/08/14 11:05), Pavel Březina wrote:
>On 08/05/2014 03:56 PM, Jakub Hrozek wrote:
>>On Tue, Aug 05, 2014 at 03:39:11PM +0200, Lukas Slebodnik wrote:
>>>On (28/07/14 10:14), Simo Sorce wrote:
>>>>On Thu, 2014-07-24 at 21:18 +0200, Jakub Hrozek wrote:
>>>>>On Thu, Jul 24, 2014 at 03:20:45PM -0400, Dan Lavu wrote:
>>>>>>Was talking to Lukas about the name and came up with this suggestion,
>>>>>>so instead of "whitespaces_replacement_string" to "override_default_whitespace", thoughts?
>>>>>
>>>>>I like it!
>>>>>
>>>>>Dan, given you're a native speaker, would you mind taking a look at the
>>>>>changes to src/man/sssd.conf.5.xml ?
>>>>
>>>>whitespace_substitute would be shorter.
>>>>
>>>>Simo.
>>>>
>>>If others agree, we can rename this configuration option. sssd was not
>>>released officially with "override_default_whitespace" yet.
>>
>>I would prefer to first discuss if we should replace all whitespace or
>>just "space". See:
>>     https://fedorapeople.org/cgit/jhrozek/public_git/sssd.git/commit/?h=case
>>
>>I'm sorry I didn't catch this earlier, only when I started working on
>>extending the functionality to other responders.
>>
>>I personally favor safety and simplicity over functionality, so I think
>>it would be better to only replace space (as winbind does) to be able to
>>replace symetrically. I also realize the RFE talked about "whitespace"
>>but I believe that was a misunderstanding. I reached out to the original
>>reporter of the RFE for clarification..
>
>I agree with replacing only space, unless there's an RFE. If you ask me it
>wasn't really necessary to implement string as replacement, a character was
>enough
I was not sure about this. So I decided to write more general version.
We don't have valiadation of configuration options; the best solution will be
to update manual page and mention that just the 1st character will be used.

>I'm looking into the code right now... it doesn't seem to cope with an input
>that also contains the replacement character.
>To make it really reversible we
>should first search the input for the replacement character and replace it
>with an escape sequence.
There is a unit test, which test replacement spaces in string with space.

I don't think we need to escape it. Windbind does not have this character
configurable and they should escape replacement string in original string.
We can use different string(character).

>Sorry, I did not follow the whole thread so maybe it was already mentioned?
>
It is better to write comment after a commit then never :-)

LS



More information about the sssd-devel mailing list