[SSSD] [PATCH] LDAP: Prevent from using uninitialized sdap_options

Jakub Hrozek jhrozek at redhat.com
Thu Nov 14 18:46:11 UTC 2013


On Wed, Nov 13, 2013 at 03:06:48PM +0100, Jakub Hrozek wrote:
> On Wed, Nov 13, 2013 at 08:56:18AM +0100, Lukas Slebodnik wrote:
> > ehlo,
> > 
> > previously, variable "struct sdap_options *opts" was part of bectx
> > When ldap_get_options failed in time of ldap backend initialisation
> > sdap_options(ctx->opts) remained NULL.
> > 
> > After refactoring dcb44c39dda9699cdd6488fd116a51ced0687de3
> > "LDAP: sdap_id_ctx might contain several connections"
> > talloc_free can be called with uninitialised sdap_options opts
> > if initial call to ldap_get_options fail.
> > 
> > I didn't change done section because talloc_free can be safely
> > call with NULL pointer.
> > 
> > Simple patch is attached.
> > 
> > LS
> 
> ACK

Pushed to master and sssd-1-11



More information about the sssd-devel mailing list