mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-07 17:54:05 +02:00
W32: tighten access rights requested to read symlink
According to http://blog.kalmbach-software.de/2008/02/28/howto-correctly-read-reparse-data-in-vista/ we only need FILE_READ_EA, and should also use wider share flags.
This commit is contained in:
committed by
Xavier Claessens
parent
cb1a4e0e6c
commit
01855d2991
@@ -466,8 +466,9 @@ _g_win32_readlink_utf16_raw (const gunichar2 *filename,
|
|||||||
* point and use DeviceIoControl() on it.
|
* point and use DeviceIoControl() on it.
|
||||||
*/
|
*/
|
||||||
h = CreateFileW (filename,
|
h = CreateFileW (filename,
|
||||||
FILE_READ_ATTRIBUTES | SYNCHRONIZE | GENERIC_READ,
|
FILE_READ_EA,
|
||||||
FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
|
||||||
|
NULL, OPEN_EXISTING,
|
||||||
FILE_ATTRIBUTE_NORMAL
|
FILE_ATTRIBUTE_NORMAL
|
||||||
| FILE_FLAG_OPEN_REPARSE_POINT
|
| FILE_FLAG_OPEN_REPARSE_POINT
|
||||||
| (attributes & FILE_ATTRIBUTE_DIRECTORY ? FILE_FLAG_BACKUP_SEMANTICS : 0),
|
| (attributes & FILE_ATTRIBUTE_DIRECTORY ? FILE_FLAG_BACKUP_SEMANTICS : 0),
|
||||||
|
Reference in New Issue
Block a user