(RtlUpcaseUnicodeChar): Declare.
* path.cc (hash_path_name): Split into three functions, taking
the path as char *, PWCSTR, or PUNICODE_STRING. Move implementation
into PUNICODE_STRING-based function. Drop old drive-relative path
consideration.
* winsup.h (iswdirsep): Like isdirsep but for WCHARs.
(isabspath_u): Like isabspath, for PUNICODE_STRINGs.
(iswabspath): Like isabspath, for PWCHARs.
(hash_path_name): Add new declarations.
have no native NT path representation for simplified debug output.
* syscalls.cc: Convert debug output to print native NT path.
(unlink): Drop redundant debug output.
* fhandler_disk_file.cc (fhandler_disk_file::link): Drop extern
declaration of stat_suffixes. Use NT native path in debug output.
(fhandler_base::utimes_fs): Simplify closeit case. Use close_fs
to close newly opened file handle.
(fhandler_base::open_fs): Use NT native path in debug output.
* path.cc: Throughout drop extern declaration of stat_suffixes.
* path.h (stat_suffixes): Declare.
* sec_acl.cc (acl_worker): Drop extern declaration of stat_suffixes.
* times.cc (utimes_worker): Take path_conv as parameter instead of
single-byte pathnam, drop nofollow argument, accommodate throughout.
Compare UNICODE paths when enumerating file descriptors. Fix
formatting. Use NT native path in debug output.
* delqueue.cc: Delete.
* fhandler.h (fhandler_base::close_fs): Drop declaration.
(fhandler_disk_file::close): Drop declaration.
* fhandler_disk_file.cc (fhandler_base::fstat_fs): Call close instead of
close_fs.
(fhandler_base::fstat_helper): Use open FH_UNIX handle in call to
get_file_attribute.
(fhandler_base::open_fs): Call close instead of get_file_attribute.
(fhandler_disk_file::close): Remove.
(fhandler_base::close_fs): Remove.
* fhandler_socket.cc (fhandler_socket::close): Just call
fhandler_base::close for FH_UNIX sockets.
* shared.cc (user_shared_initialize): Drop call to
user_shared->delqueue.init.
* shared_info.h (CURR_USER_MAGIC): Change according to below change.
(MAX_DELQUEUES_PENDING): Remove.
(class delqueue_list): Remove.
(class user_info): Remove delqueue.
* syscalls.cc (close_all_files): Drop call to
user_shared->delqueue.process_queue.
(unlink): Drop delqueue handling.
(STATUS_OBJECT_PATH_NOT_FOUND): Define.
(STATUS_BUFFER_OVERFLOW): Define.
(FILE_SUPERSEDED): Define.
(FILE_OPENED): Define.
(FILE_CREATED): Define.
(FILE_OVERWRITTEN): Define.
(FILE_EXISTS): Define.
(FILE_DOES_NOT_EXIST): Define.
(PIO_APC_ROUTINE): Typedef.
(NtFsControlFile): Fix parameter types to use PIO_APC_ROUTINE.
(NtWriteFile): Declare.
(RtlInt64ToHexUnicodeString): Declare.
* strfuncs.cc: Include ntdll.h.
(RtlInt64ToHexUnicodeString): New function.
* syscalls.cc (try_to_bin): Rewrite using native NT functions.
Only try to create recycle bin after unsuccessfully trying to move
file. Also try to create special files in recycle bin so that Windows
Explorer isn't unnecessarily stampeded.
separators, require them to be existing directories if so. Check
for a request to change only the case of the filename. Check paths
for case insensitve equality only once. Handle renaming a directory
to another, existing directory by unlinking the destination directory
first. If newpath points to an existing file with R/O attribute set,
try to unset R/O attribute first. Augment hardlink test by not
checking directories. If renaming fails with STATUS_ACCESS_DENIED,
try to unlink existing destination filename and try renaming again.
Drop useless test for non-empty directory. Always close fh at the
end of the function.
trying to rename it. Use nfh handle when checking for non-empty
newpath directory. Only change status if check_dir_not_empty really
returns STATUS_DIRECTORY_NOT_EMPTY.
dependency-filtering $(wordlist ...) call appropriately. Link ntdll.
(bloda.o): New rule to build bloda.o
* cygcheck.cc (dump_sysinfo): Call bloda function dump_dodgy_apps().
* bloda.cc: New file implements detection of applications from the
Big List Of Dodgy Apps.
oldpath and newpath referring to the same file. Test if oldpath
has more than one hardlink before opening oldpath (idea by Eric Blake).
Reorder test so that file id is tested before volume serial number.
* syscalls.cc (check_dir_not_empty): New static function.
(unlink_nt): Move code checking for non-empty dir to check_dir_not_empty
and call check_dir_not_empty instead.
(rename): Add fault handler. Check oldpath and newpath for trailing
. and .. path components and return EINVAL if so. Check oldpath
for being on a vrtual file system. If renaming a dir fails with
STATUS_ACCESS_DENIED, check if the target dir is non-empty and return
ENOTEMPTY if so.
for binary in case of .exe files.
* ntdll.h (RtlPrefixUnicodeString): Declare.
* path.cc (path_conv::is_binary): New method.
* path.h (path_conv::is_binary): Declare.
* syscalls.cc (rename_append_suffix): New static helper function for
rename.
(rename): Rewrite. New suffix tests. Use native NT functions.
opened for reading the ACLs, fall back to faking them.
* sec_acl.cc (acl_worker): Handle non-existing files.
* security.cc (get_file_attribute): Return ILLEGAL_UID/ILLEGAL_GID
as owner/group for non-readable ACLs on file systems supporting them.