[glib/glib-2-58: 15/55] W32: tighten access rights requested to read symlink
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-58: 15/55] W32: tighten access rights requested to read symlink
- Date: Fri, 19 Oct 2018 13:38:47 +0000 (UTC)
commit 01855d2991077da3225ebc2ce6c966eb302962e9
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Thu Aug 16 10:06:33 2018 +0000
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.
glib/gstdio.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/glib/gstdio.c b/glib/gstdio.c
index 60266960a..1a56b1932 100644
--- a/glib/gstdio.c
+++ b/glib/gstdio.c
@@ -466,8 +466,9 @@ _g_win32_readlink_utf16_raw (const gunichar2 *filename,
* point and use DeviceIoControl() on it.
*/
h = CreateFileW (filename,
- FILE_READ_ATTRIBUTES | SYNCHRONIZE | GENERIC_READ,
- FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ FILE_READ_EA,
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
+ NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL
| FILE_FLAG_OPEN_REPARSE_POINT
| (attributes & FILE_ATTRIBUTE_DIRECTORY ? FILE_FLAG_BACKUP_SEMANTICS : 0),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]