linux/fs/cifs
Ronnie Sahlberg d3edede29f cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup()
Add checking for the path component length and verify it is <= the maximum
that the server advertizes via FileFsAttributeInformation.

With this patch cifs.ko will now return ENAMETOOLONG instead of ENOENT
when users to access an overlong path.

To test this, try to cd into a (non-existing) directory on a CIFS share
that has a too long name:
cd /mnt/aaaaaaaaaaaaaaa...

and it now should show a good error message from the shell:
bash: cd: /mnt/aaaaaaaaaaaaaaaa...aaaaaa: File name too long

rh bz 1153996

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Cc: <stable@vger.kernel.org>
2017-08-23 13:34:52 -05:00
..
Kconfig [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
Makefile [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
asn1.c
cache.c
cifs_debug.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
cifs_debug.h
cifs_dfs_ref.c CIFS: add build_path_from_dentry_optional_prefix() 2017-03-01 22:26:10 -06:00
cifs_fs_sb.h cifs: Convert to separately allocated bdi 2017-04-20 12:09:55 -06:00
cifs_ioctl.h
cifs_spnego.c
cifs_spnego.h
cifs_unicode.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
cifs_unicode.h [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
cifs_uniupr.h
cifsacl.c cifs: cifsacl: Use a temporary ops variable to reduce code length 2017-05-12 19:45:18 -05:00
cifsacl.h
cifsencrypt.c fs: cifs: replace CURRENT_TIME by other appropriate apis 2017-05-08 17:15:15 -07:00
cifsfs.c Add wait_for_random_bytes() and get_random_*_wait() functions so that 2017-07-15 12:44:02 -07:00
cifsfs.h Introduce cifs_copy_file_range() 2017-04-07 08:04:41 -05:00
cifsglob.h [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
cifspdu.h CIFS: move DFS response parsing out of SMB1 code 2017-03-01 22:26:10 -06:00
cifsproto.h [CIFS] Minor cleanup of xattr query function 2017-05-12 20:59:10 -05:00
cifssmb.c CIFS: Reconnect expired SMB sessions 2017-07-08 17:23:10 -05:00
connect.c [SMB3] Improve security, move default dialect to SMB3 from old CIFS 2017-07-08 18:59:42 -05:00
dir.c cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup() 2017-08-23 13:34:52 -05:00
dns_resolve.c
dns_resolve.h
export.c
file.c CIFS: fix circular locking dependency 2017-07-05 20:08:39 -05:00
fscache.c
fscache.h
inode.c sched/wait: Split out the wait_bit*() APIs from <linux/wait.h> into <linux/wait_bit.h> 2017-06-20 12:19:09 +02:00
ioctl.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
link.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
misc.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
netmisc.c cifs: small underflow in cnvrtDosUnixTm() 2017-05-02 14:57:34 -05:00
nterr.c
nterr.h
ntlmssp.h
readdir.c cifs: initialize file_info_lock 2017-01-14 14:58:29 -06:00
rfc1002pdu.h
sess.c smb2: Enforce sec= mount option 2017-03-02 23:13:37 -06:00
smb1ops.c CIFS: Improve readdir verbosity 2017-06-20 19:13:47 -05:00
smb2file.c CIFS: add use_ipc flag to SMB2_ioctl() 2017-03-01 22:26:11 -06:00
smb2glob.h CIFS: Separate SMB2 header structure 2017-02-01 16:46:34 -06:00
smb2inode.c
smb2maperror.c CIFS: Display SMB2 error codes in the hex format 2017-07-08 17:23:10 -05:00
smb2misc.c CIFS: fix oplock break deadlocks 2017-05-03 10:10:10 -05:00
smb2ops.c CIFS: Reconnect expired SMB sessions 2017-07-08 17:23:10 -05:00
smb2pdu.c cifs: Fix df output for users with quota limits 2017-08-23 13:33:21 -05:00
smb2pdu.h CIFS: implement get_dfs_refer for SMB2+ 2017-03-02 17:05:31 -06:00
smb2proto.h cifs: prototype declaration and definition to set acl for smb 2 - 3 and cifsacl mount options 2017-07-08 15:08:38 -05:00
smb2status.h
smb2transport.c CIFS: add CONFIG_CIFS_DEBUG_KEYS to dump encryption keys 2017-07-05 19:51:04 -05:00
smbencrypt.c cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack 2016-12-14 01:44:16 -06:00
smberr.h
smbfsctl.h
transport.c cifs: Do not modify mid entry after submitting I/O in cifs_call_async 2017-07-05 19:58:08 -05:00
winucase.c
xattr.c cifs: remove redundant return in cifs_creation_time_get 2017-06-20 19:14:40 -05:00