1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-22 05:57:43 +03:00

s3: Lift the smbd_messaging_context from reload_services

This commit is contained in:
Volker Lendecke 2010-08-08 15:09:47 +02:00
parent 7c7ffb70fb
commit 39da717fe1
11 changed files with 22 additions and 22 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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;

View File

@ -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 {

View File

@ -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

View File

@ -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;

View File

@ -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();

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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 */