[SSSD] [PATCH] gracefully handle mmap_cache calls when uninitialized

Michal Židek mzidek at redhat.com
Fri Dec 14 14:17:34 UTC 2012


On 12/14/2012 02:59 PM, Simo Sorce wrote:
> Failure to init the mmap_cache is a soft error, so just gracefully
> return a EINVAL error from public functions if the mc context is NULL
> and do not segfault.
>
> Fixes: https://fedorahosted.org/sssd/ticket/1716
>
> Simo.
>
>
>

Looks good to me. Tested with uninitialized mmap cache and worked fine.

But I have failed to find were we explicitly set the context of memory 
caches to NULL when not initialized properly. Maybe we should place it 
to nss_process_init to the "if (ret)" branch when memory cache 
initialization fails to make it more obvious.

If it is set to NULL explicitly somewhere else, than it is ACK, 
otherwise, please, add it to the nss_process_init and it will be ACK.

Thanks
Michal




More information about the sssd-devel mailing list