From 93e884989afd2f702c758a9b635c9ea9ca394280 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 26 Jan 2009 13:03:49 +0000 Subject: [PATCH] * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT flag. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/uinfo.cc | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f5555156a..73eb35a67 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-01-26 Corinna Vinschen + + * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT + flag. + 2009-01-24 Corinna Vinschen * mount.cc (mount_info::from_fstab): Open fstab file with diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 9b6733f22..8ca382bfe 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -543,7 +543,9 @@ pwdgrp::load (const wchar_t *rel_path) paranoid_printf ("%S", &upath); status = NtOpenFile (&fh, SYNCHRONIZE | FILE_READ_DATA, &attr, &io, - FILE_SHARE_VALID_FLAGS, FILE_SYNCHRONOUS_IO_NONALERT); + FILE_SHARE_VALID_FLAGS, + FILE_SYNCHRONOUS_IO_NONALERT + | FILE_OPEN_FOR_BACKUP_INTENT); if (!NT_SUCCESS (status)) { paranoid_printf ("NtOpenFile(%S) failed, status %p", &upath, status);