summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 15:09:47 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 18:09:33 +0200
commit39da717fe1583308239278615ac44f8b910c50e3 (patch)
tree87c7d0f98236c0297cf1dbf8c3f43e66a58b9495
parent7c7ffb70fb53c8cedd388c016836d13107f28ac1 (diff)
downloadsamba-39da717fe1583308239278615ac44f8b910c50e3.tar.gz
samba-39da717fe1583308239278615ac44f8b910c50e3.tar.bz2
samba-39da717fe1583308239278615ac44f8b910c50e3.zip
s3: Lift the smbd_messaging_context from reload_services
-rw-r--r--source3/auth/auth_ntlmssp.c2
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
-rw-r--r--source3/smbd/negprot.c4
-rw-r--r--source3/smbd/process.c6
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/server.c4
-rw-r--r--source3/smbd/server_reload.c6
-rw-r--r--source3/smbd/sesssetup.c10
-rw-r--r--source3/smbd/smb2_sesssetup.c2
-rw-r--r--source3/torture/vfstest.c2
11 files changed, 22 insertions, 22 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index c212bb39d4..bc0e9d276a 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -122,7 +122,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
/* sub_set_smb_name checks for weird internally */
sub_set_smb_name(auth_ntlmssp_state->ntlmssp_state->user);
- reload_services(True);
+ reload_services(smbd_messaging_context(), True);
nt_status = make_user_info_map(&user_info,
auth_ntlmssp_state->ntlmssp_state->user,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 85ade8f800..83bc6525aa 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5756,7 +5756,7 @@ struct event_context *smbd_event_context(void);
struct messaging_context *smbd_messaging_context(void);
struct memcache *smbd_memcache(void);
void reload_printers(struct messaging_context *msg_ctx);
-bool reload_services(bool test);
+bool reload_services(struct messaging_context *msg_ctx, bool test);
void exit_server(const char *const explanation);
void exit_server_cleanly(const char *const explanation);
void exit_server_fault(void);
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index ac95486d56..a58786ce61 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -341,7 +341,7 @@ static WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token,
/* go ahead and re-read the services immediately */
become_root();
- reload_services(false);
+ reload_services(msg_ctx, false);
unbecome_root();
if ( lp_servicenumber( sharename ) > 0 )
@@ -5682,7 +5682,7 @@ static bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token,
/* reload our services immediately */
become_root();
- reload_services(false);
+ reload_services(msg_ctx, false);
unbecome_root();
numlines = 0;
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index e61d5198ac..9151d1baf1 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -667,7 +667,7 @@ void reply_negprot(struct smb_request *req)
}
/* possibly reload - change of architecture */
- reload_services(True);
+ reload_services(sconn->msg_ctx, True);
/* moved from the netbios session setup code since we don't have that
when the client connects to port 445. Of course there is a small
@@ -693,7 +693,7 @@ void reply_negprot(struct smb_request *req)
if(choice != -1) {
fstrcpy(remote_proto,supported_protocols[protocol].short_name);
- reload_services(True);
+ reload_services(sconn->msg_ctx, True);
supported_protocols[protocol].proto_reply_fn(req, choice);
DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
} else {
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 2715c676e6..8e97d4086f 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -912,7 +912,7 @@ static void smbd_sig_hup_handler(struct tevent_context *ev,
{
change_to_root_user();
DEBUG(1,("Reloading services after SIGHUP\n"));
- reload_services(False);
+ reload_services(smbd_messaging_context(), False);
}
void smbd_setup_sig_hup_handler(void)
@@ -2223,7 +2223,7 @@ void check_reload(time_t t)
}
if (t >= last_smb_conf_reload_time+SMBD_RELOAD_CHECK) {
- reload_services(True);
+ reload_services(smbd_messaging_context(), True);
last_smb_conf_reload_time = t;
}
@@ -2949,7 +2949,7 @@ void smbd_process(void)
/* this is needed so that we get decent entries
in smbstatus for port 445 connects */
set_remote_machine_name(remaddr, false);
- reload_services(true);
+ reload_services(smbd_server_conn->msg_ctx, true);
/*
* Before the first packet, check the global hosts allow/ hosts deny
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index ba4c90d552..ed6d3bc902 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -547,7 +547,7 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf)
add_session_user(sconn, get_remote_machine_name());
}
- reload_services(True);
+ reload_services(sconn->msg_ctx, True);
reopen_logs();
sconn->nbt.got_session = true;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 1b7059c2aa..d6877444fd 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -68,7 +68,7 @@ static void smb_conf_updated(struct messaging_context *msg,
DEBUG(10,("smb_conf_updated: Got message saying smb.conf was "
"updated. Reloading.\n"));
change_to_root_user();
- reload_services(False);
+ reload_services(smbd_messaging_context(), False);
}
@@ -952,7 +952,7 @@ extern void build_options(bool screen);
if (smbd_messaging_context() == NULL)
exit(1);
- if (!reload_services(False))
+ if (!reload_services(smbd_messaging_context(), False))
return(-1);
init_structs();
diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c
index b2b296454b..80e30c04b6 100644
--- a/source3/smbd/server_reload.c
+++ b/source3/smbd/server_reload.c
@@ -88,7 +88,7 @@ void reload_printers(struct messaging_context *msg_ctx)
Reload the services file.
**************************************************************************/
-bool reload_services(bool test)
+bool reload_services(struct messaging_context *msg_ctx, bool test)
{
bool ret;
@@ -110,11 +110,11 @@ bool reload_services(bool test)
ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
- reload_printers(smbd_messaging_context());
+ reload_printers(msg_ctx);
/* perhaps the config filename is now set */
if (!test)
- reload_services(True);
+ reload_services(msg_ctx, True);
reopen_logs();
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 35b8c04747..41fdc7d22f 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -468,7 +468,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
/* setup the string used by %U */
sub_set_smb_name( real_username );
- reload_services(True);
+ reload_services(sconn->msg_ctx, True);
if ( map_domainuser_to_guest ) {
make_server_info_guest(NULL, &server_info);
@@ -589,7 +589,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
ret = NT_STATUS_LOGON_FAILURE;
} else {
/* current_user_info is changed on new vuid */
- reload_services( True );
+ reload_services(sconn->msg_ctx, True);
SSVAL(req->outbuf, smb_vwv3, 0);
@@ -683,7 +683,7 @@ static void reply_spnego_ntlmssp(struct smb_request *req,
}
/* current_user_info is changed on new vuid */
- reload_services( True );
+ reload_services(sconn->msg_ctx, True);
SSVAL(req->outbuf, smb_vwv3, 0);
@@ -1695,7 +1695,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
sub_set_smb_name(sub_user);
- reload_services(True);
+ reload_services(sconn->msg_ctx, True);
if (lp_security() == SEC_SHARE) {
/* In share level we should ignore any passwords */
@@ -1848,7 +1848,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
}
/* current_user_info is changed on new vuid */
- reload_services( True );
+ reload_services(sconn->msg_ctx, True);
}
data_blob_free(&nt_resp);
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 8e8e26c2a3..3ca7ae7638 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -327,7 +327,7 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct smbd_smb2_session *session,
/* setup the string used by %U */
sub_set_smb_name(real_username);
- reload_services(true);
+ reload_services(smb2req->sconn->msg_ctx, true);
if (map_domainuser_to_guest) {
make_server_info_guest(session, &session->server_info);
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index 75feff83c3..99358de29b 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -468,7 +468,7 @@ int main(int argc, char *argv[])
poptFreeContext(pc);
/* TODO: check output */
- reload_services(False);
+ reload_services(smbd_messaging_context(), False);
/* the following functions are part of the Samba debugging
facilities. See lib/debug.c */