smbd: only reprocess printer_list.tdb if it changed
commit728e951923ab7a3f8a9e3dcf2179ef9132e668d1
authorDavid Disseldorp <ddiss@samba.org>
Wed, 23 Jul 2014 12:42:00 +0000 (23 14:42 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 1 Sep 2014 19:34:11 +0000 (1 21:34 +0200)
treee88235e6f1e0459bef3e6f437db0271ca6d13f97
parent5a647c5258f57c93563a4e962aa712221874bf2d
smbd: only reprocess printer_list.tdb if it changed

The per-client smbd printer share inventory is currently updated from
printer_list.tdb when a client enumerates printers, via EnumPrinters or
NetShareEnum.
printer_list.tdb is populated by the background print process, based on
the latest printcap values retrieved from the printing backend (e.g.
CUPS) at regular intervals.
This change ensures that per-client smbd processes don't reparse
printer_list.tdb if it hasn't been updated since the last enumeration.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Suggested-by: Volker Lendecke <vl@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit a2182e03a061de6c1f111ce083cb5f668fe75e4e)
source3/smbd/server_reload.c