#11799 NORM 1.75-fi: ext2 filesystem non-unique directories can be created

Zarro Boogs per Child bugtracker at laptop.org
Sun Apr 22 23:53:41 EDT 2012


#11799: ext2 filesystem non-unique directories can be created
---------------------------------+------------------------------------------
 Reporter:  Quozl                |                 Owner:  wmb at firmworks.com   
     Type:  defect               |                Status:  new                 
 Priority:  normal               |             Milestone:  1.75-firmware       
Component:  ofw - open firmware  |               Version:  Development firmware
 Keywords:                       |           Next_action:  code                
 Verified:  0                    |   Deployment_affected:                      
Blockedby:                       |              Blocking:                      
---------------------------------+------------------------------------------
 It is possible to create multiple directories of the same name on an ext2
 filesystem.  Probably also ext3 and ext4.

 $mkdir should do an early successful exit if the directory already exists
 rather than create a duplicate.

 XO-1.75 Q4D10

 Reproducer:
 {{{
 ok mkdir int:\test
 ok mkdir int:\test
 ok mkdir int:\test
 ok mkdir int:\test
 }}}

 Result:
 {{{
 e2fsck -f /dev/mmcblk0p1
 e2fsck 1.41.12 (17-May-2010)
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Duplicate entry 'test' found.
         Marking / (2) to be rebuilt.

 Pass 3: Checking directory connectivity
 Pass 3A: Optimizing directories
 Entry 'test' in / (2) has a non-unique filename.
 Rename to te~0<y>? yes

 Entry 'test' in / (2) has a non-unique filename.
 Rename to te~1<y>? yes

 Entry 'test' in / (2) has a non-unique filename.
 Rename to te~2<y>? yes

 Pass 4: Checking reference counts
 Pass 5: Checking group summary information

 Boot: ***** FILE SYSTEM WAS MODIFIED *****
 Boot: 70/16384 files (10.0% non-contiguous), 29339/65536 blocks
 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/11799>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list