diff options
-rw-r--r-- | source4/utils/ntlm_auth.c | 18 | ||||
-rw-r--r-- | source4/winbind/wb_server.c | 8 | ||||
-rw-r--r-- | source4/wrepl_server/wrepl_in_connection.c | 6 | ||||
-rw-r--r-- | source4/wrepl_server/wrepl_server.c | 2 |
4 files changed, 21 insertions, 13 deletions
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c index bb9b5d89fa..20673775a5 100644 --- a/source4/utils/ntlm_auth.c +++ b/source4/utils/ntlm_auth.c @@ -58,18 +58,22 @@ enum stdio_helper_mode { typedef void (*stdio_helper_function)(enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **private2); static void manage_squid_basic_request (enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **private2); static void manage_gensec_request (enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **private2); static void manage_ntlm_server_1_request (enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **private2); @@ -241,6 +245,7 @@ static NTSTATUS local_pw_check_specified(struct loadparm_context *lp_ctx, } static void manage_squid_basic_request(enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **private2) { @@ -272,6 +277,7 @@ static void manage_squid_basic_request(enum stdio_helper_mode stdio_helper_mode, to the calling application. The callback comes from within gensec */ static void manage_gensec_get_pw_request(enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **password) { @@ -362,6 +368,7 @@ static void gensec_want_feature_list(struct gensec_security *state, char* featur } static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **private2) { @@ -692,6 +699,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, } static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mode, + struct loadparm_context *lp_ctx, char *buf, int length, void **private, unsigned int mux_id, void **private2) { @@ -712,7 +720,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod } else if (plaintext_password) { /* handle this request as plaintext */ if (!full_username) { - if (asprintf(&full_username, "%s%c%s", domain, *lp_winbind_separator(global_loadparm), username) == -1) { + if (asprintf(&full_username, "%s%c%s", domain, *lp_winbind_separator(lp_ctx), username) == -1) { mux_printf(mux_id, "Error: Out of memory in asprintf!\n.\n"); return; } @@ -747,7 +755,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod } if (!domain) { - domain = smb_xstrdup(lp_workgroup(global_loadparm)); + domain = smb_xstrdup(lp_workgroup(lp_ctx)); } if (ntlm_server_1_lm_session_key) @@ -757,10 +765,10 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod flags |= NTLM_AUTH_FLAG_USER_SESSION_KEY; if (!NT_STATUS_IS_OK( - local_pw_check_specified(global_loadparm, + local_pw_check_specified(lp_ctx, username, domain, - lp_netbios_name(global_loadparm), + lp_netbios_name(lp_ctx), &challenge, &lm_response, &nt_response, @@ -991,7 +999,7 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode, private = &normal_private; } - fn(helper_mode, c, length, private, mux_id, private2); + fn(helper_mode, global_loadparm, c, length, private, mux_id, private2); talloc_free(buf); } diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c index 6d002902d3..4225260774 100644 --- a/source4/winbind/wb_server.c +++ b/source4/winbind/wb_server.c @@ -129,7 +129,7 @@ static void winbind_task_init(struct task_server *task) } /* Make sure the directory for the Samba3 socket exists, and is of the correct permissions */ - if (!directory_create_or_exist(lp_winbindd_socket_directory(global_loadparm), geteuid(), 0755)) { + if (!directory_create_or_exist(lp_winbindd_socket_directory(task->lp_ctx), geteuid(), 0755)) { task_server_terminate(task, "Cannot create winbindd pipe directory"); return; @@ -140,7 +140,7 @@ static void winbind_task_init(struct task_server *task) service->task = task; service->primary_sid = secrets_get_domain_sid(service, - lp_workgroup(global_loadparm)); + lp_workgroup(task->lp_ctx)); if (service->primary_sid == NULL) { task_server_terminate( task, nt_errstr(NT_STATUS_CANT_ACCESS_DOMAIN_INFO)); @@ -151,7 +151,7 @@ static void winbind_task_init(struct task_server *task) listen_socket = talloc(service, struct wbsrv_listen_socket); if (!listen_socket) goto nomem; listen_socket->socket_path = talloc_asprintf(listen_socket, "%s/%s", - lp_winbindd_socket_directory(global_loadparm), + lp_winbindd_socket_directory(task->lp_ctx), WINBINDD_SAMBA3_SOCKET); if (!listen_socket->socket_path) goto nomem; listen_socket->service = service; @@ -166,7 +166,7 @@ static void winbind_task_init(struct task_server *task) listen_socket = talloc(service, struct wbsrv_listen_socket); if (!listen_socket) goto nomem; listen_socket->socket_path = - smbd_tmp_path(listen_socket, global_loadparm, + smbd_tmp_path(listen_socket, task->lp_ctx, WINBINDD_SAMBA3_PRIVILEGED_SOCKET); if (!listen_socket->socket_path) goto nomem; listen_socket->service = service; diff --git a/source4/wrepl_server/wrepl_in_connection.c b/source4/wrepl_server/wrepl_in_connection.c index d26c89d35d..65c8b6118f 100644 --- a/source4/wrepl_server/wrepl_in_connection.c +++ b/source4/wrepl_server/wrepl_in_connection.c @@ -258,7 +258,7 @@ NTSTATUS wreplsrv_in_connection_merge(struct wreplsrv_partner *partner, /* startup the wrepl port 42 server sockets */ -NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service) +NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadparm_context *lp_ctx) { NTSTATUS status; struct task_server *task = service->task; @@ -275,7 +275,7 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service) return NT_STATUS_INTERNAL_ERROR; } - if (lp_interfaces(global_loadparm) && lp_bind_interfaces_only(global_loadparm)) { + if (lp_interfaces(lp_ctx) && lp_bind_interfaces_only(lp_ctx)) { int num_interfaces = iface_count(); int i; @@ -294,7 +294,7 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service) } } } else { - address = lp_socket_address(global_loadparm); + address = lp_socket_address(lp_ctx); status = stream_setup_socket(task->event_ctx, model_ops, &wreplsrv_stream_ops, "ipv4", address, &port, service); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c index 91f0a4fb05..a5c8007285 100644 --- a/source4/wrepl_server/wrepl_server.c +++ b/source4/wrepl_server/wrepl_server.c @@ -477,7 +477,7 @@ static void wreplsrv_task_init(struct task_server *task) * setup listen sockets, so we can anwser requests from our partners, * which pull from us */ - status = wreplsrv_setup_sockets(service); + status = wreplsrv_setup_sockets(service, task->lp_ctx); if (!NT_STATUS_IS_OK(status)) { task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_sockets() failed"); return; |