summaryrefslogtreecommitdiffstats
path: root/source3/smbd/globals.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd/globals: remove unused msg_ctx_to_sconn()Stefan Metzmacher2011-12-151-13/+0
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Dec 15 14:24:59 CET 2011 on sn-devel-104
* s3:smbd: remove unused smbd_messaging_context()Stefan Metzmacher2011-12-141-10/+0
| | | | metze
* s3:smbd/server: maintain the list of child processes under smbd_parent_contextStefan Metzmacher2011-12-141-2/+0
| | | | metze
* s3:smbd/globals: change 'int am_parent' into 'struct smbd_parent_context ↵Stefan Metzmacher2011-12-141-1/+1
| | | | | | | | *am_parent' This is a short term solution on the way to get rid of 'am_parent' completely. metze
* s3: Move can_delete_directory to smbd/, remove shimVolker Lendecke2011-12-131-1/+0
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Dec 13 19:00:37 CET 2011 on sn-devel-104
* s3:smbd: remember the event context on smbd_server_connectionStefan Metzmacher2011-12-121-0/+1
| | | | metze
* s3-seal Remove struct smb_srv_trans_enc_ctxAndrew Bartlett2011-10-211-2/+2
| | | | | | | | | | | | | This structure added no value, particularly after the move to gensec. It was added at a time when auth_ntlmssp_state was not available in the client. This changed a while back (the wrapper was extended with client calls), and the move to gensec again reinforced that we do not need the extra complexity. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Fix some nonempty blank linesVolker Lendecke2011-08-101-1/+1
|
* s3-printing: Rework how the background process is startedSimo Sorce2011-08-101-0/+1
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3: Move deferred_open_queue to smbd_server_connectionVolker Lendecke2011-08-021-1/+0
|
* s3:smbd - Move printing queue stuffSimo Sorce2011-08-021-0/+1
| | | | | | | | This way we can properly deal with pcap updates in the background queue process if it is enabled (on by default) and not perform these actions in the main smbd process. Signed-off-by: Günther Deschner <gd@samba.org>
* s3-smbd: Remove obsolete smbd_set_server_fd().Andreas Schneider2011-07-041-29/+0
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-build: Provide a run-time shim to work around duplicate symbolsAndrew Bartlett2011-06-211-0/+16
| | | | | | | | | | | | | | | | The become_root() and similar 'smbd' functions that are used widely in Samba libraries had 'dummy' copies in dummysmbd.c and dummyroot.c. These have been replaced by a runtime plugin mechanim, which ensures that standlone binaries still do nothing, while in smbd the correct function is used. This avoids having these as duplicate symbols in the smbd binary, which can cause unpredictable behaviour. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* tdb_compat.h: divert every tdb build and includes to tdb_compatRusty Russell2011-06-201-1/+1
| | | | | | | | We change all the headers and wscript files to use tdb_compat; this means we have one place to decide whether to use TDB1 or TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett2011-05-311-1/+1
| | | | | | | | This has been a wrapper around server_event_context() for some time now, and removing this from dummmysmbd.c assists with library dependencies. Andrew Bartlett
* s3-smbd: expose smbd_set_server_fd()Andrew Tridgell2011-05-081-0/+29
| | | | | | | | | | this allows the fd to be setup by subsystems that want to use the s3 server core code Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun May 8 12:01:13 CEST 2011 on sn-devel-104
* s3: only include tdb headers where needed.Günther Deschner2011-05-061-0/+1
| | | | Guenther
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-globals: silence build warning in smbd_messaging_context().Günther Deschner2011-03-231-0/+1
| | | | Guenther
* s3-printing: Initiate pcap reload from parent smbdDavid Disseldorp2011-01-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Move error reporting of messaging context creation fail intoJeremy Allison2010-11-141-1/+5
| | | | | | | | the daemons themselves. Allows client utilities to silently fail to create a messaging context due to access denied on the messaging tdb (which I need for the following patch). Jeremy.
* s3: Add msg_ctx_to_sconnVolker Lendecke2010-10-031-0/+13
|
* s3: Remove some remaining files.c globals to sconnVolker Lendecke2010-09-281-14/+0
|
* s3: Move "Files" to smbd_server_connectionVolker Lendecke2010-09-281-1/+0
|
* s3: Remove "server_fd" global variableVolker Lendecke2010-09-281-1/+0
|
* s3-build: only include memcache.h where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3: Make char_flags and base_reverse const arraysVolker Lendecke2010-08-241-6/+0
| | | | | | | | This moves those arrays from dynamic to static, shared memory, removing them from globals.c. I did it by dumping the result of init_tables() with dump_data(). Some massage by an editor macro made it the initializer.
* s3: Move "trans_num" to smbd_server_connectionVolker Lendecke2010-08-241-1/+0
|
* Revert "Remove the global char *LastDir."Jeremy Allison2010-07-131-0/+1
| | | | | | | | | | | | Volker pointed out I'd missed the "last directory" cache part of this code. Return us to caching the directory we're in (reduces sys call load). Mea maxima culpa. Jeremy. This reverts commit 2f30aea3324f32f9b8555e961256fc1280da2871.
* s3:lib make server contexts genericSimo Sorce2010-06-101-16/+1
| | | | Pair-programmed-with: Andreas Schneider <asn@samba.org>
* Don't use the autofree context for the globals. This causes child smbd's forkedJeremy Allison2010-06-101-2/+12
| | | | | | | by modules to crash due to destructors being called (found when using the vfs_aio_fork module with smb2). Jeremy.
* s3-smbd: Remove unneeded dependency of map_username to globals.c.Andreas Schneider2010-06-041-3/+0
| | | | Reviewed-by: Simo Sorce <idra@samba.org>
* s3:smbd move messaging_context and memcache into globals.cAndrew Bartlett2010-05-281-0/+27
| | | | | | This helps vfstest, which previously had duplicate copies of these functions. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Be more forgiving on client oplock break failure (as Windows does). Remove a ↵Jeremy Allison2010-05-131-1/+0
| | | | | | global. Jeremy.
* Move the global blocking lock records into the smb1 state.Jeremy Allison2010-04-291-12/+0
| | | | Jeremy
* s3:smbd: add echo handler information to struct smbd_server_connectionStefan Metzmacher2010-03-221-0/+3
| | | | metze
* s3: Abstract access to sessionid.tdb, similar to conn_tdb.cVolker Lendecke2010-03-011-2/+0
|
* Remove the global char *LastDir.Jeremy Allison2010-01-121-1/+0
| | | | This is no longer used for anything.
* Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke2009-11-231-10/+0
| | | | This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
* s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke2009-11-211-0/+10
|
* We now pass the Microsoft SMB2 fileio test with EA's and streams...Jeremy Allison2009-09-171-1/+1
| | | | Jeremy.
* s3:smbd: move dptr globals into struct smbd_server_connectionStefan Metzmacher2009-08-071-4/+0
| | | | metze
* Move the initialization of smbd_server_conn from smbd/process,Jeremy Allison2009-07-171-0/+5
| | | | | | | | | | | | | | | | | | | | | after the accept and fork, to smbd_init_globals(), so it's done immediately on server startup. This is needed as some messages are sent to all active smbd processes (including the master listening daemon). If it gets a message that forces it to scan it's current connections (ie. conn_find()) then it discovers that sconn->smb1.tcons.Connections dereferences null (as sconn == NULL in the parent) and crashes. Yes, I could fix all cases where sconn is used and explicitly check for NULL but this fix is easier. It means that the smbd_event_context() is initialized in the master daemon and then re-initialized after fork, but that should be being done correctly in every fork call anyway. Without this change the previous fix 6a9e0039100b57f9626e87defec6720c476b9789 still panics in the reproducible test case for bug 6564, as this is one case where such a message (MSG_SMB_CONF_UPDATED) is sent to the parent. Metze please check. This change passes valgrind. Jeremy.
* s3:smbd: move global notify_changes_by_mid to smbd_server_connectionStefan Metzmacher2009-07-021-2/+0
| | | | metze
* s3:smbd: move tcon specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-5/+0
| | | | metze
* s3:smbd: move more session specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-12/+0
| | | | metze
* s3:smbd: move some session specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-8/+0
| | | | metze
* s3:smbd: move already_got_session to struct smbd_server_connectionStefan Metzmacher2009-06-031-2/+0
| | | | metze
* s3:smbd: move max_recv to struct smbd_server_connectionStefan Metzmacher2009-06-031-5/+0
| | | | metze