svn commit: samba r11705 - in branches/SAMBA_4_0/source/libnet: .

Stefan Metzmacher metze at samba.org
Sun Nov 13 13:12:56 GMT 2005


On Sat, Nov 12, 2005 at 09:44:42PM +0000, mimir at samba.org wrote:
> Fix segfaulting create user function.
> Changeset:
> Modified: branches/SAMBA_4_0/source/libnet/libnet_user.c
> ===================================================================
> --- branches/SAMBA_4_0/source/libnet/libnet_user.c	2005-11-12 18:22:12 UTC (rev 11704)
> +++ branches/SAMBA_4_0/source/libnet/libnet_user.c	2005-11-12 21:44:42 UTC (rev 11705)
> @@ -31,10 +31,14 @@
>  	struct libnet_Lookup fp;
>  	struct libnet_rpc_domain_open dom_io;
>  	struct libnet_rpc_useradd user_io;
> +	const char *address;
>  	
> +	address = talloc_array(mem_ctx, const char, 8);
> +
>  	/* find domain pdc */
>  	fp.in.hostname    = r->in.domain_name;
>  	fp.in.methods     = NULL;
> +	fp.out.address    = &address;
>  
>  	status = libnet_LookupPdc(ctx, mem_ctx, &fp);
>  	if (!NT_STATUS_IS_OK(status)) return status;

Hi Rafal,

can you explain that a bit more?

why an array of 8 characters? and why the caller need to set the out parameter?

metze


More information about the samba-technical mailing list