From: Volker Lendecke Date: Fri, 28 Feb 2020 10:18:00 +0000 (+0100) Subject: libsmb: Use posix open in SMBC_open_ctx X-Git-Tag: ldb-2.2.0~1522 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1856f07b39d4e8bc8f66cb49c7666b0d5ed99b8;p=thirdparty%2Fsamba.git libsmb: Use posix open in SMBC_open_ctx Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c index a1ae4584d15..512827e134d 100644 --- a/source3/libsmb/libsmb_file.c +++ b/source3/libsmb/libsmb_file.c @@ -125,8 +125,21 @@ SMBC_open_ctx(SMBCCTX *context, } /*d_printf(">>>open: resolved %s as %s\n", path, targetpath);*/ - status = cli_open(targetcli, targetpath, flags, - context->internal->share_mode, &fd); + if (srv->try_posixinfo) { + status = cli_posix_open( + targetcli, + targetpath, + flags, + mode, + &fd); + } else { + status = cli_open( + targetcli, + targetpath, + flags, + context->internal->share_mode, + &fd); + } if (!NT_STATUS_IS_OK(status)) { /* Handle the error ... */