Bug 1165093

Summary: nfs mount via symlinks cross the volume and comes back again to same will fai
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Jiffin <jthottan>
Component: gluster-nfsAssignee: Niels de Vos <ndevos>
Status: CLOSED WONTFIX QA Contact: storage-qa-internal <storage-qa-internal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.0CC: jthottan, ndevos, skoduri, vagarwal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Cause: The symbolic link which points path outside exported volume is treated as bad symlinks.So when a symlink goes out of the file system , we just stop resolving the symlink and returns an error, but if symlinks returns to exported volume again , right now we do not consider them. Consequence: The code haven't direct access to directories which is outside the file system. By this fix, code may get indirect access to outside of the exported volume. Workaround (if any): Need to resolve the symlink until the path pointed by the symlink completes. Result: The mount using symlink which crosses the file system boundary and comes again will work.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-29 12:19:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1164227    

Description Jiffin 2014-11-18 10:25:32 UTC
Description of problem:

NFS mount via symlinks crosses the volume(boundary of file system) and comes back again to same will fail where as in kernel nfs it works fine. 

For example,
Consider a volume test which contains,
1.)a directory dir
2.)symlink1 points to ../vol/dir
3.)symlink2 points to ../xyz/../vol/dir 

Mount fails for symlink1 and symlink2

Version-Release number of selected component (if applicable):
mainline

How reproducible:
always


Actual results:
Mount fails retuning access denied.

Expected results:
Mount should happen

Additional info:
Kernel nfs is resolving mount path correctly

Comment 2 Soumya Koduri 2016-01-29 12:19:38 UTC
In Gluster, symlinks cannot be resolved outside its namespace. So this is working as expected. Closing the bug.