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

Gerald (Jerry) Carter jerry at samba.org
Wed Mar 8 16:30:28 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Allison wrote:

>> 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 ?

Probably WERR_INSUFFIENT_BUFFER but we have to check the amount
of required space before we can really reply.  IIRC a NULL RPC_BUFFER*
is not an error.  Many of the Win32 spooler callers use this convention.
The spoolsrv.exe just gets in the way and tries to optimize by sending
an initial buffer that might be large enough in an effort to save a
round trip.






cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEDwakIR7qMdg1EfYRAm0zAKDWWj2q40Ph49FpAbxzE235ijn03ACgwa+W
B/3D6/8eCg/ehcohFCatNOg=
=B8S0
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list