From 1280531a73db20a2df663daeda2aee44dd068d4c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 13 Jan 2021 14:00:56 +0100 Subject: [PATCH] s3:utils: Pass cli_credentials to connect_one() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- source3/utils/smbcacls.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 7452d8e692e..73e6230d46d 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -863,7 +863,7 @@ static int inherit(struct cli_state *cli, const char *filename, /***************************************************** Return a connection to a server. *******************************************************/ -static struct cli_state *connect_one(const struct user_auth_info *auth_info, +static struct cli_state *connect_one(struct cli_credentials *creds, const char *server, const char *share) { struct cli_state *c = NULL; @@ -873,7 +873,7 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info, nt_status = cli_full_connection_creds(&c, lp_netbios_name(), server, NULL, 0, share, "?????", - get_cmdline_auth_info_creds(auth_info), + creds, flags); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status))); @@ -1824,9 +1824,11 @@ int main(int argc, char *argv[]) *share = 0; share++; + creds = get_cmdline_auth_info_creds(popt_get_cmdline_auth_info()); + /* Make connection to server */ if (!test_args) { - cli = connect_one(popt_get_cmdline_auth_info(), server, share); + cli = connect_one(creds, server, share); if (!cli) { exit(EXIT_FAILED); } @@ -1845,8 +1847,6 @@ int main(int argc, char *argv[]) } } - creds = get_cmdline_auth_info_creds(popt_get_cmdline_auth_info()), - status = local_cli_resolve_path(frame, "", creds, -- 2.47.3