svn commit: samba r20090 - in branches: SAMBA_3_0/source/auth SAMBA_3_0/source/groupdb SAMBA_3_0/source/lib SAMBA_3_0/source/nsswitch SAMBA_3_0/source/passdb SAMBA_3_0/source/rpcclient SAMBA_3_0/source/smbd SAMBA_3_0_24/source/auth SAMBA_3_0_24/source/groupdb SAMBA_3_0_24/source/lib SAMBA_3_0_24/source/nsswitch SAMBA_3_0_24/source/passdb SAMBA_3_0_24/source/rpcclient SAMBA_3_0_24/source/smbd

Jeremy Allison jra at samba.org
Sat Dec 9 23:52:04 GMT 2006


On Sat, Dec 09, 2006 at 03:13:10PM -0800, James Peach wrote:
> 
> Thanks Jeremy. One thing - in create_token_from_username, the gids  
> array can be allocated on either tmp_ctx or mem_ctx. tmp_ctx is  
> destroyed on exit, but mem_ctx is not, and can be the null context.  
> Do you need to explicity free gids?

The cases when create_token_from_username() is called with
the null context are both in smbd/service.c. In these cases
the allocated sids (not gids actually) array is assigned to
conn->nt_user_token, which is freed with TALLOC_FREE() in
conn_free() in smbd/conn.c.

Actually there is one talloced thing that should be freed,
and that's the "found_username" string. I'll fix this.

Jeremy.


More information about the samba-technical mailing list