From: Volker Lendecke Date: Wed, 5 Jul 2023 14:38:32 +0000 (+0200) Subject: libsmb: Retry with OPEN_REPARSE_POINT on IO_REPARSE_TAG_NOT_HANDLED X-Git-Tag: tevent-0.16.0~1065 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0edab509206bb0d4aa3ccd87542181bac486207;p=thirdparty%2Fsamba.git libsmb: Retry with OPEN_REPARSE_POINT on IO_REPARSE_TAG_NOT_HANDLED 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index ad73e4a1041..59fdcccc98e 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -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