Gross hack

Jeremy Allison jallison at cthulhu.engr.sgi.com
Thu Nov 19 22:34:28 GMT 1998


All,

	I have just committed a *GROSS* and *DISGUSTING*
hack to the SAMBA_2_0 branch that just might make things
easier for people adding printers from NT :-).

The problem :

Now that Samba 2.0 claims to support NT SMB requests,
then NT assumes that it supports *all* the NT semantics,
including the \\SPOOLSS pipe.

NT can still add printers from downlevel (Win95) printer servers
however, so there has to be a fallback mechanism in the
NT code. The problem was that with the 2.0 code NT wasn't
using that fallback mechanism and would always say "The
Printer Name is invalid" when trying to add a printer
from a Samba 2.0 server.

The real solution:
------------------
Jean-Francois needs to check in his \\SPOOLSS code
into the HEAD branch and we need to debug it :-).

The *GROSS* and *DISGUSTING* (ie. mine :-) solution :
-----------------------------------------------------
It turns out that if you turn off NT access to the
\\SRVSVC pipe for *just one open request* that NT
will fall back to using the old Lanman code that
we support.

The trick is failing the open at the right time :-).

I've now added code to do that in the 2.0 (and soon
the HEAD) cvs branches, and would be interested in
people testing this hack out to see if it's safe.

It works fine here, but I'd be happier with wider
testing.

Let me know how you go on (you can tell if you
have the new code by doing the following grep
from the source/ directory of the 2.0 branch) :

grep disgusting smbd/ipc.c
         * This is a *disgusting* hack.

Chees,

	Jeremy.

-- 
--------------------------------------------------------
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