svn commit: samba r10705 - in branches/SAMBA_4_0/source/librpc/idl: .

tridge at samba.org tridge at samba.org
Tue Oct 4 01:43:25 GMT 2005


Author: tridge
Date: 2005-10-04 01:43:24 +0000 (Tue, 04 Oct 2005)
New Revision: 10705

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10705

Log:

fixed a crash bug in the getdcname irpc server for winbind. The
problem was that the return string was declared as:

	[out] astring dcname

which means "this is a non-NULL string". The server code sometimes
returned NULL however (on getdc lookup failure), which caused the NDR
marshalling code to crash. When you declare a non-pointer return value
you are promising that the value can never be NULL.

The trivial fix is to use:

	[out] astring *dcname

which leaves the API alone, but includes a pointer in the wire format,
which in turn means it is valid to send a NULL string as a response.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/irpc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/irpc.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/irpc.idl	2005-10-04 01:35:22 UTC (rev 10704)
+++ branches/SAMBA_4_0/source/librpc/idl/irpc.idl	2005-10-04 01:43:24 UTC (rev 10705)
@@ -59,7 +59,7 @@
 		[in] astring my_accountname,
 		[in] uint32 account_control,
 		[in,ref] dom_sid *domain_sid,
-		[out] astring dcname
+		[out] astring *dcname
 		);
 
 	/******************************************************



More information about the samba-cvs mailing list