FEATURE REQ: safe % expansion via new syntax

Luke Kenneth Casson Leighton lkcl at samba.org
Tue Feb 1 22:14:33 GMT 2000


> > no, that's not the case.  spoolssd calls nt_printing.c which calls
> > printing.c (remaps).
> > 
> > unfortunately, it takes a crec parameter which i have had to set to NULL
> 
> you mean a connection_struct.

urrr... yes, and it goes through some processing and you get an snum and
that gets a connection_rec to represent the service.
 
> > because the concept of a crec (representing a service section in smb.conf)
> > doesn't _exist_ in spoolssd, and even if it did, it would be the IPC$
> > share not the [printer-name] share!!!!
> 
> we can simulate here (there is no joke in that sentence :-) ).

i know.  it's just... not as simple as we would like, just thought i'd
point out what i think the discrepancy is.

 
> We have enough info in spoolss_openprinter_ex() to make a fake
> connection_struct.

if you manage to do that, i'll be impressed!

i have _some_ of the info associated with the actual handle, already, via
some of the struct cli_connection code.  have a look at
rpc_client/cli_connect.c.

for example, i have code that passes over a usr_sess_key which actually
comes from smbd over the MSRPC-loopback, but it originally came from
netlogond!!!  please don't ask me what contortions i had to go through to
get this.

_anyway_, check become_vuser() and how it's set up, and how the info is
stored.

to cut a long story short, i don't recommend you try and create a
connection_struct, but let's try and think up some alternative, simpler
scheme.

i tried really hard to cut connection_struct and as much smbd code away
from the msrpc daemons as much as possible.


> It makes me think I should do that and attach it to the
> PRINTER_HANDLE in openprinter_ex.

or something similar, yes.
 
> > brain-dead, huh?  it's the difference between NT-style printing and winXX
> > printing, and it's a pain.
> 
> not brain-dead. the spoolss is cool. DCE/RPC in NT was a good idea, the

yep!

you know we're becoming NT-advocates, you and me, both.

we're going to have to be careful!



More information about the samba-technical mailing list