>From <madhu.punj...@in.ibm.com>:
madhu.punj...@in.ibm.com has uploaded this change for review. (
https://review.gerrithub.io/394151
Change subject: Return ERR_FSAL_SYMLINK when trying to OPEN a SYMLINK
......................................................................
Return ERR_FSAL_SYMLINK when trying to OPEN a SYMLINK
Currently when NFS4 OPEN is done for SYMLINK the gpfs_open2()
proceeds to allocate an object for the SYMLINK object and sets
'u.symlink.link_content=NULL'. Later on the same object is used
by open_by_handle() which writes to 'u.file.share'. With this
both the 'u.symlink' structure and 'u.file' structure which are part
of the same union 'u' get used. This leads to a crash when the
handle is released by release() which tries to free() the
'u.symlink.link_content' as it is not NULL.
The NFS4 RFC says that a OPEN should not be done against a SYMLINK
and error NFS4ERR_SYMLINK should be returned.
Fixed the crash by having a check for SYMLINK prior to allocating
a new object in gpfs_open2(). If the object type is SYMLINK we return
error ERR_FSAL_SYMLINK.
Change-Id: Ice145ac41448778dc5f7d821271c1678e95e9eea
Signed-off-by: Madhu Thorat <madhu.punj...@in.ibm.com>
Reported-by: Ravi K Komanduri <rkoma...@in.ibm.com>
---
M src/FSAL/FSAL_GPFS/file.c
M src/support/nfs_convert.c
2 files changed, 22 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha
refs/changes/51/394151/1
--
To view, visit https://review.gerrithub.io/394151
To unsubscribe, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice145ac41448778dc5f7d821271c1678e95e9eea
Gerrit-Change-Number: 394151
Gerrit-PatchSet: 1
Gerrit-Owner: madhu.punj...@in.ibm.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel