From ed7ec849f625609f8c8e061386adfcb593fcd54a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 29 Jul 2007 12:27:22 +0000 Subject: * fhandler_disk_file.cc (fhandler_disk_file::link): Use FILE_ANY_ACCESS. (fhandler_base::utimes_fs): Fix white space. (fhandler_disk_file::lock): Remove 9x blurb from comment. (fhandler_disk_file::mkdir): Use NtCreateFile/NtClose instead of CreateDirectoryA. (fhandler_disk_file::rmdir): Accommodate changes to unlink_nt. Simplify post-delete SMB-related tests. Use NtQueryAttributesFile instead of GetFileAttributes. * ntdll.h (STATUS_DIRECTORY_NOT_EMPTY): Define. (NtQueryAttributesFile): Declare. * syscalls.cc (unlink_nt): Return NTSTATUS. Drop setattrs parameter. Never use FILE_DELETE_ON_CLOSE, always use NtSetInformationFile(FileDispositionInformation) instead. Check for R/O attributes and open file with FILE_WRITE_ATTRIBUTES access if any of them are set. Remove R/O attributes before marking for delete if necessary. Revert them afterwards if necessary. (unlink): Accommodate changes to unlink_nt. --- winsup/cygwin/ntdll.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'winsup/cygwin/ntdll.h') diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 75b11463a..7882eb15f 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -21,6 +21,7 @@ #define STATUS_DELETE_PENDING ((NTSTATUS) 0xc0000056) #define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xc00000a1) #define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xc00000bb) +#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xc0000101) #define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106) #define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148) #define STATUS_NO_MORE_FILES ((NTSTATUS) 0x80000006) @@ -752,6 +753,8 @@ extern "C" BOOLEAN, PULONG, PULONG); NTSTATUS NTAPI NtQueryEaFile (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, BOOLEAN, PVOID, ULONG, PULONG, BOOLEAN); + NTSTATUS NTAPI NtQueryAttributesFile (POBJECT_ATTRIBUTES, + PFILE_BASIC_INFORMATION); NTSTATUS NTAPI NtQueryFullAttributesFile (POBJECT_ATTRIBUTES, PFILE_NETWORK_OPEN_INFORMATION); NTSTATUS NTAPI NtQueryInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID, -- cgit v1.2.3