VirtualBox

Opened 9 years ago

#14464 new defect

dwFileAttributes Incorrectly Reports FILE_ATTRIBUTE_REPARSE_POINT

Reported by: Matt Hopkins Owned by:
Component: shared folders Version: VirtualBox 5.0.2
Keywords: Cc:
Guest type: Windows Host type: Windows

Description

With a Windows guest running within a Windows host, executing the FindFirstFile Win32 API function on the guest returns the incorrect dwFileAttributes with FILE_ATTRIBUTE_REPARSE_POINT for symlinks on the vboxsf.

With symlinks on Linux & Mac hosts, FILE_ATTRIBUTE_REPARSE_POINT is set to false.

With symlinks on Windows hosts, FILE_ATTRIBUTE_REPARSE_POINT is set to true.

FILE_ATTRIBUTE_REPARSE_POINT should be set to false for all vboxsf files/folders, because being a symlink should only be relevant to the host, and the information should be hidden to the guest.

This is causing us some issues doing PHP development involving symlinked folders, because PHP likes to try and follow the reparse points to convert relative paths to canonical paths. It attempts to retrieve the reparse point info to conver to the canonical path, then fails.

To reproduce the issue:

On the Windows host, create a folder at c:\test

Create a subdirectory at c:\test\myDir

Create a symlink:

mklink /D c:\test\myLink c:\test\myDir

Create a VirtualBox shared folder pointing to c:\test , and mount it to X: within the guest.

Run the attached Python script:

python find_data.py X:\myLink

On the Windows host, this outputs:

Target file is X:\myLink
Found file: myLink
Reparse point: 1024
Attributes: 1040

On a Linux/Max host, this outputs:

Target file is X:\myLink
Found file: myLink
Reparse point: 0
Attributes: 16

Attachments (1)

find_data.py (1.1 KB ) - added by Matt Hopkins 9 years ago.
find_data.py

Download all attachments as: .zip

Change History (1)

by Matt Hopkins, 9 years ago

Attachment: find_data.py added

find_data.py

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use