Printing in 2.2.1a

Juergen Hasch Hasch at
Sun Aug 12 15:16:33 GMT 2001

Am Dienstag, 7. August 2001 00:00 schrieb Gerald Carter:
> On Mon, 6 Aug 2001, Juergen Hasch wrote:
> > Am Montag, 6. August 2001 16:05 schrieb Gerald Carter:
> > > I'm working on adding a 'lanman printing only' parameter which would
> > > fail opens on the spoolss named pipe.  This would give us identical
> > > behavior to 2.0.x

I tested the new "disable spoolss" option and it gets my NT4 clients working again.

However, I would like to keep the new spoolss features introduced in Samba 2.2 and
still be able to print from NT 4 machines. At work all desktop computers are running 
Windows NT 4, slowly upgrading to Win2K. The driver download feature is just *nice*.

Printing from NT 4 to a Win2K machine  works. I traced the communication
with ethereal and it looks like (at least within my limited understanding) it's
using spoolss. I can see the NT 4 machine  requesting full printer access
(access_type=0xf000c) and Win2k treats this in a way the NT4 machine
is satisfied with.

I added the following patch to nt_printing.c/print_access_check:

	/* Check access */


	result = se_access_check(secdesc->sec, user, access_type,
				 &access_granted, &status);

	DEBUG(4, ("access check was %s\n", result ? "SUCCESS" : "FAILURE"));

/* PATCH: fallback if access_type is not PRINTER_ACCESS_USE */
	if ( !result && (access_type != PRINTER_ACCESS_USE)) {
		access_type = PRINTER_ACCESS_USE;
		result = se_access_check(secdesc->sec, user,access_type,&access_granted,&status);
		DEBUG(0, ("fallback access check was %s\n", result ? "SUCCESS" : "FAILURE"));
/* end of patch */

This makes printing work without problems, at least nobody at work complained any more :-)
I know you said you don't like this approach, but it looks like its working very well for me.
I am open to any other solution, I just believe downgrading all clients to lanman printing is not 
the best solution.


More information about the samba-technical mailing list