[SSSD] [PATCH] Check NSCD configuration file

Jakub Hrozek jhrozek at redhat.com
Mon May 20 21:06:04 UTC 2013


On Mon, May 20, 2013 at 06:08:57PM +0200, Ondrej Kos wrote:
> After an off-list discussion, adding another patch which precedes the
> original one, and moves the src/tools/nscd.c file to src/util.
> 
> The actual patch for the config file parsing fixed accordingly to the list
> conversation.
> 
> Ondra

[PATCH 1/2] Move nscd.c from tools to util
Ack, but when you resend the patches, please amend the commit message to
say that we name the module differently now because starting from the
next patch it's going to include another function consumed by the
monitor. Maybe linking the monitor with this file could be moved to the
next patch.

[PATCH 2/2] Check NSCD configuration file
You forgot to implement one request I made:

You should do a NULL-check for entry and enabled. 
Otherwise you risk a crash if the line contained one part but not the
other.

For the "service" part you can either check here or just return 0 from
sss_nscd_check_service(), both are fine.

> +        if (!strcmp(entry, "enable-cache") &&
> +            !strcmp(enabled, "yes")) {
> +
> +            occured |= sss_nscd_check_service(service);
> +        }
> +    };



More information about the sssd-devel mailing list