Skip to content

Conversation

@Politie-SOC
Copy link
Contributor

closes #1519

@Miauwkeru Miauwkeru changed the title Prevent fake NTFS filesystem mounts Prevent fake NTFS filesystem mounts in target-mount Jan 28, 2026
@Miauwkeru Miauwkeru force-pushed the fix/prevent-fake-mounts branch from 4582113 to 6b21bdf Compare January 28, 2026 12:38
Copy link
Contributor

@Miauwkeru Miauwkeru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test specifically in tests/tools/test_mount.py for the desired behaviour?

@Politie-SOC
Copy link
Contributor Author

Politie-SOC commented Jan 29, 2026

@Miauwkeru, a test has been added for your convenience.

Comment on lines +25 to +29
root = tmp_path

# Cleanup first (conftest creates a MockTarget- tempfile)
for item in root.iterdir():
item.unlink()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
root = tmp_path
# Cleanup first (conftest creates a MockTarget- tempfile)
for item in root.iterdir():
item.unlink()
root = tmp_path / "mock_ntfs"
root.mkdir()

Instead of removing the file that gets created by target_bare fixture, it is better to just create a new directory for it instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent fake NTFS filesystems to appear in the filesystem mounts

2 participants