diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2019-03-20 23:03:02 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2019-03-20 23:03:02 +0000 |
commit | a05bc5213c1ac82e85c0167d158548436bd5a6c9 (patch) | |
tree | ad6bfe9bd54283f12cc01a2addb570006a88cee6 /include/arch | |
parent | 06e0fdce4625ff5d56e0f7123a5d84d898059ddd (diff) | |
download | apr-a05bc5213c1ac82e85c0167d158548436bd5a6c9.tar.gz |
Narrow symbolic link detection on NTFS
Read the WIN32_FIND_DATA::dwReserved0 field to determine whether reparse point
is a "name surrogate".
It's probably more safe to bind to specifig tags. If provided structure
(wininfo) was not resulted from FindFile* call, then additional FindFirstFile
call is performed. However this may be unnecessary, because the alternate
GetFileInformation call is used in the case of an open file handle, and
APR_FINFO_LINK has no meaning when it comes to open files.
Submitted by: Oleg Liatte <olegliatte gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1855949 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/arch')
-rw-r--r-- | include/arch/win32/apr_arch_file_io.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/arch/win32/apr_arch_file_io.h b/include/arch/win32/apr_arch_file_io.h index 7c5996cab..5302a15be 100644 --- a/include/arch/win32/apr_arch_file_io.h +++ b/include/arch/win32/apr_arch_file_io.h @@ -135,7 +135,8 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool); /* Private function for apr_stat/lstat/getfileinfo/dir_read */ int fillin_fileinfo(apr_finfo_t *finfo, WIN32_FILE_ATTRIBUTE_DATA *wininfo, - int byhandle, apr_int32_t wanted); + int byhandle, int finddata, const char *fname, + apr_int32_t wanted); /* Private function that extends apr_stat/lstat/getfileinfo/dir_read */ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile, |