summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * Makefile.in (OBJS): Add pwdgrp.o.Corinna Vinschen2014-03-124-2/+174
| | | | | | * client.cc (client_request::handle_request): Handle CYGSERVER_REQUEST_PWDGRP message. * pwdgrp.cc: New file implementing CYGSERVER_REQUEST_PWDGRP.
* * cygheap.h (enum cygheap_pwdgrp::cache_t): Remove.Corinna Vinschen2014-03-1213-378/+593
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * Throughout, fix format specifiers in debug statements to accommodateCorinna Vinschen2014-03-128-94/+85
| | | | x86_64.
* * uinfo.cc (pwdgrp::fetch_account_from_windows): Avoid crash onCorinna Vinschen2014-03-122-1/+7
| | | | non-domain member machines if an unknown SID comes in.
* * include/cygwin/socket.h (IPV6_JOIN_GROUP): Revert.Corinna Vinschen2014-03-122-0/+7
| | | | (IPV6_LEAVE_GROUP): Ditto.
* Fix ChangeLog entry date.Corinna Vinschen2014-03-111-1/+1
|
* * fhandler.h (dev_console::b): Redefine as CONSOLE_SCREEN_BUFFER_INFO for useChristopher Faylor2014-03-103-3/+9
| | | | | | with older OS. * fhandler_console.cc (dev_console::fillin): Ditto for GetConsoleScreenBufferInfo.
* * fhandler_console.cc (dev_console::save_restore): Save entire line of currentChristopher Faylor2014-03-102-1/+7
| | | | cursor position.
* * fhandler_console.cc (fhandler_console::save_restore): Save only until lastChristopher Faylor2014-03-102-18/+23
| | | | | | | written row and, because of this, don't bother trying to restore the screen buffer size. Set cursor position after refilling buffer. (fhandler_console::write): Use absolute paths when saving/restoring cursor position or suffer odd problems after a saved screen is restored.
* * fhandler.h (fhandler_console::dwBufferSize): Delete.Christopher Faylor2014-03-093-365/+391
| | | | | | | | | | | | | | | | | | | | (fhandler_console::dwCursorPosition): Ditto. (fhandler_console::wAttributes): Ditto. (fhandler_console::b): New field encompassing previously disparate screen buffer info. (fhandler_console::save_bufsize): Rename from savebufsiz (fhandler_console::save_buf): Rename sfrom savebuf. (fhandler_console::save_cursor): New field. (fhandler_console::save_restore): New function. (fhandler_console::con): Rename from dev_state. (fhandler_console::focus_aware): Accommodate name change. * fhandler_console.cc: Use 'b' field of dev_console throughout instead of disparate names. Accommodate dev_state -> con rename. (dev_state:save_restore): New function. Attempt to save the entire screen buffer rather than just the visible part. Clear the buffer when saving, like Linux. (fhandler_console::char_command): Use con.save_restore() for Save/restore screen sequence.
* * sigproc.cc (_cygtls::remove_wq): Reset thread_ev inside of lock. Set to NULLChristopher Faylor2014-03-092-1/+7
| | | | when done.
* * fhandler_console.cc (fhandler_console::char_command): Properly use calculatedChristopher Faylor2014-03-092-1/+6
| | | | value rather than directly using dev_state.args[0].
* * dir.cc (opendir): Propagate any errno from build_fh_name.Christopher Faylor2014-03-092-0/+9
|
* * pwdgrp.h (pwdgrp::is_passwd): New inline method.Corinna Vinschen2014-03-075-49/+63
| | | | | | | | | | | | | | | (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.
* * libc/include/stdlib.h (strtold): Define if _HAVE_LONG_DOUBLE isCorinna Vinschen2014-03-073-4/+18
| | | | | | defined. * libc/stdlib/strtold.c (strtold): Ditto. Call strtod on systems with long double == double, _strtold otherwise.
* * passwd.cc (pg_ent::enumerate_builtin): Convert pwd_builtins andCorinna Vinschen2014-03-065-20/+49
| | | | | | | | | | | | | | | 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.
* * setpwd.cc (client_request_setpwd::serve): Use RtlSecureZeroMemory toCorinna Vinschen2014-03-062-2/+7
| | | | delete password from memory.
* * setlsapwd.cc (setlsapwd): Use RtlSecureZeroMemory to delete passwordCorinna Vinschen2014-03-062-1/+6
| | | | from memory.
* * ldap.cc (rediscover_thread): Remove.Corinna Vinschen2014-03-053-72/+18
| | | | | | | | | | | (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.
* * include/cygwin/config.h (__TM_GMTOFF): Define.Corinna Vinschen2014-03-052-0/+8
| | | | (__TM_ZONE): Define.
* * 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.