summaryrefslogtreecommitdiff
path: root/source3/smbd/server_reload.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-07s3-printing: Initiate pcap reload from parent smbdDavid Disseldorp1-2/+9
Since commit 7022554, smbds share a printcap cache (printer_list.tdb), therefore ordering of events between smbd processes is important when updating printcap cache information. Consider the following two process example: 1) smbd1 receives HUP or printcap cache time expiry 2) smbd1 checks whether pcap needs refresh, it does 3) smbd1 marks pcap as refreshed 4) smbd1 forks child1 to obtain cups printer info 5) smbd2 receives HUP or printcap cache time expiry 6) smbd2 checks whether pcap needs refresh, it does not (due to step 3) 7) smbd2 reloads printer shares prior to child1 completion (stale pcap) 8) child1 completion, pcap cache (printer_list.tdb) is updated by smbd1 9) smbd1 reloads printer shares based on new pcap information In this case both smbd1 and smbd2 are reliant on the pcap update performed on child1 completion. The prior commit "reload shares after pcap cache fill" ensures that smbd1 only reloads printer shares following pcap update, however smbd2 continues to present shares based on stale pcap data. This commit addresses the above problem by driving pcap cache and printer share updates from the parent smbd process. 1) smbd0 (parent) receives a HUP or printcap cache time expiry 2) smbd0 forks child0 to obtain cups printer info 3) child0 completion, pcap cache (printer_list.tdb) is updated by smbd0 4) smbd0 reloads printer shares 5) smbd0 notifies child smbds of pcap update via message_send_all() 6) child smbds read fresh pcap data and reload printer shares This architecture has the additional advantage that only a single process (the parent smbd) requests printer information from the printcap backend. Use time_mono in housekeeping functions As suggested by Björn Jacke.
2011-01-07s3-printing: reload shares after pcap cache fillDavid Disseldorp1-5/+8
Since commit eada8f8a, updates to the cups pcap cache are performed asynchronously - cups_cache_reload() forks a child process to request cups printer information and notify the parent smbd on completion. Currently printer shares are reloaded immediately following the call to cups_cache_reload(), this occurs prior to smbd receiving new cups pcap information from the child process. Such behaviour can result in stale print shares as outlined in bug 7836. This fix ensures print shares are only reloaded after new pcap data has been received. Pair-Programmed-With: Lars Müller <lars@samba.org>
2010-08-18s3: Lift smbd_server_fd from reload_services()Volker Lendecke1-5/+6
2010-08-13s3-smbd: Publish nt printers.Andreas Schneider1-1/+1
Reloading of the printers requires rpc services up and running! The first call in reload_services will be skipped. Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-08s3: Remove the smbd_messaging_context from load_printersVolker Lendecke1-1/+1
2010-08-08s3: Remove the smbd_messaging_context from pcap_cache_reloadVolker Lendecke1-1/+1
2010-08-08s3: Lift the smbd_messaging_context from reload_servicesVolker Lendecke1-3/+3
2010-08-08s3: Lift the smbd_messaging_context from reload_printersVolker Lendecke1-6/+6
2010-08-08s3: Lift the smbd_messaging_context from is_printer_publishedVolker Lendecke1-0/+1
2010-08-08s3: Lift the smbd_messaging_context from nt_printer_publishVolker Lendecke1-1/+3
2010-08-08s3: Lift the smbd_messaging_context from nt_printer_removeVolker Lendecke1-1/+2
2010-07-31s3-build: avoid to globally include printing and spoolss headers.Günther Deschner1-0/+1
This shrinks precompiled headers by 3MB and will slightly speed up any build. Guenther
2010-07-27s3-spoolss: Use winreg_delete_printer_key to delete printers.Simo Sorce1-1/+1
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Converted printer publishing functions.Simo Sorce1-3/+24
Use spoolss_PrintInfo2 and winreg calls. Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-05-28s3:smbd split reload services/printers functions from server.cAndrew Bartlett1-0/+109
This helps vfstest, as it previously had duplicate copies of these functions. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>