]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Use posix open in SMBC_open_ctx
authorVolker Lendecke <vl@samba.org>
Fri, 28 Feb 2020 10:18:00 +0000 (11:18 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 3 Mar 2020 17:48:38 +0000 (17:48 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/libsmb_file.c

index a1ae4584d151d8514a1e35fce2eee3562b334310..512827e134d4c7cc365f43b9fc2ea2a79cac69ad 100644 (file)
@@ -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 ... */