[ http://issues.apache.org/jira/browse/HADOOP-281?page=all ]

Wendy Chien updated HADOOP-281:
-------------------------------

    Attachment: addNode.patch
                TestDFSMkdirs.java

Hi Arun, 
I was simultaneously working on this bug and had a different fix.  Hairong and 
I think it would be simpler to check the path/parent is a directory in addNode 
(which is called by unprotectedMkdir which in turn is called by mkdirs).  I 
think the check in addNode is required regardless of mkdirs. 

I have attached my patch file along with test code for the change.  

Please look at it and let me know what you think.  

Thanks,
Wendy


> dfs.FSDirectory.mkdirs can create sub-directories of a file!
> ------------------------------------------------------------
>
>                 Key: HADOOP-281
>                 URL: http://issues.apache.org/jira/browse/HADOOP-281
>             Project: Hadoop
>          Issue Type: Bug
>    Affects Versions: 0.3.1
>            Reporter: Sameer Paranjpye
>             Fix For: 0.5.0
>
>         Attachments: addNode.patch, mkdirs.patch, TestDFSMkdirs.java
>
>
> dfs.FSDirectory.mkdirs will merrily adds children to a directory tree node 
> without checking whether it represents a directory. So it is possible to 
> create a subdirectories of a file.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to