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
2015-04-23Fix buffer size error handling in gethostname.Renato Silva
* net.cc (cygwin_gethostname): Fix buffer size error handling. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-03-13net.cc: Remove extra braces.Alexey Pavlov
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-01-23 * net.cc (cygwin_inet_pton): Declare.Corinna Vinschen
(gethostby_specials): New function. (gethostby_helper): Change returned addrtype in 4-to-6 case. (gethostbyname2): Call gethostby_specials.
2015-01-20 * common.din (sockatmark): Export.Corinna Vinschen
* net.cc (sockatmark): New function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-11-20 * net.cc (fdsock): Change default values for socket buffers on 32 bitCorinna Vinschen
to fix performance on 10Gb networks.
2014-10-13 * net.cc (cygwin_setsockopt): Drop redundant test for AF_LOCAL andCorinna Vinschen
SOCK_STREAM in SO_PEERCRED case, as in the original patch.
2014-10-11 Add setsockopt(sd, SOL_SOCKET, SO_PEERCRED, NULL, 0) to disableCorinna Vinschen
initial handshake on AF_LOCAL sockets. * fhandler.h (class fhandler_socket): Add no_getpeereid status flag. (fhandler_socket::af_local_set_no_getpeereid): New prototype. * fhandler_socket.cc (fhandler_socket::af_local_connect): Skip handshake if no_getpeereid is set. Add debug output. (fhandler_socket::af_local_accept): Likewise. (fhandler_socket::af_local_set_no_getpeereid): New function. (fhandler_socket::af_local_copy): Copy no_getpeereid. (fhandler_socket::getpeereid): Fail if no_getpeereid is set. * net.cc (cygwin_setsockopt): Add SO_PEERCRED for AF_LOCAL/SOCK_STREAM sockets. Add comment to explain why we need it. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-08-22 * Throughout, use __try/__except/__endtry blocks, rather than myfaultCorinna Vinschen
handler. * cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs has been moved from _local_storage to _cygtls. * cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage of counters. Change type of counters to uint32_t for clarity. Remove _cygtls as friend class. (struct _local_storage): Move pathbufs from here... (struct _cygtls): ...to here, allowing to access it from _sigbe. (class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt members. (san::setup): Drop parameter. Don't initialize removed members. (san::leave): Don't set removed members. (class myfault): Only define on 32 bit. (myfault::faulted): Only keep implementation not taking any parameter. Drop argument in call to sebastian.setup. (__try/__leave/__except/__endtry): Implement to support real SEH. For now stick to SJLJ on 32 bit. * dcrt0.cc (dll_crt0_0): Drop 64 bit call to exception::install_myfault_handler. * exception.h (exception_handler): Define with EXCEPTION_DISPOSITION as return type. (PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer to _DISPATCHER_CONTEXT on 64 bit. (class exception): Define separately for 32 and 64 bit. (exception::myfault): Add handler for myfault SEH handling on 64 bit. (exception::exception): Fix mangled method name to account for change in type of last parameter. (exception::install_myfault_handler): Remove. * exceptions.cc (exception::myfault_handle): Remove. (exception::myfault): New SEH handler for 64 bit. * gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when returning to the caller. * ntdll.h: Move a comment to a better place. (struct _SCOPE_TABLE): Define on 64 bit. * thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround. * tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs. (tls_pathbuf::destroy): Change type of loop variables to uint32_t. * tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to uint32_t. Accommodate new place of pathbufs. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Regenerate.
2014-08-21 * net.cc (if_freenameindex): Don't catch a SEGV from free to failCorinna Vinschen
loudly on double free.
2014-06-23 * net.cc (cygwin_getaddrinfo): Fix value of hint->ai_addrlen on 64 bit.Corinna Vinschen
Explain why.
2014-05-19 * net.cc (call_gaa): Fix setting pa_ret pointer in case of an errorCorinna Vinschen
from GetAdaptersAddresses (CID 60218). (get_ifs): Add missing braces in AF_INET6 case which broke netmask computation. Break out of loop if prefix gets <= 0 (CID 59939).
2014-05-05 * net.cc (cygwin_getsockopt): Rearrange code slightly and handleCorinna Vinschen
TCP_NODELAY just like SO_KEEPALIVE and SO_DONTROUTE.
2014-04-24 * fhandler_socket.cc: On x86_64, define u_long as __ms_u_long beforeCorinna Vinschen
including the windows headers. Explain why. (get_inet_addr): Convert ANY address to LOOPBACK address. Explain why. (fhandler_socket::evaluate_events): Forcibly set SO_ERROR socket option in case a connection attempt failed. Explain why. (fhandler_socket::ioctl): Drop x86_64 re-definition of u_long here. * fhandler_procnet.cc: On x86_64, define u_long as __ms_u_long before including the windows headers. Explain why. * net.cc: Ditto.
2014-04-16 * net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS.Corinna Vinschen
2014-02-07 * fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo inCorinna Vinschen
comment. * mount.cc (mount_info::from_fstab): Use tmp_pathbuf rather than stack for big local buffer. * net.cc (cygwin_gethostname): Call GetComputerNameExA rather than GetComputerNameA if gethostname failed. * shared.cc (user_info::initialize): Fix formatting. * include/sys/file.h: Define flock and accompanying macros if not already defined in sys/_default_fcntl.h.
2013-11-24 Throughout, drop unnecessary explicit includes of windows header filesCorinna Vinschen
included by default. * winlean.h: Add long comment to explain why we have to define certain symbols. (_NORMALIZE_): Define. (_WINNLS_): Drop definition and subsequent undef. (_WINNETWK_): Ditto. (_WINSVC_): Ditto. 2013-11-23 Eric Blake <eblake@redhat.com>
2013-11-19 * net.cc (cygwin_getaddrinfo): Fix a comment. Only memset whints ifCorinna Vinschen
hints is NULL. Add a comment and set whints.ai_family explicitely to AF_UNSPEC to follow glibc man page closely. Check flags against whints for locality.
2013-11-19 * autoload.cc (IdnToAscii): Define.Corinna Vinschen
(IdnToUnicode): Define. (FreeAddrInfoW): Define. (GetAddrInfoW): Define. (GetNameInfoW): Define. * net.cc: Drop W. Richard STEVENS libgai implementation. (cygwin_freeaddrinfo): Move code from ipv4_freeaddrinfo here. Move definition up in file to avoid forward declaration in ga_duplist. (ga_dup): Take addrinfoW as input. Add parameters to get IDN flags and to set error value. Handle IDN flags and especially AI_CANONIDN. Convert input wchar_t ai_canonname string to multibyte for output. (ga_duplist): Add parameters to get IDN flags and to set error value and propagate to ga_dup. Call cygwin_freeaddrinfo. (gai_errmap): Add comments. Align error strings to GLibc. Add EAI_IDN_ENCODE entry. (get_ipv6_funcs): Remove. (load_ipv6_guard): Remove. (ipv6_inited): Remove. (load_ipv6): Remove. (load_ipv6_funcs): Remove. (cygwin_getaddrinfo): Drop calling load_ipv6. Handle AI_IDN* flags. Convert input strings to wchar_t and call GetAddrInfoW/FreeAddrInfoW. In case hints is NULL, set default ai_flags explicitely to AI_V4MAPPED | AI_ADDRCONFIG, as documented for Glibc. Only add AI_ALL if AI_ADDRCONFIG is not given. Unconditionally add Windows-specific AI_DISABLE_IDN_ENCODING to ai_flags to make IDN behaviour compatible to Glibc even on Windows 8 and later. (cygwin_getnameinfo): Drop calling load_ipv6. Handle NI_IDN* flags. Call GetNameInfoW and convert returned strings from wchar_t to multibyte. * include/netdb.h: Add comments to describe flags and error values. (AI_*): Define all flags using hex values for clearness. (AI_IDN): Define. (AI_CANONIDN): Define. (AI_IDN_ALLOW_UNASSIGNED): Define. (AI_IDN_USE_STD3_ASCII_RULES): Define. (NI_*): Define all flags using hex values for clearness. (NI_IDN): Define. (NI_IDN_ALLOW_UNASSIGNED): Define. (NI_IDN_USE_STD3_ASCII_RULES): Define. (EAI_IDN_ENCODE): Define.
2013-10-24 * devices.in (dev_storage): Map /dev/zero and /dev/full to \Device\Null.Corinna Vinschen
* devices.cc: Regenerate. * dtable.h (struct dtable): Make fhandler_base friend, rather than fhandler_disk_file. * fhandler.cc (fhandler_base::open_with_arch): Create unique id. (fhandler_base::cleanup): Call del_my_locks. (fhandler_base::fcntl): Handle F_GETLK, F_SETLK and F_SETLKW. * fhandler.h (fhandler_base::get_dev): Return real device number. (fhandler_base::set_unique_id): New inline method. (fhandler_disk_file::lock): Drop declaration. (fhandler_disk_file::get_dev): New method, return pc.fs_serial_number. (fhandler_dev_zero::open): Drop declaration. * fhandler_disk_file.cc (fhandler_disk_file::close): Move del_my_locks call to fhandler_base::open_with_arch. (fhandler_disk_file::fcntl): Move handling of locking commands to fhandler_base::fcntl. (fhandler_base::open_fs): Drop call to NtAllocateLocallyUniqueId. * fhandler_zero.cc (fhandler_dev_zero::open): Remove so that default fhandler_base::open is used to open \Device\Null. * flock.cc (fixup_lockf_after_exec): Finding a single fhandler is enough here. (fhandler_base::lock): Replace fhandler_disk_file::lock. Refuse to lock nohandle devices. Handle read/write test using POSIX flags. Explain why. Never fail on SEEK_CUR or SEEK_END, rather assume position 0, just as Linux. * net.cc (fdsock): Create unique id.
2013-06-13 * net.cc (gen_old_if_name): New function to generate short interfaceCorinna Vinschen
names for old pre-1.7 applications. (get_ifs): Call gen_old_if_name for said old applications.
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen
2013-01-21Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor
checkins. Regularize copyright format.
2012-11-26 * fhandler_registry.cc: Drop Mingw.org considerations.Corinna Vinschen
* fhandler_serial.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_tape.cc: Ditto. * fhandler_tty.cc: Ditto. * net.cc: Ditto. * ntdll.h: Ditto. * sched.cc: Ditto. * sec_helper.cc: Ditto.
2012-08-21* net.cc (get_adapters_addresses): Drop FIXME part of comment.Christopher Faylor
2012-08-17whitespace cleanupChristopher Faylor
2012-07-06Add files missing in previous checkinCorinna Vinschen
2012-07-02* Makefile.in: Add some more optimization flags for cygwait, malloc and ↵Christopher Faylor
path. Explain why -fomit-frame-pointer doesn't work right for passwd.o and path.o. Add -static to link command line for cygwin0.dll. * fhandler_disk_file.cc (fhandler_disk_file::facl): Reorganize slightly to silence compiler warning when compiling with -fstack-check. * net.cc (inet_ntop6): Initialize structure members to silence compiler warning when compiling with -fstack-check. * pseudo-reloc.cc (_pei386_runtime_relocator): Make this a C function. Detect NULL u. * winsup.h (_pei386_runtime_relocator): Declare this as extern "C". * lib/_cygwin_crt0_common.cc (_pei386_runtime_relocator): Call with NULL argument. * signal.cc (sigaction_worker): Eliminate last argument. Let callers report their own strace info. Regparmize. (sigaction): Reflect sigaction_worker changes. (siginterrupt): Ditto. * exceptions.cc: Update copyright.
2012-05-21 * net.cc (cygwin_recvfrom): Don't shortcircuit if len == 0. Add commentCorinna Vinschen
to explain why. (cygwin_recv): Ditto. (cygwin_recvmsg): Ditto.
2012-05-03 * net.cc (get_adapters_addresses): Only create thread on affectedCorinna Vinschen
systems. Change comment acordingly. * wincap.h (wincaps::has_gaa_largeaddress_bug): New element. * wincap.cc: Implement above element throughout. (wincap_8): New globale wincaps to support Windows 8. (wincapc::init): Take Windows 8 into account. Set new has_gaa_largeaddress_bug member to false on 32 bit systems.
2012-03-08 * net.cc (call_gaa): New thread function to call GetAdaptersAddresses.Corinna Vinschen
(get_adapters_addresses): Call call_gaa. If necessary, call it as child thread. Explain why that's necessary.
2012-02-27 * cygtls.cc (dll_cmp): New comparison function for bsearch.Corinna Vinschen
(well_known_dlls): New array containing well-known DLLs. (_cygtls::call2): Add code for BLODA detection. * net.cc (fdsock): Ditto.
2011-12-18Clean up whitespace.Christopher Faylor
2011-12-04Throughout, remove extra space after function name from debugging output.Christopher Faylor
Throughout, change syscalls to report on return values using new %R format option. * smallprint.cc (__small_vsprintf): Add parsing for %R to report on return values and possible errno from syscalls. * errno.cc (errmap): Add PRIVILEGE_NOT_HELD. * fhandler_tty.cc (fhandler_pty_master::setup): When creating a thread use shorter name to reduce debuggging output. * select.cc (start_thread_pipe): Ditto. (start_thread_serial): Ditto. (start_thread_socket): Ditto. (start_thread_mailslot): Ditto. * sigproc.cc (talktome): Ditto.
2011-10-05 * net.cc (socketpair): Bind first socket to loopback only as well.Corinna Vinschen
2011-09-02 * net.cc (cygwin_getsockopt): Drop erroneous double conversion of errorCorinna Vinschen
code returned by SOL_SOCKET/SO_ERROR. Fix error handling.
2011-08-172011-08-16 Pierre Humblet <Pierre.Humblet@ieee.org>Pierre Humblet
* net.cc (gethostby_helper): Remove DEBUGGING code from and streamline the second pass.
2011-08-04 * net.cc (socketpair): Release sb0 if there's no space left for sb1.Corinna Vinschen
2011-07-29 Throughout change "WinSock" to "Winsock" in comments.Corinna Vinschen
* fhandler_socket.cc (fhandler_socket::sendmsg): Add missing call to get_inet_addr to convert AF_LOCAL to AF_INET sockets. * net.cc (cygwin_socket): Workaround UDP Winsock problem. Add comment to explain why. * select.cc: Include winsock2.h rather than winsock.h.
2011-06-06whitespace eliminationChristopher Faylor
2011-05-01 * net.cc (fdsock): Drop setting uninterruptible_io to true.Corinna Vinschen
2011-04-19 * net.cc (get_ipv4fromreg_ipcnt): Rearrange to fetch all registryCorinna Vinschen
values at once using RtlQueryRegistryValues. (get_ipv4fromreg): Ditto.
2011-04-04 Drop NT4 support.Corinna Vinschen
* autoload.cc (DnsQuery_A): Fatal if not available. (DnsRecordListFree): Ditto. (DsGetDcNameW): Ditto. (NetGetAnyDCName): Remove. (NetGetDCName): Remove. (EnumProcessModules): Fatal if not available. (GetModuleFileNameExW): Ditto. (GetModuleInformation): Ditto. (GetProcessMemoryInfo): Ditto. (QueryWorkingSet): Ditto. (LsaRegisterLogonProcess): Ditto. * fenv.cc (_feinitialise): Drop supports_sse condition. * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment. (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition. (fhandler_disk_file::opendir): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment. * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code. * fhandler_process.cc (get_process_state): Ditto. * kernel32.cc (GetWindowsDirectoryW): Remove. (GetWindowsDirectoryA): Remove. * miscfuncs.cc (nice_to_winprio): Drop NT4-only code. * mount.cc (fs_info::update): Fix comments. * net.cc (get_2k_ifs): Drop NT4-only code. * sec_auth.cc (get_logon_server): Ditto. (lsaauth): Drop NT4-specific error handling. * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally. * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE. (peek_windows): Drop NT4-only condition in call to PeekMessage. * syscalls.cc (gethostid): Remove NT4-only workaround. * wincap.cc: Througout, drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from wincaps. (wincap_nt4sp4): Remove. (wincap_minimal): Set to wincap_2000. (wincapc::init): Rely on availability of OSVERSIONINFOEX structure. Treat error from GetVersionEx as fatal. Treat NT4 as fatal. * wincap.h (struct wincaps): Drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags and methods. * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW. (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
2011-03-29 * net.cc (SIO_BASE_HANDLE): Define.Corinna Vinschen
(fdsock): If we got an LSP handle, try to create a copy of the base handle instead. Change comment to explain.
2011-02-21 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,Corinna Vinschen
rather than recvmsg. (fhandler_socket::writev): Call send_internal directly, rather than sendmsg. * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather than cygwin_recvfrom. (cygwin_send): Call fhandler_socket::sendto directly, rather than cygwin_sendto.
2011-02-15 * Throughout fix copyright dates.Corinna Vinschen
2011-01-31 * fhandler_socket.cc (address_in_use): Disable. Add comment.Corinna Vinschen
(fhandler_socket::bind): Change comment to explain setting the SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for address in use. * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve comment to compensate for the deleted comment in fhandler_socket::bind. * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps. * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags and method.
2010-12-02 * net.cc (get_xp_ifs): Fix counting of idx to return stable interfaceCorinna Vinschen
alias names for interfaces with multiple IPv4 addresses.
2010-11-23 * autoload.cc (SendARP): Remove.Corinna Vinschen
* net.cc (get_flags): Set IFF_NOARP flag for PPP and SLIP devices. (get_xp_ifs): Unify IFF_BROADCAST setting. Drop calling SendARP to set IFF_NOARP flag.
2010-11-22 * net.cc (get_ipv4fromreg_ipcnt): Fix debug output. Only create debugCorinna Vinschen
output if error is not ERROR_FILE_NOT_FOUND. (get_ipv4fromreg): Ditto.
2010-09-28 * net.cc (getdomainname): Drop special case for NT4.Corinna Vinschen