diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-05-10 11:49:06 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-05-10 11:49:06 +0000 |
commit | e48b4ec4c5849992b04ed5d293d524779cb7a43a (patch) | |
tree | 796311e4a629e4eaadea149e1a734c5955765825 /source3/printing | |
parent | bbc16ef8da0bef525c5d5ba47b096f8771cfdb3b (diff) | |
download | samba-e48b4ec4c5849992b04ed5d293d524779cb7a43a.tar.gz samba-e48b4ec4c5849992b04ed5d293d524779cb7a43a.tar.xz samba-e48b4ec4c5849992b04ed5d293d524779cb7a43a.zip |
fail a print start on a deleted auto printer
(This used to be commit f1f92bf4da75ec6fccd34b07719d642196665258)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printing.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 95aa50fb431..b23dd3aa73e 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -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; |