[ 
https://issues.apache.org/jira/browse/HADOOP-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645707#comment-13645707
 ] 

Omkar Vinit Joshi commented on HADOOP-9511:
-------------------------------------------

Thanks Vinod..

bq. forceSecureOpenForRead is public after the patch. Why? Only for testing? If 
so, add @VisibleForTesting otherwise the java comment needs to be fixed.
bq. Similarly for forceSecureOpenForRandomRead
Fixed. added @Private and @VisibleForTesting annotations. Also added the same 
annotations for the existing method "forceSecureOpenForRead"

bq. For openFSDataInputStream and forceSecureOpenFSDataInputStream, comment 
that it can only be a local FS path and the the FS also need to be local? May 
be even explicitly add checks? Best yet, we can just remove it from the API, 
use the static variable rawFilesystem, but add checks to the passed-in path to 
make sure it is a local FS path.
Added exists check in "openFSDataInputStream" but not in force method as it is 
only for testing. Not adding extra test case for this as this is obvious.

bq. testReadUnrestricted: For the newly added code, user/group should be null?

Fixed.




                
> Adding support for additional input streams (FSDataInputStream and 
> RandomAccessFile) in SecureIOUtils.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9511
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9511
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Omkar Vinit Joshi
>            Assignee: Omkar Vinit Joshi
>         Attachments: HADOOP-9511.20130426.patch, HADOOP-9511.20130429.patch
>
>
> At present we can only get secured InputStream. However we want other types 
> of input streams to avoid possible security attacks.
> YARN-578 needs this fix.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to