diff options
Diffstat (limited to 'winsup/cygwin/ChangeLog')
-rw-r--r-- | winsup/cygwin/ChangeLog | 1083 |
1 files changed, 10 insertions, 1073 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index fa5ca1947..51cc4e880 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -39,10 +39,6 @@ * cygheap.cc: Fix formatting. -2014-10-30 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (cygheap_user::ontherange): Don't mention /etc/passwd. - 2014-10-29 Corinna Vinschen <corinna@vinschen.de> * cygheap.cc (init_cygheap::init_installation_root): Create content of @@ -67,16 +63,9 @@ 2014-10-27 Corinna Vinschen <corinna@vinschen.de> - * dlfcn.cc (dlopen): Drop patch accommodating SetDllDiretory from - 2014-10-14. - -2014-10-27 Corinna Vinschen <corinna@vinschen.de> - - * cygheap.cc (cygheap_fixup_in_child): Drop call to set_dll_dir. - (init_cygheap::init_installation_root): Set installation_dir_len. - (setup_cygheap): Drop call to set_dll_dir. + * cygheap.cc (init_cygheap::init_installation_root): Set + installation_dir_len. * cygheap.h (struct init_cygheap): Add installation_dir_len member. - (init_cygheap::set_dll_dir): Remove. * environ.cc (win_env::add_cache): Use stpcpy for speed. (posify_maybe): Use tmp_pathbuf buffer instead of stack. (raise_envblock): New function to resize Windows environment block. @@ -84,20 +73,6 @@ $PATH exists and is non-empty. If not, add PATH variable with Cygwin installation directory as content to Windows environment. Explain why. - * uinfo.cc (cygheap_pwdgrp::_nss_init): Fill UNICODE_STRING members - on the fly. Drop call to RtlInitUnicodeString. - (pwdgrp::check_file): Ditto. - -2014-10-26 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_socket.cc (fhandler_socket::af_local_connect): Drop - setting connect_state to connect_credxchg. - (fhandler_socket::af_local_accept): Ditto. - (fhandler_socket::recv_internal): Drop ill-advised connect_state check. - Add comment so as not to repeat the exercise. - * fhandler.h (enum conn_state): Drop now unneeded connect_credxchg - state. - 2014-10-24 Corinna Vinschen <corinna@vinschen.de> * fhandler_proc.cc (format_proc_cygdrive): Fix symlink path if cygdrive @@ -108,12 +83,6 @@ * gendef (sigdelayed): 64 bit only: Fix seh_pushreg statements in prologue. -2014-10-24 Kai Tietz <corinna@vinschen.de> - Corinna Vinschen <corinna@vinschen.de> - - * gendef (sigdelayed): 64 bit only: Push CPU flags before aligning - stack to avoid changing flag values. - 2014-10-22 Yaakov Selkowitz <yselkowi@redhat.com> * common.din (stime): Export. @@ -121,12 +90,6 @@ * include/cygwin/time.h (stime): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. -2014-10-21 Corinna Vinschen <corinna@vinschen.de> - - * sec_auth.cc (get_user_groups): Remove experimental exception handler - added 2014-09-05. - (get_user_local_groups): Ditto. - 2014-10-20 Corinna Vinschen <corinna@vinschen.de> * fhandler_serial.cc: Revert debug code accidentally checked in on @@ -139,21 +102,11 @@ 2014-10-17 Corinna Vinschen <corinna@vinschen.de> - * cygheap.cc (cygheap_fixup_in_child): Call set_dll_dir. - (init_cygheap::init_installation_root): Just memmove contents of - installation_root instead of calling GetModuleFileNameW again. - Copy installation_root to installation_dir before stripping of - "bin" dir. Don't call SetDllDirectory here. Explain what we do. - (setup_cygheap): New function taking over initial cygheap setup - from memory_init. Additionally call set_dll_dir. + * cygheap.cc (init_cygheap::init_installation_root): Just memmove + contents of installation_root instead of calling GetModuleFileNameW + again. Copy installation_root to installation_dir before stripping of + "bin" dir. Explain what we do. * cygheap.h (struct init_cygheap): Add installation_dir member. - (init_cygheap::set_dll_dir): Define. - (setup_cygheap): Declare. - * dcrt0.cc: Throughout drop parameter from memory_init call. - (dll_crt0_0): Call setup_cygheap prior to memory_init. - * dlfcn.cc (dlopen): Change comment to point to the right function. - * shared.cc (memory_init): Drop parameter. Drop cygheap setup. - * shared_info.h (memory_init): Change declaration accordingly. 2014-10-17 Corinna Vinschen <corinna@vinschen.de> @@ -189,31 +142,6 @@ * fhandler_proc.cc (format_proc_partitions): Extend output to print the windows mount points the device is mounted on. -2014-10-14 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_socket.cc (fhandler_socket::connect): Don't change state - on WSAEALREADY error. Change comment accordingly. - -2014-10-14 Corinna Vinschen <corinna@vinschen.de> - - * cygheap.cc (init_cygheap::init_installation_root): Install Cygwin's - installation dir as DLL search path, instead of ".". - * cygheap.h (class cwdstuff): Add parameter names in function - declarations for readability. - (cwdstuff::get): Add inline implementation fetching the CWD as wide char - string. - * dlfcn.cc (dlopen): Add searching for dependent DLLs in DLL - installation dir or CWD, if all else failed. - Add comment to explain scenarios this is accommodating. - -2014-10-14 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_socket.cc (fhandler_socket::connect): Init connect_state to - connect_pending only on unconnected socket. Set connect_state to - connected on WSAEISCONN error. Set connect_state to connect_failed - on any other error except WSAEWOULDBLOCK if connect is still pending. - Add lots of comment to explain why all of the above. - 2014-10-13 Corinna Vinschen <corinna@vinschen.de> * net.cc (cygwin_setsockopt): Drop redundant test for AF_LOCAL and @@ -250,63 +178,12 @@ sockets. Add comment to explain why we need it. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. -2014-10-11 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_socket.cc (fhandler_socket::af_local_connect): Drop outdated - comment. - (fhandler_socket::evaluate_events): Only set connect_state and call - af_local_connect if connect_state is connect_pending. Explain why. - Drop redundant test for socket family and type. - (fhandler_socket::connect): Extend comment. - -2014-10-11 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_socket.cc (fhandler_socket::evaluate_events): Handle - connect_state and af_local_connect connect call here, once, independent - of FD_CONNECT being requested. Add comment to explain why. - (fhandler_socket::connect): Drop connect_state handling and calling - af_local_connect. Move remaining AF_LOCAL stuff prior to calling - ::connect and explain why. Simplify error case. - * poll.cc (poll): Handle connect state independently of POLLOUT being - requested for the descriptor to allow setting POLLIN if connect failed. - Add comment. - * select.cc (set_bits): Drop connect_state and AF_LOCAL handling here. - -2014-10-11 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_socket.cc (fhandler_socket::evaluate_events): Slightly - rearrange code. Rephrase a comment. - 2014-10-10 Corinna Vinschen <corinna@vinschen.de> * dlfcn.cc (dlopen): Disable old 32 bit code on 64 bit. * dcrt0.cc (check_sanity_and_sync): Ditto. * dll_init.cc (dll_dllcrt0_1): Fix typo in comment. -2014-10-09 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_procsys.cc (fhandler_procsys::readdir): Just test - ObjectTypeName for object types rather than calling lstat to avoid - performance hit. - * globals.cc (ro_u_natdir): Define. - (ro_u_natsyml): Define. - (ro_u_natdev): Define. - -2014-10-09 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Set d_type - for virtual directories. - -2014-10-09 Corinna Vinschen <corinna@vinschen.de> - - * fhandler_proc.cc (fhandler_proc::readdir): Set dirent d_type. - * fhandler_process.cc (fhandler_process::readdir): Ditto. - * fhandler_procnet.cc (fhandler_procnet::readdir): Ditto. - * fhandler_procsys.cc (fhandler_procsys::readdir): Ditto. - * fhandler_procsysvipc.cc (fhandler_procsysvipc::readdir): Ditto. - * fhandler_virtual.h (virt_ftype_to_dtype): Define new inline function - to generate dirent d_type from virtual_ftype_t. - 2014-10-08 Corinna Vinschen <corinna@vinschen.de> * common.din (ffsl): Export. @@ -333,68 +210,11 @@ 2014-09-05 Corinna Vinschen <corinna@vinschen.de> * exception.h (class exception): Remove unnecessary #ifdef. - * uinfo.cc (client_request_pwdgrp::client_request_pwdgrp): Fix length - counter to include trailing NUL. - - * sec_auth.cc (get_user_groups): Add experimental exception handler. - (get_user_local_groups): Ditto. 2014-09-05 Corinna Vinschen <corinna@vinschen.de> - * uinfo.cc (pwdgrp::fetch_account_from_windows): Handle APPLICATION - PACKAGE AUTHORITY SIDs. * winlean.h (DNLEN): Raise to 31. Explain why. -2014-09-03 Corinna Vinschen <corinna@vinschen.de> - - * sec_acl.cc (aclcheck32): Check for required default entries as well. - Enable check for missing CLASS_OBJ entries, now that setfacl creates - them. - -2014-09-02 Corinna Vinschen <corinna@vinschen.de> - - * sec_acl.cc (aclsort32): Set errno to EINVAL if aclcheck32 failed. - -2014-08-31 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Disallow user accounts - as groups. Add comment. - -2014-08-31 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (cygheap_pwdgrp::init): Fix comment. Rearrange code for - style. - (cygheap_pwdgrp::nss_init_line): Disable db_prefix and db_separator - settings. Add comment. - (pwdgrp::fetch_account_from_windows): Drop outdated comment. Fix code - fetching primary group gid of group setting in SAM description field. - Change comment accordingly. - -2014-08-31 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Disallow creating an - entry for "NULL SID". - -2014-08-31 Corinna Vinschen <corinna@vinschen.de> - - * sec_acl.cc (setacl): Add comment. Handle NULL ACE for SUID, SGID, - and VTX bits. Create owner, group, other and NULL entries in the same - way and in the same order as alloc_sd. - (getacl): Skip NULL ACE. - -2014-08-28 Corinna Vinschen <corinna@vinschen.de> - - * fhandler.cc (fhandler_base::facl): Drop CLASS_OBJ entry. - * fhandler_disk_file.cc (fhandler_disk_file::facl): Ditto in noacl case. - * sec_acl.cc (getacl): Compute useful fake CLASS_OBJ and DEF_CLASS_OBJ - permission bits based on how these values are generated on Linux. - Add comments to explain what the code is doing. - * security.cc (get_attribute_from_acl): Compute group permission based - on the actual primary group permissions and all secondary user and group - ACCESS_ALLOWED_ACEs to emulate Linux' behaviour more closely. - (check_access): Fix typos im comment. - * include/cygwin/acl.h (MIN_ACL_ENTRIES): Redefine as 3. - 2014-08-28 Corinna Vinschen <corinna@vinschen.de> * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Try the @@ -552,17 +372,6 @@ 2014-08-19 Corinna Vinschen <corinna@vinschen.de> - * fhandler.h (enum conn_state): Add "connect_credxchg" state. - (class fhandler_socket): Grant another bit to connect_state flag. - * fhandler_socket.cc (fhandler_socket::af_local_connect): Rearrange - variable definition. Set connect_state to connect_credxchg. - (fhandler_socket::af_local_accept): Ditto. - (fhandler_socket::recv_internal): Accept connect_credxchg on connection - oriented AF_LOCAL sockets as well to allow the credential exchange. - Extend comment to explain. - -2014-08-19 Corinna Vinschen <corinna@vinschen.de> - * autoload.cc: Replace WNet[...]A with WNet[...]W imports. * dcrt0.cc (initial_env): Drop strlwr calls. Call strcasestr instead. * fhandler_netdrive.cc: Throughout, convert to calling WNet UNICODE @@ -594,36 +403,11 @@ listener. Add comment. (fhandler_socket::accept4): Explicitely check if the socket is listening and fail with EINVAL, if not. Explain why we have to do that. - (fhandler_socket::recv_internal): Explicitely check if the socket is - connected if it's a stream socket. Explain why we have to do that. (fhandler_socket::getpeereid): Drop now redundant test. 2014-08-15 Corinna Vinschen <corinna@vinschen.de> * winsup.h (_GNU_SOURCE): Define. Explain why. - * configure.ac: Convert to new AC_INIT style. - * configure: Regenerate. - -2014-08-15 Corinna Vinschen <corinna@vinschen.de> - - * cygerrno.h (seterrno): Define as (always) inline function. - * errno.cc (seterrno): Remove. - -2014-08-14 Corinna Vinschen <corinna@vinschen.de> - - * dll_init.sgml: Remove. - * dtable.sgml: Move into ../doc/misc-funcs.xml. - * external.sgml: Ditto. - * stackdump.sgml: Ditto. - -2014-08-14 Corinna Vinschen <corinna@vinschen.de> - - * security.sgml: Move to ../doc dir and rename to logon-funcs.xml. - -2014-08-14 Corinna Vinschen <corinna@vinschen.de> - - * path.sgml: Move to ../doc dir and rename to path.xml. - * posix.sgml: Move to ../doc dir and rename to posix.xml. 2014-08-14 Corinna Vinschen <corinna@vinschen.de> @@ -667,14 +451,6 @@ * common.din (__cxa_atexit): Export. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 274. -2014-08-04 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Drop "plus_prepended" - as naming style. Drop enum name_style_t, use a boolean - "fully_qualified_name" value instead. Rework function to drop - "plus_prepended" handling througout and default to "name only" style - as replacement. - 2014-07-31 Eric Blake <eblake@redhat.com> * include/pthread.h: Decorate attribute names with __, for @@ -684,27 +460,6 @@ * include/sys/cygwin.h: Likewise. * include/sys/strace.h: Likewise. -2014-07-30 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix comment. - -2014-07-29 Corinna Vinschen <corinna@vinschen.de> - - * cygheap.h (class cygheap_domain_info): Remove lowest_tdo_posix_offset. - * ldap.cc (cyg_ldap::fetch_posix_offset_for_domain): Return UINT32_MAX - in case of error. - * security.h (PRIMARY_POSIX_OFFSET): Define. - (NOACCESS_POSIX_OFFSET): Define. - (UNUSABLE_POSIX_OFFSET): Define. - * uinfo.cc (cygheap_domain_info::init): Drop initializing - lowest_tdo_posix_offset. - (pwdgrp::fetch_account_from_file): Set PosixOffset to either - UNUSABLE_POSIX_OFFSET or NOACCESS_POSIX_OFFSET in case we don't get a - sensible offset from AD. Explain why. Drop setting ch - lowest_tdo_posix_offset. - (pwdgrp::fetch_account_from_windows): Replace constant 0x100000 with - PRIMARY_POSIX_OFFSET throughout. - 2014-07-24 Corinna Vinschen <corinna@vinschen.de> * fhandler_socket.cc (fhandler_socket::send_internal): Fix value of @@ -720,10 +475,6 @@ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 32. -2014-07-21 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc: Fix typo in comment. - 2014-07-16 Corinna Vinschen <corinna@vinschen.de> * thread.cc (pthread::create): Handle stackaddr as upper bound address. @@ -757,13 +508,6 @@ * sigproc.cc (send_sig): Fix bad format in diagnostic output. -2014-07-14 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (cygheap_domain_info::init): Correctly set - lowest_tdo_posix_offset to UNIX_POSIX_OFFSET. - (fetch_posix_offset): Redesign to fake a POSIX offset in all cases - where we can't fetch a non-0 POSIX offset from our primary domain. - 2014-07-14 Yaakov Selkowitz <yselkowitz@cygwin.com> * thread.cc (pthread_mutex::pthread_mutex): Change default type @@ -809,11 +553,6 @@ writing small buffers. Rename variables and add comments to help understanding the code in years to come. -2014-07-07 Corinna Vinschen <corinna@vinschen.de> - - * passwd.cc (pg_ent::enumerate_ad): Revert to simply skipping a domain - if opening the connection to the domain fails. - 2014-07-07 Pierre Humblet <Pierre.Humblet@ieee.org> Corinna Vinschen <corinna@vinschen.de> @@ -827,73 +566,6 @@ * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add debug output. -2014-06-25 Corinna Vinschen <corinna@vinschen.de> - - * errno.cc (errmap): Fix order of SERVICE_REQUEST_TIMEOUT. - -2014-06-25 Corinna Vinschen <corinna@vinschen.de> - - * errno.cc (errmap): Handle Windows error codes ERROR_CANCELLED, - ERROR_CONNECTION_REFUSED, ERROR_DEV_NOT_EXIST, ERROR_DS_GENERIC_ERROR, - ERROR_NOT_ENOUGH_QUOTA, ERROR_SERVICE_REQUEST_TIMEOUT, ERROR_TIMEOUT, - ERROR_UNEXP_NET_ERR. - * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Drop explicit LDAP_TIMEOUT - handling. - -2014-06-25 Corinna Vinschen <corinna@vinschen.de> - - * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Explicitely map LDAP_TIMEOUT - to EIO. - -2014-06-25 Corinna Vinschen <corinna@vinschen.de> - - * autoload.cc (ldap_search_sW): Replace ldap_search_stW. - (LdapMapErrorToWin32): Import. - * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Accommodate - change to cyg_ldap::open. - * ldap.cc (CYG_LDAP_TIMEOUT): Remove. - (CYG_LDAP_ENUM_TIMEOUT): Remove. - (def_tv): Remove. - (enum_tv): Remove. - (cyg_ldap::map_ldaperr_to_errno): New method to map LDAP error codes to - POSIX errno codes. Explicitly map LDAP_NO_RESULTS_RETURNED to ENMFILE. - (cyg_ldap::wait): Ditto. - (struct cyg_ldap_init): New struct. - (cyg_ldap::connect_ssl): Return ULONG. Drop setting LDAP_OPT_TIMELIMIT. - Add call to ldap_search_sW to fetch root DSE. - (cyg_ldap::connect_non_ssl): Ditto. - (ldap_init_thr): New static thread function. - (cyg_ldap::connect): New method to call connect_ssl/connect_non_ssl in - an interruptible cygthread. - (struct cyg_ldap_search): New struct. - (cyg_ldap::search_s): New method to perform generic synchronous search. - (ldap_search_thr): New static thread function. - (cyg_ldap::search): New method to call search_s in an interruptible - cygthread. - (struct cyg_ldap_next_page): New struct. - (cyg_ldap::next_page_s): New method to perform generic synchronous - paged search. - (ldap_next_page_thr): New static thread function. - (cyg_ldap::next_page): New method to call next_page_s in an - interruptible cygthread. - (cyg_ldap::open): Return POSIX errno. Call connect method. - (cyg_ldap::fetch_ad_account): Call search method rather than - ldap_search_stW. - (cyg_ldap::enumerate_ad_accounts): Return POSIX errno. Use infinite - timeout in call to ldap_search_init_pageW. - (cyg_ldap::next_account): Return POSIX errno. Call next_page method - rather than ldap_get_next_page_s. - (cyg_ldap::fetch_posix_offset_for_domain): Call search method rather - than ldap_search_stW. - (cyg_ldap::fetch_unix_sid_from_ad): Ditto. - (cyg_ldap::fetch_unix_name_from_rfc2307): Ditto. - * ldap.h (class cyg_ldap): Accommodate aforementioned changes. - * passwd.cc (pg_ent::enumerate_ad): Ditto. Break search if one of - cyg_ldap::enumerate_ad_accounts or cldap.next_account returns with - an error code other than ENMFILE. - * sec_helper.cc (cygpsid::get_id): Accommodate change to cyg_ldap::open. - * uinfo.cc (fetch_posix_offset): Ditto. - 2014-06-23 Corinna Vinschen <corinna@vinschen.de> * spawn.cc (find_exec): Initialize err (CID 60111). @@ -951,24 +623,6 @@ * dcrt0.cc (insert_file): Fix resource leaks (CIDs 59987, 59988). -2014-06-23 Corinna Vinschen <corinna@vinschen.de> - - * ldap.cc (CYG_LDAP_TIMEOUT): Set to 5 secs. - (CYG_LDAP_ENUM_TIMEOUT): New timeout value for enumeration only. Set - to 60 secs. - (CYG_LDAP_ENUM_PAGESIZE): Define as number of entries per single - search page. Set to 100. Use throughout. - (def_tv): Rename from tv. Use throughout. - (enum_tv): New variable. Use in call to ldap_get_next_page_s. - -2014-06-17 Corinna Vinschen <corinna@vinschen.de> - - * ldap.cc (CYG_LDAP_TIMEOUT): Define as timeout value. Set to 30 secs - for now. Use throughout. - * uinfo.cc (colon_to_semicolon): New local function. - (pwdgrp::fetch_account_from_windows): Convert all colons in AD gecos - entry to semicolons. - 2014-06-17 David Stacey <drstacey@tiscali.co.uk> * libc/rexec.cc (cygwin_rexec): Make ahostbuf static to avoid returning @@ -989,62 +643,12 @@ * timer.cc (timer_tracker::cancel): Demote api_fatal to system_printf, printing more details about odd failure condition. -2014-05-23 Corinna Vinschen <corinna@vinschen.de> - - * autoload.cc (ldap_memfreeW): Remove. - (ldap_msgfree): Import. - * ldap.cc: Throughout, use ldap_msgfree to free LDAPMessage memory, - rather than ldap_memfreeW. - (cyg_ldap::next_account): Immediately abandon search when quiting from - search. - -2014-05-22 Corinna Vinschen <corinna@vinschen.de> - - * autoload.cc (ldap_abandon): Remove. - (ldap_count_entries): Import. - (ldap_get_next_page_s): Import. - (ldap_result): Remove. - (ldap_searchW): Remove. - (ldap_search_abandon_page): Import. - (ldap_search_init_pageW): Import. - * ldap.cc (cyg_ldap::close): Use ldap_search_abandon_page to abandon - search. Reset srch_id, srch_msg and srch_entry. - (cyg_ldap::enumerate_ad_accounts): Use paged search to overcome server - side search result set restriction. - (cyg_ldap::next_account): Ditto. - * ldap.h (class cyg_ldap): Add members srch_id, srch_msg and srch_entry. - Remove member msg_id. - (cyg_ldap::cyg_ldap): Change initialization accordingly. - -2014-05-22 Corinna Vinschen <corinna@vinschen.de> - - * sec_auth.cc (get_server_groups): Call get_user_local_groups only if - get_logon_server succeeded. - -2014-05-22 Corinna Vinschen <corinna@vinschen.de> - - * ldap.cc (cyg_ldap::fetch_ad_account): Take additional domain string - parameter. Convert into likely rootDSE string if not NULL, and use in - subsequent call to ldap_search_stW. Add comment to explain that this - is not the exactly correct solution. - * ldap.h (cyg_ldap::fetch_ad_account): Change prototype accordingly. - * uinfo.cc (pwdgrp::fetch_account_from_windows): Always use loc_ldap - in call to fetch_posix_offset to make sure we're fetchoinmg the posix - offsets from *our* domain controller. Only set domain variable to - non-NULL if the account is from a trusted domain. Use domain in call - to cyg_ldap::fetch_ad_account. - 2014-05-22 Corinna Vinschen <corinna@vinschen.de> * gmon.h: Pull in profile.h. Explain why. 2014-05-22 Corinna Vinschen <corinna@vinschen.de> - * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix potential SEGV - referencing NULL pointer. - -2014-05-22 Corinna Vinschen <corinna@vinschen.de> - * libc/bsdlib.cc (forkpty): Close master and slave if fork fails to avoid resource leak (CID 59997). * libc/fts.c: Update to FreeBSD version 1.39 (CID 59947). @@ -1128,30 +732,6 @@ * syscalls.cc (getusershell): Fix buffer overrun (Coverity ID 59932). -2014-05-15 Corinna Vinschen <corinna@vinschen.de> - - * external.cc (cygwin_internal): Use local name buffer instead of - allocated one in CW_CYGNAME_FROM_WINNAME. - -2014-05-15 Corinna Vinschen <corinna@vinschen.de> - - * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 273. - -2014-05-15 Corinna Vinschen <corinna@vinschen.de> - - * external.cc (cygwin_internal): Implement CW_CYGNAME_FROM_WINNAME. - Add lengthy comment to explain what we do and why. - * include/sys/cygwin.h (cygwin_getinfo_types): Add - CW_CYGNAME_FROM_WINNAME. - -2014-05-14 Corinna Vinschen <corinna@vinschen.de> - - * sec_auth.cc (get_server_groups): Call get_logon_server only for - non-builtin accounts. - * uinfo.cc (pwdgrp::fetch_account_from_windows): Check incoming - account name for validity in terms of the current name prefixing rules - and refuse invalid names. - 2014-05-13 Corinna Vinschen <corinna@vinschen.de> * fhandler_socket.cc (fhandler_socket::ioctl): Handle the different @@ -1165,72 +745,8 @@ * fhandler_console.cc (dev_console::save_restore): Only save current dwEnd line rather than the one after that. -2014-05-08 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (cygheap_user::init): Fix formatting in debug output. - (struct cyg_USER_INFO_24): Define temporarily. Explain why. - (pwdgrp::fetch_account_from_windows): Handle sane primary group - setting for Microsoft Accounts. Explain why. - * wincap.h (wincaps::has_microsoft_accounts): New element. - * wincap.cc: Implement above element throughout. - -2014-05-08 Corinna Vinschen <corinna@vinschen.de> - - * grp.cc (gr_ent::enumerate_caches): Fix copy/paste bug introducing - an endless loop. - -2014-05-07 Corinna Vinschen <corinna@vinschen.de> - - * passwd.cc (pwdgrp::parse_passwd): Fix an off by one computing the - buffer len. Add comment. - * uinfo.cc (internal_getlogin): Fix typo in comment. - -2014-05-07 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Tweak SID<->uid - conversion to cover S-1-5-113, S-1-5-114, and S-1-5-1000 groups. - -2014-05-07 Corinna Vinschen <corinna@vinschen.de> - - * grp.cc (pwdgrp::parse_group): Set grp.len. Drop generating any - gr_mem entries. - (getgrgid_r): Don't try to copy gr_mem entries. Always set gr_mem - to an empty list. - (getgrnam_r): Ditto. - (app_gr): New static struct to store group data propagated to the - calling application via getgrgid/getgrnam. - (getgr_cp): Fill app_gr and return pointer to app_gr.g. - (getgrgid32): Call getgr_cp. - (getgrnam32): Ditto. - * passwd.cc (pwdgrp::parse_passwd): Set res.len. - (app_pw): New static struct to store passwd data propagated to the - calling application via getpwuid/getpwnam. - (getpw_cp): Fill app_pw and return pointer to app_pw.p. - (getpwuid32): Cal getpw_cp. - (getpwnam): Ditto. - * pwdgrp.h (struct pg_pwd): Add len member. - (struct pg_grp): Ditto. - -2014-05-06 Corinna Vinschen <corinna@vinschen.de> - - * security.h (MAX_SUBAUTH_CNT): Drop. Use SID_MAX_SUB_AUTHORITIES - instead throughout. - (MAX_SID_LEN): Drop. Use SECURITY_MAX_SID_SIZE instead throughout. - 2014-05-06 Corinna Vinschen <corinna@vinschen.de> - * grp.cc (internal_getgroups): Drop unused cygsid variable. - * sec_helper.cc (cygpsid::pstring): Use sid_sub_auth_count macro. - (cygsid::get_sid): Use MAX_SUBAUTH_CNT rather than wrong constant 8. - Don't call memcpy to copy subauthorities into SID, use assignment. - (cygsid::getfromstr): Use MAX_SUBAUTH_CNT rather than wrong constant 8. - * security.h (MAX_SUBAUTH_CNT): New definition. Set to 11 to cover - Microsoft Accounts. - (MAX_SID_LEN): Define in terms of SID member sizes and MAX_SUBAUTH_CNT. - (DBGSID): Use MAX_SUBAUTH_CNT to define size of SubAuthority array. - * uinfo.cc (pwdgrp::fetch_account_from_windows): Handle Micosoft - Accounts. Handle them as well known group. Compare domain names - case-insensitive. * winlean.h (PIPE_REJECT_REMOTE_CLIENTS): Drop temporary definition since Mingw64 catched up. (DNLEN): Redefine as 16. Explain why. @@ -1278,16 +794,6 @@ * miscfuncs.cc (check_iovec): Allow 0 as valid iovcnt value. -2014-04-22 Corinna Vinschen <corinna@vinschen.de> - - * ldap.cc (user_attr): Remove "uid" attribute. - * ldap.h (LDAP_USER_NAME_ATTR): Remove. Change other attribute index - values as required. - (cyg_ldap::get_user_name): Remove inline function. - * uinfo.cc (pwdgrp::fetch_account_from_windows): Remove code to handle - Cygwin username different from Windows username. - (pwdgrp::add_account_from_cygserver): Remove unnecessary cast. - 2014-04-18 Corinna Vinschen <corinna@vinschen.de> * winf.cc (linebuf::fromargv): Temporarily revert patch from 2014-01-24. @@ -1318,11 +824,6 @@ * net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS. -2014-04-12 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix gid evaluation - for local accounts. - 2014-04-10 Corinna Vinschen <corinna@vinschen.de> * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 30. @@ -1433,12 +934,6 @@ (exception::exception): Install unhandled exception filter. * exceptions.cc (exception::handle_while_being_debugged): New method. -2014-03-19 Corinna Vinschen <corinna@vinschen.de> - - * passwd.cc (pg_ent::enumerate_ad): Ignore primary domain in list of - trusted domains only if all trusted domains are enumerated anyway. - Explain why. - 2014-03-18 Christopher Faylor <me.cygwin2014@cgf.cx> * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_fork): Actually call @@ -1485,58 +980,6 @@ 2014-03-12 Corinna Vinschen <corinna@vinschen.de> - * cygheap.h (enum cygheap_pwdgrp::cache_t): Remove. - (cygheap_pwdgrp::caching): Convert to bool. - (cygheap_pwdgrp::pwd_cache): Add cygserver member. - (cygheap_pwdgrp::grp_cache): Ditto. - (cygheap_pwdgrp::nss_db_caching): Drop. - (cygheap_pwdgrp::nss_db_full_caching): Drop. - (cygheap_pwdgrp::nss_cygserver_caching): New method. - (cygheap_pwdgrp::nss_disable_cygserver_caching): New method. - * cygserver.h (client_request::request_code_t): Add - CYGSERVER_REQUEST_PWDGRP. - * cygserver_pwdgrp.h: New file. - * cygtls.h (struct _local_storage): Remove pwbuf and grbuf members. - * grp.cc (pwdgrp::prep_tls_grbuf): Drop. - (internal_getgrsid): Handle cygserver caching and rearrange to check - the caches first. - (internal_getgrnam): Ditto. - (internal_getgrgid): Ditto. - (gr_ent::enumerate_caches): Handle cygserver cache. - * passwd.cc (pwdgrp::prep_tls_pwbuf): Drop. - (internal_getpwsid): Handle cygserver caching and rearrange to check - the caches first. - (internal_getpwnam): Ditto. - (internal_getpwuid): Ditto. - (pw_ent::enumerate_caches): Handle cygserver cache. - * pwdgrp.h (pwdgrp::add_account_from_cygserver): New method declaration. - (pwdgrp::fetch_account_from_cygserver): New method declaration. - (pwdgrp::prep_tls_pwbuf): Drop declaration. - (pwdgrp::prep_tls_grbuf): Drop declaration. - (pwdgrp::add_user_from_cygserver): New inline methods. - (pwdgrp::add_group_from_cygserver): New inline methods. - * tlsoffsets.h: Regenerate. - * tlsoffsets64.h: Regenerate. - * uinfo.cc (internal_getlogin): Call internal_getgroups if cygserver - caching is not available. - (cygheap_pwdgrp::init): Initialize pwd_cache.cygserver and - grp_cache.cygserver. Set caching to true. - (cygheap_pwdgrp::nss_init_line): Drop db_cache handling entirely. - (pwdgrp::add_account_from_windows): Drop no caching handling. - (client_request_pwdgrp::client_request_pwdgrp): New method. - (pwdgrp::fetch_account_from_cygserver): New method. - (pwdgrp::add_account_from_cygserver): New method. - - * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix formatting. - * include/sys/cygwin.h: Ditto. - -2014-03-12 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Avoid crash on - non-domain member machines if an unknown SID comes in. - -2014-03-12 Corinna Vinschen <corinna@vinschen.de> - * include/cygwin/socket.h (IPV6_JOIN_GROUP): Revert. (IPV6_LEAVE_GROUP): Ditto. @@ -1596,38 +1039,6 @@ * dir.cc (opendir): Propagate any errno from build_fh_name. -2014-03-07 Corinna Vinschen <corinna@vinschen.de> - - * pwdgrp.h (pwdgrp::is_passwd): New inline method. - (pwdgrp::is_group): New inline method. - (add_account_from_windows): Drop group argument from declaration. - (fetch_account_from_windows): Ditto. - (check_file): Ditto. - (add_user_from_windows): Call add_account_from_windows accordingly. - (add_group_from_windows): Ditto. - * uinfo.cc (pwdgrp::add_account_from_windows): Drop group argument. - Use is_group method instead. - (pwdgrp::check_file): Ditto. - (pwdgrp::fetch_account_from_windows): Ditto. - * grp.cc: Accommodate aforementioned changes. - * passwd.cc: Ditto. - -2014-03-06 Corinna Vinschen <corinna@vinschen.de> - - * passwd.cc (pg_ent::enumerate_builtin): Convert pwd_builtins and - grp_builtins to array of cygpsid pointers. Replace SID strings with - pointers to well known SIDs. - * sec_helper.cc (well_known_local_service_sid): Define. - (well_known_network_service_sid): Define. - (trusted_installer_sid): Define. - * security.h (well_known_local_service_sid): Declare. - (well_known_network_service_sid): Declare. - (trusted_installer_sid): Declare. - * uinfo.cc (pwdgrp::fetch_account_from_windows): Throughout set acc_type - to SidTypeUnknown if LookupAccountXXX function failed. Create - simplified passwd entry for non-user accounts, except for LocalSystem. - Add comment. - 2014-03-06 Corinna Vinschen <corinna@vinschen.de> * setlsapwd.cc (setlsapwd): Use RtlSecureZeroMemory to delete password @@ -1635,18 +1046,6 @@ 2014-03-05 Corinna Vinschen <corinna@vinschen.de> - * ldap.cc (rediscover_thread): Remove. - (cyg_ldap::open): Remove code to rediscover DC. It just won't do the - right thing. - (cyg_ldap::enumerate_ad_accounts): Change to be self-sufficient (no - explicit open call required). Enumerate on a DC of the domain itself - instead of relying on delegation. Remove ill-advised code trying to - generate rootdse from domain name. - * passwd.cc (pg_ent::enumerate_ad): Drop explicit call to - cyg_ldap::open. - -2014-03-05 Corinna Vinschen <corinna@vinschen.de> - * include/cygwin/config.h (__TM_GMTOFF): Define. (__TM_ZONE): Define. @@ -1673,115 +1072,6 @@ * exception.h (exception::exception): Install vectored exception handler rather than vectored continue handler. -2014-03-03 Corinna Vinschen <corinna@vinschen.de> - - * sec_helper.cc (cygpsid::get_id): Move Samba SID->uid/gid mapping - from get_sids_info here. - (get_sids_info): Vice versa. - * security.cc (convert_samba_sd): New static function to map a Samba - security descriptor to a security descriptor with UNIX users and groups - converted to Windows SIDs per RFC 2307 mapping. - (check_file_access): Call convert_samba_sd on Samba security - descriptors. - -2014-02-28 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Only fetch extended - user info if we're creating a passwd entry. Add comment. - -2014-02-28 Corinna Vinschen <corinna@vinschen.de> - - * cygheap.h (cygheap_user::sid): Return reference to cygpsid rather - than PSID. - (cygheap_user::saved_sid): Ditto. - (cygheap_pwdgrp::cache_t): New type. - (cygheap_pwdgrp::caching): Convert to cache_t. - (cygheap_pwdgrp::nss_db_caching): Change accordingly. - (cygheap_pwdgrp::nss_db_full_caching): New inline method. - * grp.cc (internal_getgroups): Reinvent. Take cyg_ldap pointer as - third parameter and use throughout. - (getgroups32): Call internal_getgroups. - * pwdgrp.h (internal_getgroups): Declare. - * uinfo.cc (internal_getlogin): Partial rewrite to accommodate having - no connection to the DC. Give primary group from user token more - weight. Generate group entries for all groups in the user token if - caching is set to NSS_FULL_CACHING. - (cygheap_pwdgrp::init): Initialize caching to NSS_FULL_CACHING. - (cygheap_pwdgrp::nss_init_line): Handle "db_cache: full". - (pwdgrp::add_account_from_windows): Fix group handling in non-caching - mode. - (pwdgrp::fetch_account_from_windows): Default primary group for the - current user to primary group from user token. Check for primary - domain first after LookupAccountSid failed. - -2014-02-27 Corinna Vinschen <corinna@vinschen.de> - - * autoload.cc (CheckTokenMembership): Import. - * external.cc (cygwin_internal): Call get_uid/get_gid instead of get_id. - * grp.cc (internal_getgrsid): Take additional cyg_ldap pointer. - Forward to pwdgrp::add_group_from_windows. - (internal_getgrnam): Ditto. - (internal_getgrgid): Ditto. - (gr_ent::enumerate_local): Drop ugid_caching bool from call to - pwdgrp::fetch_account_from_windows. - (getgroups32): Rename from internal_getgroups and drop getgroups32 stub. - Drop srchsid parameter and code handling it. Add local cyg_ldap - instance and forward to internal_getgrXXX. - (getgroups): Call getgroups32. - (get_groups): Add local cyg_ldap instance and forward to - internal_getgrXXX. - (getgrouplist): Ditto. - (setgroups32): Ditto. - * ldap.cc (cyg_ldap::open): Don't call close. Return true if connection - is already open. - (cyg_ldap::remap_uid): Forward this to internal_getpwsid. - (cyg_ldap::remap_gid): Forward this to internal_getgrsid. - * passwd.cc (internal_getpwsid): Take additional cyg_ldap pointer. - Forward to pwdgrp::add_user_from_windows. - (internal_getpwnam): Ditto. - (internal_getpwuid): Ditto. - (pg_ent::enumerate_builtin): Drop ugid_caching bool from call to - pwdgrp::fetch_account_from_windows. - (pg_ent::enumerate_sam): Ditto. - (pg_ent::enumerate_ad): Ditto. Forward local cldap instead. - * pwdgrp.h (internal_getpwsid): Align declaration to above change. - (internal_getpwnam): Ditto. - (internal_getpwuid): Ditto. - (internal_getgrsid): Ditto. - (internal_getgrgid): Ditto. - (internal_getgrnam): Ditto. - (internal_getgroups): Drop declaration. - (pwdgrp::add_account_from_windows): Align declaration to below change. - (pwdgrp::add_user_from_windows): Ditto. - (pwdgrp::add_group_from_windows): Ditto. - * sec_acl.cc (setacl): Add local cyg_ldap instance and forward to - internal_getpwuid and internal_getgrgid. - (getacl): Add local cyg_ldap instance and forward to cygpsid::get_id. - (aclfromtext32): Add local cyg_ldap instance and forward to - internal_getpwnam and internal_getgrnam. - * sec_helper.cc (cygpsid::get_id): Take additional cyg_ldap pointer. - Forward to internal_getgrsid and internal_getpwsid. - (get_sids_info): Drop ldap_open. Forward local cldap to - internal_getpwsid and internal_getgrXXX. Call CheckTokenMembership - rather than internal_getgroups. - * security.h (cygpsid::get_id): Add cyg_ldap pointer, drop default - parameter. - (cygpsid::get_uid): Add cyg_ldap pointer. Call get_id accordingly. - (cygpsid::get_gid): Ditto. - * uinfo.cc (internal_getlogin): Add local cyg_ldap instance and forward - to internal_getpwXXX and internal_getgrXXX calls. - (pwdgrp::add_account_from_windows): Take additional cyg_ldap pointer. - Forward to pwdgrp::fetch_account_from_windows. - (fetch_posix_offset): Drop ldap_open argument and handling. Get - cyg_ldap instance as pointer. - (pwdgrp::fetch_account_from_windows): Take additional cyg_ldap pointer. - Use it if it's not NULL, local instance otherwise. Drop ldap_open. - Drop fetching extended group arguments from AD for speed. - -2014-02-27 Corinna Vinschen <corinna@vinschen.de> - - * path.cc (find_fast_cwd_pointer): Fix preceeding comment. - 2014-02-25 Christopher Faylor <me.cygwin2014@cgf.cx> * fhandler.h (fhandler_console::scroll_buffer_screen): New function. @@ -1820,32 +1110,10 @@ 2014-02-22 Corinna Vinschen <corinna@vinschen.de> - * external.cc (cygwin_internal): Add cases for CW_GETNSSSEP, - CW_GETPWSID and CW_GETGRSID. - * grp.cc (internal_getgrsid_from_db): New function. - * passwd.cc (internal_getpwsid_from_db): New function. - (pg_ent::setent): Add special case for call from mkpasswd/mkgroup. - * pwdgrp.h (internal_getpwsid_from_db): Declare. - (internal_getgrsid_from_db): Declare. - (enum nss_enum_t): Move to include/sys/cygwin.h. - (class pg_ent): Add comment. - * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix typo in comment. - Change "UNIX" to "Unix" in domain name. - * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GETNSSSEP, - CW_GETPWSID and CW_GETGRSID. - (enum nss_enum_t): Define here. - -2014-02-21 Corinna Vinschen <corinna@vinschen.de> - - * pwdgrp.h (pwdgrp::fetch_account_from_windows): Add bool parameter - to declaration, set to true by default. - * uinfo.cc (pwdgrp::fetch_account_from_windows): Add bool parameter - "ugid_caching". Only add account to ugid_cache if set to true. - * grp.cc (gr_ent::enumerate_local): Call fetch_account_from_windows - with ugid_caching parameter set to false. - * passwd.cc (pg_ent::enumerate_builtin): Ditto. - (pg_ent::enumerate_sam): Ditto. - (pg_ent::enumerate_ad): Ditto. + * external.cc (cygwin_internal): Add cases for CW_GETPWSID and + CW_GETGRSID. + * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SETENT, CW_GETENT, + CW_ENDENT, CW_GETNSSSEP, CW_GETPWSID and CW_GETGRSID. 2014-02-20 Corinna Vinschen <corinna@vinschen.de> @@ -1857,115 +1125,11 @@ * grp.cc (get_groups): Don't add gid to list if it's ILLEGAL_GID. (getgrouplist): Return number of groups, just like glibc. -2014-02-19 Corinna Vinschen <corinna@vinschen.de> - - * passwd.cc (pg_ent::setent): Initialize cygheap domain info. - * sec_auth.cc (get_logon_server): Ditto. - -2014-02-18 Corinna Vinschen <corinna@vinschen.de> - - * external.cc (cygwin_internal): Handle new CW_SETENT, CW_GETENT and - CW_ENDENT info types. - * grp.cc (setgrent_filtered): New function, called from cygwin_internal. - (getgrent_filtered): Ditto. - (endgrent_filtered): Ditto. - * passwd.cc (pg_ent::setent): Set state explicitely to from_cache. - (pg_ent::getent): Handle the fact that a DC has no SAM and enumerating - local accounts is equivalent to enumerating domain accounts. - (setpwent_filtered): New function, called from cygwin_internal. - (getpwent_filtered): Ditto. - (endpwent_filtered): Ditto. - * pwdgrp.h (setpwent_filtered): Declare. - (getgrent_filtered): Ditto. - (endgrent_filtered): Ditto. - (setpwent_filtered): Ditto. - (getpwent_filtered): Ditto. - (endpwent_filtered): Ditto. - * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SETENT, CW_GETENT, - and CW_ENDENT. - 2014-02-18 Corinna Vinschen <corinna@vinschen.de> * setlsapwd.cc (setlsapwd): Fix conditional expression after breaking it on 2014-01-23. -2014-02-17 Corinna Vinschen <corinna@vinschen.de> - - * autoload.cc (ldap_abandon): Import. - (ldap_result): Import. - (ldap_searchW): Import. - (NetGroupEnum): Import. - (NetLocalGroupEnum): Import. - (NetUserEnum): Import. - * cygheap.h (class cygheap_pwdgrp): Add members enums and enum_tdoms. - (cygheap_pwdgrp::nss_db_enums): New inline method. - (cygheap_pwdgrp::nss_db_enum_tdoms): Ditto. - * cygtls.h (struct _local_storage): Drop unused members pw_pos and - grp_pos. - * grp.cc (grent): New static variable of class gr_ent. - (gr_ent::enumerate_caches): New method. - (gr_ent::enumerate_local): New method. - (gr_ent::getgrent): New method. - (setgrent): Call gr_ent method. - (getgrent32): Ditto. - (endgrent): Ditto. - * ldap.cc (sid_attr): Rename from nfs_attr. - (cyg_ldap::close): Abandon still running asynchronous search. - (cyg_ldap::fetch_ad_account): Reduce filter buffer size. - (cyg_ldap::enumerate_ad_accounts): New method. - (cyg_ldap::next_account): New method. - (cyg_ldap::fetch_posix_offset_for_domain): Reduce filter buffer size. - (cyg_ldap::fetch_unix_sid_from_ad): Ditto. Fix return value in case - no value has been read. - (cyg_ldap::fetch_unix_name_from_rfc2307): Reduce filter buffer size. - * ldap.h (class cyg_ldap): Add msg_id member. - (cyg_ldap::enumerate_ad_accounts): Declare. - (cyg_ldap::next_account): Declare: - * passwd.cc (pwent): New static variable of class pw_ent. - (pg_ent::clear_cache): New method. - (pg_ent::setent): New method. - (pg_ent::getent): New method. - (pg_ent::endent): New method. - (pg_ent::enumerate_file): New method. - (pg_ent::enumerate_builtin): New method. - (pg_ent::enumerate_sam): New method. - (pg_ent::enumerate_ad): New method. - (pw_ent::enumerate_caches): New method. - (pw_ent::enumerate_local): New method. - (pw_ent::getpwent): New method. - (setpwent): Call pw_ent method. - (getpwent): Ditto. - (endpwent): Ditto. - * pwdgrp.h (class pwdgrp): Define pg_ent, pw_ent and gr_ent as friend - classes. - (pwdgrp::add_account_post_fetch): Declare with extra bool parameter. - (pwdgrp::file_attr): New inline method. - (enum nss_enum_t): Define. - (class pg_ent): Define. - (class pw_ent): Define. - (class gr_ent): Define. - * tlsoffsets.h: Regenerate. - * tlsoffsets64.h: Ditto. - * uinfo.cc (cygheap_pwdgrp::init): Initialize enums and enum_tdoms. - (cygheap_pwdgrp::nss_init_line): Fix typo in preceeding comment. - Handle new "db_enum" keyword. - (pwdgrp::add_account_post_fetch): Take additional `bool lock' parameter - and acquire pglock before adding element to array if lock is true. - (pwdgrp::add_account_from_file): Call add_account_post_fetch with lock - set to true. - (pwdgrp::add_account_from_windows): Ditto in case of caching. - (pwdgrp::fetch_account_from_windows): Handle builtin aliases only - known to the domain controller. Only call NetLocalGroupGetInfo for - aliases. - -2014-02-16 Corinna Vinschen <corinna@vinschen.de> - - * miscfuncs.h (NT_readline::close): New function to close handle. - (NT_readline::~NT_readline): Call close. - * sec_auth.cc (verify_token): Use constructor to initialize tok_usersid. - * security.h (cygsid::cygsid): Add copy constructor taking cygsid as - source. - 2014-02-16 Corinna Vinschen <corinna@vinschen.de> * dcrt0.cc (dll_crt0_1): Call initial_setlocale before fetching @@ -2006,95 +1170,18 @@ when !winpid. Simplify logic. Don't do duplicate detection for winpid. -2014-02-14 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (pwdgrp::fetch_account_from_windows): Default to /bin/bash - as login shell. - -2014-02-13 Corinna Vinschen <corinna@vinschen.de> - - * ldap.cc (cyg_ldap::fetch_posix_offset_for_domain): If domain name - has no dot, it's a Netbios name. Change the search filter expression - accordingly and filter by flatName. Add comment. - * uinfo.cc (cygheap_domain_info::init): Gracefully handle NULL - DnsDomainName and DomainSid members in DS_DOMAIN_TRUSTSW structure. - Add comment. Fix comment preceeding fetching the mapping server - from registry. - (pwdgrp::fetch_account_from_file): Convert str to a local array. - (fetch_posix_offset): New static function. - (pwdgrp::fetch_account_from_windows): Add debug output in case - LookupAccountSidW fails. Simplify code by calling fetch_posix_offset - where appropriate. If LookupAccountSidW fails, check if the SID is - one of the known trusted domains. If so, create a more informative - account entry. - -2014-02-12 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (cygheap_pwdgrp::nss_init_line): Explicitely ignore a colon - as separator char. - 2014-02-11 Christopher Faylor <me.cygwin2014@cgf.cx> - * winsup.h: Turn off previous workaround but leave a comment. - -2014-02-11 Corinna Vinschen <corinna@vinschen.de> - - * ldap.cc (rediscover_thread): Give argument a useful name. - * miscfuncs.cc (NT_readline::init): It's a really bad idea trying to - print a pointer to a PUNICODE_STRING as PUNICODE_STRING. Fix it. - * uinfo.cc (cygheap_domain_info::init): Print status codes as hex - values in debug output. - -2014-02-11 Corinna Vinschen <corinna@vinschen.de> - - * autoload.cc (NetLocalGroupGetInfo): Replace NetGroupGetInfo. - * cygheap.h (class cygheap_ugid_cache): Move ugid_cache_t type here - and rename. - (struct init_cygheap): Add cygheap_ugid_cache member "ugid_cache". - * pwdgrp.h (class ugid_cache_t): Remove here. - * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Accommodate - move of ugid_cache to cygheap. - * sec_helper.cc (get_sids_info): Ditto. - * uinfo.cc (ugid_cache): Remove. - (pwdgrp::fetch_account_from_windows): Define id_val globally. - Move SidTypeAlias handling into SidTypeUser/SidTypeGroup branch since - aliases are handled like groups in SAM. Accommodate move of ugid_cache - to cygheap. Consolidate code reading SAM comments into a single branch - for both, SidTypeUser and SidTypeAlias. For SidTypeAlias, fix thinko - and call NetLocalGroupGetInfo rather than NetGroupGetInfo. Simplify - code setting Cygwin primary group for SAM accounts. Add code to handle - UNIX uid/gid from SAM comment. - -2014-02-11 Christopher Faylor <me.cygwin2014@cgf.cx> - - * winsup.h (Interlocked*): Use intrinsic versions of Interlocked - functions. - * cygwin.sc.in: More closely emulate default pe/i386 linker script. 2014-02-10 Corinna Vinschen <corinna@vinschen.de> - * uinfo.cc (cygheap_domain_info::init): Drop accidentally leftover if - statement. - -2014-02-10 Corinna Vinschen <corinna@vinschen.de> - - * uinfo.cc (cygheap_domain_info::init): Fix handling of account domain - on donmain controllers. Explain why. - -2014-02-10 Corinna Vinschen <corinna@vinschen.de> - * cygheap.cc (cwcsdup): Change parameter to correct PWCSTR. (cwcsdup1): Ditto. * cygheap_malloc.h: Change declarations accordingly. 2014-02-10 Corinna Vinschen <corinna@vinschen.de> - * uinfo.cc (pwdgrp::fetch_account_from_windows): Add code to allow - setting the primary group from the SAM comment field. - -2014-02-10 Corinna Vinschen <corinna@vinschen.de> - * dcrt0.cc (child_info_spawn::handle_spawn): Call fixup_lockf_after_exec with additional argument to specify if the process has been execed or spawned. @@ -2112,161 +1199,11 @@ * environ.cc (strbrk): New function. (parse_options): Use strbrk to parse CYGWIN environment variable. -2014-02-09 Corinna Vinschen <corinna@vinschen.de> - - Introduce reading passwd/group entries from SAM/AD. Introduce - /etc/nsswitch.conf file to configure it. - * Makefile.in (DLL_OFILES): Add ldap.o. - * autoload.cc: Import ldap functions from wldap32.dll. - (DsEnumerateDomainTrustsW): Import. - (NetGroupGetInfo): Import. - * cygheap.h (class cygheap_domain_info): New class to keep global - domain info. - (class cygheap_pwdgrp): New class to keep passwd/group caches and - configuration info from /etc/nssswitch.conf. - (struct init_cygheap): Add cygheap_domain_info member "dom" and - cygheap_pwdgrp member "pg". - * cygtls.h (struct _local_storage): Remove unused member "res". - Rearrange slightly, Add members pwbuf and grbuf to implement non-caching - passwd/group fetching from SAM/AD. Make pw_pos and pw_pos unsigned. - * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Add RFC 2307 - uid/gid mapping. - * fhandler_process.cc: Drop including pwdgrp.h. - * fhandler_procsysvipc.cc: Ditto. - * fhandler_registry.cc (fhandler_registry::fstat): Set key uid/gid - to ILLEGAL_UID/ILLEGAL_GID rather than UNKNOWN_UID/UNKNOWN_GID. - * grp.cc (group_buf): Drop. - (gr): Drop. - (pwdgrp::parse_group): Fill pg_grp. - (pwdgrp::read_group): Remove. - (pwdgrp::init_grp): New method. - (pwdgrp::prep_tls_grbuf): New method. - (pwdgrp::find_group): New methods. - (internal_getgrsid): Convert to call new pwdgrp methods. - (internal_getgrnam): Ditto. - (internal_getgrgid): Ditto. - (getgrgid_r): Drop 2nd parameter from internal_getgrgid call. - (getgrgid32): Ditto. - (getgrnam_r): Ditto for internal_getgrnam. - (getgrnam32): Ditto. - (getgrent32): Convert to call new pwdgrp methods. - (internal_getgrent): Remove. - (internal_getgroups): Simplify, especially drop calls to - internal_getgrent. - * ldap.cc: New file implementing cyg_ldap class for LDAP access to AD - and RFC 2307 server. - * ldap.h: New header, declaring cyg_ldap class. - * passwd.cc (passwd_buf): Drop. - (pr): Drop. - (pwdgrp::parse_passwd): Fill pg_pwd. - (pwdgrp::read_passwd): Remove. - (pwdgrp::init_pwd): New method. - (pwdgrp::prep_tls_pwbuf): New method. - (find_user): New methods. - (internal_getpwsid): Convert to call new pwdgrp methods. - (internal_getpwnam): Ditto. - (internal_getpwuid): Ditto. - (getpwuid32): Drop 2nd parameter from internal_getpwuid call. - (getpwuid_r): Ditto. - (getpwnam): Ditto for internal_getpwnam. - (getpwnam_r): Ditto. - (getpwent): Convert to call new pwdgrp methods. - * path.cc (class etc): Remove all methods. - * path.h (class etc): Drop. - * pinfo.cc (pinfo_basic::pinfo_basic): Set gid to ILLEGAL_GID rather - than UNKNOWN_GID. - (pinfo_init): Ditto. - * pwdgrp.h (internal_getpwnam): Drop 2nd parameter from declaration. - (internal_getpwuid): Ditto. - (internal_getgrgid): Ditto. - (internal_getgrnam): Ditto. - (internal_getgrent): Drop declaration. - (enum fetch_user_arg_type_t): New type. - (struct fetch_user_arg_t): New type. - (struct pg_pwd): New type. - (struct pg_grp): New type. - (class pwdgrp): Rework to provide functions for file and db requests - and caching. - (class ugid_cache_t): New class to provide RFC 2307 uid map caching. - (ugid_cache): Declare. - * sec_acl.cc: Drop including pwdgrp.h. - * sec_auth.cc: Drop including dsgetdc.h and pwdgrp.h. - (get_logon_server): Convert third parameter to ULONG flags argument - to allow arbitrary flags values in DsGetDcNameW call and change calls - to this function throughout. Use cached account domain name rather - than calling GetComputerNameW. - (get_unix_group_sidlist): Remove. - (get_server_groups): Drop call to get_unix_group_sidlist. - (verify_token): Rework token group check without calling - internal_getgrent. - * sec_helper.cc (cygpsid::pstring): New methods, like string() but - return pointer to end of string. - (cygsid::getfromstr): Add wide character implementation. - (get_sids_info): Add RFC 2307 uid/gid mapping for Samba shares. - * security.cc: Drop including pwdgrp.h. - * security.h (DEFAULT_UID): Remove. - (UNKNOWN_UID): Remove. - (UNKNOWN_GID): Remove. - (uinfo_init): Move here from winsup.h. - (ILLEGAL_UID): Ditto. - (ILLEGAL_GID): Ditto. - (UNIX_POSIX_OFFSET): Define. Add lengthy comment. - (UNIX_POSIX_MASK): Ditto. - (MAP_UNIX_TO_CYGWIN_ID): Ditto. - (ILLEGAL_UID16): Move here from winsup.h. - (ILLEGAL_GID16): Ditto. - (uid16touid32): Ditto. - (gid16togid32): Ditto. - (sid_id_auth): New convenience macro for SID component access. - (sid_sub_auth_count): Ditto. - (sid_sub_auth): Ditto. - (sid_sub_auth_rid): Ditto. - (cygpsid::pstring): Declare. - (cygsid::getfromstr): Declare wide character variant. - (cygsid::operator=): Ditto. - (cygsid::operator*=): Ditto. - (get_logon_server): Change declaration according to source code. - * setlsapwd.cc (setlsapwd): Drop 2nd parameter from internal_getpwnam - call. - * shared.cc (memory_init): Call cygheap->pg.init in first process. - * syscalls.cc: Drop including pwdgrp.h. - * tlsoffsets.h: Regenerate. - * tlsoffsets64.h: Ditto. - * uinfo.cc (internal_getlogin): Drop gratuitious internal_getpwuid - call. Fix debug output. Overwrite user gid in border case of a - missing passwd file while a group file exists. - (pwdgrp::add_line): Allocate memory on cygheap. - (pwdgrp::load): Remove. - (ugid_cache): Define. - (cygheap_pwdgrp::init): New method. - (cygheap_pwdgrp::nss_init_line): New method. - (cygheap_pwdgrp::_nss_init): New method. - (cygheap_domain_info::init): New method. - (logon_sid): Define. - (get_logon_sid): New function. - (pwdgrp::add_account_post_fetch): New method. - (pwdgrp::add_account_from_file): New methods. - (pwdgrp::add_account_from_windows): New methods. - (pwdgrp::check_file): New method. - (pwdgrp::fetch_account_from_line): New method. - (pwdgrp::fetch_account_from_file): New method. - (pwdgrp::fetch_account_from_windows): New method. - * winsup.h: Move aforementioned macros and declarations to security.h. - 2014-02-09 Christopher Faylor <me.cygwin2014@cgf.cx> * sigproc.cc (sig_send): Don't bother with an error message if we are exiting. -2014-02-08 Corinna Vinschen <corinna@vinschen.de> - - * miscfuncs.h (class NT_readline): New class to implement line-wise - reading from file using native NT functions. - * miscfuncs.cc (NT_readline::init): New method. - (NT_readline::fgets): New method. - * mount.cc (mount_info::from_fstab): Utilize NT_readline to read - fstab files. - 2014-02-06 Corinna Vinschen <corinna@vinschen.de> * fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo in |