s3-auth Fix memory leak in security=share and force user =
Andrew Bartlett
abartlet at samba.org
Tue Feb 15 18:40:14 MST 2011
On Tue, 2011-02-15 at 17:32 -0800, Jeremy Allison wrote:
> On Wed, Feb 16, 2011 at 12:28:54PM +1100, Andrew Bartlett wrote:
> > On Wed, 2011-02-16 at 02:27 +0100, Jeremy Allison wrote:
> > > The branch, v3-6-test has been updated
> > > via 518f1a2 s3-auth Fix memory leak in security=share and force user =
> > > via 320e549 Merge branch 'v3-6-test' of ssh://git.samba.org/data/git/samba into v3-6-test
> > > via 25e21dc tdb: Fix a C++ warning
> > > from ccb3d5e s3-librpc: move server_id marshalling to own helper file.
> > >
> > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
> > >
> > >
> > > - Log -----------------------------------------------------------------
> > > commit 518f1a2a35920ebf43c29b163a5091a9d92b5264
> > > Author: Andrew Bartlett <abartlet at samba.org>
> > > Date: Fri Feb 11 11:34:56 2011 +1100
> > >
> > > s3-auth Fix memory leak in security=share and force user =
> > >
> > > In these cases, the server_info was not stolen onto a long term memory
> > > context, and so remained on the NULL context where it was created.
> > >
> > > Andrew Bartlett
> > >
> > > Autobuild-User: Andrew Bartlett <abartlet at samba.org>
> > > Autobuild-Date: Wed Feb 16 01:08:19 CET 2011 on sn-devel-104
> > > (cherry picked from commit 1354d3dc747344390302e3fd2a202ff372985a9c)
> >
> > Thanks for that. I suspect it may apply to earlier branches as well,
> > but I've not looked into the details yet.
>
> Yeah, made me start looking at the memory heirarchy in the auth code
> a little more closely. Unfortunately it's a mess :-(. Pre talloc_stackframe()
> code :-(.
Yeah, even the current code isn't great - the fact that
make_server_info() does an talloc on NULL is particularly bad - this is
a long-term structure, so there is always a correct context to put it
on. Once I get the changes in my s3-auth and s3-auth-rename branches
into the tree I hope to at least tidy up the talloc tree in master, to
avoid more surprises in future.
In short, the current code looks like a minimalist conversion to
talloc(), and I'll do what I can to finish that job.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
More information about the samba-technical
mailing list