Commit Graph

357 Commits

Author SHA1 Message Date
Christopher Faylor f489e86b8f * syscalls.cc (stat_worker): Make stat return correct st_blocks for files with
size bigger than 2Gb and less than 4Gb
2000-07-26 17:48:49 +00:00
Corinna Vinschen a246b47b67 * security.cc (lookup_name): Search on local machine first if
myself->domain is not empty.
2000-07-26 15:44:58 +00:00
Christopher Faylor 6e76b010c3 * fhandler_console.cc (fhandler_console::read): Explicitly set cursor to make
it visible while waiting in WaitForMultipleObjects.
2000-07-26 13:59:23 +00:00
Christopher Faylor f653e4ddc1 Add missing ChangeLog entry. 2000-07-26 13:42:01 +00:00
Corinna Vinschen 1d8fc847ee * passwd.cc: Change name of passwd_in_memory_p to passwd_state.
Change type to enum. Change storage class to static. Adjust comments.
        (read_etc_passwd): Set passwd_state to different values when loaded
        from file in contrast to being emulated.
        (search_for): Return default passwd entry if passwd is emulated or
        it's a request for the current user. Otherwise return NULL.
2000-07-26 11:48:38 +00:00
Christopher Faylor 00edcbb0cb * syscalls.cc (statfs): Use path_conv method to convert input path. 2000-07-26 01:56:48 +00:00
Christopher Faylor 2a1a9785eb * syscalls.cc (_link): Avoid extraneous call to cygwin_conv_to_win32_path. 2000-07-26 01:44:16 +00:00
David Starks-Browning 738c2431e5 New entry (Programming Questions): 'Why doesn't gdb handle signals?' 2000-07-25 21:35:08 +00:00
David Starks-Browning 53d1fe2a5c Entry 'Is the Cygwin library multi-thread-safe?': Update for latest release. 2000-07-25 21:16:44 +00:00
David Starks-Browning 3637f333ed Entry 'Are mixed-case filenames possible with Cygwin?': Expand slightly,
add reference to coolview.
2000-07-25 20:49:59 +00:00
David Starks-Browning 74b29f02d9 New entry (Cygwin API Questions): 'Is there a mouse interface?' -- No. 2000-07-25 20:13:38 +00:00
David Starks-Browning 717a3d7b37 Entry 'Can I use my own malloc?': Add warning about _malloc_r from newlib. 2000-07-25 19:50:31 +00:00
David Starks-Browning 7e0482eecd Entry 'Is it OK to have multiple copies of the DLL?':
Emphasise that no, it's not OK.
2000-07-25 19:17:31 +00:00
David Starks-Browning 3cf421356f Changed 'sourceware.cygnus.com' to 'sources.redhat.com' in the FAQ, where appropriate. 2000-07-25 19:00:29 +00:00
Corinna Vinschen 8b6ebe8fd5 * syscalls.cc (_link): Corrected previous patch. 2000-07-24 19:14:38 +00:00
Corinna Vinschen 9602ffc30b * fhandler.h (class fhandler_dev_random): Add members for managing
pseudo randomness.
        * fhandler_random.cc: Rearrange. Use pseudo random number generator
        as entropy source if system entropy isn't available and if device is
        used as /dev/urandom. Allow initializing device by calling write().
2000-07-24 11:33:02 +00:00
Corinna Vinschen bb7f93f898 * fhandler.h: Add comment. 2000-07-23 21:13:05 +00:00
Corinna Vinschen c49b9c439c * fhandler.h (class fhandler_dev_raw): Add private member `varblkop'
to be set when variable blocksize mode is on.
        * fhandler_raw.cc: Eliminate `\n' from trace output.
        (clear): Set `varblkop' to 0.
        (dup): Copy varblkop as well.
        (writebuf): Care for variable blocksize.
        (open): Ditto.
        (raw_read): Ditto.
        (raw_write): Ditto.
        * fhandler_tape.cc (open): Ditto.
        (ioctl): Ditto. Some cleanups.
2000-07-23 19:33:44 +00:00
Corinna Vinschen 9fb628fc57 Patch suggested by Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
* winsup.h: Add new macros sys_wcstombs and sys_mbstowcs.
        * syscalls.cc (_link): Replace calls to mbstowcs by call to
        sys_mbstowcs.
        * uinfo.cc (internal_getlogin): Replace calls to wcstombs and
        mbstowcs by calls to sys_wcstombs and sys_mbstowcs. Replace
        usage of constants by meaningful defines. Use result of
        GetSystemDirectory for HOMEPATH and HOMEDRIVE as a last resort.
2000-07-22 16:43:54 +00:00
Corinna Vinschen ede1fee4ca * spawn.cc (span_guts): Retrieve security attributes before setting
psid to NULL.
2000-07-21 19:34:35 +00:00
Corinna Vinschen 4c02a6ab9c * include/winnt.h: Add missing typedefs for PTOKEN_SOURCE and
LPTOKEN_SOURCE.
2000-07-21 10:11:57 +00:00
Corinna Vinschen 6780333e20 * security.cc (acl_worker): Use stat_suffixes in call to path_conv
just as in `stat_worker'.
2000-07-21 10:06:13 +00:00
Corinna Vinschen 99fd83eb67 * ntsec.sgml: Add description for the new setuid ability
of Cygwin since release 1.1.3.
        * overview2.sgml: Add description for new chroot functionality.
        * calls.texinfo: Add missing calls. Change comments for
        setuid, setgid, seteuid, setegid, chroot.
2000-07-20 11:04:33 +00:00
Corinna Vinschen c4b881eb44 * spawn.cc (spawn_guts): Don't restore impersonation in case
of _P_OVERLAY. Clean up slightly. Accomodate comments.
2000-07-19 20:27:27 +00:00
Corinna Vinschen a67f4165ae * shared.h (class pinfo): New members `root' and `rootlen'.
* syscalls.cc (chroot): Set new root for process.
        * path.cc (getcwd_inner): Add parameter to force use of
        new root from chroot() call.
        (ischrootpath): New macro.
        (normalize_posix_path): Care for changed root dir.
        (normalize_win32_path): Ditto.
        (getcwd_inner): Ditto.
        (chdir): Eliminate trailing path component consisting
        entirely of dots.
        * fork.cc (fork): Copy pinfo members regarding chroot().
        * spawn.cc (_spawnve): Ditto.
        * dir.cc (opendir): Don't use computed win32 path if
        chroot() took place.
2000-07-19 20:14:24 +00:00
Christopher Faylor 45b5257519 Update copyright info. 2000-07-19 17:42:16 +00:00
Christopher Faylor 49a1613414 * dll_init.cc (dll_list::alloc): Fix debugging output. 2000-07-18 02:26:46 +00:00
Christopher Faylor b7be354a26 Update ChangeLog. 2000-07-18 00:12:10 +00:00
Christopher Faylor 5bc584ba65 Throughout, eliminate third argument to path_conv and use new PC_* constants
for second argument.
* path.h: Generalize SYMLINK_* constants to PC_*.
(path_conv): Create a new method.  Fold third argument into second.
* dll_init.cc (dll_list::alloc): Try harder to find space to allocate dll
struct.
(dll_dllcrt0): Don't check sanity if we've already called dll_crt0.
* path.cc (path_conv::check): Don't check for a null or empty path unless
specifically told with a flag setting.
(check_null_empty_path): New function, adapted from macro.
* syscalls.cc (_rename): Use already-determined file attributes rather than
checking again.
* lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static per_process
structure since this is apparently supposed to be zeroed.
* lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to older
DLLs.
2000-07-17 19:18:21 +00:00
Corinna Vinschen 17811f7bbe Patch suggested by Eric Fifer <EFifer@sanwaint.com>
* poll.cc (poll): Fix erroneous negations.
2000-07-17 17:42:00 +00:00
Corinna Vinschen b0d5cd02dc * environ.cc (setenv): Use __cygwin_environ instead of
environ after reallocating environment space.
2000-07-17 15:59:27 +00:00
Christopher Faylor c609f9dcec * _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error. 2000-07-17 00:24:56 +00:00
Christopher Faylor 0763ee9d83 * environ.cc: Use new definition of "environ" throughout.
(environ_init): Explicitly initialize __cygwin_environ.
(cur_environ): New function.  Detects when user has updated their environment.
* exec.cc: Use 'environ' define throughout rather than __cygwin_environ.
* spawn.cc: Ditto.
* winsup.h: Declare cur_environ, main_environ, environ.
2000-07-16 20:06:11 +00:00
Christopher Faylor b4e59f5f14 * acconfig.h: Add support for NEWVFORK.
* config.h.in: Ditto.
* configure.in: Add --enable-vfork option.
* configure: Regenerate.
* dcrt0.cc (quoted): Detect and fix up quoted backslashes.
* sigproc.cc (proc_subproc): Correctly name handle of newly added child process
to avoid erroneous debugging messages about closing the wrong handle.
2000-07-16 17:38:41 +00:00
Christopher Faylor 8e382d8049 * spawn.cc (spawn_guts): Use \ for quoting '"'.
* dcrt0.cc (quoted): Understand \ quoting for '"'.
2000-07-16 06:31:06 +00:00
Christopher Faylor 2768430b64 Slightly more efficient version of previous change. 2000-07-16 04:37:43 +00:00
Christopher Faylor 01e6597b1c * dcrt0.cc (build_argv): Strip quotes from argv[0] since it should never be
globified.
2000-07-16 04:34:05 +00:00
Christopher Faylor c77c441991 Update comments. 2000-07-16 04:10:33 +00:00
Christopher Faylor 92e30b7535 * dll_init.cc (dll_list::alloc): Round correctly. Use VirtualAlloc since
shared file mapping is unnecessary.
(dll_list::detach): Release memory via VirtualFree since there we no longer use
shared file mapping.
2000-07-15 04:36:10 +00:00
Christopher Faylor 2eb392bd77 * hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that we can
detect when there are no fds to pass.
* dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04 2000
change.
(dll_crt0_1): Set "cygwin_finished_initializing" flag.
(dll_crt0): Don't perform memcpy if uptr is already set to internal structure.
(_dll_crt0): Remember location of programs envptr.
* dll_init.h (per_module, dll, dll_list): Revamp.
* dll_init.cc: Revamp.  Use new classes.
* fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff.
* environ.cc: Use __cygwin_environ throughout rather than the
user_data->envptr.
* exec.cc: Ditto.
* spawn.cc: Ditto.
* winsup.h: Declare update_envptrs, cygwin_finished_initializing.
* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous change.
* lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own per_process
structure or we end up overwriting information from the main program.
2000-07-15 02:48:11 +00:00
Corinna Vinschen 44d2afed74 * mount.cc (mount_already_exists): Slightly rearrange.
Change message texts.
2000-07-13 21:49:36 +00:00
Corinna Vinschen d9028f52ae * mount.cc (mount_already_exists): Additional warning message
if mount point exists with another mount type.
2000-07-13 11:09:53 +00:00
Christopher Faylor 5f9316981a * debug.cc (thread_stub): Use impure_ptr in place of reent_data.
* dll_init.cc (dll_dllcrt0): Replace erroneous use of local symbol with correct
__cygwin_user_data->impure_ptr.
2000-07-12 04:49:07 +00:00
Christopher Faylor a0f7b496ad * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset environ if
already set.
2000-07-12 04:02:45 +00:00
DJ Delorie 1ff7263eb9 * include/shlobj.h: add CSIDL_COMMON_* 2000-07-11 17:33:48 +00:00
Christopher Faylor 69859e8697 * fhandler_console.cc (fhandler_console::read): Unicode interface to
ReadConsoleInput only exists on W2K, so use workaround from Kazuhiro Fujieda
<fujieda@jaist.ac.jp>.
2000-07-10 23:08:45 +00:00
Christopher Faylor 5814b26cc7 Add missing text. 2000-07-10 15:31:46 +00:00
Christopher Faylor 356d1c6ab0 * Makefile.in (install): Install textmode.o as well as binmode.o. 2000-07-10 15:30:04 +00:00
Corinna Vinschen d501c6adee * spawn.cc (spawn_guts): Close handle `hToken' only if it's not
copied from myself->token.
        * syscalls.cc (seteuid): Replace CopySid by memcpy which is foolproof
        here.
2000-07-09 21:02:44 +00:00
Christopher Faylor 5fc3f2d40a Slight optimization. 2000-07-09 16:21:55 +00:00