aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
AgeCommit message (Collapse)AuthorFilesLines
2001-08-04* dtable.cc (dtable::release): Avoid messing with console whenEgor Duda2-0/+7
closing socket.
2001-08-03 * net.cc (cygwin_accept): Allow NULL peer and len parameters.Corinna Vinschen3-0/+20
* include/cygwin/socket.h: Define socklen_t as int.
2001-08-03 * path.cc (fchdir): Set the fhandler's path to absolute value toCorinna Vinschen2-0/+25
ensure changing to the correct directory even if the fhandler originally points to a relative path.
2001-08-02 * security.cc (set_file_attribute): Clean up. Don't callCorinna Vinschen2-10/+13
`set_nt_attribute' when ntsec isn't set.
2001-07-29* dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal withChristopher Faylor3-4/+20
growing stack under Windows 95. * Makefile.in: Add install-lib and install-headers.
2001-07-27* cygwin.din: Export sys_errlist, sys_nerr.Christopher Faylor3-1/+9
* include/cygwin/version.h: Bump minor version number.
2001-07-27 * security.cc (get_user_primary_group): Fix compiler warning.Corinna Vinschen2-2/+7
(alloc_sd): Add DELETE permission for user when S_IWUSR is given.
2001-07-26* thread.cc (__pthread_equal): Invert return value so that true is returnedChristopher Faylor2-223/+227
when threads are equal.
2001-07-26Christopher Faylor <cgf@cygnus.com>Christopher Faylor3-1/+9
* cygwin.din: Export __signgam. * include/cygwin/version.h: Bump minor version number.
2001-07-26Throughout, reorganize header file inclusion to put security.h prior toChristopher Faylor51-33/+75
fhandler.h. * fhandler.h (fhandler_base::get_inheritance): New method. * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper close-on-exec inheritance when creating. (fhandler_socket::check_peer_secret_event): Create handle as non-inheritable.
2001-07-26* syscalls.cc (setsid): Detach process from its console if the currentChristopher Faylor5-10/+51
controlling tty is the console and already closed. * dtable.h (class dtable): Add members to count descriptors referring to the console. * dtable.cc (dtable::dec_console_fds): New function to detach process from its console. (dtable::release): Decrement the counter of console descriptors. (dtable::build_fhandler): Increment it. * exception.cc (ctrl_c_handler): Send SIGTERM to myself when catch CTRL_SHUTDOWN_EVENT.
2001-07-25Tue 24 Jul 2001 02:28:00 PM Trevor Forbes <t4bs@hotmail.com>Robert Collins2-1/+7
* thread.cc (verifyable_object_isvalid): Don't validate PTHREAD_MUTEX_INITIALIZER pointer as it will cause an exception in IsBadWritePtr() when running GDB.
2001-07-25 * localtime.c: Changed whole file to become C++ clean. Rename toCorinna Vinschen2-140/+62
localtime.cc. * localtime.cc (tzload): Preserve errno.
2001-07-21* cygheap.cc (cygheap_fixup_in_child): Attempt Win95 workaround.Christopher Faylor6-7/+25
* dtable.cc (dtable::dup_worker): Add debugging output. (dtable::vfork_child_dup): Correctly set close_on_exec. * fhandler.cc (fhandler_base::fork_fixup): Don't mess with handle if there is no need to get it from the parent. * fhandler_tty.cc (fhandler_tty_common::close): Add debugging output.
2001-07-20 * dir.cc (readdir): Protect FindNextFileA against INVALID_HANDLE_VALUE.Corinna Vinschen2-0/+8
2001-07-18* cygheap.cc (_cmalloc): Use correct constants for size calculation.Christopher Faylor5-7/+17
* dcrt0.cc (dll_crt0_1): Move uid initialization earlier. * fork.cc (fork_parent): Move cygheap_setup_in_child to just prior to CreateProcess so that all contents of cygheap are copied. * spawn.cc (spawn_guts): Ditto.
2001-07-18 * security.cc (get_user_groups): Call Net function with NULL serverCorinna Vinschen2-17/+47
name under specific error conditions. (is_group_member): Ditto. (get_user_local_groups): Ditto. (get_user_primary_group): Ditto.
2001-07-18 * syscalls.cc (_unlink): Explicitely check for non-existant file.Corinna Vinschen2-2/+13
2001-07-17 * delqueue.h: Remove obsolete file.Corinna Vinschen2-30/+4
2001-07-17* child_info.h: Bump magic number.Christopher Faylor9-132/+180
(class child_info): Add an element. * cygheap.cc (init_cheap): Allocate cygwin heap in shared memory area. (cygheap_fixup_in_child): Map cygwin heap, passed from parent via shared memory into correct address. (cygheap_setup_for_child): New function. * cygheap.h: Declare new functions. * dcrt0.cc (dll_crt0_1): Accomodate new cygheap_fixup_in_child arguments. Avoid protecting subproc_ready unless it is spawn/nowait. * fork.cc (fork_parent): Use new cygheap_setup_for_child function to setup cygwin heap info. Close passed cygheap shared memory handle. * spawn.cc (spawn_guts): Ditto. Also, reorganize to avoid synchronization between parent and child in non-P_OVERLAY case. * sigproc.cc (wait_sig): Only signal subproc_ready when execing.
2001-07-16 * grp.cc: Add missing Copyright date 2001.Corinna Vinschen2-1/+5
2001-07-15 Change well_known_admin_sid to well_known_admins_sid throughout.Corinna Vinschen7-35/+73
* sec_acl.cc (setacl): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. * sec_helper.cc: Add constructor for `well_known_null_sid'. * security.cc (get_nt_attribute): Set S_ISVTX for directories if FILE_WRITE_DATA and FILE_EXECUTE but not FILE_DELETE_CHILD is set. Add evaluation of S_ISVTX, S_ISGID and S_ISUID from NULL ACE. (alloc_sd): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. Add creation of NULL ACE for S_ISVTX, S_ISGID and S_ISUID permissions. * security.h: Add extern declaration for `well_known_null_sid'.
2001-07-14* syscalls.cc (stat_worker): Simplify previous change.Christopher Faylor2-6/+7
2001-07-13* syscalls.cc (_unlink): Correct (?) logic which determines when to report anChristopher Faylor2-16/+26
access violation and when to queue file for eventual deletion. (stat_worker): Check for invalid buf argument.
2001-07-10 * mmap.cc (fhandler_disk_file::mmap): Try to open file mappingsCorinna Vinschen2-7/+33
by a unified name when running under 9x/ME. If that failes, create the file mapping using the unified name.
2001-07-09 * uinfo.cc (internal_getlogin): Add pointer check.Corinna Vinschen2-3/+11
2001-07-09 * security.cc (alloc_sd): Don't set inheritance attribute forCorinna Vinschen2-0/+21
permissions given to directories.
2001-06-29* fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Return 0 for success.Christopher Faylor2-6/+10
2001-06-28Change check_null_empty_path* to check_null_empty_str* throughout.Christopher Faylor10-54/+88
* path.cc (path_conv::check): Add signal protection here since retrieving info about remote shares can take some time. * path.h (check_null_empty_str_errno): Convert to a function prototype. * path.cc (check_null_empty_str): Move to miscfuncs.cc. * miscfuncs.cc (check_null_empty_str_errno): New function. (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (check_null_empty_str): Change from VirtualQuery to IsBadWritePtr. * thread.cc (check_valid_pointer): Ditto. * resource.cc (getrlimit): Use check_null_invalid_struct macro for checking validity of pointer. (setrlimit): Ditto.
2001-06-26* fhandler.cc (fhandler_disk_file::fstat): Don't rely on exactly 3 charactersChristopher Faylor4-5/+28
being read for executable test since we could be checking for less than that. * syscalls.cc (stat_worker): Try opening the file the "correct" way first so that #! processing can potentially happen. If that fails, then use "query open" method. * spawn.cc (spawn_guts): Delay processing of signal until after we've notified parent about reparenting.
2001-06-26Remove trailing tabs.Christopher Faylor2-2/+2
2001-06-26* mmap.cc: Clean up *ResourceLock calls throughout.Christopher Faylor15-460/+484
* thread.cc (pthread_cond::TimedWait): Check for WAIT_TIMEOUT as well as WAIT_ABANDONED. (__pthread_cond_timedwait): Calculate a relative wait from the abstime parameter.
2001-06-24forced commitChristopher Faylor1-0/+3
2001-06-24Fix typoChristopher Faylor1-1/+1
2001-06-24* exceptions.cc (interrupt_setup): Move actions from setup_handler to here.Christopher Faylor6-75/+84
(setup_handler): Move actions after a successful interrupt to interrupt_setup. * fork.cc (vfork): Augment debugging output. * sigproc.cc (proc_subproc): Ditto. * spawn.cc (spawn_guts): Ditto. Correctly fill out progname when spawn NO_WAIT. Call signal handler when a signal arrives. * sigproc.h: Declare a function.
2001-06-22 * fhandler.h class fhandler_socket): Declare new methodCorinna Vinschen3-0/+17
`set_close_on_exec'. * fhandler_socket.cc (fhandler_socket::set_close_on_exec): New method.
2001-06-22 * fhandler_tape.cc (fhandler_dev_tape::tape_erase): Set sizeCorinna Vinschen2-1/+6
parameter to value expected by GetTapeParameters().
2001-06-22 * fhandler_console.cc (fhandler_console::read): Detect AltGr moreCorinna Vinschen2-2/+25
robustly on WinNT.
2001-06-212001-06-22 Robert Collins rbtcollins@hotmail.comRobert Collins2-2/+8
* thread.cc (__pthread_cond_timedwait): Lock the waiting mutex before the condition protect mutex to avoid deadlocking. (Found by Greg Smith). (__pthread_cond_wait): Ditto.
2001-06-20* fhandler.cc (fhandler_base::open): Work around windows bug whenEgor Duda2-0/+17
CreateFile() with dwDesiredAccess == 0 called on remote share returns valid handle even if file doesn't exist.
2001-06-20* fhandler_socket.cc (fhandler_socket::signal_secret_event): NewEgor Duda4-15/+44
function. * fhandler.h: Declare it. * fhandler_socket.cc (fhandler_socket::create_secret_event): Don't signal secret event immediately. (fhandler_socket::check_peer_secret_event): Do it after peer event was opened. * net.cc (cygwin_connect): Or if socket is non-blocking. (cygwin_accept): Ditto.
2001-06-18* fhandler_tty.cc (fhandler_tty_slave::init): Revert 2001-06-16 change.Christopher Faylor4-64/+99
* fork.cc (fork_copy): Print more debugging info. (fork_parent): Change order of arguments to accomdate buggy gcc. (fork): Ditto. * syscalls.cc (_unlink): Reorganize to try harder to delete file with DeleteFile and to recover more gracefully if FILE_FLAG_DELETE_ON_CLOSE doesn't work properly.
2001-06-16* exceptions.cc (sig_handle_tty_stop): Reset PID_STOPPED if not actuallyChristopher Faylor6-8/+25
stopping. * fhandler_console.cc (fhandler_console::fixup_after_fork): Don't set controlling terminal if just inheriting a handle. (fhandler_console::fixup_after_exec): Ditto. * fhandler_tty.cc (fhandler_tty_slave::init): Ditto. * signal.cc (kill_worker): Set appropriate errno if proc_exists determines that process does not really exist.
2001-06-15* path.cc (path_conv::check): Deal more robustly with foo/ behavior.Christopher Faylor2-6/+10
2001-06-15 * fhandler_tape.cc (fhandler_dev_tape::tape_status): Set sizeCorinna Vinschen2-1/+9
parameter to value expected by GetTapeParameters().
2001-06-15* fhandler.cc (fhandler_disk_file::fstat): Properly set executable bits forChristopher Faylor2-44/+40
directory when !ntsec && !ntea. Also move common code prior to call to get_attributes.
2001-06-14* thread.cc (pthread_cond::Signal): Release the condition access variableChristopher Faylor2-1/+11
correctly.
2001-06-14* fhandler.cc (fhandler_base::open): Set win32 access flagsEgor Duda4-21/+40
to 0, when requested. * fhandler.h: New status flag FH_QUERYOPEN. (fhandler::get_query_open): New function. (fhandler::set_query_open): Ditto. * syscalls.cc (stat_worker): Request query-only open mode.
2001-06-12* environ.cc (set_file_api_mode): New function. Move settingEgor Duda4-4/+29
of file APIs mode (OEM/ANSI) here. (codepage_init): From here. * winsup.h (set_file_api_mode): Declare it. * fork.cc (fork_child): Set file APIs mode in forkee.
2001-06-11Add missing entry.Christopher Faylor1-1/+5