1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:libsmb: Pass cli_credentials to get_ipc_connect_master_ip()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Andreas Schneider 2021-01-13 15:40:08 +01:00 committed by Volker Lendecke
parent be18d600f7
commit 78c4043a28
3 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,6 @@
#include "includes.h"
#include "libsmb/libsmb.h"
#include "libsmb/namequery.h"
#include "auth_info.h"
#include "../libcli/auth/libcli_auth.h"
#include "../libcli/auth/spnego.h"
#include "smb_krb5.h"
@ -3887,14 +3886,13 @@ struct cli_state *get_ipc_connect(char *server,
struct cli_state *get_ipc_connect_master_ip(TALLOC_CTX *ctx,
struct sockaddr_storage *mb_ip,
const struct user_auth_info *user_info,
struct cli_credentials *creds,
char **pp_workgroup_out)
{
char addr[INET6_ADDRSTRLEN];
fstring name;
struct cli_state *cli;
struct sockaddr_storage server_ss;
struct cli_credentials *creds = get_cmdline_auth_info_creds(user_info);
*pp_workgroup_out = NULL;

View File

@ -565,6 +565,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
struct sockaddr_storage *ip_list;
struct sockaddr_storage server_addr;
struct user_auth_info *u_info;
struct cli_credentials *creds = NULL;
NTSTATUS status;
if (share[0] != (char)0 || path[0] != (char)0) {
@ -596,6 +597,8 @@ SMBC_opendir_ctx(SMBCCTX *context,
set_cmdline_auth_info_username(u_info, user);
set_cmdline_auth_info_password(u_info, password);
creds = get_cmdline_auth_info_creds(u_info);
/*
* We have server and share and path empty but options
* requesting that we scan all master browsers for their list
@ -654,7 +657,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
cli = get_ipc_connect_master_ip(talloc_tos(),
&ip_list[i],
u_info,
creds,
&wg_ptr);
/* cli == NULL is the master browser refused to talk or
could not be found */

View File

@ -118,7 +118,7 @@ struct cli_state *get_ipc_connect(char *server,
struct cli_credentials *creds);
struct cli_state *get_ipc_connect_master_ip(TALLOC_CTX *ctx,
struct sockaddr_storage *mb_ip,
const struct user_auth_info *user_info,
struct cli_credentials *creds,
char **pp_workgroup_out);
/* The following definitions come from libsmb/clidfs.c */