Commit Graph

1589 Commits

Author SHA1 Message Date
Christopher Faylor 747e577331 * environ.cc: Set reset_com to false to mimic linux behavior more closely. 2001-10-31 16:30:46 +00:00
Corinna Vinschen 928eca7a58 * dtable.cc (dtable::vfork_child_dup): Revert impersonation
before duplicating fhandler.
2001-10-31 12:03:45 +00:00
Christopher Faylor 34397675de remove garbage ChangeLog entry. 2001-10-31 05:35:28 +00:00
Christopher Faylor 774cd790fc * sigproc.cc (sigproc_terminate): Don't signal main thread when exiting.
* sigproc.h (sigframe): Decorate some methods with `inline'.
(new_muto): Coerce pointer to new to void *.
2001-10-31 02:58:38 +00:00
Christopher Faylor 0fc07e4d69 * fhandler.cc (fhandler_base::fork_fixup): Pass old handle to setclexec_pid. 2001-10-31 02:03:00 +00:00
Christopher Faylor 6ea0c04e7c * cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh.
(cygheap_fdmanip::isopen): New method.
* syscalls.cc (_read): Avoid accessing closed fd.
* path.h (fe_types): New enum.
(path_conv::set_path): New method.
(find_exec): Change null_if_not_found argument to something more generic.
* spawn.cc (find_exec): Default to returning the POSIX path rather than the
windows path, unless instructed otherwise.
(spawn_guts): Force call to find_exec to use native paths.
* dlfcn.cc (check_path_access): Accommodate new find_exec arguments.
* environ.h (win_env::get_posix): New method.
2001-10-31 00:55:32 +00:00
Corinna Vinschen 05230a4a29 * fhandler_socket.cc (fhandler_socket::close): Add error handling.
Fixed ChangeLog entries.
2001-10-30 11:48:36 +00:00
Corinna Vinschen fc79ce17c7 * (fhandler_socket::dup): Revert previous change. 2001-10-30 10:07:39 +00:00
Christopher Faylor 19ba6f2195 * dtable.cc (dtable::dup2): Add some debugging. Use methods from passed in
class rather than cygheap->fdtab.
* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add more
debugging output.
(fhandler_socket::dup): Allocate new space for prot_info_ptr for duplicated
entry.
* syscalls.cc (stat_worker): Always delete fh if it has been created.
2001-10-30 07:43:46 +00:00
Corinna Vinschen 3d4b75dec2 * security.cc (is_group_member): Call NetLocalGroupGetMembers() for
local machine only.
	(get_user_local_groups): Ditto for NetLocalGroupEnum().
2001-10-30 00:02:36 +00:00
Christopher Faylor 7a47ed496c * Makefile.in: Propagate 'clean' to subdirs properly. 2001-10-29 20:32:27 +00:00
Christopher Faylor 8dd6060b98 * fhandler.cc (fhandler_base::set_name): Set namehash here to catch name
changes.
(fhandler_base::open): Remove namehash setting.
(fhandler_base::fstat): Subtract 1 from arbitrary time setting to avoid strange
ls -l granularity problem.
* shared_info.h (MOUNT_VE
2001-10-29 20:30:47 +00:00
Egor Duda 3fbfb55efe * winsup.api/ltp/stat03.c: Supress compiler warning. 2001-10-29 20:03:06 +00:00
Egor Duda bd65358b34 * winsup.api/signal-into-win32-api.c: Supress compiler warning. 2001-10-29 19:45:43 +00:00
Christopher Faylor cdd8cb1f2a * select.cc (MAKEready): Remove extraneous select_read. 2001-10-29 16:12:47 +00:00
Corinna Vinschen ac19c8dcf6 * uinfo.cc (internal_getlogin): Set environment variable $HOME
from either /etc/passwd or $HOMEDRIVE/$HOMEPATH if necessary.
2001-10-29 11:53:52 +00:00
Christopher Faylor 711ded6d28 * fhandler.h (fhandler_serial::fhandler_serial): Change to only accept unit
argument.
* fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
(fhandler_serial::open): Avoid else when previous clause is a return().
* path.cc (get_devn): Alias /dev/ttyS0 -> /dev/com1, etc.
(get_device_number): Reallow standalone "com1" as a valid name for /dev/com1.
2001-10-29 05:28:24 +00:00
Christopher Faylor aa9d50a1c1 fix spelling errors 2001-10-28 23:05:49 +00:00
Christopher Faylor 451386f769 fix consistent spelling errors. 2001-10-28 18:10:44 +00:00
Corinna Vinschen be846a19d7 * configure: Regenerate, removing erroneous SUBDIRS substitution. 2001-10-26 15:01:08 +00:00
Christopher Faylor fe00cca93e * select.cc (MAKEready): Check for read_ready in loop since select_read could
set it.
(peek_socket): Check ready/write/except specifically since they could have been
set even prior to peek_socket call.
2001-10-26 04:06:27 +00:00
Christopher Faylor 53c79b98c9 Clarify checkin comment slightly. 2001-10-24 23:56:45 +00:00
Christopher Faylor 7ee2c95756 * shared_info.h (MOUNT_VERSION): Change to a smaller, still arbitrary number.
* shared.cc (open_shared): Accept a number to denote the shared memory region.
(memory_init): Use shared memory version as part of the object name of the
shared region.  Ditto for the mount table.
* path.cc (CYGWIN_REGNAME): New define used in place of
CYGWIN_INFO_CYGWIN_REGISTRY_NAME throughout.
* external.cc (cygwin_internal): Implement CW_[GS]ET_CYGWIN_REGISTRY_NAME.
* cygheap.h (init_cygheap::cygwin_regname): New element.
2001-10-24 22:10:06 +00:00
Christopher Faylor ae21eea62e * Makefile.in: Remove EXEEXT consideration. We always need EXEEXT. 2001-10-24 22:09:37 +00:00
Christopher Faylor a9f20457f3 * Makefile.in: Only build testsuite directory on first 'make check'.
* configure.in: Remove testsuite from SUBDIRS.
* configure: Regenerate.
2001-10-24 21:56:54 +00:00
Christopher Faylor a830378213 Remove merge conflict indicator. 2001-10-24 15:40:24 +00:00
Christopher Faylor a0626ebe27 Ensure that all fhandler_*::read definitions are __stdcall throughout.
* fhandler.cc (fhandler_base::set_inheritance): Be more defensive in debugging
code.
* fhandler.h: Adjust regparms throughout to reflect passing 'this' parameter.
* fhandler_console.cc (fhandler_console::read): Remove unneeded test.  Only
honor "key down" events.
* miscfuncs.cc (strcasestr): Reorganize for efficient code use.
(check_null_empty_str_errno): Ditto.
(__check_null_invalid_struct_errno): Ditto.
(__check_invalid_read_ptr_errno): Ditto.
* syscalls.cc (_read): Return 0 when length == 0, as per Single UNIX
Specification.
2001-10-24 04:16:45 +00:00
Christopher Faylor a05d38a8b4 * debug.cc (set_errno): Return value of errno that was set, just like the
macro.
(setclexec_pid): Replace old handle with new handle.
* debug.h: Reflect change in arguments for setclexec_pid.
* fhandler.cc (fhandler_base::set_inheritance): Ditto.
(fhandler_base::fork_fixup): Ditto.
* cygerrno.h: Reflect return value change for set_errno.
2001-10-22 21:09:41 +00:00
Christopher Faylor e7e231e531 Remove 'cb' parameter and modify fhandler_* constructors throughout.
* dtable.cc (dtable::build_fhandler): Remove debugging output which uses 'cb'.
* exec.cc (execvp): New function.
(execvpe): Ditto.
* fhandler.cc (fhandler_base::fhandler_base): Use constructor initialization.
* fhandler.h (fhandler_tty_common::fhandler_tty_common): Ditto.
* fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
Ditto.
* fhandler_console.cc (fhandler_console::fhandler_console): Ditto.
* fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Ditto.
* fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
* fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Ditto.
(fhandler_tty_slave::fhandler_tty_slave): Ditto.
(fhandler_pty_master::fhandler_pty_master): Ditto.
* fhandler_windows.cc (fhandler_windows::fhandler_windows): Ditto.
2001-10-22 18:39:22 +00:00
Corinna Vinschen 65d1068cb8 Patch suggested by Ian Ray <ian.ray@nokia.com>:
* syscalls.cc (seteuid): Unset environment variables HOMEDRIVE and
	HOMEPATH before calling internal_getlogin().
	* uinfo.cc (internal_getlogin): Use default HOMEPATH and HOMEDRIVE
	from environment if both are present, else query NetUserGetInfo().
2001-10-22 18:31:00 +00:00
Corinna Vinschen c270dc2555 * net.cc (get_2k_ifconf): Change multiple IP address naming scheme
to Linux style.

	Patch by Alexander Gottwald <ago@informatik.tu-chemnitz.de>:
        * net.cc (get_2k_ifconf): Added support for multiple IP addresses on
        one interface.
2001-10-22 12:23:33 +00:00
Corinna Vinschen 8b6234ca12 * miscfuncs.cc (__check_invalid_read_ptr_errno): Return error, if any. 2001-10-22 11:31:39 +00:00
Christopher Faylor d055070040 * resource.cc (fill_rusage): Perform paranoid zero structure passed to
GetProcessMemoryInfo.
2001-10-22 00:10:46 +00:00
Christopher Faylor 1f0191e542 * autoload.cc: Autoload GetProcessMemoryInfo.
* resource.cc (fill_rusage): Calculate ru_maxrss and ru_majflt entries.
(Bug report on this from Guido Serassio in the squid project).  This requires
including psapi.h.
2001-10-21 23:44:43 +00:00
Christopher Faylor c43c5c1643 * dll_init.cc (dll_list::alloc): Increase retry count to 1000. 2001-10-21 03:38:41 +00:00
Christopher Faylor 3ddb57fb3f fix typo. 2001-10-20 17:35:27 +00:00
Corinna Vinschen 011ec894d2 * mkgroup.c: Avoid compiler warnings.
(print_special): New function.
        (main): Print special accounts by calling print_special().
        * mkpasswd.c: Avoid compiler warnings.
        (enum_users): Print additional U-domain\username info in gecos
        field when SIDs are printed.
        (print_special): New function.
        (main): Print special accounts by calling print_special().
2001-10-20 13:56:09 +00:00
Corinna Vinschen b07891c58b * include/winnetwk.h (WNetGetResourceInformationA): Add declaration.
(WNetGetResourceInformationW): Ditto.
        (WNetGetResourceInformation): Add define.
2001-10-20 10:41:09 +00:00
Christopher Faylor 6fdd213161 * miscfuncs.cc (+__check_invalid_read_ptr_errno): New function.
* syscalls.c (_write): Validate that write buffer is accessible for reading,
not writing.
* winsup.h: Declare new function, increase regparmization of check_* functions.
2001-10-20 05:08:21 +00:00
Corinna Vinschen 5318c49833 * path.cc (getcwd): Allow len == 0 when buf == NULL. 2001-10-19 19:17:04 +00:00
Christopher Faylor da8f3291d1 * syscalls.cc (_read): Validate input pointer.
(_write): Ditto.
(system): Ditto.
2001-10-19 02:27:19 +00:00
Corinna Vinschen e34027611a Patch from Frederic Devernay <Frederic.Devernay@sophia.inria.fr>:
* poll.cc (poll): Call cygwin_select() if any fd is valid.
2001-10-17 18:52:06 +00:00
Corinna Vinschen 081be67e75 * fhandler_raw.cc (fhandler_dev_raw::open): Eliminate compatibility
code since no Win32 device names are used anymore.
        * fhandler_tape.cc (fhandler_dev_tape::tape_set_blocksize): Allow
        0 as blocksize to indicate variable blocksize.
        * path.cc (win32_device_name): Generate NT internal device names
        using upper/lower case names for readability.
        Generate \DosDevices\<letter>: device name for mount table
        compatibility devices.
2001-10-16 20:17:23 +00:00
Corinna Vinschen 2de2be2235 Forgot ChangeLog 2001-10-16 17:32:42 +00:00
Christopher Faylor 1a2cca85d2 * fhandler.cc (fhandler_base::fork_fixup): Guard against compiler warning. 2001-10-16 16:58:28 +00:00
Corinna Vinschen b20e2ee663 * fhandler_tape.cc (fhandler_dev_tape::tape_status): Report
EOTWarningZoneSize in get->mt_eotwarningzonesize.
        * include/cygwin/mtio.h: Define DEFTAPE.
        (struct mtget): Add member `mt_eotwarningzonesize'. Add a comment.
        * include/cygwin/version.h: Bump API minor version to 47.
2001-10-16 16:28:39 +00:00
Corinna Vinschen 0aa019b960 * pathnames.sgml: Cleanup raw device text to be more coherent. 2001-10-16 16:03:22 +00:00
Corinna Vinschen 7b46bb01e1 * pathnames.sgml: Add description for new fixed device paths. 2001-10-16 15:16:02 +00:00
Corinna Vinschen 990690655c * autoload.cc: Add load statement for `NtOpenFile'.
* fhandler.h (fhandler_dev_raw::get_unit): New method.
	(fhandler_dev_tape::norewind): Eliminate.
	(fhandler_dev_tape::is_rewind_device): New method.
	* fhandler_raw.cc (fhandler_dev_raw::open): Open new
	fixed device name devices using NT internal method.
	Keep calling fhandler_base::open() for old mount table
	device mapping compatibility devices.
	(fhandler_dev_raw::fstat): Eliminate.  Settings are done
	by fhandler_base::fstat() already.
	* fhandler_tape.cc: Remove `norewind' usage throughout.
	* ntdll.h: Define FILE_SYNCHRONOUS_IO_NONALERT.
	Define struct _IO_STATUS_BLOCK.
	Declare NtOpenFile().
	* path.cc (get_raw_device_number): Add new approach for
	using fixed device names.
	(win32_device_name): Ditto.
	(get_device_number): Ditto.  Require POSIX path to begin
	with "/dev/".
	(mount_info::conv_to_win32_path): Call win32_device_name()
	instead of get_device_number() after evaluating mount points
	to allow changing the win32 destination path again.
	* security.cc (str2buf2uni): Remove `static' to be able to
	call function from fhandler_dev_raw::open().
	* wincap.cc: Set flag has_raw_devices appropriately.
	* wincap.h: Add flag has_raw_devices.
2001-10-16 14:53:26 +00:00
Christopher Faylor 2ac3bab68d * cygheap.h (cygheap_fdget::cygheap_fdget): Remove debugging operation from
set_errno.
2001-10-16 14:43:36 +00:00