[glib: 3/7] W32: tighten access rights requested to read symlink
- From: LRN <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/7] W32: tighten access rights requested to read symlink
- Date: Wed, 12 Sep 2018 15:15:29 +0000 (UTC)
commit 256e74124821693c847b905dcbd70efae06c9809
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]