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
2002-09-22Merged changes from HEADConrad Scott
2002-09-19Merged changes from HEADConrad Scott
2002-09-12Merged changes from HEADConrad Scott
2002-08-26Merged changes from HEADConrad Scott
2002-08-06Merged changes from HEADConrad Scott
2002-07-30Merged changes from HEADConrad Scott
2002-07-26Merged changes from HEADConrad Scott
2002-07-23Merged changes from HEADConrad Scott
2002-07-02Merged changes from HEADConrad Scott
2002-07-01Merged changes from HEADConrad Scott
2002-06-30Merged changes from HEADConrad Scott
2002-06-25Merged changes from HEADConrad Scott
2002-06-22Merged changes from HEADConrad Scott
2002-06-21Merged changes from HEADConrad Scott
2002-06-20Merged changes from HEADConrad Scott
2002-06-13Merged changes from HEADRobert Collins
2002-02-28Merged changes from HEADRobert Collins
2002-01-22Merged changes from HEADRobert Collins
2002-01-04Merged changes from HEADRobert Collins
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-12Update copyrights.Christopher Faylor
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-09-06* cygheap.h (init_cygheap): Move bucket array here from cygheap.cc.Christopher Faylor
* cygheap.cc: Throughout use bucket array from cygheap. * sigproc.cc (proc_subproc): Dynamically allocate zombie buffer to save DLL space. (sigproc_fixup_after_fork): Free zombie array after a fork. * sigproc.h (sigproc_fixup_after_fork): Declare. * dir.cc (mkdir): Expand buffer for security descriptor to 4K to avoid stack corruption. * fhandler.cc (fhandler_base::open): Ditto. * path.cc (symlink): Ditto.
2001-08-31 * security.cc (create_token): Change initialization of `exp' to complyCorinna Vinschen
with new LARGE_INTEGER definition in winnt.h.
2001-08-15 * security.cc (set_nt_attribute): Return always -1 in case ofCorinna Vinschen
a failure. * times.cc (utimes): On NTFS with ntsec ON, change the file's security descriptor temporarily to acquire write access if opening the file failed.
2001-08-08 * security.cc (alloc_sd): Revert to setting inheritance attribute forCorinna Vinschen
permissions given to directories. Never set inheritance on NULL ACE.
2001-08-07 * security.cc (alloc_sd): Don't set FILE_DELETE_CHILD for groupCorinna Vinschen
if S_ISVTX attribute is given. * dir.cc (mkdir): Allow immediate setting of S_ISUID, S_ISGID and S_ISVTX attribute. * syscalls.cc (_open): Ditto.
2001-08-07 * dir.cc (mkdir): Set security attributes correctly forCorinna Vinschen
CreateDirectoryA () call if ntsec is on. Don't call set_file_attributes () then. * fhandler.cc (fhandler_base::open): Ditto for CreateFileA () call. * path.cc (symlink): Ditto. * security.cc (set_security_attribute): New function. * security.h: Add declaration for `allow_ntea' and `set_security_attribute'.
2001-08-05Throughout, change check for running under Windows NT to 'iswinnt'.Christopher Faylor
* dcrt0.cc (set_os_type): Set 'iswinnt' appropriately. * cygheap.cc (init_cheap): Revert to using VirtualAlloc for allocating cygheap. (cygheap_setup_for_child_cleanup): New function. Standard function to call after calling CreateProcess to cleanup cygheap info passed to child. (cygheap_fixup_in_child): Copy cygheap from shared memory into allocated space under Windows 9x or if can't relocate shared space under NT. * cygheap.h: Declare new function. * spawn.cc (spawn_guts): Use cygheap_fixup_in_child. * fork.cc (fork_parent): Ditto. * winsup.h: Declare iswinnt.
2001-08-02 * security.cc (set_file_attribute): Clean up. Don't callCorinna Vinschen
`set_nt_attribute' when ntsec isn't set.
2001-07-27 * security.cc (get_user_primary_group): Fix compiler warning.Corinna Vinschen
(alloc_sd): Add DELETE permission for user when S_IWUSR is given.
2001-07-26Throughout, reorganize header file inclusion to put security.h prior toChristopher Faylor
fhandler.h. * fhandler.h (fhandler_base::get_inheritance): New method. * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper close-on-exec inheritance when creating. (fhandler_socket::check_peer_secret_event): Create handle as non-inheritable.
2001-07-18 * security.cc (get_user_groups): Call Net function with NULL serverCorinna Vinschen
name under specific error conditions. (is_group_member): Ditto. (get_user_local_groups): Ditto. (get_user_primary_group): Ditto.
2001-07-16 Change well_known_admin_sid to well_known_admins_sid throughout.Corinna Vinschen
* sec_acl.cc (setacl): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. * sec_helper.cc: Add constructor for `well_known_null_sid'. * security.cc (get_nt_attribute): Set S_ISVTX for directories if FILE_WRITE_DATA and FILE_EXECUTE but not FILE_DELETE_CHILD is set. Add evaluation of S_ISVTX, S_ISGID and S_ISUID from NULL ACE. (alloc_sd): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. Add creation of NULL ACE for S_ISVTX, S_ISGID and S_ISUID permissions. * security.h: Add extern declaration for `well_known_null_sid'.
2001-07-09 * security.cc (alloc_sd): Don't set inheritance attribute forCorinna Vinschen
permissions given to directories.
2001-06-26* mmap.cc: Clean up *ResourceLock calls throughout.Christopher Faylor
* thread.cc (pthread_cond::TimedWait): Check for WAIT_TIMEOUT as well as WAIT_ABANDONED. (__pthread_cond_timedwait): Calculate a relative wait from the abstime parameter.
2001-06-05* security.h (NTWriteEA): Change prototype.Egor Duda
* ntea.cc (NTReadEA): Don't check for global ntea setting, now it's caller responsibility. (NTWriteEA): Ditto. * security.cc (get_file_attribute): Read attribute from EA only if 'ntea' is enabled. (set_file_attribute): Ditto. * path.h: (class path_conv): Add members to store file system information. (path_conv::get_drive_type): New function. * syscalls.cc (stat_worker): Use it. * path.cc (path_conv::update_fs_info): New functions. (path_conv::check): Get file system information from device where file resides. On NTFS, try to read symlink contents from EA. (get_symlink_ea): New function. (set_symlink_ea): Ditto. (symlink): Store symlink in extended attribute, if possible.
2001-05-31Maintain 80 col line length.Christopher Faylor
2001-05-31* path.cc (chdir): Always send unsigned chars to isspace since newlib's isspaceChristopher Faylor
doesn't deal well with "negative" chars. * fhandler.cc (fhandler_disk_file::open): Propagate remote status of file garnered from path_conv. Move #! checking to fstat. (fhandler_disk_file::fstat): Reorganize st_mode setting to eliminate duplication. Move check for #! here from fhandler::open. * fhandler.h (fhandler_base::isremote): New method. (fhandler_base::set_isremote): Ditto. (fhandler_base::set_execable_p): Also record "don't care if executable state". (fhandler_base::dont_care_if_execable): New method. * path.cc (path_conv::check): Clear new flags. Appropriately set vol_flags, drive_type, and is_remote_drive. * path.h: Add new flags and methods for manipulating them. * syscalls.cc (_unlink): Use isremote() to determine if a path is remote rather than calling GetDriveType. (stat_worker): Ditto. * security.cc (get_file_attribute): Or attribute with result of NTReadEA to be consistent with get_nt_attribute.
2001-05-30 * sec_helper.cc (cygsid::getfrompw): Change parameter to `const'.Corinna Vinschen
(cygsid::getfromgr): Ditto. * security.cc: Use `sys_mbstowcs' and `sys_wcstombs' throughout. (extract_nt_dom_user): Try to get user and domain from SID in pw->pw_gecos first. * security.h (class cygsid): Change parameter of getfrompw() and getfromgr() to `const'. * uinfo.cc (internal_getlogin): Change order for evaluating user information in winNT case. Drop usage of NetWkstaUserGetInfo().
2001-05-22 * security.cc (get_file_attribute): Don't set errno.Corinna Vinschen
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-17 * security.cc (cygwin_set_impersonation_token): Never destroyCorinna Vinschen
previous token object. (subauth): Create token source with well defined identifier.
2001-05-15 * fork.cc (fork): Eliminate superfluous call to getuid().Corinna Vinschen
* security.h: New define `NO_SID'. Remove declarations of functions moved to methods into class cygsid. (class cygsid): Declare new methods `getfromstr', `get_sid', `getfrompw', `getfromgr', `get_rid', `get_uid', `get_gid', `string' and new constructors and operators =, == and !=. Declare new global cygsids `well_known_XXX_sid' substituting the corresponding `get_XXX_sid' functions. Remove declarations of these functions. * sec_helper.cc (well_known_admin_sid): New global variable. (well_known_system_sid): Ditto (well_known_creator_owner_sid): Ditto (well_known_world_sid): Ditto (cygsid::string): New method, substituting `convert_sid_to_string_sid'. (cygsid::get_sid): New method, substituting `get_sid'. (cygsid::getfromstr): New method, substituting `convert_string_sid_to_sid'. (cygsid::getfrompw): New method, substituting `get_pw_sid'. (cygsid::getfromgr): New method, substituting `get_gr_sid'. (cygsid::get_id): New method, substituting `get_id_from_sid'. (get_admin_sid): Eliminated. (get_system_sid): Ditto. (get_creator_owner_sid): Ditto. (get_world_sid): Ditto. * grp.cc: Use new cygsid methods and well known sids throughout. * registry.cc: Ditto. * sec_acl.cc: Ditto. * security.cc: Ditto. * shared.cc: Ditto. * syscalls.cc (seteuid): Ditto. Eliminate redundant conditional. * uinfo.cc (internal_getlogin): Ditto. * spawn.cc (spawn_guts) Revert previous patch.
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-14 * security.cc (subauth): Check if Secur32.dll could be loaded.Corinna Vinschen
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-30 * grp.cc: Eliminate MAX_DOMAIN_NAME define.Corinna Vinschen
(read_etc_group): Substitute MAX_DOMAIN_NAME by INTERNET_MAX_HOST_NAME_LENGTH. * passwd.cc (parse_pwd): Don't force pw_name to be lower case. * sec_helper.cc: Substitute MAX_USER_NAME by UNLEN, MAX_COMPUTERNAME_LENGTH by INTERNET_MAX_HOST_NAME_LENGTH throughout. (lookup_name): Slight cleanup. * security.cc (alloc_sd): Substitute MAX_USER_NAME by UNLEN. * security.h: Define DEFAULT_UID as DOMAIN_USER_RID_ADMIN and DEFAULT_GID as DOMAIN_ALIAS_RID_ADMINS. * shared.cc (memory_init): Substitute MAX_USER_NAME by UNLEN. * thread.h: Ditto. * uinfo.cc (internal_getlogin): Substitute MAX_USER_NAME by UNLEN. Substitute MAX_COMPUTERNAME_LENGTH and MAX_HOST_NAME by INTERNET_MAX_HOST_NAME_LENGTH. * winsup.h: Include lmcons.h. Eliminate MAX_USER_NAME and MAX_HOST_NAME. Move DEFAULT_UID and DEFAULT_GID to security.h.
2001-04-26 * security.cc (alloc_sd): Add unrelated ACCESS_ALLOWED_ACE behindCorinna Vinschen
the `everyone' ACE.
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.