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
2001-09-12 * Makefile.in: Build wincap.o.Corinna Vinschen
* wincap.cc: New file. * wincap.h: Ditto. * autoload.cc: Add dynamic load statement for `CreateHardLinkA'. * dcrt0.cc (os_being_run): Eliminated. (osname): Ditto. (iswinnt): Ditto. (set_os_type): Ditto. (dll_crt0_1): Call wincap.init() instead of set_os_type(). (_dll_crt0): Ditto. * environ.cc (set_chunksize): New function. (parse_thing): `forkchunk' setting now invokes function `set_chunksize'. * fork.cc (chunksize): Eliminated. Moved to be member of wincap. * host_dependent.h: Removed. * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available. * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc, environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc, fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h, security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc, times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap capability check throughout. * winsup.h: Include wincap.h. Eliminate extern declarations of `os_being_run' and `iswinnt'. Eliminate `os_type" definition. * include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12Wed Sep 12 13:03:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* autoload.cc (LoadDLLfuncEx): Auto load TryEnterCriticalSection - its a n NT only call. * thread.cc (pthread_cond::TimedWait): Use critical sections for NT. (pthread_cond::fixup_after_fork): Don't detect bad apps. (pthread_mutex::pthread_mutex): Use critical sections for NT. (pthread_mutex::~pthread_mutex): Ditto. (pthread_mutex::Lock): Ditto. (pthread_mutex::TryLock): Ditto. (pthread_mutex::UnLock): Ditto. (pthread_mutex::fixup_after_fork): Ditto. Also do not detect bad apps. (__pthread_mutex_trylock): Move WIN32 specific test into the class metho d. (__pthread_mutex_destroy): Prevent dereferencing passed pointer without valid address. * thread.h (pthread_mutex): Use critical sections for NT.
2001-09-08* cygheap.h (init_cygheap): Move heap pointers here.Christopher Faylor
* include/sys/cygwin.h (perprocess): Remove heap pointers. * dcrt0.cc (__cygwin_user_data): Reflect obsolete perprocess stuff. (_dll_crt0): Don't initialize heap pointers. (cygwin_dll_init): Ditto. (release_upto): Use heap pointers from cygheap. * heap.h: Ditto. * fork.cc (fork_parent): Ditto. Don't set heap pointers in ch. (fork_child): Remove obsolete sigproc_fixup_after_fork. * shared.cc (memory_init): Reorganize so that cygheap initialization is called prior to regular heap since regular heap uses cygheap now. * sigproc.cc (proc_subproc): Eliminate zombies allocation. (sigproc_init): Move zombies alloation here. Don't free up array on fork, just reuse it. (sigproc_fixup_after_fork): Eliminate. * sigproc.h: Ditto. * include/cygwin/version.h: Reflect change to perprocess structure.
2001-08-31* cygwin.sc: Revert to previous NO_COPY behavior.Christopher Faylor
* winsup.h: Ditto. * sigproc.cc: Ditto. * autoload.cc: Ditto.
2001-08-31* cygwin.sc: New file -- linker script for building cygwin DLL.Christopher Faylor
* Makefile.in: Use linker script to control location of cygheap. * cygheap.cc (buckets): Make static. (init_cheap): Remove special iswinnt handling. Allocate cygheap at a fixed location. Display more info when allocation fails. (cygheap_fixup_in_child): Try harder to move cygheap to correct location. Display more info when allocation fails. * fhandler.h (fhandler_socket): Add macros for tracking socket shutdown state. * net.cc (cygwin_shutdown): Set appropriate shutdown value for future use. * select.cc (select_stuff::cleanup): New method. (cygwin_select): Call cleanup explicitly to avoid a race. (select_stuff:~select_stuff): Call cleanup chain via cleanup method. (fhandler_socket::select_read): Set *_ready when shutdown has been called on the socket. (fhandler_socket::select_write): Ditto. (fhandler_socket::select_except): Ditto. * winsup.h: Move NO_COPY to "COMMON" section. * autoload.cc (wsock_started): Avoid initializing NO_COPY value. * sigproc.cc: Remove initialization from NO_COPY variables. (sigproc_init): Initialize sig_loop_wait here, rather than via initialization. (subproc_init): Initialize proc_loop_wait here, rather than via initialization.
2001-06-11* pinfo.cc: Use autoloaded ToolHelp functions throughout for Win9x.Christopher Faylor
* autoload.cc: Autoload ToolHelp functions.
2001-05-20 * autoload.cc: Add load statements for `LookupAccountNameW',Corinna Vinschen
`LsaClose', `LsaEnumerateAccountRights', `LsaFreeMemory', `LsaOpenPolicy', `LsaQueryInformationPolicy', `NetLocalGroupEnum', `NetLocalGroupGetMembers', `NetServerEnum', `NetUserGetGroups' and `NtCreateToken'. * ntdll.h: Add declaration for `NtCreateToken'. * sec_helper.cc: Add `well_known_local_sid', `well_known_dialup_sid', `well_known_network_sid', `well_known_batch_sid', `well_known_interactive_sid', `well_known_service_sid' and `well_known_authenticated_users_sid'. (cygsid::string): Define as const method. (cygsid::get_sid): Set psid to NO_SID on error. (cygsid::getfromstr): Ditto. (cygsid::getfrompw): Simplify. (cygsid::getfromgr): Check for gr == NULL. (legal_sid_type): Move to security.h. (set_process_privilege): Return -1 on error, otherwise 0 or 1 related to previous privilege setting. * security.cc (extract_nt_dom_user): Remove `static'. (lsa2wchar): New function. (open_local_policy): Ditto. (close_local_policy): Ditto. (get_lsa_srv_inf): Ditto. (get_logon_server): Ditto. (get_logon_server_and_user_domain): Ditto. (get_user_groups): Ditto. (is_group_member): Ditto. (get_user_local_groups): Ditto. (sid_in_token_groups): Ditto. (get_user_primary_group): Ditto. (get_group_sidlist): Ditto. (get_system_priv_list): Ditto. (get_priv_list): Ditto. (get_dacl): Ditto. (create_token): Ditto. (subauth): Return immediately if SE_TCB_NAME can't be assigned. Change all return statements in case of error to jumps to `out' label. Add `out' label to support cleanup. * security.h: Add extern declarations for `well_known_local_sid', `well_known_dialup_sid', `well_known_network_sid', `well_known_batch_sid', `well_known_interactive_sid', `well_known_service_sid' and `well_known_authenticated_users_sid'. Add extern declarations for functions `create_token', `extract_nt_dom_user' and `get_logon_server_and_user_domain'. (class cygsid): Add method `assign'. Change operator= to call new `assign' method. Add `debug_print' method. (class cygsidlist): New class. (legal_sid_type): Moved from sec_helper.cc to here. * spawn.cc (spawn_guts) Revert reversion of previous patch. Call `RevertToSelf' and `ImpersonateLoggedOnUser' instead of `seteuid' again. * syscalls.cc (seteuid): Rearranged. Call `create_token' now when needed. Call `subauth' if `create_token' fails. Try setting token owner and primary group only if token was not explicitely created by `create_token'. * uinfo.cc (internal_getlogin): Try harder to generate correct user information. Especially don't trust return value of `GetUserName'.
2001-05-19 * autoload.cc: Add missing load statement for `CancelIo'.Corinna Vinschen
2001-05-19* grp.cc (read_etc_group): Don't copy mutex on fork.Christopher Faylor
* pwd.cc (read_etc_passwd): Ditto. * autoload.cc (LoadDLLfuncEx): Use LoadDLLprime to initialize DLL specific area.
2001-05-16* autoload.h: Eliminate.Christopher Faylor
* autoload.cc: Pull in autoload.h. Eliminate many macros. Rewrite to avoid necessity of initialization routines. Just use a standard one. (wsock_init): New function. Moved from net.cc. * net.cc (wsock_init): Move to autoload.cc. (wsadata): Make global. * dtable.cc (dtable::build_fhandler): Use more reliable method for checking if net stuff has been loaded.
2001-05-15 * autoload.cc: Add autoload statements for ws2_32 functionsCorinna Vinschen
`WSACloseEvent', `WSACreateEvent', `WSAGetOverlappedResult', `WSARecv', `WSARecvFrom', `WSASend', `WSASendTo' and `WSASetEvent', `WSAWaitForMultipleEvents'. * net.cc: Define wsock_evt. (wsock_event): New class. (cygwin_sendto): Use overlapped socket io if available. (cygwin_recvfrom): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * security.cc (subauth): Set Win32 error to 0 to safely ask for the error code of dynamically loaded function `LsaRegisterLogonProcess'.
2001-05-05Revert much of previous erroneous checkin. Add ChangeLog entry.Christopher Faylor
* pinfo.h: Correctly set __SIGOFFSET. * path.cc (hash_path_name): Avoid calling library functions for simple copying of characters. * shortcut.c: Use WIN32_LEAN_AND_MEAN. * smallprint.c: Ditto. * environ.cc (getwinenv): Minor clarity fix. * localtime.c: No need to include windows.h * string.h: New file.
2001-05-05* exceptions.cc (ctrl_c_handler): Always send signal to process if it has noChristopher Faylor
tty.
2001-05-03 * autoload.cc: Use new definition of LoadDLLinitfunc throughout.Corinna Vinschen
Redefine wrapper for wsock32.dll and ws2_32.dll. (std_dll_init): New function. * autoload.h: Rename LoadDLLinitfunc to LoadDLLinitfuncdef. Add new defines LoadDLLinitfunc and LoadDLLstdfunc. * net.cc (wsock_init): Add guard variable handling. Take care to call WSAStartup only once. Load WSAStartup without using autoload wrapper to eliminate recursion. Eliminate FIONBIO and srandom stuff.
2001-05-01 * autoload.cc: Add LoadDLLinitfunc for secur32.dll.Corinna Vinschen
Add LoadDLLfuncEx statements for AllocateLocallyUniqueId@4, DuplicateTokenEx@24, LsaNtStatusToWinError@4, LsaDeregisterLogonProcess@4, LsaFreeReturnBuffer@4, LsaLogonUser@56, LsaLookupAuthenticationPackage@12, LsaRegisterLogonProcess@12, * environ.cc: Add extern declaration for `subauth_id'. (subauth_id_init): New function for setting `subauth_id'. (struct parse_thing): Add entry for `subauth_id'. * fork.cc (fork_parent): Call `RevertToSelf' and `ImpersonateLoggedOnUser' instead of `seteuid'. * security.cc: Define global variable `subauth_id'. (extract_nt_dom_user): New function. (cygwin_logon_user): Call `extract_nt_dom_user' now. (str2lsa): New static function. (str2buf2lsa): Ditto. (str2buf2uni): Ditto. (subauth): Ditto. * security.h: Add prototype for `subauth'. * spawn.cc (spawn_guts): Use cygheap->user.token only if impersonated. Use `cygsid' type. Remove impersonation before allowing access to workstation/desktop to everyone. Call `RevertToSelf' and `ImpersonateLoggedOnUser' instead of `seteuid'. * syscalls.cc (seteuid): Rearranged to allow using subauthentication to retrieve user tokens when needed.
2001-04-25 * autoload.cc: Add LoadDLLfunc statements for SetTokenInformation@16.Corinna Vinschen
* cygheap.cc: Include security.h. * grp.cc (internal_getgrent): New function. (getgroups): Rearranged using `internal_getgrent' and the new `cygsid' class. * passwd.cc (internal_getpwent): New function. * sec_acl.cc: Use new `cygsid' class throughout. (acl_access): Use `internal_getgrent' instead of `getgrent'. * sec_helper.cc: Use new `cygsid' class throughout. (get_id_from_sid): Use `internal_getgrent' instead of `getgrent'. Use `internal_getpwent' instead of `getpwent'. * security.cc: Use new `cygsid' class throughout. * security.h: Move `MAX_SID_LEN' from winsup.h to here. Add extern declarations for `internal_getgrent' and `internal_getpwent'. (class cygsid): New class. * shared.cc (sec_user): Use new `cygsid' class. * syscalls.cc (seteuid): Try to set owner to user and primary group to current group in impersonation token before performing impersonation. (setegid): Try to set primary group in process token to the new group if ntsec is on. * uinfo.cc (internal_getlogin): Use new `cygsid' class. Try to set owner to user and primary group to current group in process token if the process has been started from a non cygwin process. (uinfo_init): Set primary group only if the process has been started from a non cygwin process. * winsup.h: Move define for `MAX_SID_LEN' to security.h.
2001-04-16* autoload.cc: Add winmm functions needed by fhandler_dsp.cc.Christopher Faylor
* fhandler_dsp.cc: New file. Implements OSS like /dev/dsp. * include/sys/soundcard.h: New file. User land includes for OSS /dev/dsp. * fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP definition. * dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp device. * path.cc (windows_device_names): Add /dev/dsp into list of device names. * Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
2001-03-23* fhandler.h (fhandler_dev_clipboard): Extend to support writing.Christopher Faylor
* fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard): Initialize new fields. Open clipboard here. (fhandler_dev_clipboard::dup): New method. (fhandler_dev_clipboard::open): Accomodate new fields. Register clipboard here, if appropriate. (set_clipboard): New function. Moves buffer to clipboard. (fhandler_dev_clipboard::write): Truly implement clipboard writing. (fhandler_dev_clipboard::read): Reimplement to allow successive reads. (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard. (fhandler_dev_clipboard::close): Clear out new fields. Support sequential reads and sequential writes. Support for binary data via a native clipboard format.
2001-03-22* autoload.cc (kernel32_init): New function for kernel32 autoloadChristopher Faylor
initialization. (SignalObjectAndWait): Add conditional load of this function when it is available.
2001-03-11* autoload.cc (noload): Use proper method for multiline strings or newer gcc'sChristopher Faylor
complain. * exceptions.cc (unused_sig_wrapper): Ditto. * fhandler.h (fhandler_base): Make get_io_handle and friends return self. * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accomodate DEBUGGING flag to avoid spurious warnings when inheritance is set.
2001-03-06 * autoload.c (cygwin_premain0): Add missing parameter.Corinna Vinschen
* binmode.c (cygwin_premain0): Ditto. * textmode.c (cygwin_premain0): Ditto. Patch contributed by Jason Tiller <jtiller@sjm.com> : * auto_load.cc: Add "GetKeyboardLayout" entry in the list of Win32 User32.DLL exports to provide. * fhandler.h (class fhandler_console): Add meta_mask private member to remember which keystroke modifiers should generate META. * fhandler_console.cc (fhandler_console::read): Modify code that tests a keystroke for a META-escaped key to use the 'meta_mask' variable. (fhandler_console::fhandler_console): Add definition for variable "meta_mask" used to determine if a keystroke should be preceded by META in the client console stream. Set meta_mask based on whether or not user's keyboard language is English - non-English keyboards pass AltGr (right <ALT>) unmolested, whereas English keyboards now interpret left- and right-<ALT> as META.
2001-02-22 * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.Corinna Vinschen
* autoload.cc: Add LoadDLLinitfunc for ole32.dll. Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0 and CoCreateInstance@20. * dir.cc (dir_suffixes): New datastructure. (readdir): Check for R/O *.lnk files to hide the suffix. (opendir): Use `dir_suffixes' in path conversion. (rmdir): Ditto. * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY into account only if the file is no symlink. * path.cc (inner_suffixes): New datastructure. (SYMLINKATTR): Eliminated. (path_conv::check): Use `inner_suffixes' on inner path components. (shortcut_header): New global static variable. (shortcut_initalized): Ditto. (create_shortcut_header): New function. (cmp_shortcut_header): Ditto. (symlink): Create symlinks by creating windows shortcuts. Preserve the old code. (symlink_info::check_shortcut): New method. (symlink_info::check_sysfile): Ditto. (symlink_info::check): Check for shortcuts. Move code reading old system attribute symlinks into symlink_info::check_sysfile(). (chdir): Use `dir_suffixes' in path conversion. * security.cc (get_file_attribute): Check for S_IFLNK flag. Force 0777 permissions then. * spawn.cc (std_suffixes): Add ".lnk" suffix. * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion. Check for shortcut symlinks to eliminate R/O attribute before calling DeleteFile(). (stat_suffixes): Add ".lnk" suffix. (stat_worker): Force 0777 permissions if file is a symlink.
2001-02-08 * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.Corinna Vinschen
Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12. * fhandler_socket.cc (fhandler_socket::ioctl): Move variable definitions to the beginning of the function to allow better debugging. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * net.cc: Include iphlpapi.h. (get_2k_ifconf): Rewritten. Uses IP Helper API now. (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'. (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only on Windows NT < Service Pack 3, `get_2k_ifconf otherwise. * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'. (struct ifreq): Add `ifru_hwaddr'.
2001-01-17* autoload.cc (LoadDLLinitfunc): Remove debugging statement.Christopher Faylor
* exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to earlier in interrupt. ((interrupt_setup): i.e., here. (sig_handle): Don't queue multiple SIGSTOPS. * fhandler.h (bg_check_types): Enumerate return value of bg_check for clarity. * signal.cc (kill_pgrp): Minor cleanup. * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type for function return. Don't raise signal if a signal is already queued. * fhandler_console.cc (fhandler_console::read): Use enumerated return type for bg_check. * select.cc: Ditto, throughout. * read.cc: Ditto, throughout. * termios.cc: Ditto, throughout. (_read): YA interrupt detect simplification. * wait.cc (wait4): Ditto.
2001-01-08* pinfo.cc (codepage_init): Move function.Christopher Faylor
* environ.cc (codepage_init): To here. * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration since it is supposed to be maskable. * signal.cc (sigaction): Ditto. * sigproc.cc (wait_sig): Ditto. * winsup.h: Eliminate global declaration of codepage_init.
2000-12-26* autoload.h: Make DLL initializers global to avoid inlining.Christopher Faylor
* exceptions.cc (interrupt_setup): Reorganize arguments to allow use of regparm. (interrupt_now): Ditto. (interrupt_on_return): Ditto. (call_handler): Ditto.
2000-12-20 * autoload.cc: Add load statemant for SetSecurityDescriptorControl.Corinna Vinschen
* security.cc (alloc_sd): Always set SE_DACL_PROTECTED flag on Win2K and higher.
2000-12-10* autoload.cc: Autoload CharToOemA.Christopher Faylor
* dcrt0.cc (dll_crt0_1): Translate command line to OEM if current codepage is OEM. * environ.cc: Add new option 'codepage' to CYGWIN environment variable. * fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in OEM mode if current codepage is OEM. * fhandler_console.cc (fhandler_console::read): Only translate console input if current codepage is ANSI. * fhandler_console.cc (fhandler_console::write_normal): Translate output data if current codepage is ANSI. * pinfo.cc (codepage_init): New function. Setup current codepage from CYGWIN environment variable and set codepage for file APIs. * security.cc (read_sd): Translate file name to it if current codepage is OEM. * winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for translations between multibyte and widechar string and vice versa.
2000-11-07 * autoload.cc: Add autoload statement for `WSASetLastError'.Corinna Vinschen
* net.cc (cygwin_connect): Change error code to WSAEINPROGRESS when connect returns WSAEWOULDBLOCK.
2000-11-02* pinfo.cc (EnumProcessesNT): New function. Eliminates dependence on psapi.h.Christopher Faylor
(EnumProcesses9x): Rename from EnumProcessesW95. Change arguments to be more useful for cygwin. (winpids::init): Accomodate argument changes. (enum_init): Ditto. * pinfo.h (winpids): Make pidlist dynamically extendable by storing it as a pointer and remembering the size. * ntdll.h: Add extra definitions needed for EnumProcessesNT. Reformat via 'indent'.
2000-10-27 * autoload.cc: New file keeping all autoload stuff.Corinna Vinschen
* Makefile.in: Add autoload.o to dependencies. * dcrt0.cc: Move all autoload stuff to autoload.cc. * fhandler_mem.cc: Ditto. * net.cc: Ditto. * uinfo.cc: Ditto.