symlink: limit symlink depth to avoid following cyclical links

/* msdn: There is a maximum of 31 reparse points (and
 * therefore symbolic links) allowed in a particular path. */
#define NFS41_MAX_SYMLINK_DEPTH     31

also added checks for the return value of nfs41_symlink_target() on open/link/rename

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-10-15 16:08:16 -04:00 committed by unknown
parent 59526ba9d8
commit 870b389e8f
4 changed files with 41 additions and 0 deletions

View file

@ -55,6 +55,10 @@
/* "udp" "tcp" "udp6" "tcp6" */
#define NFS41_NETWORK_ID_LEN 4
/* msdn: There is a maximum of 31 reparse points (and
* therefore symbolic links) allowed in a particular path. */
#define NFS41_MAX_SYMLINK_DEPTH 31
/* 424 bytes: max rpc header for reply with data */
/* 32 bytes: max COMPOUND response */