Ticket #11799 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

ext2 filesystem non-unique directories can be created

Reported by: Quozl Owned by: Quozl
Priority: normal Milestone: 1.75-firmware
Component: ofw - open firmware Version: Development firmware
Keywords: Cc:
Action Needed: no action Verified: no
Deployments affected: Blocked By:
Blocking:

Description

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

Change History

Changed 2 years ago by Quozl

  • status changed from new to assigned
  • owner changed from wmb@… to Quozl
  • next_action changed from code to add to build

However, $mkdir for the FAT filesystem does abort if asked to make a directory that already exists.

So the fix in svn 2949 for ext2fs also does abort now.

Changed 2 years ago by Quozl

  • status changed from assigned to closed
  • next_action changed from add to build to no action
  • resolution set to fixed

Is in Q4D11.

Note: See TracTickets for help on using tickets.