samba 2.2 and Forms

Jeremy Allison jeremy at
Mon Apr 2 16:06:52 GMT 2001

Jim Vopni wrote:
> I was finally able to track down the reason I was having problems with the
> PCL5 Canon drivers. They were due to the fact that Samba only
> has one Form by default(Letter).
> The last thing the driver did before putting up an error message was an
> EnumForms (guess it didn't like the results)
> In looking at my W2K machine it has 118 built-in Forms.
> Once I added new forms to Samba I was able to finally use these drivers.
> (although I did not identify exactly which Form fixed the problem)
> I have put together a patch that does the following.
> 1.  Create a set of Forms that are "Built-in"  The flags for these are set
>         to 0x1 which makes the Delete/Save buttons grey out in the Windows
>         ServerProperties page. I have included all 118 defined on my
> machine.
>         These forms are not saved in the TDB file.
> 3.  Updates/Deletes of Built-in Forms are not allowed. Win2K gives an
>         Invalid Parameter error if you attempt to do this.
> Also in the patch are fixes for 2 other problems with the existing code.
> When deleting a Form the value was deleted from the TDB file but it ended up
> leaving a hole in list of nt_form_structs created by get_ntforms().  There
> was
> code that tried to put order back into the list but it assumed the largest
> sequence number was also the number of entries in the TDB file
> This would sometimes result in Explorer crashing.  By using built-in forms
> the order is no longer required.  The built-in ones are returned first by
> EnumForms which keeps Windows happy.
> In the code for "GetForm" if the form did not exist random memory would be
> returned to the client.
> I will post the patch to samba-patches at

*Excellent* work ! Thanks. Sorry I was too busy to get to
your problems directly, but thanks for solving them yourself :-) :-).

Please CC: me on the patches and I'll get them into 2.2 and
HEAD asap.

I would really like to get these in place before the next
alpha if that's an incentive :-) :-).



Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list