summaryrefslogtreecommitdiff
path: root/source3/smbd/server_reload.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-31s3-smbd provide struct smbd_server_connection * to conn_snum_usedAndrew Bartlett1-1/+5
This provides the 'sconn' parameter to this key functions, that is currently duplicated in dummysmbd.c, which causes duplicate symbol issues in the waf build. This has natrually caused a number of consequential changes across the codebase, includning not passing a messaging context into initial reload_services(): This causes problems because the global smbd_server_connection isn't yet set up, as there isn't a connection here, just the initial process. Andrew Bartlett
2011-03-30s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner1-1/+0
Guenther
2011-03-30s3-messages: only include messages.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-auth: smbd needs auth.hGünther Deschner1-0/+1
Guenther
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-02-22s3-printing: only include printing where really needed.Günther Deschner1-0/+1
Guenther
2011-02-22s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett1-8/+8
These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
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>