svn commit: samba r22744 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

Jeremy Allison jra at samba.org
Mon May 7 19:43:37 GMT 2007


On Mon, May 07, 2007 at 01:39:26PM +0000, vlendec at samba.org wrote:
> Author: vlendec
> Date: 2007-05-07 13:39:25 +0000 (Mon, 07 May 2007)
> New Revision: 22744
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22744
> 
> Log:
> Fix a valgrind error. parse_domain_username does not necessarily fill in
> the domain.
> 
> 
> Modified:
>    branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
>    branches/SAMBA_3_0_25/source/nsswitch/winbindd_group.c
>    branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c
> 
> 
> Changeset:
> Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
> ===================================================================
> --- branches/SAMBA_3_0/source/nsswitch/winbindd_group.c	2007-05-07 13:32:34 UTC (rev 22743)
> +++ branches/SAMBA_3_0/source/nsswitch/winbindd_group.c	2007-05-07 13:39:25 UTC (rev 22744)
> @@ -494,6 +494,9 @@
>  	memset(name_group, 0, sizeof(fstring));
>  
>  	tmp = state->request.data.groupname;
> +
> +	name_domain[0] = '\0';
> +	name_group[0] = '\0';
>  	
>  	parse_domain_user(tmp, name_domain, name_group);

Wouldn't it be better to fix parse_domain_user to always
fill in a valid string for domain and group, even if it's
just [0] = '\0'' ?

Jeremy.


More information about the samba-technical mailing list