From 755f6f8f650d467aaa8b76570f76515fb357041d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 21 Jan 2008 14:51:55 +0000 Subject: [PATCH] * fhandler_disk_file.cc (fhandler_disk_file::link): Open file with READ_CONTROL for Vista/Longhorn's sake. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_disk_file.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 746472cb1..19aadbedd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-01-21 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_disk_file::link): Open file with + READ_CONTROL for Vista/Longhorn's sake. + 2008-01-15 Corinna Vinschen * Makefile.in (install-libs): Overwrite newlib's libg.a with symlink diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index c68b42687..f660bb06c 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1089,7 +1089,7 @@ fhandler_disk_file::link (const char *newpath) NTSTATUS status; OBJECT_ATTRIBUTES attr; IO_STATUS_BLOCK io; - status = NtOpenFile (&fh, FILE_ANY_ACCESS, + status = NtOpenFile (&fh, READ_CONTROL, pc.get_object_attr (attr, sec_none_nih), &io, FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT | FILE_OPEN_REPARSE_POINT);