summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * net.cc (cygwin_getsockopt): Make sure SO_PEERCRED is only handledCorinna Vinschen2010-07-022-1/+35
| | | | | in level SOL_SOCKET. Workaround a return value regression in Vista and later. Add comment to explain.
* 2010-06-28 Rick Rankin <rrankin1424-mingw@yahoo.com>Chris Sutcliffe2010-06-294-0/+45
| | | | | | | | * include/psapi.h (PROCESS_MEMORY_COUNTERS_EX, PERFORMANCE_INFORMATION, GetPerformanceInfo): Define. * lib/psapi.def (GetPerformanceInfo): Define. * include/wincrypt.h (CryptEnumProvidersA, CryptEnumProvidersW, CryptEnumProviders): Define.
* * utils.sgml (locale): Change stray local cygdrive prefix to Cygwin'sCorinna Vinschen2010-06-292-1/+6
| | | | default.
* * spawn.cc (spawn_guts): Reinstantiate a FIXME comment.Corinna Vinschen2010-06-292-2/+6
|
* * exceptions.cc (dump_exception): Use %W instead of %s for printingCorinna Vinschen2010-06-294-6/+14
| | | | | | | progname. * fork.cc (frok::parent): Fix typos in debug output. * spawn.cc (spawn_guts): Copy wide Win32 filename into _pinfo::progname, rather than native NT name.
* * fork.cc (frok::parent): Improve error message.Christopher Faylor2010-06-282-2/+7
|
* * Makefile.in: Use "xmlto pdf" instead of docbook2pdf.Yaakov Selkowitz2010-06-274-6/+14
| | | | | | | Force the dblatex backend, as the default passivetex does not work. * README: Replace docbook-utils dependency with dblatex. Update required docbook-xml version. * faq-programming.xml: Ditto.
* * setup-net.sgml: Add a paragraph describing now to avoid unintentionalChristopher Faylor2010-06-262-1/+13
| | | | upgrades.
* * flock.cc (allow_others_to_sync): Use small stack buffer ratherCorinna Vinschen2010-06-222-12/+19
| | | | | | than big temp buffer. Fix typo in comment. (lf_setlock): Revert to using tmp_pathbuf. (lf_getlock): Ditto.
* * sec_acl.cc (setacl): Use the long time unused ACL_DEFAULT_SIZECorinna Vinschen2010-06-223-4/+10
| | | | | instead of a constant value. * security.cc (alloc_sd): Ditto.
* * tmpbuf.h: New file.Christopher Faylor2010-06-213-9/+46
| | | | | | | * flock.cc: Include tmpbuf.h for new tmpbuf functionality. (allow_others_to_sync): Use tmpbuf rather than tmp_pathbuf. Explain why. (lf_setlock): For consistency, use tmpbuf rather than tmp_pathbuf. (lf_getlock): Ditto.
* * dcrt0.cc (__api_fatal): Temporarily generate a stackdump.Christopher Faylor2010-06-212-0/+7
|
* * tls_pbuf.cc (tmp_pathbuf::w_get): Report what's failing when too many buffersChristopher Faylor2010-06-212-1/+6
| | | | are in use.
* * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Fetch statCorinna Vinschen2010-06-172-1/+7
| | | | handle only after checking for NFS.
* * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Use handleCorinna Vinschen2010-06-152-3/+36
| | | | | | returned by get_stat_handle. (fhandler_base::fstat_helper): Reinstatiate code to re-open the file when checking for executability if called via fstat. Explain why.
* * dtable.cc (dtable::dup_worker): Reset path_conv handle in duplicatedCorinna Vinschen2010-06-1510-157/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fhandler. * fhandler.cc (fhandler_base::fstatvfs): Keep handle in created path_conv. * fhandler.h (fhandler_base::get_stat_access): New method. (fhandler_base::get_stat_handle): New method. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Use handle returned by get_stat_handle. Only request inode from system if it isn't already set in the fhandler, and only for filesystems supporting them. (fhandler_base::fstat_fs): Use handle returned by get_stat_handle. Change the way open_fs is called. Explain why. (fhandler_base::fstat_helper): Use handle returned by get_stat_handle. Never use 0 inode number. Simplify executable recognition by re-using get_stat_handle if file could be opened with sufficient rights. (fhandler_disk_file::fstatvfs): Use handle returned by get_stat_handle. (fhandler_disk_file::facl): Use handle returned by get_stat_handle in GETACL and GETACLCNT cases. (fhandler_disk_file::link): Use handle returned by get_stat_handle instead of opening file here again. Add comment. (readdir_get_ino): Keep handle in created path_conv and drop opening file. * ntdll.h (wait_pending): New helper function. * path.cc (symlink_info::check): Drop unused 'opt' parameter from declaration. Add path_conv_handle argument. (path_conv::check): Make sure conv_handle is closed. Keep PC_KEEP_HANDLE flag in pflags_or. Accommodate call to sym.check to new args. (path_conv::~path_conv): Close conv_handle. (symlink_info::check_shortcut): Don't re-open file here, just use incoming handle. Drop goto's and label out. (symlink_info::check_sysfile): Don't re-open file here, just use incoming handle. Keep track of file position to accommodate the fact that file has been opened asynchronously in calling function. (symlink_info::check_nfs_symlink): Don't re-open file here, just use incoming handle. (symlink_info::check): Drop unused 'opt' parameter. Add path_conv_handle argument. Always try to open file with GENERIC_READ rights first to allow reading file content w/o having to re-open the file. Drop back to READ_CONTROL | FILE_READ_ATTRIBUTES otherwise. Call symlink test functions (except for check_reparse_point) only if file could be opened with GENERIC_READ. Keep file handle open if PC_KEEP_HANDLE is set in pflags. * path.h (enum pathconv_arg): Add PC_KEEP_HANDLE flag. (class path_conv_handle): New class. (class path_conv): Add conv_handle member. (path_conv::operator =): Duplicate conv_handle. (path_conv::handle): New method. (path_conv::access): New method. (path_conv::reset_conv_handle): New method. (path_conv::close_conv_handle): New method.
* * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Fix indentation.Corinna Vinschen2010-06-152-5/+9
|
* * fhandler_disk_file.cc (path_conv::get_ino_by_handle): Convert fromCorinna Vinschen2010-06-153-17/+29
| | | | | | | static function to path_conv method. Accommodate throughout. (path_conv::ndisk_links): Unused, comment out. * path.h (path_conv::get_ino_by_handle): Declare. (path_conv::ndisk_links): Comment out declaration.
* * path.cc (path_conv::check): Return with ENOTDIR if component is aCorinna Vinschen2010-06-142-0/+10
| | | | device.
* * dlfcn.cc (get_full_path_of_dll): Revert patch from 2010-04-29.Corinna Vinschen2010-06-142-2/+6
|
* * times.cc (gtod): Move to sharable region.Christopher Faylor2010-06-122-1/+11
|
* * path.cc (symlink_info::check_shortcut): Use ro_u_empty rather thanCorinna Vinschen2010-06-092-6/+12
| | | | | | | local UNICODE_STRING object. (symlink_info::check_sysfile): Ditto. Return immediately if NtOpenFile failed to avoid closing random handle. Improve debug output in case NtReadFile failed.
* * path.cc (symlink_info::check): Set h to NULL after closing handleCorinna Vinschen2010-06-082-3/+10
| | | | | | in udf check. Remove overagressive bracketing. Don't set h to NULL without closing the handle. Fix using wrong handle in checking file system when using parent directory handle.
* * include/sys/stdio.h: Remove _GNU_SOURCE guard around getlineCorinna Vinschen2010-06-072-3/+6
| | | | and getdelim prototypes since they are SUSv4 now.
* * ntdll.h (STATUS_BAD_NETWORK_PATH): Define.Corinna Vinschen2010-06-023-0/+11
| | | | | | (STATUS_BAD_NETWORK_NAME): Define. * path.cc (symlink_info::check): Convert STATUS_BAD_NETWORK_PATH and STATUS_BAD_NETWORK_NAME into an immediate ENOENT.
* * exceptions.cc (open_stackdumpfile): Correctly append .stackdumpCorinna Vinschen2010-06-013-17/+25
| | | | | | | | suffix. * nlsfuncs.cc (rebase_locale_buf): Reorder arguments. Accommodate throughout. Add pointer to end of buffer and avoid changing pointers not pointing into the buffer.
* * fhandler_netdrive.cc (fhandler_netdrive::exists): Always free WNetCorinna Vinschen2010-06-012-10/+9
| | | | resource if created.
* * cygheap.cc (cygheap_user::set_name): Allow to change the user nameCorinna Vinschen2010-05-312-1/+8
| | | | if it only differs by case.
* * fhandler_registry.cc (multi_wcstombs): New function.Corinna Vinschen2010-05-262-5/+52
| | | | | | (fhandler_registry::fstat): Call multi_wcstombs for strings of type REG_MULTI_SZ. (fhandler_registry::fill_filebuf): Ditto.
* * hires.h (hires_base::reset): New function.Christopher Faylor2010-05-263-5/+17
| | | | | | | (hires_us): Specify that hires_base is a public import. (hires_ms): Ditto. * times.cc (gtod): Move earlier in file. (settimeofday): Reset gtod so that base will be subsequently recalculated.
* * path.cc (symlink_info::check): Don't try to handle remote reparseCorinna Vinschen2010-05-262-2/+13
| | | | points as symlinks. Explain why.
* * include/inttypes.h: Change PTR definitions to int to align with theCorinna Vinschen2010-05-262-12/+17
| | | | stdint.h type definitions of intptr_t/uintptr_t.
* * fhandler.h (class fhandler_pty_master): Add master_thread member.Corinna Vinschen2010-05-263-4/+12
| | | | | | | * fhandler_tty.cc (fhandler_pty_master::close): Properly detach from master thread. (fhandler_pty_master::setup): Store cygthread pointer of pty master control thread in master_thread. Don't zap thread handle.
* * nlsfuncs.cc (__set_lc_time_from_win): Use LOCALE_SMONTHNAME1Corinna Vinschen2010-05-262-3/+20
| | | | | instead of LOCALE_SABBREVMONTHNAME1 in Japanese and Korean locales to get abbreviated month names. Explain why.
* 2010-04-27 Danny Smith <dannysmith@users.sourceforge.net>Chris Sutcliffe2010-05-192-2/+12
| | | | * mingwex/mb_wc_common.h (get_codepage): Revert change of 2006-09-19.
* * environ.cc (regopt): Change the first argument to wide char string.Christopher Faylor2010-05-1812-60/+89
| | | | | | | | | | | | | | | | | | | | | | | (environ_init): Accommodate change to the first argument of regopt. * exception.cc (open_stackdumpfile): Accommodate change to the type of progname in _pinfo. * external.cc (fillout_pinfo): Ditto. * fhandler_process.cc (format_process_winexename): Ditto. (format_process_stat): Ditto. * fork.cc (fork::parent): Ditto. * pinfo.cc (pinfo_basic::pinfo_basic): Call GetModuleFileNameW instead of GetModuleFileName. (pinfo::thisproc): Accommodate change to the type of progname in _pinfo. (pinfo_init): Ditto. * pinfo.h (_pinfo): Change the type of progname to a wide char array. * registry.h (reg_key::get_int): Change the first argument from constant point to pointer to constant. (reg_key::get_string): Ditto. Change the last argument likewise. * registry.cc (reg_key::get_int): Accommodate change to the declaration. (reg_key::get_string): Ditto. * strace.cc (strace::hello): Accommodate change to the type of progname in _pinfo. (strace::vsprntf): Ditto.
* * Makefile.in (DLL_OFILES): Add pseudo-reloc.o.Christopher Faylor2010-05-0712-482/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (child_info_fork::handle_fork): Call _pei386_runtime_relocator here. (dll_crt0_1): Ditto for non-fork case. * dll_init.cc (dll::init): Complain more in comment. Clean up slightly. (dll_dllcrt0_1): Call _pei386_runtime_relocator when we know we have a filled-in per_process structure. * globals.cc (__cygwin_user_data): Accommodate new fields for _pei386_runtime_relocator. * pseudo-reloc.cc: New file adapted from old lib/pseudo-reloc.c. Include winsup.h directly. Collapse #ifdef __CYGWIN__ into one block. Perform minor whitespace code reformatting. (__report_error): Use small_printf to output error. (_pei386_runtime_relocator): Conditionalize for cygwin to take per_process pointer parameter. * winsup.h (_pei386_runtime_relocator): Declare. * include/cygwin/version.h (CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED): New macro. (CYGWIN_VERSION_USER_API_VERSION_COMBINED): Use above macro. (CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL): New macro. (CYGWIN_VERSION_API_MINOR): Bump to 227. * include/sys/cygwin.h: Remove obsolete comment. (per_process::unused2): Shorten. (per_process::pseudo_reloc_start): New field. (per_process::pseudo_reloc_end): Ditto. (per_process::image_base): Ditto. * lib/_cygwin_crt0_common.cc: Declare pseudo runtime externs needed for per_process structure. (_cygwin_crt0_common): Fill in pseudo_reloc runtime constants. * lib/pseudo-reloc-dummy.c: New file. Dummy function to satisify ld. * lib/pseudo-reloc.c: Delete.
* * fhandler_tty.cc (fhandler_tty_slave::init): Disable grabbingCorinna Vinschen2010-05-072-1/+6
| | | | process group ownership of tty in case we're being debugged.
* * path.cc (path_conv::check): Drop setting sym.pflags before callingCorinna Vinschen2010-05-062-6/+15
| | | | | | | mount_info::conv_to_win32_path since the flag value is overwritten by mount_info::conv_to_win32_path anyway. Set flags for DOS paths before calling symlink_info::check so they can be used in that function already.
* * dll_init.cc (dll_list::alloc): Add debugging assertion.Christopher Faylor2010-05-032-22/+29
|
* * dlfcn.cc (get_full_path_of_dll): Handle non-existent file.Corinna Vinschen2010-04-292-2/+6
|
* * new-features.sgml (ov-new1.7.6): Add new "dos" and "inode" mountCorinna Vinschen2010-04-293-10/+43
| | | | | | | | options. * pathnames.sgml (mount-table): Ditto. (pathnames-specialchars): Change description order. Add paragraph to explain new behaviour in terms of leading spaces and trailing dots and spaces in pathnames.
* * utils.sgml (mount): Add description for "dos" and "ihash" mountCorinna Vinschen2010-04-292-0/+13
| | | | options.
* * path.cc: Include sys/cygwin.h if built for mount(1).Corinna Vinschen2010-04-292-1/+17
| | | | | | (struct opt): Add "dos" and "ihash" options. (from_fstab_line): Call cygwin_internal rather than read_flags if built for mount(1).
* * mount.cc (struct opt): Add "dos" and "ihash" options.Corinna Vinschen2010-04-295-12/+52
| | | | | | | | | | | | | | | | | | | | | (fillout_mntent): Ditto. * path.cc (path_conv::get_nt_native_path): Use path_conv's has_dos_filenames_only method. (path_conv::check): Add PATH_IHASH flag if FS has unreliable inode numbers. (symlink_info::check_shortcut): Or symlink flags to pflags. (symlink_info::check_sysfile): Ditto. Change test accordingly. (symlink_info::check_reparse_point): Ditto. (symlink_info::check_nfs_symlink): Ditto. (symlink_info::check): Check PATH_DOS flag in call to get_nt_native_path to utilize mount flag. Ditto in test for potential restarting. Set PATH_DOS if FS only allows DOS filename rules. * path.h (enum path_types): Add PATH_DOS and PATH_IHASH. (path_conv::hasgood_inode): Check PATH_IHASH instead of fs.hasgood_inode. (path_conv::has_dos_filenames_only): New method. * include/sys/mount.h (MOUNT_DOS): New mount flag. (MOUNT_IHASH): Ditto.
* * mount.cc (oopts): Remove entirely.Corinna Vinschen2010-04-292-48/+17
| | | | | | | | (usage): Call cygwin_internal (CW_LST_MNT_OPTS) to create list of mount options. (print_version): Fix copyright date. (main): Replace option processing loop with single call to cygwin_internal (CW_CVT_MNT_OPTS).
* * external.cc (cygwin_internal): Add CW_CVT_MNT_OPTS to allow mountCorinna Vinschen2010-04-294-11/+82
| | | | | | | | | | flag parsing. Add CW_LST_MNT_OPTS case to allow mount flag listing. * mount.cc (fstab_read_flags): Rename from read_flags. Make externally available. Change input string to char ** to allow returning faulty option. Add flag for avoiding debug output. (fstab_list_flags): New function to create list of options. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CVT_MNT_OPTS and CW_LST_MNT_OPTS.
* * mount.cc (compare_flags): New function.Corinna Vinschen2010-04-282-16/+29
| | | | (read_flags): Replace loop with bsearch. Simplify error check.
* * include/cygwin/version.h: Bump API minor version.Corinna Vinschen2010-04-282-1/+6
|
* * new-features.sgml (ov-new1.7.6): Add locale wide-char changes.Corinna Vinschen2010-04-282-0/+10
|