diff options
author | 2024-09-12 14:05:42 +0200 | |
---|---|---|
committer | 2024-09-15 10:42:45 -0500 | |
commit | 89c601ab7cb3f520d59a653ddde2dfddd50986fb (patch) | |
tree | e409090a4f986ab62c421b5c5f6801873c6c40fc | |
parent | smb: client: compress: fix an "illegal accesses" issue (diff) | |
download | wireguard-linux-89c601ab7cb3f520d59a653ddde2dfddd50986fb.tar.xz wireguard-linux-89c601ab7cb3f520d59a653ddde2dfddd50986fb.zip |
cifs: Fix recognizing SFU symlinks
SFU symlinks have 8 byte prefix: "IntxLNK\1".
So check also the last 8th byte 0x01.
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r-- | fs/smb/client/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c index 73e2e6c230b7..7d424e769a56 100644 --- a/fs/smb/client/inode.c +++ b/fs/smb/client/inode.c @@ -612,7 +612,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path, cifs_dbg(FYI, "Socket\n"); fattr->cf_mode |= S_IFSOCK; fattr->cf_dtype = DT_SOCK; - } else if (memcmp("IntxLNK", pbuf, 7) == 0) { + } else if (memcmp("IntxLNK\1", pbuf, 8) == 0) { cifs_dbg(FYI, "Symlink\n"); fattr->cf_mode |= S_IFLNK; fattr->cf_dtype = DT_LNK; |