summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * ntdll.h (RtlCreateUnicodeStringFromAsciiz): Fix declaration.Corinna Vinschen2007-08-164-46/+70
| | | | | | | | | | | | (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.
* * path.cc (get_nt_native_path): Allow to convert special paths whichCorinna Vinschen2007-08-153-11/+19
| | | | | | 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 superfluousCorinna Vinschen2007-08-153-8/+6
| | | | | test for trailing dot. * path.h (path_conv::operator []): Remove.
* * fhandler_socket.cc (get_inet_addr): Use NT native functions forCorinna Vinschen2007-08-153-21/+51
| | | | | | accessing the file representing the local socket. (fhandler_socket::bind): Ditto. * ntdll.h: Declare NtReadFile.
* * path.cc (symlink_info::check): In case of ERROR_SHARING_VIOLATION andCorinna Vinschen2007-08-142-3/+22
| | | | | ERROR_ACCESS_DENIED, try to get file attributes by using directory functions.
* * path.cc (fs_info::update): Correctly handle the volume root directory.Corinna Vinschen2007-08-142-2/+9
|
* * fhandler.h (fhandler_base::pc): Make public.Corinna Vinschen2007-08-147-25/+39
| | | | | | | | | | | | | | | * 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.
* * mmap.cc: Call NtClose instead of CloseHandle throughout.Corinna Vinschen2007-08-132-17/+32
| | | | | (CreateMapping): Drop unused last argument. Accommodate throughout. (mmap64): Re-open file with execute permissions using NtOpenFile.
* * fhandler.h (fhandler_base::close_fs): Reintroduce (as inline function)Corinna Vinschen2007-08-134-5/+12
| | | | | | | | for clearness. * fhandler_disk_file.cc (fhandler_base::fstat_fs): Revert previous change. (fhandler_base::open_fs): Ditto. * fhandler_socket.cc (fhandler_socket::close): Ditto.
* * Makefile.in (DLL_OFILES): Remove delqueue.o.Corinna Vinschen2007-08-139-162/+36
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * devices.in (dev_storage): Use native NT device name for kmsg mailslot.Corinna Vinschen2007-08-138-45/+79
| | | | | | | | | | | | | | | * devices.cc: Regenerate. * fhandler.cc (fhandler_base::operator =): Use path_conv assignment operator. (fhandler_base::set_name): Ditto. (fhandler_base::open): Use NT native path in debug output. * fhandler_mailslot.cc: Convert to NT native function calls. * ntdll.h (struct _FILE_MAILSLOT_SET_INFORMATION): Define. (NtCreateMailslotFile): Declare. * path.cc (path_conv::set_normalized_path): Don't set wide_path to NULL. (path_conv::set_name): Remove unused function. * path.h (path_conv::set_name): Drop declaration. (path_conv::operator =): Define.
* * faq-programming.xml: Clarify where to run "make check".Christopher Faylor2007-08-122-2/+7
|
* * fhandler.cc (fhandler_base::open): Remove HIDDEN_DOT_FILES code.Corinna Vinschen2007-08-124-17/+6
| | | | | * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto. * path.cc (symlink_worker): Ditto.
* * syscalls.cc (getw): Remove redundant implementation.Corinna Vinschen2007-08-122-56/+8
| | | | | | | (putw): Ditto. (wcscmp): Ditto. (wcslen): Ditto. (memccpy): Ditto.
* * ntdll.h: Add descriptive comments to special Rtl functions.Corinna Vinschen2007-08-124-74/+294
| | | | | | | | | | | | | | | | | | | | | (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.
* * path.cc (fillout_mntent): Fix calculation of unicode buffer size.Corinna Vinschen2007-08-102-1/+6
|
* * syscalls.cc (rename): Check oldpath and newpath for trailing dirCorinna Vinschen2007-08-102-31/+127
| | | | | | | | | | | | | 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.
* * gendef (sigbe): Reset "incyg" while the stack lock is active to avoid aChristopher Faylor2007-08-092-1/+6
| | | | potential race.
* * syscalls.cc (rename): Close oldpath file handle immediately afterCorinna Vinschen2007-08-093-4/+14
| | | | | | 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.
* 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2007-08-032-1/+2
| | | | | * include/_mingw.h: Increment version to 3.13. * Makefile.in: Reset CYGRELEASE to 1
* 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2007-08-032-2/+6
| | | | * include/_mingw.h: Increment version to 3.13.
* 2007-08-03 Chris Sutcliffe <ir0nh34d@users.sf.net>Chris Sutcliffe2007-08-033-3/+8
| | | | | * include/w32api.h: Increment version to 3.10. * Makefile.in: Ditto.
* * Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjustingDave Korn2007-08-034-5/+438
| | | | | | | | 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.
* * fhandler_disk_file.cc (readdir_get_ino): Accommodate native symlinks.Corinna Vinschen2007-08-023-3/+15
| | | | * syscalls.cc (rename): Ditto.
* * smallprint.c: Remove.Corinna Vinschen2007-08-022-250/+4
|
* * lib/Makefile: Add missed file to accommodate below changes.Christopher Faylor2007-08-021-0/+4
|
* Add missing checkin.Christopher Faylor2007-08-021-4/+4
|
* * lib/cygwin_attach_dll.c: Fix compiler warning.Christopher Faylor2007-08-023-0/+9
| | | | * lib/cygwin_crt0.c: Ditto.
* * Makefile.in: Add -lntdll to link line.Christopher Faylor2007-08-022-3/+8
| | | | (CYGWIN_OBJS): Include strfuncs.o.
* * dcrt0.cc (codepage_type): Remove definition.Christopher Faylor2007-08-024-32/+50
| | | | | * strfuncs.cc: Move it here. New file with bits of miscfuncs.cc. * miscfuncs.cc: Remove wide character stuff.
* * smallprint.c: New file.Corinna Vinschen2007-08-023-2/+258
| | | | | * Makefile.in (OBJS): Add smallprint.o. (CYGWIN_OBJS): Remove smallprint.o from Cygwin dir.
* * syscalls.cc (rename): Move and add text to comment about testingCorinna Vinschen2007-08-022-16/+31
| | | | | | 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.
* * path.h (struct fs_info): Drop root_len and name_hash members.Corinna Vinschen2007-08-023-17/+10
| | | | | | | (fsinfo::length): Remove. (path_conv::rootdir): Remove. * syscalls.cc (try_to_bin): Use rootdir function instead of path_conv::rootdir method.
* * fhandler_disk_file.cc (path_conv::ndisk_links): Fix typo in call toCorinna Vinschen2007-08-022-1/+6
| | | | NtClose.
* * include/winbase.h (ReOpenFile): Add prototype.Corinna Vinschen2007-08-023-0/+9
| | | | * lib/kernel32.def (ReOpenFile@16): Add export.
* * syscalls.cc (rename): Check if oldpath and newpath refer to theCorinna Vinschen2007-08-012-1/+41
| | | | | same file. If so, return successfully and perform no other action, as per SUSv3.
* * ntdll.h (STATUS_ACCESS_DENIED): Define.Corinna Vinschen2007-08-013-25/+80
| | | | | | | | | | | * 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.
* * localtime.cc (tzsetwall): Don't set TZ.Corinna Vinschen2007-08-012-0/+8
|
* * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): DropCorinna Vinschen2007-08-015-99/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | usage of path_conv::volser(). (fhandler_base::fstat_by_name): Ditto. * ntdll.h (STATUS_NO_MEDIA_IN_DEVICE): Define. (STATUS_OBJECT_NAME_NOT_FOUND): Define. (FILE_REMOVABLE_MEDIA, FILE_READ_ONLY_DEVICE, FILE_FLOPPY_DISKETTE) (FILE_WRITE_ONCE_MEDIA, FILE_REMOTE_DEVICE, FILE_DEVICE_IS_MOUNTED) (FILE_VIRTUAL_VOLUME, FILE_AUTOGENERATED_DEVICE_NAME) FILE_DEVICE_SECURE_OPEN): Define Device Characteristics. (struct _FILE_FS_DEVICE_INFORMATION): Define. * path.cc (MAX_FS_INFO_CNT): Remove. (fsinfo): Remove. (fsinfo_cnt): Remove. (fs_info::update): Rewrite using native NT functions. Drop fs_info cashing since it's incorrect. (path_conv::fillin): Use NtQueryInformationFile. Drop setting serial number. (path_conv::check): Accommodate new fs_info::update parameters. (fillout_mntent): Ditto. * path.h (fs_info): Drop serial, has_ea and drive_type status flags. (fs_info::update): Declare with new parameters. (path_conf::drive_type): Remove. (path_conf::fs_has_ea): Remove. (path_conf::volser): Remove.
* * fhandler.cc (check_posix_perms): Remove.Corinna Vinschen2007-08-012-26/+7
| | | | | (fhandler_base::fpathconf): Return value of pc.has_acls () instead of calling check_posix_perms.
* * syscalls.cc (rename): Use unchanged path_conv in condition.Corinna Vinschen2007-08-012-2/+6
|
* * smallprint.cc (__small_vsprintf): Add format specifier 'W' forCorinna Vinschen2007-08-012-13/+26
| | | | PWCHAR arguments. Move wide char handling after char handling.
* * ntdll.h (RtlFreeAnsiString): Declare.Corinna Vinschen2007-07-313-12/+63
| | | | | | | | | | * ntdll.h (RtlFreeOemString): Declare. * ntdll.h (RtlUnicodeStringToAnsiString): Declare. * ntdll.h (RtlUnicodeStringToOemString): Declare. * smallprint.cc: Renamed from smallprint.c. Drop unnecessary forward declarations. (__small_vsprintf): Add format specifiers 'C' for WCHAR arguments and 'S' for PUNICODE_STRING arguments.
* 2007-07-31 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2007-07-312-1/+7
| | | | * include/wtsapi32.h (WTS_CURRENT_SESSION, WTSDisconnectSession): Define.
* * fhandler_disk_file.cc (fhandler_disk_file::link): Revert to checkingCorinna Vinschen2007-07-316-152/+190
| | | | | | | | | | 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.
* * fhandler_disk_file.cc (fhandler_disk_file::facl): If file can't beCorinna Vinschen2007-07-304-2/+26
| | | | | | | 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.
* * syscalls.cc (stat_worker): Don't call build_fh_pc with invalid pc.Corinna Vinschen2007-07-302-10/+15
|
* 2007-7-30 Martijn Wargers <martijnw22@users.sourceforge.net>Danny Smith2007-07-303-0/+9
| | | | | * include/wingdi.h (GetTextExtentExPointI): Add prototype. * lib/gdi32.def (GetTextExtentExPointI@28): Add export.
* * fhandler.cc (fhandler_base::wait_overlapped): Handle read EOF better andChristopher Faylor2007-07-292-6/+26
| | | | issue a SIGPIPE when we get ERROR_NO_DATA.
* * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't allowCorinna Vinschen2007-07-293-19/+38
| | | | | | | | | | | | FileAttributes set to 0 when calling NtSetInformationFile since it has a special meaning. (fhandler_disk_file::facl): Ditto. (fhandler_disk_file::link): Only set attributes after copying files. Use SetFileAttributesW. * syscalls.cc (unlink_nt): Only care for actual FILE_ATTRIBUTE_READONLY. Don't allow FileAttributes set to 0 when calling NtSetInformationFile. After marking for deletion, restore R/O attribute on files to accommodate hardlinks.