apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 47630] NTFS Reparse Points are treated as n*x APR_LNK, only correct for junction/dir link
Date Thu, 21 Mar 2019 10:07:07 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=47630

--- Comment #22 from Oleg Liatte <olegliatte@gmail.com> ---
As I've tracked, any time we need to fallback (and do additional calls to
determine a tag), we actually have already opened file handle. So we can pass
this handle to fillin_fileinfo (and to reparse_point_is_link) instead of file
name and thus avoid the need to open/close file one more time.

MS documents FSCTL_GET_REPARSE_POINT pretty poorly, but experimentations show
that DeviceIoControl doesn't require 16k output buffer. You can allocate
REPARSE_GUID_DATA_BUFFER struct and use it as output buffer (with corresponding
size of 28 bytes). DeviceIoControl reports failure with error ERROR_MORE_DATA,
but still fills output buffer in and returns proper lpBytesReturned. And this
is enough to get reparse point tag (which is the first field in
REPARSE_GUID_DATA_BUFFER). However more deep documentation digging or
comprehensive testing is needed to prove such partial read and rely on it. 

Otherwise more documented and reliable (but more slow) FindFileFirst/FindClose
should be kept.

And of course all these do not make sense if that "fallback" path never
executes actually, and can be just removed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message