Bug 15081 - The samba background daemon doesn't refresh the printcap cache on startup
Summary: The samba background daemon doesn't refresh the printcap cache on startup
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing (show other bugs)
Version: 4.16.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-30 15:32 UTC by Andreas Schneider
Modified: 2022-06-13 06:56 UTC (History)
3 users (show)

See Also:


Attachments
patch for 4.16 (2.32 KB, patch)
2022-06-07 08:30 UTC, Andreas Schneider
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2022-05-30 15:32:06 UTC
The samba background daemon doesn't refresh the printcap cache on startup. It only refreshes it after the 'printcap cache time' elapsed. So you have to wait 5 minutes before spoolssd is able to find printers, but till then the process is already killed again ...
Comment 1 Andreas Schneider 2022-05-30 15:36:18 UTC
Reproducer:

lpadmin -p testprinter -E -v /dev/null
smbpasswd -a root
bin/smbd
lpstat -l -p testprinter
rpcclient -Uroot localhost -c 'getprinter testprinter 2'
Comment 2 Samba QA Contact 2022-05-31 21:52:03 UTC
This bug was referenced in samba master:

3b5b80e99603e4c1d4d1080ed45bd75116a9fa8e
ac16351ff5a0c5b46f461c26516b85e8483bba83
Comment 3 Andreas Schneider 2022-06-07 08:30:27 UTC
Created attachment 17320 [details]
patch for 4.16
Comment 4 Jeremy Allison 2022-06-07 17:21:47 UTC
Re-assigning to Jule for inclusion in 4.16.next.
Comment 5 Jule Anger 2022-06-09 08:58:22 UTC
Pushed to autobuild-v4-16-test.
Comment 6 Samba QA Contact 2022-06-09 10:04:03 UTC
This bug was referenced in samba v4-16-test:

8507fa6fc7daa29746ed81578669070a32bd0427
1397656cebf2cdd00a28727ec8f4b65308106440
Comment 7 Jule Anger 2022-06-09 10:08:45 UTC
Closing out bug report.

Thanks!
Comment 8 Samba QA Contact 2022-06-13 06:56:26 UTC
This bug was referenced in samba v4-16-stable (Release samba-4.16.2):

8507fa6fc7daa29746ed81578669070a32bd0427
1397656cebf2cdd00a28727ec8f4b65308106440