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
2012-07-24 * wincap.cc (wincapc::init): Drop memset call since it can result inCorinna Vinschen
a race condition. Drop all considerations for pre-Windows 2000 systems since Cygwin won't start on them anyway.
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-04-15wincap.h: Rename assitant to assistant throughout. wincap.cc: Ditto.Christopher Faylor
* devices.in (exists_console): Use fhandler_console::exists () rather than raw test. * devices.cc: Regenerate. * fhandler.h (fhandler_console::exists): Define new function. * fhandler_console.cc (fhandler_console::need_invisible): Use fhandler_console::exists () rather than raw test. * spawn.cc: Rename assitant to assistant throughout. (child_info_spawn::worker): Simplify test for when to start a non-Cygwin process in its own process group. Just do it whenever we start a non-Cygwin process.
2012-02-21 * shared.cc (shared_info::init_obcaseinsensitive): Check actual stateCorinna Vinschen
of case sensitivity on post-Windows 2000 systems. * wincap.h (wincaps::kernel_is_always_casesensitive): New element. * wincap.cc: Implement above element throughout.
2012-02-17 * ntdll.h (struct _PEB): Add EnvironmentUpdateCount member.Corinna Vinschen
* spawn.cc (child_info_spawn::worker): Speed up job recognition. Expand comment to explain every little detail and so we never forget. * wincap.h (wincaps::has_program_compatibility_assitant): New element. * wincap.cc: Implement above element throughout.
2011-12-19 * dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stackCorinna Vinschen
rather than for wincap.is_wow64. Accommodate name change from wow64_has_64bit_parent to wow64_needs_stack_adjustment. Align comment. (_dll_crt0): Ditto. * wincap.h (wincaps::wow64_has_secondary_stack): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Set wow64_has_secondary_stack to false on non-64 bit systems. * wow64.cc (wow64_needs_stack_adjustment): Rename (hopefully the last time) from wow64_has_64bit_parent. (wow64_eval_expected_main_stack): Fix comment to reflect real life. (wow64_test_for_64bit_parent): Fix comment. * wow64.h (wow64_needs_stack_adjustment): Accommodate new name.
2011-10-15 * sec_auth.cc (get_token_group_sidlist): Add CONSOLE LOGON SID onCorinna Vinschen
systems supporting it. Never add SERVICE SID but keep code in for future reference. Explain why. (get_priv_list): Add cygpsid pointer parameter. Point it to the mandatory integrity SID which matches account and privileges. (create_token): Fetch mandatory integrity SID from call to get_priv_list. (lsaauth): Call get_priv_list with additional NULL pointer. Change comment accordingly. * sec_helper.cc (well_known_console_logon_sid): New static SID. (cygpriv): Change to structure containing extra flag to store info about required integrity level. (privilege_luid): Accommodate changes to cygpriv. Return integrity level in new high_integrity parameter. (privilege_name): Accommodate changes to cygpriv. (set_privilege): Drop trailing \n from debug output. (set_cygwin_privileges): Don't set SE_CREATE_GLOBAL_PRIVILEGE anymore since it's just not needed, but keep code in for future reference. Change comment accordingly. * security.h (well_known_console_logon_sid): Declare. (privilege_luid): Align declaration to above change. * wincap.h (wincaps::has_console_logon_sid): New element. * wincap.cc: Implement above element throughout.
2011-07-31* cygthread.cc (cygthread::async_create): Define new function.Christopher Faylor
* cygthread.h (cygthread::create): Use correct regparm. (cygthread::standalone): Delete from class and from all constructors. (cygthread::cygthread): Use three only arguments for detached threads, and start the thread via QueueUserAPC/async_create. * dcrt0.cc (dll_crt0_0): Remove handling for wincap.has_buggy_thread_startup. (dll_crt0_1): Ditto. * wincap.cc: Ditto throughout. * wincap.h: Ditto.
2011-05-20 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.Corinna Vinschen
(class child_info_fork): Remove stacksize, add stackaddr and guardsize members. * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Partial rewrite to regenerate the stack exactly as in the parent. (child_info_fork::alloc_stack): Set stackaddr to 0, rather than stacksize. (dll_crt0_1): Check for stackaddr before changing the stack addresses in the TEB. * fork.cc (frok::child): Check for stackaddr here. (frok::parent): Set ch.stackaddr and ch.guardsize if not called from the main thread. * init.cc (dll_entry): Replace pointer to NT_TIB with pointer to TEB. Fix incorrectly changed address test before removing _my_tls. Set StackLimit to NULL on Windows 2000. Explain why. * miscfuncs.cc (struct thread_wrapper_arg): Store stackbase rather than stacksize, store commitaddr, remove guardsize. Store all pointers as char * for easier address arithmetic. (thread_wrapper): Rewrite to remove OS stack before calling thread function. Add lots of comments to explain what we do. (CygwinCreateThread): Reserve our own stack in case we got no application stack. Add comments. * ntdll.h (struct _TEB): Extend defintion up to DeallocationStack member. * thread.cc (pthread_attr::pthread_attr): Use "(size_t) -1" rather then 0xffffffff. * wincap.h (wincaps::has_stack_size_param_is_a_reservation): New element. * wincap.cc: Implement above element throughout.
2011-05-16 * heap.cc (heap_init): Rewrite initial heap allocation to use addressesCorinna Vinschen
beyond 0x20000000. Explain why and how. * shared.cc (shared_info::heap_slop_size): Remove. * shared_info.h (class shared_info): Remove heap_slop_inited and heap_slop members. Remove heap_slop_size declaration. (CURR_SHARED_MAGIC): Update. * wincap.cc: Throughout, drop heapslop. * wincap.h (struct wincaps): Drop heapslop.
2011-05-10 * fhandler_proc.cc (format_proc_uptime): Don't call GetSystemInfo.Corinna Vinschen
Fetch CPU count from wincap. (format_proc_stat): Ditto. * globals.cc (system_info): Move to wincap. * heap.cc (heap_init): Fetch page size from wincap. * syscalls.cc (getpagesize): Fetch allocation granularity from wincap. (getsystempagesize): Fetch page size from wincap. * wincap.cc (wincap_2003): Default is_server to false. (wincapc::init): Call GetSystemInfo here. Always set is_server value. * wincap.h (class wincapc): Add system_info as private member. (wincapc::cpu_count): New public method. (wincapc::page_size): Ditto. (wincapc::allocation_granularity): Ditto.
2011-05-10 * environ.cc (set_chunksize): Remove.Corinna Vinschen
(parse_thing): Remove forkchunk entry. * fork.cc (child_copy): Drop handling external chunksize setting. * wincap.cc: Througout, drop chunksize. (wincapc::set_chunksize): Remove. * wincap.h (struct wincaps): Drop chunksize and declaration of set_chunksize.
2011-04-28 * autoload.cc (GetSecurityInfo): Remove.Corinna Vinschen
* ntdll.h (RtlConvertToAutoInheritSecurityObject): Declare. (RtlDeleteSecurityObject): Declare. (RtlGetControlSecurityDescriptor): Declare. (RtlLengthSecurityDescriptor): Declare. * security.cc (file_mapping): New global variable. (get_file_sd): Rewrite. Clean up code. Get rid of GetSecurityInfo call. (alloc_sd): Call RtlSetControlSecurityDescriptor to set SE_DACL_PROTECTED flag. (check_file_access): Remove mapping. Use file_mapping instead. (check_registry_access): Rename mapping to reg_mapping. * wincap.cc: Througout, drop use_get_sec_info_on_dirs, * wincap.h (struct wincaps): Drop use_get_sec_info_on_dirs.
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-04-02 * autoload.cc (GetExtendedTcpTable): Remove.Corinna Vinschen
(GetTcpTable): Remove. (CharNextExA): Remove. (FindWindowA): Remove. (ShowWindowAsync): Remove. * dcrt0.cc (disable_dep): Remove unused function. (dll_crt0_0): Drop comment babbling about TS & DEP. * fhandler_socket.cc (address_in_use): Remove unused function. * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps. (wincapc::init): Drop code setting ts_has_dep_problem flag. * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
2011-03-24* wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.Christopher Faylor
2011-03-20 * fenv.cc (_feinitialise); Don't use SSE instructions on systems notCorinna Vinschen
supporting them. * wincap.h (wincaps::supports_sse): New element. * wincap.cc: Implement above element throughout.
2011-03-08 * fhandler.cc (fhandler_base::open): When creating a file on aCorinna Vinschen
filesystem supporting ACLs, create the file with WRITE_DAC access. Explain why. * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for directories. * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets. * path.cc (symlink_worker): Ditto for symlinks. * security.cc (get_file_sd): Always call GetSecurityInfo for directories on XP and Server 2003. Improve comment to explain why. (set_file_attribute): Explicitely cast mode_t value to bool in call to get_file_sd. * wincap.h (wincaps::use_get_sec_info_on_dirs): New element. * wincap.cc: Implement above element throughout.
2011-03-01* autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack onChristopher Faylor
systems which need it. * wincap.cc (use_dont_resolve_hack): Set as appropriate. * wincap.h (use_dont_resolve_hack): Define.
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.
2011-01-11 * fhandler.h (MAX_PARTITIONS): New definition.Corinna Vinschen
(class fhandler_dev_floppy): Add partitions array member. Add close method. * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero out partitions array. (fhandler_dev_floppy::open): Fix "entire disk" condition for call to DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO). When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME) on all affected disk partitions starting with Vista. (fhandler_dev_floppy::close): New method. (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any. * wincap.h (wincaps::has_restricted_raw_disk_access): New element. * wincap.cc: Implement above element throughout.
2010-10-09 * cygheap.h (cwdstuff::override_win32_cwd): Declare.Corinna Vinschen
* ntdll.h (struct _PEB): Add members accessed by the fast cwd method starting with Vista. (struct _KUSER_SHARED_DATA): Define with only the DismountCount. (RtlAllocateHeap): Declare. (RtlEnterCriticalSection): Declare. (RtlFreeHeap): Declare. (RtlLeaveCriticalSection): Declare. * path.cc (get_user_proc_parms): Remove. (struct _FAST_CWD): New structure. (fast_cwd_ptr): Define. (SharedUserData): Define. (peek32): Define. (find_fast_cwd_pointers): New function to find the global pointer to the current FAST_CWD structure. (copy_cwd_str): New helper function. (cwdstuff::override_win32_cwd): New method to set the Win32 CWD. (cwdstuff::init): Just call override_win32_cwd from here when started from native Win32 parent. (cwdstuff::set): Access Win32 CWD via PEB reference instead of using get_user_proc_parms function. Memorize old DismountCount before opening directory handle. Call override_win32_cwd to set up Win32 CWD. Be more verbose in comments. * wincap.h (wincaps::has_fast_cwd): New element. * wincap.cc: Implement has_fast_cwd element throughout.
2010-09-26 * fhandler_socket.cc (fhandler_socket::bind): Drop has_exclusiveaddruseCorinna Vinschen
condition. Fix comment about availability. Move remaining comment to the right spot. Drop has_ip_helper_lib condition. * net.cc (cygwin_setsockopt): Drop has_disabled_user_tos_setting condition. Fix comment. (get_2k_ifs): Fix comment. (get_nt_ifs): Remove. (getifaddrs): Drop call to get_nt_ifs. (get_ifconf): Ditto. * wincap.cc: Throughout, drop has_ip_helper_lib, has_disabled_user_tos_setting, and has_exclusiveaddruse settings from wincaps. (wincap_unknown): Remove. (wincap_nt4): Remove. (wincap_minimal): New macro, set to wincap_nt4sp4 for now. (wincapc::init): Drop test for pre-SP4 NT4. Just imply at least NT SP4. Replace references to wincap_unknown with references to wincap_minimal. * wincap.h (struct wincaps): Drop has_ip_helper_lib, has_disabled_user_tos_setting, and has_exclusiveaddruse flags and methods.
2010-09-20* wincap.h (wincaps::has_buggy_thread_startup): Declare.Christopher Faylor
(wincapc::has_buggy_thread_startup): Ditto. * wincap.cc::wincap_*): Accommodate has_buggy_thread_startup. (wincapc::init): Explicitly turn off has_buggy_thread_startup if not WOW64. * cygthread.h (cygthread::thread_handle): Declare/define new method. * dcrt0.cc (_dll_crt0): Don't call __sinit here. (dll_crt0_0): Don't call sigproc_init during initialization if wincap.has_buggy_thread_startup(). (dll_crt0_1): Defer sigproc_init to here when wincap.has_buggy_thread_startup(). Call __sinit after we've determined that we're not forking. (__main): Rework comments. Add potential future reminder.
2010-08-30 * autoload.cc (MsgWaitForMultipleObjectsEx): Define.Corinna Vinschen
(MsgWaitForMultipleObjects): Remove. * select.cc (select_stuff::wait): Use MsgWaitForMultipleObjectsEx with QS_ALLPOSTMESSAGE and, if possible, MWMO_INPUTAVAILABLE flags. Explain why. Fix a potential crash due to a NULL pointer in WAIT_FAILED case. (peek_windows): Use filter pattern on NT4. Explain why. * wincap.h (wincaps::has_mwmo_inputavailable): New element. * wincap.cc: Implement above element throughout.
2010-07-15 * wincap.cc (wincap_7): Set needs_count_in_si_lpres2 to false.Corinna Vinschen
2010-01-23 * Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.Corinna Vinschen
* autoload.cc (LocaleNameToLCID): Define. * cygwin.din (strfmon): Export. * nlsfuncs.cc: New file. Define a lot of internal functions called from setlocale. (wcscoll): Implement locale-aware here, using CompareStringW function. (strcoll): Ditto. (wcsxfrm): Implement locale-aware here, usingLCMapStringW function. (strxfrm): Ditto. (__set_charset_from_locale): Replace __set_charset_from_codepage. Return Linux-compatible charset. * strfuncs.cc (__set_charset_from_codepage): Remove. * wchar.h (__set_charset_from_codepage): Drop definition. * wincap.h (wincaps::has_localenames): New element. * wincap.cc: Implement above element throughout. * libc/strfmon.c: New file. * libc/strptime.cc: Remove locale constant strings in favor of access to locale-specifc data. (strptime): Point _CurrentTimeLocale to locale-specific data. Throughout use correct locale-specific format fields for all locale-specific formats. * include/monetary.h: New file. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2009-12-18 Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcessCorinna Vinschen
according to context. Throughout, replace hMainThread with GetCurrentThread/NtCurrentThread according to context. * dcrt0.cc (dll_crt0_0): Drop duplication of GetCurrentProcess to hMainProc. Drop duplication of GetCurrentThread to hMainThread. * dtable.cc (dtable::stdio_init): Remove useless comment. * globals.cc (hMainProc): Remove. (hMainThread): Remove. * ntdll.h (NtCurrentProcess): Define. (NtCurrentThread: Define.
2009-11-03 * security.cc (alloc_sd): Re-introduce setting the SE_DACL_PROTECTEDCorinna Vinschen
flag. Remove INHERITED_ACE flag from all inherited ACEs. Add comment. Fix ace_off counter in unrelated ACE loop. * wincap.cc: Re-add has_dacl_protect throughout. * wincap.h: Ditto.
2009-10-24 * fhandler.cc (fhandler_base::open): Always create file with defaultCorinna Vinschen
security descriptor and fix descriptor afterwards. Change comment to explain why. * security.cc (alloc_sd): Drop setting the SE_DACL_PROTECTED flag. * wincap.cc: Remove has_dacl_protect throughout. * wincap.h: Ditto.
2009-08-09 * dtable.cc (dtable::init_std_file_from_handle): Fix comment toCorinna Vinschen
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-07-20 * wincap.h (wincaps::has_always_all_codepages): New element.Corinna Vinschen
* wincap.cc: Implement above element throughout. * wchar.h (__sjis_mbtowc): Declare. (__eucjp_mbtowc): Ditto. (__gbk_mbtowc): Ditto. (__kr_mbtowc): Ditto. (__big5_mbtowc): Ditto. * syscalls.cc (internal_setlocale): Convert to char * function. Return parameter by default. Return NULL if request to use a charset can't be satisfied due to missing codepage support in the underlying OS. Fix comment. (setlocale): Store original locale. Restore to original locale if internal_setlocale returns NULL.
2009-06-26 * wincap.h (wincaps::has_broken_alloc_console): New element.Corinna Vinschen
* wincap.cc: Implement above element throughout.
2009-05-09 * dtable.cc (dtable::init_std_file_from_handle): Add workaround forCorinna Vinschen
Windows 7 64 bit issue. Add lengthy comment to explain what happens. * wincap.h (wincaps::has_console_handle_problem): New element. * wincap.cc: Implement above element throughout. (wincap_7): New wincaps structure for NT 6.1 kernels. (wincapc::init): Set has_console_handle_problem to false for 32 bit systems. Fix broken older ChangeLog entry.
2009-01-29 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode numberCorinna Vinschen
evaluation for faked "." entry. * mount.cc (fs_info::update): Move setting of is_cdrom after checking for caseinsensitivity. Recognize UDF in is_cdrom case and set caseinsensitive flag according to UDF brokenness determined by OS. Add comment to explain why. * mount.h (class fs_info): Add is_udf status flag. * path.cc (symlink_info::check): Add workaround for UDF bug in terms of casesensitivity on certain OSes. * wincap.h (wincaps::has_broken_udf): New element. (wincaps::has_broken_udf): New element
2009-01-20 * autoload.cc (WSAIoctl): Reintroduce.Corinna Vinschen
(WSASendMsg): Define. * fhandler.h (class fhandler_socket): Change definition of recv_internal and send_internal to take WSAMSG pointer as parameter. * fhandler_socket.cc (WSAID_WSARECVMSG): Define. (LPFN_WSARECVMSG): Define. (WSASendMsg): Declare. (get_ext_funcptr): New function to fetch address of WSARecvMsg. (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter. Change code accordingly. If control information is requested, fetch address of WSARecvMsg and use that instead of WSARecvFrom. (fhandler_socket::recvfrom): Change return type to ssize_t as declared in fhandler.h. Accommodate changes to recv_internal. (fhandler_socket::recvmsg): Ditto. Make sure that control information is only requested if system, address family, and socket type support it. (fhandler_socket::send_internal): Take just a LPWSAMSG parameter and the flags. Change code accordingly. If control information is provided, use WSASendMsg instead of WSASendTo. (fhandler_socket::sendto): Drop useless comment. Accommodate changes to send_internal. (fhandler_socket::sendmsg): Ditto. Make sure that control information is only provided if system, address family, and socket type support it. * wincap.h (wincaps::has_recvmsg): New element. (wincaps::has_sendmsg): New element * wincap.cc: Implement above elements throughout. * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment of type struct cmsghdr.
2008-11-12 * autoload.cc (GetSystemDEPPolicy): Define.Corinna Vinschen
(GetProcessDEPPolicy): Ditto. (SetProcessDEPPolicy): Ditto. * dcrt0.cc (disable_dep): New static function. (dll_crt0_0): Call disable_dep on platforms requiring it. Add longish comment to explain the circumstances. * wincap.h (wincaps::ts_has_dep_problem): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Set ts_has_dep_problem to true on 2008 Terminal Servers. * winsup.h (WINVER): Set to 0x0601.
2008-10-24 * wincap.cc (all wincaps): Store in .cygwin_dll_common section same asCorinna Vinschen
wincap. Add comment to explain why.
2008-07-09 * fhandler_socket.cc (fhandler_socket::bind): Don't run explicitCorinna Vinschen
local socket test in SO_REUSEADDR case on systems supporting enhanced socket security. Explain why. Only call address_in_use for AF_INET sockets. * net.cc (cygwin_setsockopt): Don't call setsockopt to set SO_REUSEADDR on systems supporting enhanced socket security. Add comment. * wincap.h (wincaps::has_enhanced_socket_security): New element. * wincap.cc: Implement above element throughout.
2008-05-15 * autoload.cc (LoadDLLfuncNt): Re-invent.Corinna Vinschen
(NtCreateTransaction): Define. (NtCommitTransaction): Define. (NtRollbackTransaction): Define. (RtlGetCurrentTransaction): Define. (RtlSetCurrentTransaction): Define. * ntdll.h (TRANSACTION_ALL_ACCESS): Define. (NtCreateTransaction): Declare. (NtCommitTransaction): Declare. (NtRollbackTransaction): Declare. (RtlGetCurrentTransaction): Declare. (RtlSetCurrentTransaction): Declare. * syscalls.cc (start_transaction): New static function to start TxF transaction. (stop_transaction): New static function to end TxF transaction. (rename): Call start_transaction and stop_transaction where appropriate on systems supporting transactions. * wincap.h (wincaps::has_transactions): New element. * wincap.cc: Implement above element throughout.
2008-04-28 * autoload.cc (IsWow64Process): Remove.Corinna Vinschen
(Wow64DisableWow64FsRedirection): Remove. (Wow64RevertWow64FsRedirection): Remove. * ntdll.h (enum _PROCESSINFOCLASS): Define ProcessWow64Information. * init.cc (respawn_wow64_process): Use NtQueryInformationProcess to get WOW64 state. * wincap.cc (wincapc::init): Ditto. * wincap.h (wincapc::wow64): Change type to ULONG.
2008-04-27 * wincap.h (wincapc::wow64): Change type to BOOL.Corinna Vinschen
* wincap.cc: Remove explicit use of this pointer in wincapc methods. (wincapc::init): Fix bug in IsWow64Process handling.
2008-04-01 * Fix copyright dates.Corinna Vinschen
2008-02-13 * cygtls.cc (_cygtls::init_exception_handler): Revert patchCorinna Vinschen
from 2005-12-02. * exceptions.cc (stack_info::walk): Add workaround for NT 5.2 64 bit OSes. * wincap.h (wincaps::has_restricted_stack_args): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Reset has_restricted_stack_args if not running under WOW64.
2007-12-12 * dcrt0.cc: Include string.h.Corinna Vinschen
(initial_env): Use small_printf's %P specifier. * dll_init.cc (dll_list::alloc): Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * dll_init.h (struct dll): Ditto. * environ.cc: Include string.h. (win_env::add_cache): Use temporary local buffer for path conversion. (posify): Ditto. * exceptions.cc (try_to_debug): Use CreateProcessW to allow long path names. * miscfuncs.cc: Drop unused implementations of strcasematch and strncasematch. (ch_case_eq): Drop. (strcasestr): Drop. (cygwin_wcscasecmp): New function. (cygwin_wcsncasecmp): New function. (cygwin_strcasecmp): New function. (cygwin_strncasecmp): New function. (cygwin_wcslwr): New function. (cygwin_wcsupr): New function. (cygwin_strlwr): New function. (cygwin_strupr): New function. * ntdll.h (RtlDowncaseUnicodeString): Declare. (RtlUpcaseUnicodeString): Declare. (RtlInt64ToHexUnicodeString): Fix typo in comment. * string.h: Disable not NLS aware implementations of strcasematch and strncasematch. (cygwin_strcasecmp): Declare. (strcasecmp): Define as cygwin_strcasecmp. (cygwin_strncasecmp): Declare. (strncasecmp): Define as cygwin_strncasecmp. (strcasematch):Define using cygwin_strcasecmp. (strncasematch):Define using cygwin_strncasecmp. (cygwin_strlwr): Declare. (strlwr): Define as cygwin_strlwr. (cygwin_strupr): Declare. (strupr): Define as cygwin_strupr. * wchar.h: New file. * wincap.cc (wincapc::init): Use "NT" as fix OS string. * winsup.h (strcasematch): Drop declaration. (strncasematch): Ditto. (strcasestr): Ditto.
2007-07-19 * autoload.cc (SetSecurityDescriptorControl): Drop.Corinna Vinschen
* security.cc (alloc_sd): Set security descriptor control flag without calling SetSecurityDescriptorControl function. * wincap.h (wincapc::has_dacl_protect): Rename from has_security_descriptor_control. * wincap.cc: Ditto throughout.
2007-07-19 * cygheap.h (init_cygheap::luid): Remove.Corinna Vinschen
* mmap.cc (mlock): Accommodate parameter change in call to push_thread_privilege. (munlock): Ditto. * ntdll.h (STATUS_NOT_ALL_ASSIGNED): Define. (NtAdjustPrivilegesToken): Declare. * sec_helper.cc (cygpriv): Reorder to match numerical privilege order. (privilege_luid): Take job of privilege_luid_by_name, using new cygpriv. (privilege_luid_by_name): Remove. (privilege_name): Accommodate new cygpriv array. (set_privilege): Call NtAdjustPrivilegesToken to avoid using advapi32. Accommodate changes to privilege_name. (set_cygwin_privileges): Simplify. Don't try to set SE_CREATE_GLOBAL_PRIVILEGE on systems not supporting it. * security.cc (sys_privs): Reorder to match numerical privilege order. Use real privilege values as defined in security.h. (get_system_priv_list): Drop unused grp_list argument. Create list of privileges according to new wincapc::max_sys_priv value. (get_priv_list): Call privilege_luid instead of privilege_luid_by_name. Make priv a local value instead of a pointer. (create_token): Accommodate parameter change in call to push_self_privilege. (lsaauth): Ditto. (check_access): Use privilege values directly instead of calling privilege_luid. * security.h: Define real privilege values. (cygpriv_idx): Remove. (privilege_luid): Change declaration. (privilege_luid_by_name): Drop declaration. (set_privilege): Change declaration. (set_process_privilege): Drop definition. (_push_thread_privilege): Accomodate new set_privilege parameters. * wincap.h (wincapc::max_sys_priv): New element. * wincap.cc: Implement above element throughout. (wincap_2000sp4): New wincaps structure. (wincap_xpsp1): Ditto. (wincap_xpsp2): Ditto. (wincapc::init): Use new wincaps. (wincapc::max_sys_priv): New element.
2007-06-21 * autoload.cc (WSAIoctl): Remove.Corinna Vinschen
* cygwin.din: Export freeifaddrs, getifaddrs. * fhandler_socket.cc (fhandler_socket::ioctl): Drop SOCKET parameter from get_ifconf. * net.cc: Include ifaddrs.h. (in_are_prefix_equal): Match addresses in network byte order. (ip_addr_prefix): Convert address into host byte order before testing with IN_LOOPBACK. (struct ifall): Define. (get_xp_ifs): Replace get_xp_ifconf. Return struct ifall array. (get_2k_ifs): Ditto, replace get_2k_ifconf. (get_nt_ifs): Ditto, replace get_nt_ifconf. (getifaddrs): New function. (freeifaddrs): New function. (get_ifconf): Call matching get_XX_ifs function and create ifc content from here. Drop lo fake since it's now in get_nt_ifs. * posix.sgml: Add freeifaddrs and getifaddrs to list of implemented BSD functions. * wincap.h (wincapc::has_broken_if_oper_status): New element. * wincap.cc: Implement above element throughout. * include/ifaddrs.h: New file. * include/cygwin/version.h: Bump API minor number.
2007-03-29 * cygheap.cc (cygheap_init): Fix formatting. Remove comment. SetCorinna Vinschen
shared_prefix depending only on terminal service capability. * dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges here. * fhandler_fifo.cc (fhandler_fifo::open): Create the mutex as global object. * posix_ipc.cc (ipc_mutex_init): Use cygheap->shared_prefix. (ipc_cond_init): Ditto. * sec_helper.cc (privilege_name): Make static. Use LookupPrivilegeName directly to be independent of the state of cygheap. (set_privilege): Take a LUID as parameter instead of an index value. Only print debug output in case of failure. (set_cygwin_privileges): Add comment. Use LookupPrivilegeValue to get privilege LUIDs. (init_global_security): Call set_cygwin_privileges here. * security.h (privilege_name): Drop declaration. (set_privilege): Declare according to above change. (set_process_privilege): Call privilege_luid to get LUID. (_push_thread_privilege): Ditto. * shared.cc (open_shared): Add comment. On systems supporting the SeCreateGlobalPrivilege, try to create/open global shared memory first. Fall back to local shared memory if that fails. * thread.cc (semaphore::semaphore): Use cygheap->shared_prefix. * wincap.h (wincapc::has_create_global_privilege): New element. * wincap.cc: Implement above element throughout.
2007-02-23 Throughout remove all usage of wincap.has_security.Corinna Vinschen
* environ.cc (environ_init): Drop setting allow_ntsec here. * grp.cc (initgroups32): Drop usage of label "out". * security.cc (allow_ntsec): Set to true by default. * syscalls.cc (seteuid32): Remove label success_9x. * wincap.cc: Remove has_security throughout. * wincap.h: Ditto.