mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 04:15:49 +01: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:
parent
a86eb1a8b6
commit
256e741248
@ -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),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user