Alex Korobkin
2013-Feb-20 17:03 UTC
[Samba] What will happen if I disable reverse check for \\server\printer on samba?
Hi team, In Samba 3.6, rpc_server/spoolss/srv_spoolss_nt.c file has this stance at line 1740: /* some sanity check because you can open a printer or a print server */ /* aka: \\server\printer or \\server */ DEBUGADD(3,("checking name: %s\n", r->in.printername)); result = open_printer_hnd(p, r->out.handle, r->in.printername, 0); if (!W_ERROR_IS_OK(result)) { DEBUG(0,("_spoolss_OpenPrinterEx: Cannot open a printer handle " "for printer %s\n", r->in.printername)); ZERO_STRUCTP(r->out.handle); return result; } In my specific environment it causes a problem, because when client calls the cluster under its public name, Samba performs this reverse check from inside the cluster and connects to a different cluster instance, causing printer installation to fail. I know, it shouldn't be configured like that, but that won't be fixed soon. Could anything bad happen if I remove this check manually? -Alex
Jeremy Allison
2013-Feb-21 18:16 UTC
[Samba] What will happen if I disable reverse check for \\server\printer on samba?
On Wed, Feb 20, 2013 at 12:03:08PM -0500, Alex Korobkin wrote:> Hi team, > > In Samba 3.6, rpc_server/spoolss/srv_spoolss_nt.c file has this stance at > line 1740: > > /* some sanity check because you can open a printer or a print > server */ > /* aka: \\server\printer or \\server */ > > DEBUGADD(3,("checking name: %s\n", r->in.printername)); > > result = open_printer_hnd(p, r->out.handle, r->in.printername, 0); > if (!W_ERROR_IS_OK(result)) { > DEBUG(0,("_spoolss_OpenPrinterEx: Cannot open a printer handle " > "for printer %s\n", r->in.printername)); > ZERO_STRUCTP(r->out.handle); > return result; > } > > > In my specific environment it causes a problem, because when client calls > the cluster under its public name, Samba performs this reverse check from > inside the cluster and connects to a different cluster instance, causing > printer installation to fail. I know, it shouldn't be configured like that, > but that won't be fixed soon. > > Could anything bad happen if I remove this check manually?I don't think so. Jeremy.