Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-23Handle unlinking in-use files on virtual drivesCorinna Vinschen
* path.cc (path_conv::set_nt_native_path): New function. * path.h (path_conv::set_nt_native_path): Add prototype. * syscall.cc (try_to_bin): Handle moving files to the recycler accessed via a local virtual drive (subst). Fix a problem renaming the file to the unique replacement name on Samba. Align comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-03-18Drop unneeded passwd argument from security functionsCorinna Vinschen
* sec_auth.cc (get_server_groups): Drop unused passwd argument. Adjust calls throughout. (get_initgroups_sidlist): Ditto. (get_setgroups_sidlist): Ditto. (create_token): Ditto. (lsaauth): Ditto. * security.h (create_token): Adjust prototype to above change. (lsaauth): Ditto. (get_server_groups): Ditto. * grp.cc (get_groups): Adjust call to get_server_groups. * syscalls.cc (seteuid32): Adjust calls to lsaauth and create_token. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-02-15 * path.h (path_conv): Make path_flags private. Rename known_suffix toCorinna Vinschen
suffix and make private. Rename normalized_path to posix_path and make privtae. Accommodate name changes throughout in path_conv methods. (path_conv::known_suffix): New method. Use throughout instead of accessing suffix directly. (path_conv::get_win32): Constify. (path_conv::get_posix): New method to read posix_path. Use throughout instead of accessing normalized_path directly. (path_conv::set_posix): Rename from set_normalized_path. Accommodate name change throughout. * spawn.cc (find_exec): Return POSIX path, not Win32 path.
2015-02-10 * syscalls.cc (fhandler_base::stat_fixup): Generate unique inode numberCorinna Vinschen
for /dev/tty under all circumstances. Add to comment.
2014-12-02 * autoload.cc (CreateProfile): Import.Corinna Vinschen
(LoadUserProfileW): Import. * registry.cc (get_registry_hive_path): Move to sec_auth.cc. (load_registry_hive): Remove. * registry.h (get_registry_hive_path): Drop declaration. (load_registry_hive): Ditto. * sec_auth.cc (get_user_profile_directory): Moved from registry.cc and renamed. Take third parameter with buffer length. (load_user_profile): New function taking over for load_registry_hive. Use official functions to load profile. If profile is missing, create it on Vista and later. * security.h (get_user_profile_directory): Declare. (load_user_profile): Declare. * syscalls.cc (seteuid32): Replace call to load_registry_hive with call to load_user_profile. * uinfo.cc (cygheap_user::env_userprofile): Replace call to get_registry_hive_path with call to get_user_profile_directory.
2014-10-09 * common.din (ffsl): Export.Corinna Vinschen
(ffsll): Export. * syscalls.cc (ffs): Implement using GCC intrinsic. (ffsl): Ditto. (ffsll): Ditto. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-08 * syscall.cc (ffs): Fix crash of ffs (0x80000000) on 64 bit.Corinna Vinschen
2014-08-27 * path.h (path_conv::init_reopen_attr): Change from void to returningCorinna Vinschen
POBJECT_ATTRIBUTES. Take OBJECT_ATTRIBUTES reference as argument, not pointer. * fhandler_disk_file.cc: Throughout accommodate above change. * syscalls.cc: Ditto. * ntea.cc (read_ea): Don't set hdl to NULL if it's already NULL. Set attr with pc.init_reopen_attr before trying to reopen file. (write_ea): Ditto. * security.cc (get_file_sd): Use pc.init_reopen_attr rather than pc.get_object_attr when trying to reopen file. (set_file_sd): Ditto.
2014-08-22 * Throughout, use __try/__except/__endtry blocks, rather than myfaultCorinna Vinschen
handler. * cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs has been moved from _local_storage to _cygtls. * cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage of counters. Change type of counters to uint32_t for clarity. Remove _cygtls as friend class. (struct _local_storage): Move pathbufs from here... (struct _cygtls): ...to here, allowing to access it from _sigbe. (class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt members. (san::setup): Drop parameter. Don't initialize removed members. (san::leave): Don't set removed members. (class myfault): Only define on 32 bit. (myfault::faulted): Only keep implementation not taking any parameter. Drop argument in call to sebastian.setup. (__try/__leave/__except/__endtry): Implement to support real SEH. For now stick to SJLJ on 32 bit. * dcrt0.cc (dll_crt0_0): Drop 64 bit call to exception::install_myfault_handler. * exception.h (exception_handler): Define with EXCEPTION_DISPOSITION as return type. (PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer to _DISPATCHER_CONTEXT on 64 bit. (class exception): Define separately for 32 and 64 bit. (exception::myfault): Add handler for myfault SEH handling on 64 bit. (exception::exception): Fix mangled method name to account for change in type of last parameter. (exception::install_myfault_handler): Remove. * exceptions.cc (exception::myfault_handle): Remove. (exception::myfault): New SEH handler for 64 bit. * gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when returning to the caller. * ntdll.h: Move a comment to a better place. (struct _SCOPE_TABLE): Define on 64 bit. * thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround. * tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs. (tls_pathbuf::destroy): Change type of loop variables to uint32_t. * tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to uint32_t. Accommodate new place of pathbufs. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Regenerate.
2014-08-11 * cpuid.h: Add missing copyright header. Fix formatting. Use uint32_tCorinna Vinschen
instead of unsigned throughout. Change functions to static inline and always inline. (cpuid): Add parameter to set ecx, allowing to request extended CPUID info. * fhandler_proc.cc (format_proc_cpuinfo): Use uint32_t instead of unsigned throughout. Add fake decimal places to MHz info. Handle more feature flags. * fhandler_random.cc (fhandler_dev_random::write): Allow up to 4K input to add entropy. * syscalls.cc: Drop including cpuid.h.
2014-06-23 * spawn.cc (find_exec): Initialize err (CID 60111).Corinna Vinschen
* strace.cc (strace::activate): Fix potential buffer overrun (CID 59938) * syscalls.cc (popen): Close parent pipe descriptor via fclosing fp on error to avoid resource leak (CID 59981). * thread.cc (pthread::exit): Avoid accessing cygtls member after deleting "this" (CID 60217).
2014-05-19 * syscalls.cc (getusershell): Fix buffer overrun (Coverity ID 59932).Corinna Vinschen
2014-04-25 * syscalls.cc (NT_TRANSACTIONAL_ERROR): Cover all status codes up toCorinna Vinschen
STATUS_TRANSACTION_NOT_ENLISTED.
2014-02-09 Introduce reading passwd/group entries from SAM/AD. IntroduceCorinna Vinschen
/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.
2014-01-18 * include/netinet/ip6.h: New file, copied from FreeBSD vebatim.Corinna Vinschen
2014-01-17 * syscalls.cc (popen): Introduce Glibc 'e' flag to allow thread-safeCorinna Vinschen
opening of the pipe with O_CLOEXEC flag. Simplify FD_CLOEXEC handling.
2013-12-11 * syscalls.cc (NT_TRANSACTIONAL_ERROR): Define.Corinna Vinschen
(stop_transaction): Take "trans" HANDLE by reference and set it to NULL after closing it. (unlink_nt): If NtOpenFile fails due to a transactional error, stop transaction and retry NtOpenFile. Simplify check for having to call stop_transaction. (rename): If NtOpenFile fails due to a transactional error, stop transaction and retry NtOpenFile in both affected cases. Simplify check for having to call stop_transaction and add comment from unlink_nt.
2013-12-06* syscalls.cc (dup): Use cygheap_fdnew properly.Christopher Faylor
2013-12-05* cygheap.h (cygheap_fdnew): Avoid setting errno directly since it will haveChristopher Faylor
been set by a previous function. * dtable.h (dtable::extend): Accept second size_t argument. * dtable.cc (dtable::extend): Accept second "min" argument which allows checking for OPEN_MAX_MAX boundary conditions. (dtable_init): Accommodate second argument to dtable::extend. (dtable::find_unused_handle): Ditto. * syscalls.cc (setdtablesize): Ditto. (dup): Return any error passed by cygheap_fdnew() directly. (getdtablesize): Just return dtable size directly.
2013-11-27 * syscalls.cc (try_to_bin): Enhance debug output in case reopen fails.Corinna Vinschen
2013-11-27 * syscalls.cc (try_to_bin): Drop fh_dup, reuse tmp_fh instead.Corinna Vinschen
2013-11-27 * syscalls.cc (try_to_bin): Take additional parameter to get file openCorinna Vinschen
flags. If the file to move to the bin has been opened casesensitive, reopen it caseinsensitive. Explain why. Revert the default name of the Vista-and-later recycler to mixed case for readability. (unlink_nt): Call try_to_bin with file open flags as evaluated.
2013-11-25 Throughout, keep function definitions and declarations in sync withCorinna Vinschen
newlib in terms of C99 "restrict" keyword.
2013-11-24 Throughout, drop unnecessary explicit includes of windows header filesCorinna Vinschen
included by default. * winlean.h: Add long comment to explain why we have to define certain symbols. (_NORMALIZE_): Define. (_WINNLS_): Drop definition and subsequent undef. (_WINNETWK_): Ditto. (_WINSVC_): Ditto. 2013-11-23 Eric Blake <eblake@redhat.com>
2013-11-23dup2: fix off-by-one crashEric Blake
* dtable.cc (dup3): Fix off-by-one. (find_unused_handle): Reduce time spent expanding during dup. * syscalls.cc (setdtablesize): Report error on invalid value.
2013-05-21 * syscalls.cc (open): Only return ENOTDIR if file exists.Corinna Vinschen
2013-05-01Throughout, (mainly in fhandler*) fix remaining gcc 4.7 mismatchYaakov Selkowitz
warnings between regparm definitions and declarations. * smallprint.cc (__small_vswprintf): Conditionalize declaration and setting of l_opt for only x86_64. * spawn.cc (child_info_spawn::worker): Remove unused 'pid' variable. * thread.cc (verifyable_object_isvalid): Temporarily define as non-inline with gcc 4.7+, regardless of target.
2013-04-24 * autoload.cc (CreateSymbolicLink): Define.Corinna Vinschen
* environ.cc (set_winsymlinks): Set allow_winsymlinks. (parse_thing): Change "winsymlinks" to set by function. * globals.cc (enum winsym_t): Define. (allow_winsymlinks): Define as winsym_t. (ro_u_afs): New R/O Unicode string. * mount.cc (fs_info::update): Fix comment. Handle AFS. (fs_names): Add "afs". * mount.h (enum fs_info_type): Add afs. (class fs_info): Implement afs. * path.cc (symlink): Drop third parameter in call to symlink_worker. (symlink_nfs): New function. (symlink_native): New function. (symlink_worker): Drop third argument. Handle native symlink type by calling symlink_native. Move code to handle NFS to symlink_nfs. Fix formatting. Slightly restructure code. * path.h (class path_conv): Add fs_is_afs method. (symlink_worker): Declare here. * security.h: Define privilege constants as unsigned int instead of as unsigned long. * syscalls.cc (mknod_worker): Set third parameter in symlink_worker call to WSYM_lnk. * winsup.h (symlink_worker): Drop declaration here.
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen
2013-01-21Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor
checkins. Regularize copyright format.
2013-01-19 * syscalls.cc (rename): Remove ill-conceived NFS workaround fromCorinna Vinschen
2013-01-10 for self-inflicted NFS server problem.
2013-01-11 * syscalls.cc (rename): Drop handling paths > 32757 chars, emit EINVALCorinna Vinschen
instead, thus simplifying code allocating and filling pfri. Drop size and use constant expression in NtSetInformationFile call. Add comments. Drop redundant test for fs_serial_number and change comment accordingly.
2013-01-10 * path.h (path_conv::fs_type): New method.Corinna Vinschen
* syscalls.cc (rename): Check for cross-device situation before touching anything. Explain why. Workaround NFS bug in call to NtSetInformationFile(FileRenameInformation).
2012-12-31* dtable.cc (dtable::dup3): Fix bounds checking for valid newfd.Christopher Faylor
* syscalls.cc (dup2): Ditto. * winsup.h (events_terminate): Delete obsolete function declaration.
2012-08-17whitespace cleanupChristopher Faylor
2012-07-25 * syscalls.cc (enum bin_status): Add dir_not_empty.Corinna Vinschen
(try_to_bin): Call NtQueryInformationFile(FileInternalInformation) with exact buffer size. Explain why. Ditto for NtSetInformationFile(FileRenameInformation). Handle race-condition which might lead to renaming a non-empty directory. (unlink_nt): Rearrange and partially rephrase comments related to the STATUS_SHARING_VIOLATION case. Fix condition under which a dir is tested for being non-empty. Handle dir_not_empty return code from try_to_bin. Gracefully handle disappearing directory in rm -r workaround. Fix typo in comment.
2012-07-22* DevNotes: Add entry cgf-000013.Christopher Faylor
* cygserver_ipc.h (ipc_set_proc_info): Use _cygtls::ipc_set_proc_info to set per-thread signal arrived value. * cygthread.cc (cygthread::detach): Use per-thread signal_arrived via set_thread_waiting. * fork.cc (_cygtls::fixup_after_fork): Clear signal_arrived. (_cygtls::remove): Close any signal_arrived handle when thread exists. (_cygtls::find_tls): Remove unneeded function. * cygtls.h: Update copyright. (class _cygtls): Reorganize to help avoid rebuilding newlib when structure changes. (_cygtls::event): Delete. (_cygtls::threadkill): Ditto. (_cygtls::signal_waiting): Declare new bool. (_cygtls::find_tls): Delete declaration. (_cygtls::set_threadkill): Ditto. (_cygtls::reset_threadkill): Ditto. (_cygtls::set_signal_arrived): Declare new function. (class set_thread_waiting): Declare new class. * cygwait.cc (cw_nowait_storage): Define. (cygwait): Set per-thread signal_arrived via set_thread_waiting. Don't special-case _main_tls. * cygwait.h (cw_nowait): Define. (cw_infinite): Ditto. (cygwait): Redefine pathological wait-only case. * dcrt0.cc (dll_crt0_0): Remove call to now-defunct events_init(). (dll_crt0_1): Remove call to now-defunct create_signal_arrived(). * exceptions.cc: Reflect set_signal_mask() argument reordering throughout. Remove signal mask synchronization throughout. (events_init): Delete definition. (mask_sync): Delete now-unneeded mask synchronization. (set_signal_mask): Reverse order of arguments to "standard" to, from layout. Rename "newmask" argument to "setmask". Remove debugging. (sig_handle_tty_stop): Use cancelable_wait rather than WFMO. (_cygtls::interrupt_setup): Don't treat "threadkill" events specially. Conditionally set signal_arrived depending on whether the thread has created it or not. (sigpacket::process): Reorganize to reflect thread-specific sending of signals which is more in line with the way it was actually supposed to work. * fhandler_socket.cc (get_inet_addr): Use cancelable_wait rather than IsEventSignalled to avoid potential race. (fhandler_socket::wait_for_events): Set signal_arrived event using set_thread_waiting(). (fhandler_socket::close): Use cygwait for the case of just waiting 10 ms for a signal. * fhandler_tape.cc (fhandler_dev_tape::_lock): Use cancelable_wait rather than WFMO. Redo switch/case tests accordingly. * fhandler_termios.cc (fhandler_termios::bg_check): Use cygwait for case of just waiting 0 ms for a potential signal. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Use cancelable_wait rather than WFSO. * fhandler_windows.cc (fhandler_windows::read): Set per-thread signal_arrived via set_thread_waiting(). * flock.cc (lf_setlock): Ditto. * select.cc (pselect): Ditto. Set per-thread signal_arrived using set_thread_waiting(). * gendef: Don't special case handling of _cygtls::sig for threads. * gentls_offsets: Use #pragma once in tlsoffsets.h. * ntdll.h: Use #pragma once. * poll.cc: Reflect set_signal_mask() argument reordering. * posix_ipc.cc (ipc_mutex_lock): Use cancelable_wait rather than WFMO. (ipc_cond_timedwait): Set perl-thread signal arrived using set_thread_waiting(). * security.h: Use #pragma once. * signal.cc (abort): Reflect set_signal_mask() argument reordering. (clock_nanosleep): Ditto. Change call to cancelable_wait to properly specify handling of cancel and interrupt. (sigwaitinfo): Remove handling of per-thread event in favor of per-thread signal_arrived. Use cancelable_wait rather than WFSO. * sigproc.cc (signal_arrived): Delete definition. (create_signal_arrived): Ditto. * sigproc.h (signal_arrived): Delete declaration. (set_signal_mask): Avoid defining as a "C" function. Don't conditionally declare. (create_signal_arrived): Delete declaration. * syscalls.cc (rename): Use cygwait() rather than WFSO. * thread.h (fast_mutex::lock): Use cw_infinite rather than LARGE_NULL. * wait.cc (wait4): Ditto. * thread.cc (pthread_mutex::lock): Ditto. (pthread::join): Ditto. (semaphore::_wait): Ditto. (pthread_kill): Remove set_threadkill() accommodation. * tlsoffsets.h: Regenerate.
2012-06-19Revert errneous checkin.Christopher Faylor
Check in actual change associated with ChangeLog.
2012-06-19* cygwait.cc (cancelable_wait): Mimic old cygwait behavior more closely wrtChristopher Faylor
handling of call_signal_handler. * cygwait.h (WAIT_CANCELED): Move here and redefine. (WAIT_SIGNALED): Ditto. * thread.h (WAIT_CANCELED): Delete. (WAIT_SIGNALED): Ditto.
2012-06-04* dtable.cc (dtable::dup3): Only return with lock set when O_EXCL flag isChristopher Faylor
passed in. * syscalls.cc (dup_finish): Pass O_EXCL in flags to dtable::dup3.
2012-06-03* DevNotes: Add entry cgf-000011.Christopher Faylor
* fhandler.h (fhandler_base::refcnt): Delete. (fhandler_base::inc_refcnt): New function. (fhandler_base::dec_refcnt): New function. * cygheap.h (cygheap_fdnew::~cygheap_fdnew): Accommodate split of refcnt to inc_refcnt/dec_refcnt. (cygheap_fdget::cygheap_fdget): Ditto. (cygheap_fdget::~cygheap_fdget::cygheap_fdget): Ditto. * dtable.cc (dtable::release): Ditto. (cygwin_attach_handle_to_fd): Ditto. (dtable::init_std_file_from_handle): Ditto. (dtable::dup3): On success, return with fdtab locked. * dtable.h (dtable): Add dup_finish as a friend. * syscalls.cc (dup_finish): Define new function. Increment refcnt while fdtab is locked. (dup2): Use common dup_finish() to perform dup operation. (dup3): Ditto.
2012-06-03 * globals.cc (ro_u_refs): New R/O unicode string.Corinna Vinschen
* mount.cc (fs_info::update): Recognize ReFS. * mount.h (enum fs_info_type): Add refs. (class fs_info): Add refs flag and accessor methods. * ntdll.h (RtlAddAccessAllowedAceEx): Declare. (RtlAddAccessDeniedAceEx): Declare. * path.h (path_conv::fs_is_refs): Define. * sec_helper.cc (_recycler_sd): New function to create security descriptors suitable for the recycler bin starting with Vista. * security.cc (add_access_allowed_ace): Use RtlAddAccessAllowedAceEx and drop code to set AceFlags explicitely. (add_access_denied_ace): Use RtlAddAccessDeniedAceEx and drop code to set AceFlags explicitely. * security.h (_recycler_sd): Declare. (recycler_sd): Define. * syscalls.cc (desktop_ini): Change formatting. (desktop_ini_ext): Define third line of recycler desktop.ini file since Vista, (try_to_bin): Handle ReFS just like NTFS. Write Vista and later Recycler in all uppercase, just like shell32 does when recreating it. Fix comments to include ReFS. Don't implicitely reuse object attributes from earlier NtOpenFile call, rather recreate it for safety. Use recycler_sd call when creating security descriptor for Recycler dirs and files on Vista and later. Write third line of desktop.ini when on Vista and later.
2012-04-11 * syscalls.cc (fhandler_base::stat_fixup): Fix inode numbers ofCorinna Vinschen
non-device files in virtual fileysystems.
2012-04-03 * syscalls.cc (fhandler_base::stat_fixup): Replace string comparisonCorinna Vinschen
with new device::is_dev_resident() call.
2012-04-02 * devices.h (device::get_device): New method.Corinna Vinschen
* fhandler_dev.cc (fhandler_dev::readdir): Set st_ino to device number. * syscalls.cc (fhandler_base::stat_fixup): Ditto. Fix link count for CD-ROM devices. Fix typo in comment.
2012-04-02 * fhandler.h (fhandler_base::stat_fixup): Rename fromCorinna Vinschen
fhandler_base::set_ino_and_dev. * syscalls.cc (fhandler_base::stat_fixup): Ditto. Accommodate name change throughout. Fixup link count of console devices.
2012-04-02 * devices.h (FH_CYGDRIVE): Define as DEV_VIRTFS_MAJOR class device.Corinna Vinschen
(DEV_CYGDRIVE_MAJOR): Remove. (iscygdrive_dev): Define. * dtable.cc (fh_alloc): Accommodate above change. * path.cc (path_conv::check): Use iscygdrive_dev to check for cygdrive. * syscalls.cc (fhandler_base::set_ino_and_dev): Drop check for DEV_CYGDRIVE_MAJOR from conditional.
2012-04-02 * devices.h (FH_DEV): Define as DEV_VIRTFS_MAJOR class device.Corinna Vinschen
(DEV_DEV_MAJOR): Remove. * dtable.cc (fh_alloc): Accommodate above change. * syscalls.cc (set_ino_and_dev): Drop check for DEV_DEV_MAJOR from conditional.
2012-04-02 * fhandler.h (fhandler_base::set_ino_and_dev): Declare.Corinna Vinschen
* syscalls.cc (fhandler_base::set_ino_and_dev): New method to set st_ino, st_dev, and st_rdev for devices in a single spot. (fstat64): Call fhandler_base::set_ino_and_dev instead of setting st_ino, st_dev, and st_rdev here. (stat_worker): Ditto.
2012-03-21 * syscalls.cc (lseek): Fix debug output.Corinna Vinschen