fail a print start on a deleted auto printer
authorAndrew Tridgell <tridge@samba.org>
Wed, 10 May 2000 11:49:06 +0000 (11:49 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 10 May 2000 11:49:06 +0000 (11:49 +0000)
(This used to be commit f1f92bf4da75ec6fccd34b07719d642196665258)

source3/printing/printing.c

index 95aa50fb431217dae87b1dc9086ac31c8d039e36..b23dd3aa73ebfcc4d5d29d0415f9cf8528bed343 100644 (file)
@@ -578,6 +578,12 @@ int print_job_start(int snum, char *jobname)
                }
        }
 
+       /* for autoloaded printers, check that the printcap entry still exists */
+       if (lp_autoloaded(snum) && !pcap_printername_ok(lp_servicename(snum), NULL)) {
+               errno = ENOENT;
+               return -1;
+       }
+
        /* create the database entry */
        ZERO_STRUCT(pjob);
        pjob.pid = local_pid;