Prevent access to the root file system via the memorycard mount points

Before any memorycard is used the mount point exposes "/". Let's
introduce a special value "(empty)" to allow a DIR mount to point to
nothing.
This commit is contained in:
Martin Natano
2022-02-18 17:54:14 +01:00
parent 5322843ace
commit 3216fdec1e
2 changed files with 21 additions and 2 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ MemoryCardManager::MemoryCardManager()
* until it's mounted, anyway. */
FOREACH_PlayerNumber( pn )
{
FILEMAN->Mount( "dir", "/", MEM_CARD_MOUNT_POINT_INTERNAL[pn] );
FILEMAN->Mount( "dir", "(empty)", MEM_CARD_MOUNT_POINT_INTERNAL[pn] );
FILEMAN->Mount( "timeout", MEM_CARD_MOUNT_POINT_INTERNAL[pn], MEM_CARD_MOUNT_POINT[pn] );
}
}