summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
...
* Cygwin 2.6.1: Add missing release textCorinna Vinschen2016-12-061-4/+16
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* path_conv: When encountering a ".(/)+" sequence, skip *all* slashesCorinna Vinschen2016-11-281-1/+6
| | | | | | | The original code only skipped the "./", but missed to test if more trailing slashes are present. This in turn leads to invalid conversion. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* regex: Fix typo in CHaddrangeCorinna Vinschen2016-11-241-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygutils: Fix resource leak in get_short_pathsCorinna Vinschen2016-11-241-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix typo in kill(1)Corinna Vinschen2016-11-241-1/+1
| | | | | | | buf is just a local buffer, sig is ultimately pointing to the signal string. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* _pinfo::set_ctty: Check potential NULL pointer in debug_printf statementCorinna Vinschen2016-11-241-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Eliminate unused parameter from path_conv::eq_workerCorinna Vinschen2016-11-241-12/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Remove redundant check for NULL pointer in cygwin_exception::dump_exceptionCorinna Vinschen2016-11-241-7/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix copy/paste typo in fhandler_console::scroll_buffer_screenCorinna Vinschen2016-11-241-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Don't allow sending invalid signals from user spaceCorinna Vinschen2016-11-241-12/+22
| | | | | | | | Don't allow signal 0 in signal(2), sigaction(2), siginterrupt(3). Don't allow any signal in sigqueue(3) but explicitely handle signal 0 as in kill(2). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* raise: Add missing extern "C"Corinna Vinschen2016-11-241-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* login_tty: Rewrite following FreeBSD's tracesCorinna Vinschen2016-11-241-15/+8
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fcwd_access_t: Add missing breaks in f_cwd pointer computationCorinna Vinschen2016-11-241-0/+3
| | | | | | Fixes Coverity CIDs 59893/59894 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add comments to intentional switch fallthroughsCorinna Vinschen2016-11-243-0/+7
| | | | | | Clarify Coverity "Missing break in switch" messages. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add length check creating domain\group stringsCorinna Vinschen2016-11-241-6/+6
| | | | | | Fix Coverity CID 153932 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Provide <memory.h>Sebastian Huber2016-11-221-15/+0
| | | | | | | | Provide <memory.h> for all standard Newlib targets and remove Cygwin-specific header. Most POSIX like systems provide this historic header. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Move pthread types to <sys/_pthreadtypes.h>Sebastian Huber2016-11-172-46/+59
| | | | | | | | | | This makes it possible provide operating system specific types for <pthread.h>. It is in line with the FreeBSD header file structure and allows a future cleanup of <pthread.h> to not expose unrelated things via <sys/types.h> and <unistd.h>. Glibc uses the similar <bits/pthreadtypes.h> for this purpose. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add release note for commit 8a32c24Corinna Vinschen2016-11-171-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Use allocation granularity as the 'page_size' in /proc/<pid>/status as well, ↵Erik M. Bray2016-11-161-1/+1
| | | | for consistency with /proc/<pid>/statm
* statm should report memory as multiples of allocation_granularity instead of ↵Erik M. Bray2016-11-161-1/+5
| | | | | | page_size that ensures that values in statm mupltiplied by POSIX _SC_PAGESIZE give the correct values
* Fix ShellExecuteW commentCorinna Vinschen2016-10-241-4/+3
| | | | | | | ShellExecuteW long path behaviour is now stable: It doesn't work since Windows 8.1. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* pldd: Fix resource leak and missing check if fopen failedCorinna Vinschen2016-10-231-0/+4
| | | | | | Fixes Coverity CID 66903 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* passwd: Fix potential buffer overflowCorinna Vinschen2016-10-231-1/+2
| | | | | | Fixes Coverity CID 66956 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* mkgroup/mkpasswd: Fix potential buffer overwrite in corner caseCorinna Vinschen2016-10-232-9/+15
| | | | | | Fixes Coverity CIDs 60076, 60077 and 60081 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* getfacl: Don't trust length of incoming user/groupnameCorinna Vinschen2016-10-231-2/+2
| | | | | | Fixes Coverity CIDs 60079 and 60080 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* tzset: Fix array length given to GetGeoInfoWCorinna Vinschen2016-10-231-1/+1
| | | | | | Fixes Coverity CID 66916 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* strace: Fix Coverity issuesCorinna Vinschen2016-10-231-2/+6
| | | | | | | CID 66964: Don't trust environment variable without length check CID 66968: Add missing va_end Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Use snprintf instead of multiple strcatCorinna Vinschen2016-10-231-4/+1
| | | | | | | | | This not only simplifies the code but also fixes potential memory corruption Fixes Coverity CID 66952 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Eenable output of Vista++ FS flagsCorinna Vinschen2016-10-231-19/+32
| | | | | | Also, code cleanup Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Eliminate dead codeCorinna Vinschen2016-10-221-6/+0
| | | | | | Fixes Coverity CID 66907 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Fix broken test for invalid wcstombs conversion reading symlinksCorinna Vinschen2016-10-221-6/+6
| | | | | | Fixes Coverity CID 66905 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Fix check for Cygwin symlinkCorinna Vinschen2016-10-221-1/+1
| | | | | | Fixes Coverity CID 66904 and 66906 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* strace: Add comment trying to explain confusing codeCorinna Vinschen2016-10-221-0/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck: Close with pclose what has been opened with popenCorinna Vinschen2016-10-221-1/+1
| | | | | | Fixes Coverity CID 66900 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Remove unreachable code from passwd(1)Corinna Vinschen2016-10-221-3/+0
| | | | | | Fixed Coverity CID 66966 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add _PC_CASE_INSENSITIVE to [f]pathconfKen Brown2016-10-214-1/+9
| | | | | | | | Update the getconf utility to support the new flag as well as _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY. These were previously unsupported, probably as an oversight. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix SetThreadName with gdb 7.10 on x86Jon Turney2016-10-201-1/+8
| | | | | | | | | | | Additionally to eccefd97, we need to ensure the exception handler is installed for the _ljfault used to implement _try/_except to get called. Also use the correct macro for x86 conditional compilation. Addresses https://cygwin.com/ml/cygwin/2016-09/msg00143.html Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Update FAQ answer about setting an early breakpointJon Turney2016-10-201-4/+13
| | | | Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Don't check directories always case-insensitive in rename(2)Corinna Vinschen2016-10-192-1/+4
| | | | | | | | | | | | | | | | | | Long-standing problem in one of the corner cases of rename(2): If we rename a directory a check is performed to see if newpath is identical to oldpath or a subdir of oldpath. This check is (accidentally? no hints anywhere in ChangeLogs or code) performed case-insensitive for as long as we use Unicode paths and NT functions. This leads to the problems described in https://cygwin.com/ml/cygwin/2016-09/msg00264.html Change this to be conditional case-sensitive as all other checks but let's take this with a grain of salt. There may be corner-cases in this corner-case which require to chek parts of the path always case-insensitive. Off the top of my head I can't construct such a case but that's no proof they don't exist :} Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release msg for 5a3496cCorinna Vinschen2016-10-191-0/+13
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix regression in console charset handlingCorinna Vinschen2016-10-191-0/+2
| | | | | | | | | | | | Commit d16a5630 dropped usage of cygheap's locale functions in favor of local on-the-fly usage of UTF-8 instead of ASCII. This allowed to use the current local rather than a fixed system-wide locale set at startup time. d16a5630 just missed to add the ASCII->UTF-8 conversion in the console as well. Fixes https://cygwin.com/ml/cygwin/2016-10/msg00000.html Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Bump Cygwin version to 2.6.1Corinna Vinschen2016-10-191-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* dlopen: on x/lib search x/bin if exe is in x/binnewlib-snapshot-20160923Michael Haubenwallner2016-09-081-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 09/02/2016 11:03 AM, Corinna Vinschen wrote: > On Sep 2 10:46, Michael Haubenwallner wrote: >> On 09/01/2016 03:32 PM, Corinna Vinschen wrote: >>> You could just use the global variable program_invocation_name. If in >>> doubt, use the Windows path global_progname and convert it to full POSIX >>> via cygwin_conv_path. >> >> Patch updated, using global_progname now. > > Looks good and you're right to do it this way since I just noticed > that program_invocation_name may return a relative pathname. Yep. > Btw., in other calls which require the full POSIX path we use > mount_table->conv_to_posix_path instead of cygwin_conv_path (see > e. g. fillout_pinfo()). It's a bit faster. Maybe something for a > followup patch. No problem - attached. This renders the original patch 4/4 valid again. > Note for some later improvement: I really wonder why we don't store > the absolute POSIX path of the current executable globally yet... Same here. Thanks! /haubi/ >From f7255edd33cb4abe34f27188aab8dccdfa5dd2a0 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> Date: Wed, 31 Aug 2016 18:05:11 +0200 Subject: [PATCH 3/4] dlopen: on x/lib search x/bin if exe is in x/bin citing https://cygwin.com/ml/cygwin-developers/2016-08/msg00020.html > Consider the file /usr/bin/cygz.dll: > - dlopen (libz.so) success > - dlopen (/usr/bin/libz.so) success > - dlopen (/usr/lib/libz.so) fails * dlfcn.c (dlopen): For dlopen("x/lib/N"), when the application executable is in "x/bin/", search for "x/bin/N" before "x/lib/N".
* dlopen (pathfinder): try each basename per dirMichael Haubenwallner2016-09-081-6/+6
| | | | | | | Rather than searching all search dirs per one basename, search for all basenames within per one search dir. pathfinder.h (check_path_access): Interchange dir- and basename-loops.
* dlopen: switch to new pathfinder classMichael Haubenwallner2016-09-083-109/+782
| | | | | | | | | | | | Instead of find_exec, without changing behaviour use new pathfinder class with new allocator_interface around tmp_pathbuf and new vstrlist class. * pathfinder.h (pathfinder): New file. * vstrlist.h (allocator_interface, allocated_type, vstrlist): New file. * dlfcn.cc (dlopen): Avoid redundant GetModuleHandleExW with RTLD_NOLOAD and RTLD_NODELETE. Switch to new pathfinder class, using (tmp_pathbuf_allocator): New class. (get_full_path_of_dll): Drop.
* strace: Don't print exception info for SetThreadName exceptionCorinna Vinschen2016-08-311-2/+6
| | | | | | | | | | The new functionality to set the thread name for debugging purposes creates exception debugging events. These are printed out when running strace. Since these exceptions have nothing to do with real exceptions but are, like breakpoint execptions, expected and non-fatal, don't print exception info for them. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix passwd getting error 1265 when running on newer WindowsCorinna Vinschen2016-08-312-43/+52
| | | | | | | | | | | | | On Windows 8.1 and later, the NetUserChangePassword call apparently doesn't accept the usual "\\server" string anymore, but requires to use the "domain" instead, otherwise it emits en error code 1265, ERROR_DOWNGRADE_DETECTED. Since this is accepted by pre-8.1 as well, use the domain indiscriminately when calling NetUserChangePassword from passwd(1). While at it, do some minor cleanup in passwd.c. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release message for commit 3d3ab82Yaakov Selkowitz2016-08-301-0/+3
| | | | Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Drop global __ctype_ptr__ entirely in favor of using locale_t::ctype_ptrCorinna Vinschen2016-08-251-4/+4
| | | | | | | | | | Keep __ctype_ptr__ available on Cygwin only, for backward compatibility with existing apps referencing it via the ctype macros. Otherwise initialize __global_locale.ctype_ptr and __C_locale.ctype_ptr and use them throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix formattingCorinna Vinschen2016-08-251-5/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>