svn commit: samba r13989 - in branches/SAMBA_3_0/source/rpc_parse: .

Jeremy Allison jra at samba.org
Wed Mar 8 16:24:53 GMT 2006


On Wed, Mar 08, 2006 at 09:55:13AM -0600, Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> jra at samba.org wrote:
> > Author: jra
> > Date: 2006-03-07 20:52:43 +0000 (Tue, 07 Mar 2006)
> > New Revision: 13989
> > 
> > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13989
> > 
> > Log:
> > Fix for Coverity bug #45 and associated spoolss RPC_BUFFER
> > problems. Ensure that if the parse succeeds on UNMARSHALL
> > we have a valid (although possibly empty) RPC_BUFFER returned.
> > Jeremy.
> 
> Jeremy, I think this is the wrong approach.  And yet just one more
> reason to move us to IDL.  The purpose of a RPC_BUFFER* in
> include/rpc_spoolss.h is that the pointer _should_ be NULL
> if the client did not send one.  Your patch changes the semantics.
> The srv_spoolss_nt.c implementation code should check for
> NULL pointers, not empty buffers.  This patch lies to the caller.

I agree about the IDL. I did consider fixing the callers, but
they all ended up in the same place so it seemed simpler
to fix the callee. Many of these buffers are [in,out] so
what should the semantics be if the caller doesn't send one ?

Fail with NT_STATUS_INVALID_PARAMETER ?

Jeremy.


More information about the samba-technical mailing list