summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * ldap.cc (cyg_ldap::fetch_ad_account): Take additional domain stringCorinna Vinschen2014-05-224-13/+43
| | | | | | | | | | | | 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.
* * gmon.h: Pull in profile.h. Explain why.Corinna Vinschen2014-05-222-0/+20
|
* * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix potential SEGVCorinna Vinschen2014-05-222-5/+10
| | | | referencing NULL pointer.
* * libc/bsdlib.cc (forkpty): Close master and slave if fork fails toCorinna Vinschen2014-05-224-110/+84
| | | | | | | avoid resource leak (CID 59997). * libc/fts.c: Update to FreeBSD version 1.39 (CID 59947). * libc/minires.c (minires_get_search): Fix out-of-bounds read from words array (CID 59937).
* * flock.cc (delete_lock_in_parent): Use LIST_FOREACH_SAFE to avoidCorinna Vinschen2014-05-202-3/+8
| | | | dereferencing freed pointer (CID 60224).
* * fhandler_procsysvipc.cc (format_procsysvipc_msg): Rearrange code toCorinna Vinschen2014-05-202-95/+149
| | | | | | | avoid resource leakage (CID 60002). Don't use tmp_pathbuf, explain why. Fix indentation. (format_procsysvipc_sem): Ditto. (format_procsysvipc_shm): Ditto (CID 60003).
* * fhandler_process.cc (get_mem_values): Rearrange code slightly toCorinna Vinschen2014-05-202-11/+17
| | | | | | | avoid resource leakage (CID 59973). (format_process_stat): Drop temporary variable wcmd and avoid string copy without length check (CID 60050). (format_process_status): Ditto (CID 60051).
* * fhandler_proc.cc (format_proc_swaps): Use tmp_pathbuf for filename,Corinna Vinschen2014-05-202-9/+8
| | | | rather than allocating and forgetting to free (CID 59982).
* * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Fix floppyCorinna Vinschen2014-05-203-8/+30
| | | | drive handling broken with 1.7.19.
* * scandir.cc (scandir): Assume namelist is always valid, per POSIX.Corinna Vinschen2014-05-203-29/+48
| | | | | | | (CID 60021). * sec_auth.cc (cygwin_logon_user): Securely erase password copy. (lsaprivkeyauth): Avoid trying to dereference data if no key is stored in the registry (CID 60122). Securely erase passwords after usage.
* * pseudo-reloc.cc (__report_error): Raise size of module name buffer toCorinna Vinschen2014-05-192-2/+7
| | | | PATH_MAX. Fix length in call to GetModuleFileNameW (CID 59947).
* * net.cc (call_gaa): Fix setting pa_ret pointer in case of an errorCorinna Vinschen2014-05-192-6/+15
| | | | | | from GetAdaptersAddresses (CID 60218). (get_ifs): Add missing braces in AF_INET6 case which broke netmask computation. Break out of loop if prefix gets <= 0 (CID 59939).
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 31.Corinna Vinschen2014-05-194-34/+50
|
* * dtable.cc (handle_to_fn): Fix length parameter in call toCorinna Vinschen2014-05-192-2/+7
| | | | QueryDosDeviceW (CID 59936).
* * pinfo.cc (pinfo_basic::pinfo_basic): Fix size of progname array inCorinna Vinschen2014-05-192-2/+7
| | | | call to GetModuleFileNameW (CID 59935).
* * smallprintf.cc (__small_vsprintf): Add missing break in 'C' case.Corinna Vinschen2014-05-192-1/+6
|
* * exceptions.cc (try_to_debug): Fix size of dbg_cmd (CID 59929).Corinna Vinschen2014-05-192-1/+5
|
* * syscalls.cc (getusershell): Fix buffer overrun (Coverity ID 59932).Corinna Vinschen2014-05-192-1/+5
|
* * external.cc (cygwin_internal): Use local name buffer instead ofCorinna Vinschen2014-05-162-3/+7
| | | | allocated one in CW_CYGNAME_FROM_WINNAME.
* * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 273.Corinna Vinschen2014-05-152-1/+8
|
* * external.cc (cygwin_internal): Implement CW_CYGNAME_FROM_WINNAME.Corinna Vinschen2014-05-153-1/+65
| | | | | | Add lengthy comment to explain what we do and why. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CYGNAME_FROM_WINNAME.
* * sec_auth.cc (get_server_groups): Call get_logon_server only forCorinna Vinschen2014-05-143-7/+95
| | | | | | | 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.
* * fhandler_socket.cc (fhandler_socket::ioctl): Handle the differentCorinna Vinschen2014-05-133-1/+30
| | | | | ideas of u_long between Winsock and Cygwin applications on x86_64. Add long comment.
* clarify checkin commentChristopher Faylor2014-05-101-2/+2
|
* * signal.cc (sigprocmask): Fix strace output to include "how".Christopher Faylor2014-05-093-6/+15
| | | | | * fhandler_console.cc (dev_console::save_restore): Only current dwEnd line rather than the one after that.
* * uinfo.cc (cygheap_user::init): Fix formatting in debug output.Corinna Vinschen2014-05-084-3/+51
| | | | | | | | (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.
* * 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.