Ticket #14464 (new defect)

Opened 4 years ago

dwFileAttributes Incorrectly Reports FILE_ATTRIBUTE_REPARSE_POINT

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


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 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 Download (1.1 KB) - added by thematthopkins 4 years ago.

Change History

Changed 4 years ago by thematthopkins

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use