From f70d1cfcc2dc972cad6d2bb8bd05bdf3bdd803fc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 28 Oct 2016 12:15:20 +0200 Subject: [PATCH] s3:libsmb: make use of cli_session_setup_anon() Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source3/libsmb/clidfs.c | 4 ++-- source3/libsmb/passchange.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index b8b55167b79..86a74ec874c 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -203,8 +203,8 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx, * try again with a null username. */ if (password[0] || !username[0] || get_cmdline_auth_info_use_kerberos(auth_info) || - !NT_STATUS_IS_OK(status = cli_session_setup(c, "", "", - lp_workgroup()))) { + !NT_STATUS_IS_OK(status = cli_session_setup_anon(c))) + { d_printf("session setup failed: %s\n", nt_errstr(status)); if (NT_STATUS_EQUAL(status, diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c index a7ae8d311fa..369457f4609 100644 --- a/source3/libsmb/passchange.c +++ b/source3/libsmb/passchange.c @@ -111,7 +111,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam * Thanks to for this fix. */ - result = cli_session_setup(cli, "", "", ""); + result = cli_session_setup_anon(cli); if (!NT_STATUS_IS_OK(result)) { if (asprintf(err_str, "machine %s rejected the session " -- 2.11.4.GIT