Commit Graph

1288 Commits

Author SHA1 Message Date
Corinna Vinschen dce6f56397 * path.cc (fchdir): Set the fhandler's path to absolute value to
ensure changing to the correct directory even if the fhandler originally
        points to a relative path.
2001-08-03 11:14:09 +00:00
Corinna Vinschen 842c741f98 * security.cc (set_file_attribute): Clean up. Don't call
`set_nt_attribute' when ntsec isn't set.
2001-08-02 16:01:47 +00:00
Christopher Faylor e13ea3343d * dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal with
growing stack under Windows 95.
* Makefile.in: Add install-lib and install-headers.
2001-07-29 02:33:30 +00:00
Christopher Faylor 8e4e3874c4 * cygwin.din: Export sys_errlist, sys_nerr.
* include/cygwin/version.h: Bump minor version number.
2001-07-27 16:33:20 +00:00
Corinna Vinschen 8b43d2722b * security.cc (get_user_primary_group): Fix compiler warning.
(alloc_sd): Add DELETE permission for user when S_IWUSR is given.
2001-07-27 09:17:57 +00:00
Christopher Faylor f9f2c11985 * thread.cc (__pthread_equal): Invert return value so that true is returned
when threads are equal.
2001-07-26 20:47:05 +00:00
Christopher Faylor 351a85482c Christopher Faylor <cgf@cygnus.com>
* cygwin.din: Export __signgam.
* include/cygwin/version.h: Bump minor version number.
2001-07-26 20:42:52 +00:00
Christopher Faylor 6b91b8d53b Throughout, reorganize header file inclusion to put security.h prior to
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 19:22:24 +00:00
Christopher Faylor 0cc642a5f1 * syscalls.cc (setsid): Detach process from its console if the current
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-26 00:10:52 +00:00
Robert Collins 811bf2902d Tue 24 Jul 2001 02:28:00 PM Trevor Forbes <t4bs@hotmail.com>
* 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 23:46:25 +00:00
Corinna Vinschen 09ff05f7f9 * localtime.c: Changed whole file to become C++ clean. Rename to
localtime.cc.
        * localtime.cc (tzload): Preserve errno.
2001-07-25 21:58:21 +00:00
Christopher Faylor a7670c1e82 * cygheap.cc (cygheap_fixup_in_child): Attempt Win95 workaround.
* 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-21 03:20:01 +00:00
Corinna Vinschen 1801eae1b1 * dir.cc (readdir): Protect FindNextFileA against INVALID_HANDLE_VALUE. 2001-07-20 07:24:02 +00:00
Christopher Faylor aea57aa057 fix typo. 2001-07-19 15:27:59 +00:00
Christopher Faylor 16828fc5d4 * cygheap.cc (_cmalloc): Use correct constants for size calculation.
* 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 17:05:34 +00:00
Corinna Vinschen c9fbce2641 * security.cc (get_user_groups): Call Net function with NULL server
name under specific error conditions.
        (is_group_member): Ditto.
        (get_user_local_groups): Ditto.
        (get_user_primary_group): Ditto.
2001-07-18 12:56:26 +00:00
Corinna Vinschen 5564cd7a89 * syscalls.cc (_unlink): Explicitely check for non-existant file. 2001-07-18 11:00:05 +00:00
Corinna Vinschen 3ef6288c74 * delqueue.h: Remove obsolete file. 2001-07-17 08:28:27 +00:00
Christopher Faylor 5457dfcb81 * child_info.h: Bump magic number.
(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-17 03:41:52 +00:00
Corinna Vinschen 27ea31cde4 * grp.cc: Add missing Copyright date 2001. 2001-07-16 13:22:29 +00:00
Corinna Vinschen 3a157c0d0d Change well_known_admin_sid to well_known_admins_sid throughout.
* 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-15 22:40:07 +00:00
Corinna Vinschen 4c61c04cd3 * regtool.cc (find_key): Handle keys with only one subkey. 2001-07-15 11:27:23 +00:00
Christopher Faylor fc901253d1 * syscalls.cc (stat_worker): Simplify previous change. 2001-07-14 00:09:33 +00:00
Christopher Faylor 2aa2adb2d2 * syscalls.cc (_unlink): Correct (?) logic which determines when to report an
access violation and when to queue file for eventual deletion.
(stat_worker): Check for invalid buf argument.
2001-07-13 17:22:15 +00:00
Corinna Vinschen 8595942c8e * mmap.cc (fhandler_disk_file::mmap): Try to open file mappings
by a unified name when running under 9x/ME. If that failes, create
        the file mapping using the unified name.
2001-07-10 21:04:14 +00:00
Corinna Vinschen a8506a1917 * uinfo.cc (internal_getlogin): Add pointer check. 2001-07-09 09:05:17 +00:00
Corinna Vinschen 5d0cbc17db * security.cc (alloc_sd): Don't set inheritance attribute for
permissions given to directories.
2001-07-09 09:02:41 +00:00
David Starks-Browning a761b473ad WinME also affected by missing pipe key 2001-07-06 00:57:52 +00:00
David Starks-Browning a79001009b New entry "Why doesn't Cygwin tcl/tk understand Cygwin paths?" 2001-07-06 00:40:38 +00:00
David Starks-Browning 25c06979ef New entry: "Why don't international (8-bit) characters work?" 2001-07-06 00:30:23 +00:00
David Starks-Browning 0acab04bbe New "Known Problems" entry: Pipe key doesn't work on non-US kbds on Win9x.
Some cosmetic changes.
2001-07-06 00:16:13 +00:00
David Starks-Browning 9fbb1738c4 better instructions for installing cygwin snapshots 2001-07-05 23:58:34 +00:00
David Starks-Browning 3f5ab6915c New entry "Where is the su command?" 2001-07-05 23:29:43 +00:00
David Starks-Browning c3ac95e258 "How do I rebuild the tools on my NT box?": texi2html now provided. 2001-07-04 23:36:16 +00:00
David Starks-Browning 0ef44b84e6 "Why the weird directory structure?": new mount output format.
"Why can't I run bash as a shell under NT Emacs?": new title.
2001-07-04 23:30:17 +00:00
David Starks-Browning 7414c97eb3 Update "Can I use setup to install snapshots?" (now 'no') with new instructions. 2001-07-04 23:21:49 +00:00
David Starks-Browning d3f2880903 Add caveat that contents list is always out of date.
Remove entry "Setup screwed up my mounts!"
2001-07-04 23:00:31 +00:00
David Starks-Browning a43d0f3e07 just a bit more... 2001-07-04 22:54:16 +00:00
David Starks-Browning 7b49219617 Add more to entry "How do I print under Cygwin"? 2001-07-04 22:52:58 +00:00
David Starks-Browning f215088f81 Add apropos and /usr/sbin/makewhatis to "Why doesn't man work?" entry. 2001-07-04 21:14:41 +00:00
Christopher Faylor 2113bf6c1a * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Return 0 for success. 2001-06-29 02:20:01 +00:00
Christopher Faylor 288f125efd * regtool.cc (find_key): Revert previous change. 2001-06-28 02:46:11 +00:00
Christopher Faylor 7a4078ee34 Change check_null_empty_path* to check_null_empty_str* throughout.
* 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-28 02:19:57 +00:00
Christopher Faylor c135faa8b3 * regtool.cc (find_key): Allow '/' as a synonym for '\\'. 2001-06-27 17:38:40 +00:00
Christopher Faylor 07c3cd5bb1 * fhandler.cc (fhandler_disk_file::fstat): Don't rely on exactly 3 characters
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-26 21:03:08 +00:00
Christopher Faylor 32c3034969 Remove trailing tabs. 2001-06-26 14:57:33 +00:00
Christopher Faylor 462f4effb1 * mmap.cc: Clean up *ResourceLock calls throughout.
* 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-26 14:47:48 +00:00
Christopher Faylor d006404dae forced commit 2001-06-24 22:26:53 +00:00
Christopher Faylor 7333875c53 Fix typo 2001-06-24 22:00:04 +00:00
Christopher Faylor 125205875b * exceptions.cc (interrupt_setup): Move actions from setup_handler to here.
(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-24 21:57:50 +00:00