OSDN Git Service

Provide euidaccess, canonicalize_file_name; fix fchmodat.
[pf3gnuchains/pf3gnuchains3x.git] / winsup / cygwin / ChangeLog
index 10cb43e..7eb2163 100644 (file)
@@ -1,3 +1,336 @@
+2009-09-25  Eric Blake  <ebb9@byu.net>
+
+       * syscalls.cc (fchmodat): lchmod is not yet implemented.
+       (euidaccess): New function.
+       * path.cc (realpath): Update comment.
+       (canonicalize_file_name): New function.
+       * include/cygwin/stdlib.h (canonicalize_file_name): Declare it.
+       * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+       * cygwin.din: Export canonicalize_file_name, eaccess, euidaccess.
+       * posix.sgml: Mention them.
+
+2009-09-25  Eric Blake  <ebb9@byu.net>
+
+       * fhandler.h (fhandler_base::fhaccess): Add parameter.
+       * security.h (check_file_access, check_registry_access): Likewise.
+       * security.cc (check_file_access, check_registry_access)
+       (check_access): Implement new parameter.
+       * fhandler.cc (fhandler_base::fhaccess): Likewise.
+       (device_access_denied): Update caller.
+       * syscalls.cc (access, faccessat): Update callers.
+       * spawn.cc (find_exec, fixup): Likewise.
+
+2009-09-24  Corinna Vinschen  <corinna@vinschen.de>
+
+       * posix_ipc.cc (mq_open): Avoid closing the same descriptor twice in
+       case of errors.
+       (sem_open): Ditto.
+
+2009-09-24  Corinna Vinschen  <corinna@vinschen.de>
+
+       * kernel32.cc (CreateMutexW): Use correct access mask.
+       (CreateSemaphoreW): Ditto.
+
+2009-09-23  Corinna Vinschen  <corinna@vinschen.de>
+
+       * strfuncs.cc (__set_charset_from_codepage): Fetch current ANSI
+       codepage if cp is 0.
+
+2009-09-23  Corinna Vinschen  <corinna@vinschen.de>
+
+       * strfuncs.cc (sys_cp_wcstombs): Convert lone surrogate pair
+       second halves to unambiguous ASCII SO sequence.  When converting
+       chars invalid in current codepage to ASCII SO sequence, make
+       sure to check for surrogate pair second half only if at least
+       one wide characters is left.  Decrement nwc if valid second half has
+       been converted.
+       (sys_cp_mbstowcs): Improve ASCII SO handling.  Never break from loop
+       if invalid character has been found.  Recognize ASCII SO sequence
+       representing originally invalid mulitbyte char converted into a
+       lone surrogate pair second half.  Convert accordingly.
+
+2009-09-22  Corinna Vinschen  <corinna@vinschen.de>
+
+       * autoload.cc (WSARecv): Define.
+       * fhandler_socket.cc (fhandler_socket::recv_internal): Call WSARecv
+       instead of WSARecvFrom if no name parameter is given.  Explain why.
+
+2009-09-22  Eric Blake  <ebb9@byu.net>
+
+       * syscalls.cc (faccessat): Fix typo, reject bad flags.
+       (fchmodat, fchownat, fstatat, utimensat, linkat, unlinkat): Reject
+       bad flags.
+
+2009-09-22  Corinna Vinschen  <corinna@vinschen.de>
+
+       * strfuncs.cc (sys_cp_mbstowcs): Reset shift state after handling
+       invalid multibyte sequence.
+
+2009-09-22  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (symlink_worker): Rework error handling to generate Linux
+       compatible errno in case of trailing slash in newpath.
+
+2009-09-22  Eric Blake  <ebb9@byu.net>
+
+       * dtable.h (OPEN_MAX_MAX): New macro.
+       * resource.cc (getrlimit) [RLIMIT_NOFILE]: Use it.
+       * dtable.cc (dtable::extend): Likewise.
+       * fcntl.cc (fcntl64): Obey POSIX rule with too-large F_DUPFD.
+       * syscalls.cc (dup2): Likewise.
+
+2009-09-21  Corinna Vinschen  <corinna@vinschen.de>
+
+       * cygheap.h (cwdstuff::get_posix): Convert to const inline method just
+       returning pointer to posix path.
+       (cwdstuff::reset_posix): Convert to non-inline method taking a wchar_t
+       pointer.
+       * path.cc (cwdstuff::set): Revert change from 2009-05-13.  Set posix
+       to valid incoming path again.
+       (cwdstuff::reset_posix): New implementation setting posix path from
+       incoming wchar_t path.  Explain usage.
+       (cwdstuff::get_posix): Drop implementation.
+       (cwdstuff::get): Drop special case to handle empty posix path.
+       * syscalls.cc (internal_setlocale): Store old posix cwd as wide char
+       path.  Restore posix cwd using new charset.  Explain why.
+
+2009-09-21  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_disk_file.cc (fhandler_disk_file::link): Drop faking hardlink
+       creation on filesystems not supporting hardlinks.
+
+2009-09-20  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * dcrt0.cc (dll_crt0_1): Add another hack to REALLY make sure that
+       cxx_malloc is always set to the cygwin version.
+
+2009-09-20  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * external.cc (cygwin_internal): Add hack to always reset cxx_malloc to
+       proper value.
+
+       * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Relocate wayward
+       comment.
+
+2009-09-19  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * exceptions.cc (sigpacket::process): Explicitly set thread-specific
+       handler function to zero to avoid transferring to incorrect location.
+       (_cygtls::call_signal_handler): Don't transfer to handler if there is
+       no handler to transfer to.
+
+2009-09-18  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * exceptions.cc (sigpacket::process): Give sigwait() processing
+       precedence even when a handler is present.
+
+       * syscalls.cc (getpagesize): Change return to 'int'.
+
+2009-09-16  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * ntea.c (write_ea): Don't abort if not-samba.
+
+2009-09-01  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * select.cc (peek_console): Always check window size when there is ANY
+       keyboard activity.
+
+2009-08-26  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.h (INTERIX_SYMLINK_COOKIE): Define.
+       * path.cc (symlink_info::check_sysfile): Read Interix symlinks as well.
+
+2009-08-26  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs
+       are not used.
+
+2009-08-24  Corinna Vinschen  <corinna@vinschen.de>
+
+       * mount.cc (fs_info::update): Add comment.
+       * path.cc (symlink_info::check_reparse_point): Return -1 for volume
+       mount points.  Explain why.
+       (symlink_info::check): Call fs.update again for volume mount points.
+       Explain why.
+
+2009-08-24  Corinna Vinschen  <corinna@vinschen.de>
+
+       * globals.cc (ro_u_volume): New R/O unicode string.
+       * path.cc (symlink_info::check_reparse_point): Fix check for volume
+       mount points to work on Vista and later as well.
+
+2009-08-22  Corinna Vinschen  <corinna@vinschen.de>
+
+       * strfuncs.cc (__set_charset_from_codepage): Add codepages 20866
+       (KOI8-R) and 21866 (KOI8-U).
+
+2009-08-21  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * dll_init.h (has_dtors): New flag.
+       (run_dtors): New wrapper function which avoids calling dtors more than
+       once.
+       * dll_init.cc (dll_global_dtors): Use dll.run_dtors wrapper.
+       (dll_list::detach): Ditto.
+       (dll_list::alloc): Set has_dtors flag.
+
+2009-08-21  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * fcntl.cc (fcntl64): Detect negative fd as error.
+
+2009-08-21  Corinna Vinschen  <corinna@vinschen.de>
+
+       * mmap.cc (mmap64): Allocate fh_disk_file on cygheap.  Delete
+       explicitely before returning.
+
+2009-08-20  Corinna Vinschen  <corinna@vinschen.de>
+
+       * dtable.cc (build_fh_dev): Take additional bool parameter indicating
+       whether set_name should be called or not.
+       (dtable::dup_worker): Call build_fh_pc with new second parameter set
+       to false.  Explain why.  If fhandler's dup failed, delete rather than
+       cfree newfh and set newfh to NULL to indicate failure correctly.
+       * dtable.h (build_fh_pc): Change declaration according to above change.
+       Default set_name parameter to true.
+       * mmap.cc (mmap_record::free_fh): Delete rather than cfree fh.
+
+2009-08-18  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * dtable.cc (dtable::fixup_after_exec): Close any popen'ed file handles here.
+       * fhandler.h (fhandler_*::ispipe): New function.
+       (fhandler_base::get_popen_pid): Define virtual function.
+       (fhandler_*::isdevice): Make const.
+       (fhandler_*::isfifo): Ditto.
+
+2009-08-17  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * syscalls.cc (popen): Reorganize slightly for clarity.  Fix a comment.
+
+2009-08-17  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * syscalls.cc (popen): Rewrite to accommodate situations where stdin,
+       stdout, or stderr are closed.
+
+2009-08-17  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * pipe.cc (fhandler_pipe::create_selectable): Add -pipe to default pipe names.
+
+       * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Use bool/true/false
+       for what is actually a boolean variable.
+
+2009-08-14  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix length
+       check for ".." dir.
+
+2009-08-14  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_disk_file.cc (fhandler_disk_file::readdir): Change comment
+       to be fair.
+
+2009-08-14  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Remove
+       ill-advised attempt to optimize "." and ".." handling by checking for
+       specific position in directory listing.  Explain why.
+       (fhandler_disk_file.cc (fhandler_disk_file::readdir): Ditto.
+       Special-case opening file on NFS to fetch inode number and add longish
+       comment to explain why.
+
+2009-08-14  Corinna Vinschen  <corinna@vinschen.de>
+
+       * (fhandler_socket::getsockname): Fix length returned for unbound
+       AF_LOCAL sockets.
+       (fhandler_socket::getpeername): Ditto.
+       * net.cc (socketpair): Don't set sun_path and peer_sun_path to
+       make sure getsockname and getpeername return the correct values
+       for AF_LOCAL sockets.
+
+2009-08-13  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_socket.cc (fhandler_socket::accept): Use sizeof rather
+       then constant size.  Truncate returned data, but return full address
+       length as per POSIX.
+       (fhandler_socket::getsockname): Truncate returned data, but return full
+       address length as per POSIX.
+       (fhandler_socket::getpeername): Ditto.
+
+2009-08-13  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler.h (class fhandler_socket): Add peer_sun_path member.
+       (fhandler_socket::set_peer_sun_path): New method.
+       (fhandler_socket::get_peer_sun_path): New method.
+       * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
+       peer_sun_path to NULL.
+       (fhandler_socket::~fhandler_socket): Free peer_sun_path if necessary.
+       (fhandler_socket::dup): Duplicate peer_sun_path.
+       (fhandler_socket::accept): Ditto.  Return fake unbound peer content
+       and len in case of AF_LOCAL sockets.
+       (fhandler_socket::getsockname): Always use local sockaddr_storage to
+       store socket address and copy over to incoming address.  Handle every
+       namelen correctly per POSIX.
+       (fhandler_socket::getpeername): Ditto.  Add code path to return
+       correct value for AF_LOCAL sockets.
+       (fhandler_socket::set_peer_sun_path): New method.
+       * net.cc (socketpair): Set peer_sun_path to empty string, just like
+       sun_path.
+
+2009-08-13  Corinna Vinschen  <corinna@vinschen.de>
+           Dave Korn <dave.korn.cygwin@googlemail.com>
+
+       * cxx.cc (default_cygwin_cxx_malloc): Enhance commenting.
+       * dll_init.cc (dll_dllcrt0_1): Likewise.
+       * dlfcn.cc (dlopen): Prevent dlopen()'d DLL from installing any
+       cxx malloc overrides.
+       * include/cygwin/cygwin_dll.h (__dynamically_loaded): New variable.
+       * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Check it and only
+       install cxx malloc overrides when statically loaded.  Extend comments.
+
+2009-08-12  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_socket.cc (fhandler_socket::accept): Always use local
+       sockaddr_storage to store peer address and copy over to incoming
+       peer address if available.  Truncate data as necessary according
+       to POSIX.
+
+2009-08-11  Corinna Vinschen  <corinna@vinschen.de>
+
+       * include/limits.h (NGROUPS_MAX): Set to a more sane value.
+       * include/sys/param.h (NGROUPS): Ditto.
+
+2009-08-10  Corinna Vinschen  <corinna@vinschen.de>
+
+       * spawn.cc (av::fixup): Check shell scripts for executability only on
+       filesystems/mounts supporting real permissions.
+
+2009-08-10  Corinna Vinschen  <corinna@vinschen.de>
+
+       * dtable.cc (DEV_SOCKET): New static WCHAR string.  Name of
+       the native NT socket device.
+       (dtable::init_std_file_from_handle): Remove unused tmp_pathbuf
+       variable.  Move check for sockets into FILE_TYPE_PIPE clause.
+       Rely on handle_to_fn having recognized socket, or check if
+       getsockopt works to accommodate NT4 shortcoming.
+       (handle_to_fn): Use tmp_pathbuf for OBJECT_NAME_INFORMATION
+       buffer and simplify code due to that.  Check name returned by
+       NtQueryObject for socket device.
+
+2009-08-10  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * fhandler_console.cc (create_invisible_console_workaround): Fix size
+       of cmd in the way originally intended.
+
+2009-08-10  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_console.cc (create_invisible_console_workaround):  Fix
+       size of cmd to take spaces into account.
+
+2009-08-08  Corinna Vinschen  <corinna@vinschen.de>
+
+       * dtable.cc (dtable::init_std_file_from_handle): Fix comment to
+       document change in the Windows 7 workaround.
+       * wincap.cc (wincapc::init): Don't set has_console_handle_problem
+       to false on 32 bit systems.
+
 2009-08-06  Corinna Vinschen  <corinna@vinschen.de>
 
        * net.cc (cygwin_getnameinfo): Force setting NI_NUMERICSERV only