BUG in enumprinterdataex

Martin irezumi at gmx.de
Sun Feb 4 11:58:09 GMT 2007


Jeremy Allison wrote:
> On Sat, Feb 03, 2007 at 09:28:43AM +0100, Martin wrote:
>> Hi!
>> I certainly trapped vista again.
>> The proposed fix works with XP but not with Vista.
>> Easy to compare: Samba returns a buffer size of 1642 bytes.
>> -> XP offers a buffer of 1644 bytes.
>> -> Vista 1642 bytes.
>>
>> If we only align the buffer size (as in the proposed patch), we earn a 
>> 1783 error. It seems that the buffer size in the RPC *must* match the 
>> "needed" size in the message itself.
>>
>> So the better fix would be to align the "needed" var before the test
>> against the input size.
> 
> So you're saying round up needed to a 4 byte boundary before
> setting it in r_u->needed ?
> 
> I've attached a proposed fix - can you test it for me
> before Monday (I don't have my Vista test env set up
> at home yet).
> 
> Jeremy.
This is exactly what I did, after I received the error during printer 
installation from Samba with vista (with my first diff).
I can affirm, that

1) this works for the printer connection under Vista.
2) XP is able to enumerate the printer registry with this fix.


But I can do more testing not until I'm back at work on Monday. I've no 
private license of Vista.

Martin



More information about the samba-technical mailing list