samba 2.2 and Forms
jimv at metrics.com
Sun Apr 1 20:14:59 GMT 2001
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
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
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 samba.org
Jim Vopni Software Metrics
jimv at metrics.com 450 Philips St
(519) 885-2458 x222 Waterloo Ont. N2L 5J2
More information about the samba-technical