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

libgpo: gpo_copy_file() shouldn't explicitly call smb1

Don't call cli_openx directly to open a file this
calls smb1 code explicitly, which fails if we did
a multi-protocol negotiate and negotiated smb2+.
Use the higher level cli_open() instead.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
David Mulder 2018-04-11 12:40:18 -06:00 committed by Douglas Bagnall
parent 6747553d1b
commit 8e25e2f340

View File

@ -50,7 +50,7 @@ NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
int read_size = io_bufsize;
off_t nread = 0;
result = cli_openx(cli, nt_path, O_RDONLY, DENY_NONE, &fnum);
result = cli_open(cli, nt_path, O_RDONLY, DENY_NONE, &fnum);
if (!NT_STATUS_IS_OK(result)) {
goto out;
}