* path.cc (symlink_info::check): Don't use eabuf when trying to open

file a second time.  Call NtOpenFile instead of NtCreateFile in this
	case.
This commit is contained in:
Corinna Vinschen 2008-08-15 10:19:12 +00:00
parent 84132c9d9f
commit 2b41d940ca
2 changed files with 12 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2008-08-15 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink_info::check): Don't use eabuf when trying to open
file a second time. Call NtOpenFile instead of NtCreateFile in this
case.
2008-08-14 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::link): Fix linking

View File

@ -2356,8 +2356,8 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
to special case NFS too much. */
status = NtCreateFile (&h,
READ_CONTROL | FILE_READ_ATTRIBUTES | FILE_READ_EA,
&attr, &io, NULL, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_VALID_FLAGS, FILE_OPEN,
&attr, &io, NULL, 0, FILE_SHARE_VALID_FLAGS,
FILE_OPEN,
FILE_OPEN_REPARSE_POINT
| FILE_OPEN_FOR_BACKUP_INTENT,
eabuf, easize);
@ -2372,12 +2372,10 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
eabuf = NULL;
easize = 0;
}
status = NtCreateFile (&h, READ_CONTROL | FILE_READ_ATTRIBUTES,
&attr, &io, NULL, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_VALID_FLAGS, FILE_OPEN,
FILE_OPEN_REPARSE_POINT
| FILE_OPEN_FOR_BACKUP_INTENT,
eabuf, easize);
status = NtOpenFile (&h, READ_CONTROL | FILE_READ_ATTRIBUTES,
&attr, &io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_REPARSE_POINT
| FILE_OPEN_FOR_BACKUP_INTENT);
}
if (NT_SUCCESS (status)
&& NT_SUCCESS (status