The Samba-Bugzilla – Bug 7915
Removing the last cups printer fails, the deleted printer remains shared
Last modified: 2011-03-07 11:37:17 UTC
cups_async_callback() is called to receive new printcap data from a child
process which requests the information from cupsd.
Newly received printcap information is stored in a temporary printcap cache
(tmp_pcap_cache). Once the child process closes the printcap IPC file
descriptor, the system printcap cache is replaced with the newly populated
tmp_pcap_cache, however this only occurs if tmp_pcap_cache is non null (has at
least one printer).
If the printcap cache is empty, which is the case when cups is not exporting
any printers, the printcap cache is not replaced resulting in stale data.
The test script attached to bug 7836 can be used to reproduce this bug:
Start the script with no printers presented by cups.
The workaround is to ensure that cups is always exporting at least one printer.
The fix was previously sent to the samba-technical mailing list:
New version re-based against master, with variable name change. Patch attachment to follow.
The following changes since commit d7af8753abf7dfea6af334e2a6eb9e175127a139:
s3-waf: fix the build after rpc_winreg removal. (2011-01-14 11:38:40 +0100)
are available in the git repository at:
David Disseldorp (2):
s3-printing: remove unneeded local_pcap_copy global
s3-printing: fix cups pcap reload with no printers
source3/printing/print_cups.c | 86 +++++++++++++++++++----------------------
1 files changed, 40 insertions(+), 46 deletions(-)
Created attachment 6201 [details]
flag for review
I will look at this.
This is in master and v3-6-test.