[PATCH] fix crash in smb.conf processing

Alexander Bokovoy ab at samba.org
Mon Jan 25 05:53:20 UTC 2016


On Mon, 25 Jan 2016, Uri Simchoni wrote:
> 
> 
> On 01/22/2016 03:50 PM, Alexander Bokovoy wrote:
> >Hi,
> >
> >please review and push.
> >
> >The bug is pretty serious and as such is blocker for FreeIPA use of
> >Samba in Fedora 23 -- after commit
> >795c543d858b2452f062a02846c2f908fe4cffe4 smb.conf processing was
> >improved but nobody did test it for cases when config is re-read several
> >times like it happens with the registry backend for smb.conf.
> >
> >More details are in the commit message.
> >
> >If you want to test on Fedora 23, my COPR repository
> >https://copr.fedorainfracloud.org/coprs/abbra/samba-test/ has pre-built
> >packages.
> >
> It seems to me like even before commit
> 795c543d858b2452f062a02846c2f908fe4cffe4, the default string values were
> dangling pointers after free of the Globals.ctx, only none used them.
> Wouldn't it be simpler to hang them on a different talloc context?
> 
> It can be a context that either does not ever get freed, or gets freed only
> in lp_save_defaults() (along with  cleanup to param table, but one that does
> not have to ask about the ownership of the strings).
Since nothing else allocates/frees these, it is not worth to separate
the notion of contexts. We already have two contexts involved in the
processing of params...
-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list