Spoolss permissions, NT & XP print driver misery (2.2.2/2.2.3a/2.2.4pre)

Onime Clement onime at ictp.trieste.it
Thu Mar 21 06:07:14 GMT 2002



Attached is a patch to fix a problem with printing from Windows 9x
clients, especially when a driver is installed. Clients always got a
Permission denied error. The patch is against Samba 2.2.3a

Tracing the code with a a high log level gave the following log message
[2002/03/21 12:37:40, 3] printing/printing.c:print_job_start(862)
  print_job_start: job start denied by time check

The debug also showed:
[2002/03/21 12:37:40, 106] printing/nt_printing.c:dump_a_printer(2691)
  Dumping printer at level [2]
  attributes:[24]
  priority:[0]
  default_priority:[1417]
  starttime:[1075804048]
  untiltime:[1075804048]

Also:
	When adding drivers using the rpcclient ( sub command adddriver)
tool, in order to get driver downloads working for Windows 9x, I noticed
that the Config File Name must be replaced with the Driver File Name

Example from (cupsaddsmb):
adddriver "Windows 4.0" "generic:ADOBEPS4.DRV:generic.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"

Will generate an error when the client attempts to download the driver,
while
adddriver "Windows 4.0" "generic:ADOBEPS4.DRV:generic.PPD:ADOBEPS4.DRVADOBEPS4.HLP:PSMON.DLL:RAW:ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"

Works as expected!

The code should handle this,i.e if config file entry is null then try to
use the driver file entry..

Thanks
Clement Onime

-------------- next part --------------
--- source/printing/nt_printing.c.orig	Sun Feb  3 01:46:49 2002
+++ source/printing/nt_printing.c	Thu Mar 21 14:24:47 2002
@@ -1841,7 +1841,7 @@
 	
 	SAFE_FREE(info3);
 
-	return True;	
+	return True;
 }
 
 /****************************************************************************
@@ -3963,6 +3963,8 @@
 
 	if (mins >= printer->info_2->starttime && mins <= printer->info_2->untiltime)
 		ok = True;
+	if (mins <= printer->info_2->starttime && printer->info_2->starttime == printer->info_2->untiltime)
+		ok = True;
 
 	free_a_printer(&printer, 2);
 


More information about the samba-technical mailing list