summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * libc/include/time.h (__TM_GMTOFF): Remove Cygwin-specific definition.Corinna Vinschen2014-03-052-10/+5
| | | | (__TM_ZONE): Ditto.
* * localtime.cc: Define TM_GMTOFF and TM_ZONE based on __TM_GMTOFF andCorinna Vinschen2014-03-054-14/+51
| | | | | | | | | __TM_ZONE being defined. Throughout, write to these struct tm members only if CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS is true. * libc/strptime.cc: Ditto. * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS): Define. (CYGWIN_VERSION_API_MINOR): Bump to 272.
* * libc/include/time.h (__TM_GMTOFF): Define on Cygwin.Corinna Vinschen2014-03-052-0/+22
| | | | | (__TM_ZONE): Ditto. (struct tm): Add __TM_GMTOFF and __TM_ZONE members if they are defined.
* 2014-02-27 Joey Ye <joey.ye@arm.com>Jeff Johnston2014-03-042-10/+14
| | | | * libnosys/sbrk.c (_sbrk): Remove TWS
* * exception.h (exception::handler_installed): Remove.Corinna Vinschen2014-03-043-14/+25
| | | | | | | (exception::exception): Remove old code. Manually install SEH handler instead. (exception::~exception): For x86_64, define frame end label. * exceptions.cc (exception::handler_installed): Remove.
* * libc/include/machine/_default_types.h: Define unsigned type usingCorinna Vinschen2014-03-042-0/+41
| | | | signed type macros in case unsigned type macros are not available.
* * exception.h (exception::exception): Install vectored exceptionCorinna Vinschen2014-03-032-1/+6
| | | | handler rather than vectored continue handler.
* * sec_helper.cc (cygpsid::get_id): Move Samba SID->uid/gid mappingCorinna Vinschen2014-03-033-61/+143
| | | | | | | | | | 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.
* * uinfo.cc (pwdgrp::fetch_account_from_windows): Only fetch extendedCorinna Vinschen2014-02-282-1/+8
| | | | user info if we're creating a passwd entry. Add comment.
* * cygheap.h (cygheap_user::sid): Return reference to cygpsid ratherCorinna Vinschen2014-02-285-59/+138
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* * autoload.cc (CheckTokenMembership): Import.Corinna Vinschen2014-02-2711-188/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * path.cc (find_fast_cwd_pointer): Fix preceeding comment.Corinna Vinschen2014-02-272-2/+5
|
* Fix typoCorinna Vinschen2014-02-261-1/+1
|
* * fhandler.h (fhandler_console::scroll_buffer_screen): New function.Christopher Faylor2014-02-263-15/+23
| | | | | | * fhandler_console.cc (fhandler_console::scroll_buffer_screen): New function. (fhandler_console::char_command): Use scroll_buffer_screen as appropriate. (dev_console::scroll_buffer): Remove if 0'ed block.
* * mkgroup.c (domlist_t): Drop id_offset.Corinna Vinschen2014-02-244-701/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (get_dcname): Remove. (current_group): Remove. (enum_unix_groups): Simplify. Change space to underscore in domain name. (enum_local_groups): Simplify to accommodate the fact that it's only called for foreign machines. (enum_groups): Ditto. (print_special_by_sid): Remove. (print_special_by_name): Remove. (usage): Align to new code. (fetch_primary_domain): Remove. (main): Use cygwin_internal CW_SETENT, CW_GETENT and CW_ENDENT method. Call enum_local_groups, enum_groups, and enum_unix_groups only for foreign machines. * mkpasswd.c (get_dcname): Remove. (current_user): Remove. (enum_unix_users): Simplify. Change space to underscore in domain name. (enum_users): Simplify to accommodate the fact that it's only called for foreign machines. (print_special_by_sid): Remove. (usage): Align to new code. (longopts): Add -b/--no-builtin option. (opts): Add -b option. (print_special_by_name): Remove. (enum_std_accounts): Remove. (fetch_primary_domain): Remove. (main): Use cygwin_internal CW_SETENT, CW_GETENT and CW_ENDENT method. Call enum_users and enum_unix_users only for foreign machines. * utils.xml (mkgroup): Align documentation to new usage. (mkpasswd): Ditto.
* * minidumper.cc (minidump): Fix -t option argument handling.Jon TURNEY2014-02-232-1/+5
|
* * dev_console::scroll_buffer): Reinstate clipping region.Christopher Faylor2014-02-232-1/+5
|
* * fhandler.h (dev_console::is_fullscreen): Delete.Christopher Faylor2014-02-233-61/+105
| | | | | | | | | | | | | | | | | | | | | | | (dev_console::scroll_window): Return bool indicating success. (dev_console::scroll_screen): New function. (dev_console::clear_screen): New function. (fhandler_console::clear_screen): Make __reg3. (fhandler_console::cursor_set): Ditto. (fhandler_console::cursor_get): Ditto. (fhandler_console::cursor_rel): Ditto. * fhandler_console.cc (dev_console::scroll_buffer): Adapt from fhandler_console. (fhandler_console::scroll_buffer): Use dev_console function. (dev_console::is_fullscreen): Delete. (dev_console::scroll_window): Return true if we cleared the screen. Shrink/grow buffer first before scrolling to ensure that there is sufficient space after scrolling. (fhandler_console::clear_screen): Make reg3, use dev_console function. (dev_console::clear_screen): New function adapted from fhandler_console. (fhandler_console::cursor_set): Make __reg3. (fhandler_console::cursor_rel): Ditto. (fhandler_console::cursor_get): Ditto. (fhandler_console::write): Fix "reverse index".
* * external.cc (cygwin_internal): Add cases for CW_GETNSSSEP,Corinna Vinschen2014-02-227-27/+98
| | | | | | | | | | | | | | | | 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.
* * pwdgrp.h (pwdgrp::fetch_account_from_windows): Add bool parameterCorinna Vinschen2014-02-215-17/+40
| | | | | | | | | | | 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.
* * libm/complex/complex.tex: Fix wrong syntax in documentation.Corinna Vinschen2014-02-203-78/+159
| | | | * libm/math/math.tex: Ditto.
* * grp.cc (getgrouplist): Fix previous fix so ret is only set to ngroupsCorinna Vinschen2014-02-202-1/+8
| | | | if ngroups isn't too small.
* *** empty log message ***Corinna Vinschen2014-02-201-0/+5
|
* * grp.cc (get_groups): Don't add gid to list if it's ILLEGAL_GID.Corinna Vinschen2014-02-202-2/+7
| | | | (getgrouplist): Return number of groups, just like glibc.
* * libc/stdio/open_memstream.c (internal_open_memstream_r): InitializeCorinna Vinschen2014-02-202-0/+6
| | | | c->pos to 0.
* * passwd.cc (pg_ent::setent): Initialize cygheap domain info.Corinna Vinschen2014-02-193-1/+9
| | | | * sec_auth.cc (get_logon_server): Ditto.
* * Makefile.in: Ignore errors on doc install.Christopher Faylor2014-02-182-1/+5
|
* * external.cc (cygwin_internal): Handle new CW_SETENT, CW_GETENT andCorinna Vinschen2014-02-186-3/+131
| | | | | | | | | | | | | | | | | | | | | 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.
* *** empty log message ***Christopher Faylor2014-02-181-0/+8
|
* * setlsapwd.cc (setlsapwd): Fix conditional expression after breakingCorinna Vinschen2014-02-182-1/+6
| | | | it on 2014-01-23.
* * autoload.cc (ldap_abandon): Import.Corinna Vinschen2014-02-1712-282/+1060
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * miscfuncs.h (NT_readline::close): New function to close handle.Corinna Vinschen2014-02-164-2/+12
| | | | | | | (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.
* * dcrt0.cc (dll_crt0_1): Call initial_setlocale before fetchingCorinna Vinschen2014-02-162-3/+8
| | | | current user information.
* * DevNotes: Add entry cgf-000024.Christopher Faylor2014-02-165-168/+228
| | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.h (dev_console::state): Remove trailing underscore. (dev_console::args): Ditto. (dev_console::nargs): Ditto. (dev_console::info): Eliminate subclass. (dev_console::dwEnd): New field. (dev_console::scroll_window): New function. (dev_console::is_fullscreen): Ditto. (dev_console::fillin): Rename from fillin_info. (fhandler_console::scroll_buffer): Rename from scroll_screen. * fhandler_console.cc: Throughout s/dev_state\.info/dev_state/g. Accommodate other name changes. (dev_console::fillin): Accommodate rename. Notice max x/y written to. Forgo memset if GetConsoleScreenBufferInfo fails. (fhandler_console::scroll_buffer): Accommodate rename. Don't treat y coordinate of zero as top of screen. (dev_console::is_fullscreen): New function. (dev_console::scroll_window): Ditto. (fhandler_console::clear_screen): Just scroll the screen when clearing the screen in a state where the screen buffer is bigger than the screen. (fhandler_console::char_command): Try harder to get 'S' and 'T' working in the presence of a screen buffer. Use temporary 'n' variable rather than dev_state.args[0]. Use GNU ?: shortcut method.
* * pinfo.cc (winpids::add): Always copy pinfo structure when winpid. Fill outChristopher Faylor2014-02-152-61/+46
| | | | | | dwProcessId explicitly to handle exec from a windows process. (winpids::enum_processes): Reorganize to iterate over known cygwin pids when !winpid. Simplify logic. Don't do duplicate detection for winpid.
* * uinfo.cc (pwdgrp::fetch_account_from_windows): Default to /bin/bashCorinna Vinschen2014-02-142-1/+6
| | | | as login shell.
* Fix typoCorinna Vinschen2014-02-131-1/+1
|
* * ldap.cc (cyg_ldap::fetch_posix_offset_for_domain): If domain nameCorinna Vinschen2014-02-133-61/+110
| | | | | | | | | | | | | | | | 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 strutures. 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.
* * uinfo.cc (cygheap_pwdgrp::nss_init_line): Explicitely ignore a colonCorinna Vinschen2014-02-122-1/+6
| | | | as separator char.
* 2014-02-11 Joey Ye <joey.ye@arm.com>Jeff Johnston2014-02-112-4/+9
| | | | | * arm/syscalls.c (_sbrk): Define as weak symbols. (_read, _write): Ditto.
* 2014-02-11 Joey Ye <joey.ye@arm.com>Jeff Johnston2014-02-112-3/+8
| | | | | * libc/sys/arm/syscalls.c (_sbrk): Define as weak symbols. (_read, _write): Ditto.
* * winsup.h: Turn off previous workaround but leave a comment.Christopher Faylor2014-02-112-0/+11
|
* * ldap.cc (rediscover_thread): Give argument a useful name.Corinna Vinschen2014-02-114-6/+14
| | | | | | | * 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.
* * autoload.cc (NetLocalGroupGetInfo): Replace NetGroupGetInfo.Corinna Vinschen2014-02-117-181/+192
| | | | | | | | | | | | | | | | | | | * 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.
* * winsup.h (Interlocked*): Use intrinsic versions of Interlocked functions.Christopher Faylor2014-02-113-19/+38
| | | | * cygwin.sc.in: More closely emulate default pe/i386 linker script.
* * uinfo.cc (cygheap_domain_info::init): Drop accidentally leftover ifCorinna Vinschen2014-02-102-2/+6
| | | | statement.
* * uinfo.cc (cygheap_domain_info::init): Fix handling of account domainCorinna Vinschen2014-02-102-2/+11
| | | | on donmain controllers. Explain why.
* * cygheap.cc (cwcsdup): Change parameter to correct PWCSTR.Corinna Vinschen2014-02-103-7/+13
| | | | | (cwcsdup1): Ditto. * cygheap_malloc.h: Change declarations accordingly.
* * uinfo.cc (pwdgrp::fetch_account_from_windows): Add code to allowCorinna Vinschen2014-02-102-1/+27
| | | | setting the primary group from the SAM comment field.
* * dcrt0.cc (child_info_spawn::handle_spawn): Call fixup_lockf_after_execCorinna Vinschen2014-02-103-8/+33
| | | | | | | | with additional argument to specify if the process has been execed or spawned. * flock.cc (fixup_lockf_after_exec): Take bool parameter to handle exec and spawn differently. In case of spawn, just give up POSIX locks in favor of the still running parent. Add comments to explain.