summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * 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.
* .Christopher Faylor2014-02-101-0/+3
|
* * environ.cc (strbrk): Properly deal with environment variable sans quote.Christopher Faylor2014-02-102-2/+7
|
* * environ.cc (strbrk): New function.Christopher Faylor2014-02-092-4/+49
| | | | (parse_options): Use strbrk to parse CYGWIN environment variable.
* * libc/include/pwd.h: Include <sys/cdefs.h>.Corinna Vinschen2014-02-093-0/+7
| | | | * libc/include/grp.h: Ditto.
* *** empty log message ***Corinna Vinschen2014-02-091-0/+15
|
* Introduce reading passwd/group entries from SAM/AD. IntroduceCorinna Vinschen2014-02-0929-837/+2717
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /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.
* * sigproc.cc (sig_send): Don't bother with an error message if we are exiting.Christopher Faylor2014-02-092-6/+8
|
* 2014-02-07 Jon TURNEY <jon.turney@dronecode.org.uk>Jon TURNEY2014-02-094-1/+280
| | | | | | * minidumper.cc: New file. * Makefile.in (CYGWIN_BINS): Add minidumper. * utils.xml (minidumper): New section.
* Fix ChangeLogCorinna Vinschen2014-02-081-0/+1
|
* * miscfuncs.h (class NT_readline): New class to implement line-wiseCorinna Vinschen2014-02-084-79/+109
| | | | | | | reading from file using native NT functions. * miscfuncs.cc (NT_readline::init): New method. * mount.cc (mount_info::from_fstab): Utilize NT_readline to read fstab files.
* * fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo inCorinna Vinschen2014-02-066-11/+36
| | | | | | | | | | | comment. * mount.cc (mount_info::from_fstab): Use tmp_pathbuf rather than stack for big local buffer. * net.cc (cygwin_gethostname): Call GetComputerNameExA rather than GetComputerNameA if gethostname failed. * shared.cc (user_info::initialize): Fix formatting. * include/sys/file.h: Define flock and accompanying macros if not already defined in sys/_default_fcntl.h.
* PR target/59788Rainer Orth2014-02-052-1/+7
| | | | | * ltmain.sh (opt_duplicate_compiler_generated_deps): Enable on *solaris2*.
* 2014-02-04 Matthias Braun <matze@braunis.de>Jeff Johnston2014-02-042-1/+5
| | | | * libm/mathfp/sf_numtest.c: Fix NaN/Inf detection logic.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 29.Corinna Vinschen2014-02-042-1/+5
|
* * aarch64/Makefile.in (RDIMON_SCRIPTS): Rule to build in-tree copiesRichard Earnshaw2014-02-032-2/+12
| | | | | | of scripts. (all): Build the in-tree copies of the scripts. (clean): Also delete the in-tree copies of the scripts.
* *** empty log message ***Corinna Vinschen2014-01-312-2/+6
|
* * fhandler.h (cltype): Add cl_buf_beg, cl_buf_end.Christopher Faylor2014-01-313-14/+29
| | | | | | | | * fhandler_console.cc (dev_console::console_attrs::set_cl_x): Honor buffer locations. (dev_console::console_attrs::set_cl_y): Ditto. (fhandler_console::write): On reset, use absolute positioning to go to beginning of buffer. Clear entire buffer.
* * msp430/Makefile.in (crt0-minrt.o, crtn-minrt.o): New. BuildDJ Delorie2014-01-307-24/+96
| | | | | | | | | | | | from crt0.S with -DMINRT. (CRT_OBJS): Expand. (crt_%.o): New rule pattern. Build multiple objects from crt0.S. * msp430/crt0.S: Further break out functionality. Support -DMINRT that omits all init/fini logic. * msp430/crtn.S: Likewise. * msp430/msp430-sim.ld: Wildcard all .crt_* sections, sorted. * msp430/msp430.ld: Likewise. * msp430/msp430xl-sim.ld: Likewise.
* * faq-setup.xml: Minor snapshot instruction rewording. Update discussion aboutChristopher Faylor2014-01-294-17/+17
| | | | | | setup*.exe. * faq-using.xml: Update information about setup*.exe. * faq-what.xml: Ditto.
* * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Use bic-immediateCorinna Vinschen2014-01-282-2/+6
| | | | form to clear WXN bit.
* * new-features.xml (ov-new1.7.28): Add new section.Corinna Vinschen2014-01-272-1/+28
|
* *** empty log message ***Corinna Vinschen2014-01-271-0/+4
|
* * gendef (_setjmp (x86)): Save FPU control word location in sequentialChristopher Faylor2014-01-272-4/+10
| | | | | location. Adjust sigstack save accordingly. (_longjmp (x86)): Ditto for restore.
* * gendef (sigdelayed (x86_64)): Save and restore FPU control word.Corinna Vinschen2014-01-272-4/+41
| | | | | | | (_sigdelayed (x86)): Ditto. Save and restore XMM registers. Add comment. (_setjmp (x86)): Save FPU control word, following FreeBSD here. (_longjmp (x86)): Restore FPU control word.
* update copyrightChristopher Faylor2014-01-273-3/+3
|
* Fix typoChristopher Faylor2014-01-271-1/+1
|
* * winf.cc (linebuf::fromargv): Treat '=' as a special character.Christopher Faylor2014-01-242-1/+5
|
* 2014-01-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>Jeff Johnston2014-01-242-1/+9
| | | | | * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Clear WXN bit in SCTLR_EL3. Add dsb.
* * security.h (open_local_policy): Remove declaration.Corinna Vinschen2014-01-234-25/+44
| | | | | | | | | | | | | | | (lsa_open_policy): Declare. (lsa_close_policy): Declare. * sec_auth.cc (lsa_open_policy): Rename from open_local_policy. Take server name as parameter. Return NULL in case of error, rather than INVALID_HANDLE_VALUE. (lsa_close_policy): Rename from close_local_policy. Make externally available. Get handle by value. (create_token): Convert call to open_local_policy/close_local_policy according to aforementioned changes. (lsaauth): Ditto. (lsaprivkeyauth): Ditto. * setlsapwd.cc (setlsapwd): Ditto.
* * Makefile.common: Don't drop -gFOO switches when filtering CFLAGSCorinna Vinschen2014-01-222-2/+7
| | | | and CXXFLAGS.