Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2003-06-30 * cygheap.h (enum impersonation): New enum.Corinna Vinschen
(cygheap_user::token): Delete. (cygheap_user::impersonated): Delete. (cygheap_user::external_token): New member. (cygheap_user::internal_token): New member. (cygheap_user::impersonation_state): New member. (cygheap_user::issetuid): Modify. (cygheap_user::token): New method. (cygheap_user::deimpersonate): New method. (cygheap_user::reimpersonate): New method. (cygheap_user::has_impersonation_tokens): New method. (cygheap_user::close_impersonation_tokens): New method. * dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods. * fhandler_socket.cc (fhandler_socket::dup): Ditto. * fork.cc (fork_child): Ditto. (fork_parent): Ditto. * grp.cc (internal_getgroups): Ditto. * security.cc (verify_token): Ditto. (check_file_access): Ditto. (cygwin_set_impersonation_token): Detect conflicts. Set user.external_token. * spawn.cc (spawn_guts): Use new cygheap_user methods. * syscalls.cc (seteuid32): Rearrange to use the two tokens in cygheap_user. (setegid32): Use new cygheap_user methods. * uinfo.cc: (internal_getlogin): Ditto.
2003-06-16Throughout, remove "include <errno.h>" from files which already includeChristopher Faylor
cygerrno.h. * include/cygwin/config.h (__DYNAMIC_REENT__): Define. * include/cygwin/version.h: Bump API minor version. * cygwin.din: Export __getreent * cygerrno.h: Include errno.h. Fix places where _impure_ptr is used directly to store the errno value. * debug.cc (__set_errno): Ditto. * errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled. * signal.cc: Rename _reent_clib to _REENT throughout. * thread.h (reent_clib): Remove prototype. * thread.cc (reent_clib): Rename reent_clib to __getreent. Return _impure_ptr until MTinterface is initialized. (reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL instead. * MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to keep signal handling running when fork is called from a thread other than the mainthread.
2003-06-07* fhandler_socket.cc (fhandler_socket::connect): Change errorThomas Pfaff
handling for nonblocking connects to return EALREADY when connect is called more than once for the same socket.
2003-06-03 * fhandler_socket.cc (connect_thread): Remove.Corinna Vinschen
(accept_thread): Remove. (fhandler_socket::connect): Remove all special blocking handling. (fhandler_socket::accept): Ditto. * net.cc (cygwin_connect): Make blocking sockets temporarily non-blocking and call cygwin_select on them to be interruptible. (cygwin_accept): Ditto.
2003-06-03 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'Corinna Vinschen
to `interrupted' as used in fhandler_socket::connect.
2003-06-03 * fhandler_socket.cc (fhandler_socket::connect): Simplify previousCorinna Vinschen
patch. (fhandler_socket::accept): Ditto.
2003-06-02 * fhandler_socket.cc: Include cygthread.h.Corinna Vinschen
(class sock_event): Remove. (thread_connect): New function. (thread_accept): Ditto. (fhandler_socket::connect): Use cygthread instead of socket event handling for blocking sockets. (fhandler_socket::accept): Ditto.
2003-05-29 * fhandler_socket.cc (fhandler_socket::dup): Rearrange. FixCorinna Vinschen
conditional.
2003-05-29 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,Corinna Vinschen
revert to original account before calling fixup_before_fork_exec and impersonate again afterwards. Change comment accordingly. Clean up error handling and debug output.
2003-05-27* fhandler_socket.cc (sock_event::~sock_event): New method.Thomas Pfaff
(sock_event::load): Change to void. Check if winsock2 is available. (socke_event::wait): Return 0 if interruptible mode is not available. (fhandler_socket::connect): Remove checks for winsock2 availability. (fhandler_socket::accept): Ditto.
2003-05-27 * fhandler_socket.cc (fhandler_socket::dup): First try duplicatingCorinna Vinschen
using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
2003-05-26 * fhandler_socket.cc (fhandler_socket::connect): Guard calls toCorinna Vinschen
sock_event methods by a check for WinSock2 availability. (fhandler_socket::accept): Ditto.
2003-05-20 * fhandler_socket.cc (secret_event_name): Return void. Use incomingCorinna Vinschen
char *parameter instead of local static buffer. (fhandler_socket::create_secret_event): Accomodate new calling convention for secret_event_name. (fhandler_socket::close_secret_event): Ditto.
2003-05-20 * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.Corinna Vinschen
(ENTROPY_SOURCE_NAME): Ditto. (secret_event_name): New static function. Create shared event name with "Global\" prefix on systems supporting terminal services. (fhandler_socket::set_connect_secret): Fix conditional. (fhandler_socket::create_secret_event): Create secret event using secret_event_name(). (fhandler_socket::close_secret_event): Ditto. * shared.cc (shared_name): Create shared object name with "Global\" prefix on systems supporting terminal services. * wincap.cc: Set has_terminal_services capability throughout. (wincap_2003): New global object representing Windows 2003 Server capabilities. (wincapc::init): Accomodate Windows 2003 Server. * wincap.h (struct wincaps): Add has_terminal_services capability.
2003-05-12 Replace ino_t by __ino64_t throughout.Corinna Vinschen
2003-05-11* dir.cc (readdir): Fill out new old_d_ino field.Christopher Faylor
* fhandler.h (fhandler_base::namehash): Define as ino_t. (fhandler_base::get_namehash): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate new 64 bit st_ino. * fhandler_socket.cc (fhandler_socket::fstat): Ditto. * path.cc (hash_path_name): Return ino_t. * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit. * winsup.h (hash_path_name): Declare as returning ino_t. * include/cygwin/stat.h (__stat32): Use 32 bit st_ino. (__stat64): Use 64 bit st_ino. * include/cygwin/types.h (__ino64_t): Define. (__ino32_t): Ditto. (ino_t): Define appropriately.
2003-04-01 * fhandler.cc (fhandler_base::fstat): Set the uid and gid fieldsCorinna Vinschen
from the current effective ids. * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set by fhandler_base::fstat. * security.cc (get_nt_attribute): Do not test wincap.has_security (). (get_nt_object_attribute): Ditto. (get_file_attribute): Add test for wincap.has_security (). (get_object_attribute): Ditto.
2003-03-20 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE andCorinna Vinschen
SIGPIPE handling to connection oriented sockets. Add comment.
2003-03-11 * fhandler_socket.cc (fhandler_socket::dup): Don't callCorinna Vinschen
fhandler_base::dup() but call DuplicateHandle directly instead to have control over socket inheritence.
2003-03-112003-03-11 Corinna Vinschen <corinna@vinschen.de>Corinna Vinschen
* fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid using WinSock2 socket duplication methods. Add comment. 2003-03-11 Pierre Humblet <pierre.humblet@ieee.org> * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Set io_handle to INVALID_SOCKET in case of failure. (fhandler_socket::dup): Return 0 if the io_handle is valid.
2003-03-09whitespace cleanupChristopher Faylor
2003-03-04 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.Corinna Vinschen
2003-03-01 * fhandler_socket.cc (fhandler_socket::bind): Open and write socketCorinna Vinschen
file using Win32 calls.
2003-03-01 * fhandler_socket.cc (get_inet_addr): Open and read socket file usingCorinna Vinschen
Win32 calls.
2003-02-282003-03-27 Corinna Vinschen <corinna@vinschen.de>Corinna Vinschen
* fhandler_socket.cc (class sock_event): New class managing Winsock events for interruptible socket calls. (fhandler_socket::connect): Move support for interruptible call to class sock_event. Use class object instead. (fhandler_socket::accept): Ditto. Remove useless casts. 2003-03-27 Thomas Pfaff <tpfaff@gmx.net> * fhandler_socket.cc (fhandler_socket::connect): Add support for an interruptable connect.
2003-02-21 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compilerCorinna Vinschen
warning. (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective uid/gid of current process in case of open sockets.
2003-02-21 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandlerCorinna Vinschen
data on sockets to evaluate AF_LOCAL sockets correctly. (dtable::build_fhandler): Set unit number on sockets. * fhandler.h (fhandler_socket): Add unit number. (fhandler_socket::get_unit): New method. * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit number. (fhandler_socket::fstat): Reorganize to return more Linux-like values. * net.cc: include ctype.h. (fdsock): Set unit number when building fhandler. * path.cc (path_conv::check): Set device type to FH_SOCKET if file is a AF_UNIX socket. (get_devn): Evaluate unit for virtual socket devices. (win32_device_name): Set windows path for sockets to unix_path with just backslashes to keep the different names. * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev for sockets. (stat_worker): Ditto. From Pierre Humblet: * autoload.cc (AccessCheck): Add. (DuplicateToken): Add. * security.h (check_file_access): Declare. * syscalls.cc (access): Convert path to Windows, check existence and readonly attribute. Call check_file_access instead of acl_access. * security.cc (check_file_access): Create. * sec_acl (acl_access): Delete.
2003-02-20 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptorCorinna Vinschen
created by cygheap_fdnew constructor. * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto. * fhandler_socket.cc (fhandler_socket::accept): Ditto and move creation of file descriptor behind blocking OS call. * net.cc (cygwin_socket): Ditto. (cygwin_rcmd): Ditto. (cygwin_rresvport): Ditto. (cygwin_rexec): Ditto. (socketpair): Ditto.
2003-02-03 * fhandler_socket.cc (fhandler_socket::recvfrom): Return bufferCorinna Vinschen
length and don't set errno in case of WSAEMSGSIZE error. (fhandler_socket::recvmsg): Ditto.
2003-01-28 * fhandler_socket.cc (fhandler_socket::accept): On successful executionCorinna Vinschen
set connection state of returned socket to CONNECTED.
2003-01-26* uinfo.cc (pwdgrp::load): Regularize strace output. Add warning forChristopher Faylor
CreateFile failure.
2002-12-14Throughout, change fhandler_*::read and fhandler_*::raw_read to void functionsChristopher Faylor
whose second arguments are both the lenght and the return value. * fhandler.cc (fhandler_base::read): Rework slightly to use second argument as input/output. Tweak CRLF stuff. (fhandler_base::readv): Accommodate fhandler_*::read changes. * cygthread.h (cygthread::detach): Declare as taking optional handle argument. (cygthread::detach): When given a handle argument, wait for the handle to be signalled before waiting for thread to detach. Return true when signal detected.
2002-11-28revert botched checkinChristopher Faylor
2002-11-28* include/cygwin/version.h: Bump DLL minor number.Christopher Faylor
2002-11-28* fhandler_socket.cc (fhandler_socket::sendto): Fix potential unitialized valueChristopher Faylor
return.
2002-11-07 * fhandler_socket.cc (fhandler_socket::ioctl): Return correct flagsCorinna Vinschen
for loopback interface when name is given on input instead of address.
2002-11-05* fhandler_socket.cc (fhandler_socket::recvmsg): Call if from == NULLChristopher Faylor
WSARecvFrom with fromlen = NULL.
2002-10-21Change _function() to function() throughout.Christopher Faylor
* cygwin.din: Remove last vestiges (?) of newlib wrappers. * cygthread.cc (cygthread::detach): Always wait for event or suffer an apparently inavoidable race. * dcrt0.cc (dll_crt0_1): Allocate threads after stack has been relocated. * debub.cc (lock_debug): Don't acquire lock on exit. * fork.cc (fork_child): Recreate mmaps before doing anything else since Windows has a habit of using blocks of memory in the child that could previously have been occupied by shared memory in the parent. * mmap.cc (fhandler_disk_file::fixup_mmap_after_fork): Issue error here and provide some details about what went wrong. (fixup_mmaps_after_fork): Remove error message. * shared.cc (open_shared): Move warning message so that more detail is possible. * sigproc.cc (sigproc_init): Initialize sync_proc_subproc to avoid a race. (sigproc_terminate): Specifically wait for process thread to terminate.
2002-10-20missed checkinChristopher Faylor
2002-09-30whitespaceChristopher Faylor
2002-09-30Remove \n from calls to strace class printfs throughout.Christopher Faylor
2002-09-22* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller hasChristopher Faylor
already taken care of that. * fhandler_console.cc (fhandler_console::open): Initialize handles to NULL. (fhandler_console::close): Ditto. GNUify non-GNU formatted functions calls throughout.
2002-09-19* cygthread.cc (cygthread::initialized): Avoid copying on fork or some threadsChristopher Faylor
may not end up in the pool. (cygthread::new): Avoid race when checking for initialized. Add debugging code. * fhandler.cc (fhandler_base::raw_read): Add case for ERROR_INVALID_HANDLE due to Win95 directories. (fhandler_base::open): Handle errors due to Win95 directories. (fhandler_base::close): Add get_nohandle () test. (fhandler_base::set_close_on_exec): Ditto. (fhandler_base::fork_fixup): Ditto. (fhandler_base::lock): Change error code to Posix EINVAL. (fhandler_base::dup): If get_nohandle (), set new value to INVALID_HANDLE_VALUE instead of NULL. * fhandler_disk_file.cc (fhandler_disk_file::fstat): Call fstat_by_name if get_nohandle (). Remove extraneous element from strpbrk. (fhandler_disk_file::open): Remove test for Win95 directory. * fhandler_random.cc (fhandler_dev_random::open): Add set_nohandle (). * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. (fhandler_dev_zero::close): Delete. * fhandler.h (class fhandler_dev_zero): Ditto.
2002-09-04 * fhandler.h (fhandler_socket::read): Remove method.Corinna Vinschen
(fhandler_socket::write): Ditto. (fhandler_socket::readv): New method. (fhandler_socket::writev): Ditto. (fhandler_socket::recvmsg): Add new optional argument. (fhandler_socket::sendmsg): Ditto. * fhandler.cc (fhandler_socket::read): Remove method. (fhandler_socket::write): Ditto. (fhandler_socket::readv): New method. (fhandler_socket::writev): Ditto. (fhandler_socket::recvmsg): Use win32's scatter/gather IO where possible. (fhandler_socket::sendmsg): Ditto. * net.cc (cygwin_recvmsg): Check the msghdr's iovec fields. (cygwin_sendmsg): Ditto. Add omitted sigframe.
2002-08-30* miscfuncs.cc (check_iovec_for_read): Don't check buffer when zero lengthChristopher Faylor
iov_len. (check_iovec_for_write): Ditto. * fhandler.h (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * fhandler.cc (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * syscalls.cc (_read): Delegate to readv(2). (_write): Ditto, mutatis mutandi. (readv): Rewrite, based on the old _read code, to use the new fhandler_base::readv method. Improve access mode handling and ensure all calls reach the final strace statement. (writev): Ditto, mutatis mutandi. * include/sys/uio.h (struct iovec): Change field types to match SUSv3. * winsup.h (check_iovec_for_read): New function. (check_iovec_for_write): Ditto. * miscfuncs.cc (check_iovec_for_read): Ditto. (check_iovec_for_write): Ditto.
2002-08-28 * fhandler_socket.cc (fhandler_socket::recvfrom): Eliminate flagsCorinna Vinschen
not understood by WinSock. (fhandler_socket::sendto): Ditto. If WinSock sendto() returns WSAESHUTDOWN, change errno to EPIPE and raise SIGPIPE if MSG_NOSIGNAL isn't set in flags. * include/cygwin/socket.h: Define MSG_WINMASK and MSG_NOSIGNAL. * include/cygwin/version.h: Bump API minor number.
2002-08-27 * fhandler_socket.cc (fhandler_socket::check_peer_secret_event):Corinna Vinschen
Fix strace message. (fhandler_socket::connect): Remove sigframe. (fhandler_socket::accept): Ditto. (fhandler_socket::getsockname): Ditto. (fhandler_socket::getpeername): Ditto. (fhandler_socket::recvfrom): Ditto. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. (fhandler_socket::close): Ditto. (fhandler_socket::ioctl): Ditto. * ioctl.cc (ioctl): Add sigframe. *net.cc (cygwin_sendto): Ditto. (cygwin_recvfrom): Ditto. (cygwin_recvfrom): Ditto. (cygwin_connect): Ditto. (cygwin_shutdown): Ditto. (cygwin_getpeername): Ditto. (cygwin_accept): Ditto. Improve strace message. (cygwin_getsockname): Ditto. Ditto. (cygwin_recvmsg): Ditto. Ditto. (cygwin_sendmsg): Fix strace message.
2002-08-26 * fhandler.h (fhandler_socket::recvfrom): Fix prototype.Corinna Vinschen
(fhandler_socket::sendto): Ditto. * fhandler_socket.cc (fhandler_socket::recvfrom): Ditto. (fhandler_socket::sendto): Ditto. * include/sys/socket.h (recv): Fix prototype. (recvfrom): Ditto. (send): Ditto. (sendto): Ditto. * net.cc (cygwin_sendto): Ditto. Improve strace message (cygwin_recvfrom): Ditto. Ditto. (cygwin_setsockopt): Improve strace message. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Fix prototype. (cygwin_send): Ditto. (cygwin_recvmsg): Improve strace message. (cygwin_sendmsg): Ditto.
2002-08-12 * fhandler.h (fhandler_socket::recv): Remove method.Conrad Scott
(fhandler_socket::send): Ditto. * fhandler_socket.cc (fhandler_socket::recv): Ditto. (fhandler_socket::send): Ditto. (fhandler_socket::read): Delegate to fhandler_socket::recvfrom. (fhandler_socket::write): Delegate to fhandler_socket::sendto. (fhandler_socket::sendto): Check for null `to' address. * net.cc (cygwin_sendto): Check for zero request length. (cygwin_recvfrom): Ditto. Fix signature, use void *buf. (cygwin_recv): Delegate to cygwin_recvfrom. (cygwin_send): Delegate to cygwin_sendto.
2002-08-08 * winsup.h (__check_null_invalid_struct): Make ptr argument non-const.Conrad Scott
(__check_null_invalid_struct_errno): Ditto. * miscfuncs.cc (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr_errno): Remove superfluous cast. * net.cc (get): Set appropriate errno if fd is not a socket. (cygwin_sendto): Fix parameter checking. (cygwin_recvfrom): Ditto. (cygwin_setsockopt): Ditto. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_gethostbyaddr): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_listen): Ditto. (cygwin_getpeername): Ditto. (cygwin_send): Ditto. (cygwin_shutdown): Ditto. Move sigframe to fhandler_socket. (cygwin_recvmsg): Fix parameter checking. Add tracing. (cygwin_sendmsg): Ditto. * fhandler_socket.cc (fhandler_socket::shutdown): Add sigframe. * resource.cc (setrlimit): Fix parameter checking.