[SSSD] [PATCH] Replace space: add some checks

Jakub Hrozek jhrozek at redhat.com
Tue Aug 26 13:56:50 UTC 2014


On Mon, Aug 25, 2014 at 06:27:01PM +0200, Sumit Bose wrote:
> Hi,
> 
> this patch adds some additional checks to the logic or replacing space
> with a different character. The idea is to not replace the space if we
> might run into trouble with the modified name and log an error.
> 
> As mentioned in the commit message if the original name already contains
> the replacement character the original name is used and if the input for
> the revers operation contains both space and the replacement character
> the input is returned unmodified as well. As an alternative it would be
> possible to return NULL and cause an error during the lookup. I think
> returning the unmodified name is more user friendly. The admin might
> wonder why the space is not replaced but at least the name is resolved.
> 
> With this patch a name like 'abc def_ghi' is return unmodified if the
> replacement character is '_' . But without the check 'abc_def_ghi' is
> returned which cannot be resolved back which might cause more trouble
> than the space in the name.
> 
> bye,
> Sumit


Did you consider shouting to syslog so that the failure is better
discoverable for the admin?



More information about the sssd-devel mailing list