summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * grp.cc (gr_ent::enumerate_caches): Fix copy/paste bug introducingCorinna Vinschen2014-05-082-1/+6
| | | | an endless loop.
* * passwd.cc (pwdgrp::parse_passwd): Fix an off by one computing theCorinna Vinschen2014-05-073-2/+10
| | | | | buffer len. Add comment. * uinfo.cc (internal_getlogin): Fix typo in comment.
* * uinfo.cc (pwdgrp::fetch_account_from_windows): Tweak SID<->uidCorinna Vinschen2014-05-072-1/+9
| | | | conversion to cover S-1-5-113, S-1-5-114, and S-1-5-1000 groups.
* * grp.cc (pwdgrp::parse_group): Set grp.len. Drop generating anyCorinna Vinschen2014-05-074-36/+110
| | | | | | | | | | | | | | | | | | | | 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.
* * security.h (MAX_SUBAUTH_CNT): Drop. Use SID_MAX_SUB_AUTHORITIESCorinna Vinschen2014-05-066-20/+24
| | | | | instead throughout. (MAX_SID_LEN): Drop. Use SECURITY_MAX_SID_SIZE instead throughout.
* * grp.cc (internal_getgroups): Drop unused cygsid variable.Corinna Vinschen2014-05-066-25/+52
| | | | | | | | | | | | | | | | | * 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.
* * net.cc (cygwin_getsockopt): Rearrange code slightly and handleCorinna Vinschen2014-05-053-24/+29
| | | | TCP_NODELAY just like SO_KEEPALIVE and SO_DONTROUTE.
* * spawn.cc (av::setup): Eat trailing whitespace on #! script.Christopher Faylor2014-05-032-0/+6
|
* * fhandler_dsp.cc (ioctl): Use _ioctl for recursive call.Christopher Faylor2014-05-022-1/+5
|
* * DevNotes: Add entry cgf-000026.Christopher Faylor2014-04-264-1/+27
| | | | | | | * fhandler.h (fhandler_console::save_top): Save top of screen coordinates. * fhandler_console.cc (dev::save_restore): Record top of screen coordinates. Clear entire buffer when restoring saved buffer and try to position the cursor on the save relative place on the screen.
* * syscalls.cc (NT_TRANSACTIONAL_ERROR): Cover all status codes up toCorinna Vinschen2014-04-252-1/+6
| | | | STATUS_TRANSACTION_NOT_ENLISTED.
* * fhandler_socket.cc: On x86_64, define u_long as __ms_u_long beforeCorinna Vinschen2014-04-245-11/+72
| | | | | | | | | | | including the windows headers. Explain why. (get_inet_addr): Convert ANY address to LOOPBACK address. Explain why. (fhandler_socket::evaluate_events): Forcibly set SO_ERROR socket option in case a connection attempt failed. Explain why. (fhandler_socket::ioctl): Drop x86_64 re-definition of u_long here. * fhandler_procnet.cc: On x86_64, define u_long as __ms_u_long before including the windows headers. Explain why. * net.cc: Ditto.
* * miscfuncs.cc (check_iovec): Allow 0 as valid iovcnt value.Corinna Vinschen2014-04-233-1/+8
|
* * ldap.cc (user_attr): Remove "uid" attribute.Corinna Vinschen2014-04-224-20/+21
| | | | | | | | | * 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.
* * winf.cc (linebuf::fromargv): Temporarily revert patch from 2014-01-24.Corinna Vinschen2014-04-182-2/+6
|
* * cygtls.h (TP_NUM_C_BUFS): Raise to 50 to allow SYMLOOP_MAX recursionsCorinna Vinschen2014-04-188-233/+282
| | | | | | | | | | | | | | | | | | | | | path_conv <-> normalize_posix_path, plus a bit of buffer. (TP_NUM_W_BUFS): Ditto. (class san): Change type of _c_cnt and _w_cnt to unsigned. * path.cc (normalize_posix_path): Guard recursion into path_conv against tmp_pathbuf overflow. Generate normalized path in call to path_conv. If the path is valid, replace dst with the normalized_path from path_conv call. Add comment to explain why we're doing this. * tls_pbuf.cc (tls_pathbuf::destroy): Only free buffers until the first buffer pointer is NULL. (tmp_pathbuf::c_get): Simplify error message. (tmp_pathbuf::w_get): Ditto. * tls_pbuf.h (class tmp_pathbuf): Change type of c_buf_old and w_buf_old to unsigned. (tmp_pathbuf::check_usage): New inline method to check if we have enough tmp_pathbuf buffers left to call a function using tmp_pathbuf buffers. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Regenerate.
* *** empty log message ***Corinna Vinschen2014-04-161-0/+4
|
* * net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS.Corinna Vinschen2014-04-162-1/+14
|
* * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix gid evaluationCorinna Vinschen2014-04-122-9/+15
| | | | for local accounts.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 30.Corinna Vinschen2014-04-102-1/+5
|
* * exceptions.cc (exception::myfault_handle): Only handle the minimumCorinna Vinschen2014-04-092-1/+19
| | | | amount of exceptions the myfault handler was designed for.
* * cygwin.sc.in: (Temporarily?) workaround serious ld bug whichCorinna Vinschen2014-04-082-11/+13
| | | | | truncates symbols in certain computations to 32 bit. See https://sourceware.org/bugzilla/show_bug.cgi?id=16821
* release/1.7.29Corinna Vinschen2014-04-071-0/+3
|
* * cygserver_ipc.h (ipc_set_proc_info): Add bool parameter to specifyCorinna Vinschen2014-04-073-5/+16
| | | | | | | whether or not to send signal_arrived. * shm.cc (client_request_shm::client_request_shm): Call ipc_set_proc_info with bool parameter set to true to not send signal_arrived.
* *** empty log message ***Corinna Vinschen2014-04-041-0/+4
|
* * ntea.cc (EA_BUFSIZ): Fix comment.Corinna Vinschen2014-04-042-13/+21
| | | | | (read_ea): Use tmp_pathbuf for local buffer rather than alloca. Throughout change ZwQueryEaFile to NtQueryEaFile in comments.
* * ntea (EA_BUFSIZ): Reduce to 64K. Add comment to explain why.Corinna Vinschen2014-04-042-4/+18
|
* *** empty log message ***Corinna Vinschen2014-04-012-4/+22
|
* * DevNotes: Add entry cgf-000025.Christopher Faylor2014-03-293-27/+30
| | | | | | * exceptions.cc (_cygtls::signal_debugger): Reorganize to avoid contacting the debugger if we have already done so via the exception handler. Eliminate need for goto. Remove an ifdef in favor of just allocating a larger buffer.
* * dcrt0.cc (dll_crt0_0): Install myfault exception handler on x86_64.Corinna Vinschen2014-03-284-41/+97
| | | | | | | | | | | | | | | | | | | | | | * exception.h (exception_list): Typedef as void on x86_64. (exception::handler_installed): Remove. (exception::handle_while_being_debugged): Remove. (exception::myfault_handle): Declare for x86_64. (exception::handle): Declare as ordinary exception handler on x86_64 as well. (exception::exception): Drop previous code (again). Install exception::handle as SEH handler. (exception::install_myfault_handler): New x86_64-only method to install exception::myfault_handle as VEH handler. Explain why. (exception::~exception): For x86_64, define frame end label (again). * exceptions.cc (CYG_EXC_CONTINUE_EXECUTION): Drop definition. (CYG_EXC_CONTINUE_SEARCH): Ditto. (exception::myfault_handle): New x86_64-only method, VEH handler to handle myfault exceptions. (exception::handle): Define as ordinary exception handler on x86_64 as well. Use ExceptionContinueExecution and ExceptionContinueSearch throughout instead of deleted Cygwin macros. Don't handle myfault exceptions on x86_64.
* * sec_auth.cc (create_token): Initialize lsa handle to NULL, rather thanCorinna Vinschen2014-03-283-4/+12
| | | | | | | to INVALID_HANDLE_VALUE. (lsaauth): Ditto. (lsaprivkeyauth): Ditto. * setlsapwd.cc (setlsapwd): Don't initialize lsa handle.
* * exceptions.cc (_cygtls::signal_debugger): Move memcpy to copy contextCorinna Vinschen2014-03-282-5/+9
| | | | from incoming siginfo_t to thread_context, too.
* * gendef (_sigbe/x86_64): Fix typo in .seh_proc pseudo-op.Corinna Vinschen2014-03-272-10/+23
| | | | | | | | | | (setjmp/x86_64): Drop storing ExceptionList pointer in jmp_buf->Frame. Drop comment. Store likely frame in rdx. Jump to __setjmpex. (__setjmpex): New function providing setjmp functionality. Fetch jmp_buf->Frame from rdx, like MSVCRT setjmpex. (__sjfault/x86_64): Store rdx content in jmp_buf->Frame. (__ljfault/x86_64): Don't restore ExceptionList pointer. (longjmp/x86_64): Ditto.
* * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Actually pass ioctl argument toChristopher Faylor2014-03-202-3/+8
| | | | _ioctl.
* * fhandler.h (fhandler_dev_dsp): Remove variable names from declarations.Christopher Faylor2014-03-193-14/+25
| | | | | | | | | (fhandler_dev_dsp::close_audio_in): Make __reg1. (fhandler_dev_dsp::close_audio_out): Make __reg2. * fhandler_dev_dsp.cc (fhandler_dev_dsp::close_audio_in): Make __reg1. (fhandler_dev_dsp::close_audio_out): Make __reg2. (fhandler_dev_dsp::close): Don't abruptly terminate sound just because we are exiting.
* * exception.h (exception::handle_while_being_debugged): Declare.Corinna Vinschen2014-03-193-1/+17
| | | | | (exception::exception): Install unhandled exception filter. * exceptions.cc (exception::handle_while_being_debugged): New method.
* Fix ChangeLogCorinna Vinschen2014-03-191-6/+6
|
* * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_fork): Actually callCorinna Vinschen2014-03-192-1/+12
| | | | | _fixup_after_fork rather than looping forever. (fhandler_dev_dsp::fixup_after_exec): Ditto.
* * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_fork): Actually callChristopher Faylor2014-03-182-2/+8
| | | | | _fixup_after_fork rather than looping forever. (fhandler_dev_dsp::fixup_after_exec): Ditto.
* Partially revert patch from 2014-03-04.Corinna Vinschen2014-03-183-17/+17
| | | | | | | * exception.h (exception::handler_installed): Declare. (exception::exception): Install vectored exception handler on x86_64. (exception::~exception): Remove for x86_64. * exceptions.cc (exception::handler_installed): Define.
* * sigproc.h (no_thread_exit_protect): New class.Christopher Faylor2014-03-175-7/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | * sigproc.cc (thread_exit): Use no_thread_exit_protect to determine if we need to coordinate ThreadExit/ExitProcess. * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Use no_thread_exit_protect to kludge around waiting for waveOutClose as it waits for a thread that never exits. (fhandler_dev_dsp::Audio_in::stop): Ditto for waveInClose. * fhandler.h (fhandler_dev_dsp::base): New method. (fhandler_dev_dsp::_read): Ditto. (fhandler_dev_dsp::_write): Ditto. (fhandler_dev_dsp::_ioctl): Ditto. (fhandler_dev_dsp::_fixup_after_fork): Ditto. (fhandler_dev_dsp::_fixup_after_exec): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::read): Call real function via base() pointer. (fhandler_dev_dsp::write): Ditto. (fhandler_dev_dsp::ioctl): Ditto. (fhandler_dev_dsp::fixup_after_fork): Ditto. (fhandler_dev_dsp::fixup_after_exec): Ditto. (fhandler_dev_dsp::_read): Rename by adding an leading underscore. (fhandler_dev_dsp::_write): Ditto. (fhandler_dev_dsp::_ioctl): Ditto. (fhandler_dev_dsp::_fixup_after_fork): Ditto. (fhandler_dev_dsp::_fixup_after_exec): Ditto.
* * 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.
* * 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.
* * 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].