summaryrefslogtreecommitdiff
path: root/source4/smbd/rewrite.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-30 00:54:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:22 -0500
commit55d4d36993293fee914a009f1d8f05810e347f2b (patch)
tree587a9bafd1c8df901aad8766acb0fe9ef4c3d8c0 /source4/smbd/rewrite.c
parent5540449f1cd9d9a6efab59f2bf47be4e1487ffc2 (diff)
downloadsamba-55d4d36993293fee914a009f1d8f05810e347f2b.tar.gz
samba-55d4d36993293fee914a009f1d8f05810e347f2b.tar.bz2
samba-55d4d36993293fee914a009f1d8f05810e347f2b.zip
r5102: This is a major simplification of the logic for controlling top level
servers in smbd. The old code still contained a fairly bit of legacy from the time when smbd was only handling SMB connection. The new code gets rid of all of the smb_server specific code in smbd/, and creates a much simpler infrastructures for new server code. Major changes include: - simplified the process model code a lot. - got rid of the top level server and service structures completely. The top level context is now the event_context. This got rid of service.h and server.h completely (they were the most confusing parts of the old code) - added service_stream.[ch] for the helper functions that are specific to stream type services (services that handle streams, and use a logically separate process per connection) - got rid of the builtin idle_handler code in the service logic, as none of the servers were using it, and it can easily be handled by a server in future by adding its own timed_event to the event context. - fixed some major memory leaks in the rpc server code. - added registration of servers, rather than hard coding our list of possible servers. This allows for servers as modules in the future. - temporarily disabled the winbind code until I add the helper functions for that type of server - added error checking on service startup. If a configured server fails to startup then smbd doesn't startup. - cleaned up the command line handling in smbd, removing unused options (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e)
Diffstat (limited to 'source4/smbd/rewrite.c')
-rw-r--r--source4/smbd/rewrite.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/source4/smbd/rewrite.c b/source4/smbd/rewrite.c
deleted file mode 100644
index 7128a0ad0d..0000000000
--- a/source4/smbd/rewrite.c
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "includes.h"
-#include "dynconfig.h"
-
-
-/*
- * initialize an smb process. Guaranteed to be called only once per
- * smbd instance (so it can assume it is starting from scratch, and
- * delete temporary files etc)
- */
-void smbd_process_init(void)
-{
- /* possibly reload the services file. */
- reload_services(NULL, True);
-
- if (*lp_rootdir()) {
- if (sys_chroot(lp_rootdir()) == 0)
- DEBUG(2,("Changed root to %s\n", lp_rootdir()));
- }
-
- service_cleanup_tmp_files();
-}
-
-void init_subsystems(void)
-{
- /* Do *not* remove this, until you have removed
- * passdb/secrets.c, and proved that Samba still builds... */
-
- /* Setup the SECRETS subsystem */
- if (!secrets_init()) {
- exit(1);
- }
-
- smbd_init_subsystems;
-}
-
-/****************************************************************************
- Reload the services file.
-**************************************************************************/
-BOOL reload_services(struct smbsrv_connection *smb, BOOL test)
-{
- BOOL ret;
-
- if (lp_loaded()) {
- pstring fname;
- pstrcpy(fname,lp_configfile());
- if (file_exist(fname, NULL) &&
- !strcsequal(fname, dyn_CONFIGFILE)) {
- pstrcpy(dyn_CONFIGFILE, fname);
- test = False;
- }
- }
-
- reopen_logs();
-
- if (test && !lp_file_list_changed())
- return(True);
-
- ret = lp_load(dyn_CONFIGFILE, False, False, True);
-
- /* perhaps the config filename is now set */
- if (!test)
- reload_services(smb, True);
-
- reopen_logs();
-
- load_interfaces();
-
- return(ret);
-}
-