From 01d2675aea7b71f63ced4dbd7e9e7c88555f9691 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 24 Jan 2009 16:30:09 +0000 Subject: [PATCH] * mount.cc (mount_info::from_fstab): Open fstab file with FILE_OPEN_FOR_BACKUP_INTENT flag. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/mount.cc | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f39f69baa..f5555156a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-01-24 Corinna Vinschen + + * mount.cc (mount_info::from_fstab): Open fstab file with + FILE_OPEN_FOR_BACKUP_INTENT flag. + 2009-01-23 Corinna Vinschen * smallprint.cc (__small_vsprintf): Use already available buffer tmp diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index 67998b24c..0797d1bb3 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -943,7 +943,9 @@ mount_info::from_fstab (bool user, WCHAR fstab[], PWCHAR fstab_end) InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL, NULL); debug_printf ("Try to read mounts from %W", fstab); 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)) { debug_printf ("NtOpenFile(%S) failed, %p", &upath, status);