Commit ec686804 authored by Paulo Alcantara's avatar Paulo Alcantara Committed by Steve French

smb: client: ignore unhandled reparse tags

Just ignore reparse points that the client can't parse rather than
bailing out and not opening the file or directory.
Reported-by: default avatarMarc <1marc1@gmail.com>
Closes: https://lore.kernel.org/r/CAMHwNVv-B+Q6wa0FEXrAuzdchzcJRsPKDDRrNaYZJd6X-+iJzw@mail.gmail.com
Fixes: 539aad7f ("smb: client: introduce ->parse_reparse_point()")
Tested-by: default avatarAnthony Nandaa (Microsoft) <profnandaa@gmail.com>
Signed-off-by: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 15179cf2
...@@ -378,6 +378,8 @@ int parse_reparse_point(struct reparse_data_buffer *buf, ...@@ -378,6 +378,8 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
u32 plen, struct cifs_sb_info *cifs_sb, u32 plen, struct cifs_sb_info *cifs_sb,
bool unicode, struct cifs_open_info_data *data) bool unicode, struct cifs_open_info_data *data)
{ {
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
data->reparse.buf = buf; data->reparse.buf = buf;
/* See MS-FSCC 2.1.2 */ /* See MS-FSCC 2.1.2 */
...@@ -394,12 +396,13 @@ int parse_reparse_point(struct reparse_data_buffer *buf, ...@@ -394,12 +396,13 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
case IO_REPARSE_TAG_LX_FIFO: case IO_REPARSE_TAG_LX_FIFO:
case IO_REPARSE_TAG_LX_CHR: case IO_REPARSE_TAG_LX_CHR:
case IO_REPARSE_TAG_LX_BLK: case IO_REPARSE_TAG_LX_BLK:
return 0; break;
default: default:
cifs_dbg(VFS, "%s: unhandled reparse tag: 0x%08x\n", cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n",
__func__, le32_to_cpu(buf->ReparseTag)); le32_to_cpu(buf->ReparseTag));
return -EOPNOTSUPP; break;
} }
return 0;
} }
int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb, int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment