]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Retry with OPEN_REPARSE_POINT on IO_REPARSE_TAG_NOT_HANDLED
authorVolker Lendecke <vl@samba.org>
Wed, 5 Jul 2023 14:38:32 +0000 (16:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 Aug 2023 13:40:31 +0000 (13:40 +0000)
Eventually we'll have to make STOPPED_ON_SYMLINK special to handle the
symlink response, but for now they are the same.

STOPPED_ON_SYMLINK will tell us where the symlink is,
REPARSE_TAG_NOT_HANDLED won't. So if there's an unhandled reparse
point somewhere in the path, there's no really good way to handle
this. We'll get the REPARSE_TAG_NOT_HANDLED the second time as
well. Even SMB1 QPATHINFO gets this when you try to cross a NFS
reparse point.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/cli_smb2_fnum.c

index ad73e4a10413f7688b81197a47a1c5a7d4a629f1..59fdcccc98e5c2da5664828ad2d48365d35af98f 100644 (file)
@@ -2025,7 +2025,8 @@ static void get_fnum_from_path_opened_file(struct tevent_req *subreq)
                subreq, &state->fnum, NULL, NULL, NULL, NULL);
        TALLOC_FREE(subreq);
 
-       if (NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK)) {
+       if (NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK) ||
+           NT_STATUS_EQUAL(status, NT_STATUS_IO_REPARSE_TAG_NOT_HANDLED)) {
                /*
                 * Naive option to match our SMB1 code. Assume the
                 * symlink path that tripped us up was the last