[samba-tng] spoolss conversion is complete!

Luke Kenneth Casson Leighton lkcl at samba.org
Fri Jan 28 23:23:44 GMT 2000

... i didn't say it would work, though :)

jean-francois, if you need any "state" information, e.g a
connection_struct, then we're going  to have to do this:

1) move the printing code to using util_hnd.c

2) convert util_hnd.c to pass a mini-handle-api over, in the same style as
the nmbd/ UDP 137 call-back mechanism, except simpler (a lot simpler).

it's basically a void* and a (void)(free_struct)(void*) which you can
associate a Printer struct with it and also have it freed with a

3) put a connection_struct "get" and "set" function into

BUT, but but but, i don't think you really _want_ a connection_struct in
there.  why?

because the cnum is associated with the IPC$ share when you make an MSRPC
connection, _not_ the printer share!

so all the standard_sub() code that you expect to grab the printer-share
substitutions from instead used to grab from the IPC$ share instead, which
is set up from the [global] defaults!

on this basis, the first thing i did in samba-tng was to pass NULL as the
standard_sub crec parameter, because it has exactly the same functional
equivalent to what you were doing, anyway, plus i didn't have to think
about the horrible implications of trying to set up spoolssd
printer-shares the same way as the smbd spawned-process euugh.


More information about the samba-technical mailing list