Commit Graph

447 Commits

Author SHA1 Message Date
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
Christopher Faylor bd4ec49671 * cygwin.din: Export _getmode and getmode to allow querying of binary state of
an fd.
* external.cc (cygwin_internal): Add handling of perfile_table setting.
* fhandler.cc (perfile_table): New global.
(fhandler_base::get_default_fmode): New method to return a file's default mode
based on its name.
(fhandler_base::open): Use get_default_mode method to determine a file's mode.
Record file mode in file flags.
* fhandler.h (fhandler_base): Declare get_default_fmode
* syscalls.cc (getmode): New function.
* sys/cygwin.h (__cygwin_perfile): New structure.
(cygwin_getinfo_types): Move outside of WINVER conditional.
(per_process): Move inside of WINVER conditional.
2000-07-09 05:29:51 +00:00
Christopher Faylor 85219b356e * external.cc (cygwin_internal): Export __cygwin_user_data.
* include/sys/cygwin.h: Allow definition of per_process even when not compiling
with C++.
(cygwin_getinfo_types): Add CW_USER_DATA.
* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Get __cygwin_user_data
pointer from cygwin_internal.  If it doesn't exist, return failure.  Use either
this pointer or passed in pointer throughout.  Clear forkee.
* lib/crt0.h: Accomodate argument changes to _cygwin_crt0_common.
* lib/cygwin_attach_dll.c (cygwin_attach_dll): Reorganize to allow use of newer
binaries with older DLLs.  Detect older DLLs when _cygwin_crt0_common returns 0
and allocate space for a per_process structure on the stack.
* lib/cygwin_crt0.c (cygwin_crt0): Ditto.
2000-07-08 04:36:27 +00:00
Corinna Vinschen 52cec10c67 * include/sys/cygwin.h: Hide internal data types in per_process
when not __INSIDE_CYGWIN__.
2000-07-07 08:35:31 +00:00
Christopher Faylor 737a86d32f * dcrt0.cc (__cygwin_user_data): Initialize.
(dll_crt0_1): Eliminate user_data initialization.
(dll_crt0): Set up impure_ptr_ptr for older executables.
(cygwin_dll_init): Eliminate user_data initializations.
(__api_fatal): Don't check for user_data initialization.
* dll_init.cc (struct dll): Store entire contents of per_process rather than
just a pointer.
(add): Ditto.
(initOneDll): Don't check for user_data initialization.
(DllList::recordDll): Store contents of per_process argument.
(DllList::detachDll): Pass address of per_process field.
(DllList::initAll): Ditto.
(DllList::doGlobalDestructorsOfDlls): Ditto.
(DllListIterator::operator *): Ditto.
(dll_dllcrt0): Default to __cygwin_user_data if arg is NULL.
* include/sys/cygwin.h: Reorganize per_process to eliminate obsolete fields and
accomodate new way of initializing.
* lib/_cygwin_crt0_common: Initialize _impure_ptr from
__cygwin_user_data.impure_ptr.
2000-07-05 23:46:44 +00:00
Christopher Faylor 1d613351e5 * exceptions.cc (try_to_debug): Prevent recursive spawning of JIT debugger.
Treat special event from debugger as command to continue.
2000-07-04 19:07:35 +00:00
Corinna Vinschen 0106a9b755 * poll.cc (poll): Zero out `open_fds' as well. 2000-07-04 17:36:44 +00:00
Corinna Vinschen 914e40dfe6 * include/cygwin/version.h: Bump API minor version to 24. 2000-07-04 17:25:11 +00:00
Corinna Vinschen 1ec2e52134 * security.cc (read_sd): Eliminate OemToChar. 2000-07-04 17:03:52 +00:00
Corinna Vinschen afb7e7196a * poll.cc: New file. Implement `poll' system call.
* include/poll.h: Ditto.
        * include/sys/poll.h: Ditto.
        * Makefile.in: Add poll.o as dependency.
        * cygwin.din: Add poll and _poll symbols.
2000-07-04 16:58:49 +00:00
David Starks-Browning f88cc35383 "Posting Guidelines": New name for old entry.
"Multiple copies of DLL":  shared region corrupt error message.
"Why the weird directory structure": re-wrote for latest.
"Symlinks on Samba": fix typo.
"Where is glibc": new entry.
"HT build relocatable dll": (interim update) link to Carl Thompson's message in cygwin list.
"Can I mix msvc++ and gcc objects": remove disclaimer.
2000-07-04 16:17:57 +00:00
David Starks-Browning 6680b6a589 "Contents": Add package opengl. 2000-07-04 16:10:32 +00:00
Christopher Faylor 610739191f * dcrt0.cc (dll_crt0_1): Eliminate SetFileApisToOEM and CharToOem.
* (dummy_autoload): Add functions used in fhandler_console.
* fhandler_console.cc (fhandler_console::read): Use ENCHANCED_KEY flag to
distinguish extended keys.  Translate an input character from the OEM code page
to the ANSI code page.
* (fhandler_console::write_normal): Translate output characters from the ANSI
code page to the OEM code page.
* syscalls.cc (_link): Use MultiByteToWideChar instead of OemToCharW.
2000-07-04 02:26:20 +00:00
Christopher Faylor 3b09c754da Revert errnoneous commit. 2000-07-03 20:16:23 +00:00
Christopher Faylor 8366e93be9 * exceptions.cc (stack_info::walk): Use method to find offset.
(handle_exceptions): Be more assertive in finding ebp for use under W2K.
Create a dummy stack frame for cases where program is dying and a stack dump is
being output.
(sig_handle): Fill out a GetThreadContext for use with a user-generated "core
dump".
2000-07-03 20:14:06 +00:00
Corinna Vinschen 4bedf498d6 * include/cygwin/socket.h: Remove SOCK_PACKET define since it's
not supported by Windows sockets.
2000-07-03 09:23:11 +00:00
Christopher Faylor b6cdb2c349 * dcrt0.cc (user32_init): Add primitive guard against concurrent attempts to
call this function.  Also add temporary debugging code to display a message if
the function is called multiple times.
(api32_init): Ditto.
2000-07-03 01:55:17 +00:00
Corinna Vinschen c8c609ff0a Replaced buggy ChangeLog entry 2000-07-02 16:42:15 +00:00
Corinna Vinschen 0c4d2abd99 * winsup.h: Define MAX_SID_LEN and new MAX_HOST_NAME.
* fork.cc (fork): Use above defines instead of numerical constants.
        * shared.cc (sec_user): Ditto.
        * shared.h (class pinfo): Ditto.
        * syscall.cc (seteuid): Ditto.
        * spawn.cc (_spawnve): Ditto. Eliminate conditional.
        (spawn_guts): Set child->uid = USHRT_MAX when user context will be
        changed in child process.
        * uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid
        to avoid reloading of /etc/passwd on process startup if ntsec is off.
        Use above defines instead of numerical constants.
        * security.cc: Move define for MAX_SID_LEN to winsup.h.
2000-07-02 10:17:44 +00:00
Christopher Faylor c570d680fb Add some comments. 2000-07-02 02:03:50 +00:00
Corinna Vinschen 760d376e34 * uinfo.cc (uinfo_init): Eliminate calls to read_etc_group()
and read_etc_passwd().
2000-07-02 00:00:17 +00:00
Corinna Vinschen ebbd4e8fb3 Changes by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* assert.cc (__assert): Reduce dependency on newlib.
        * exec.cc: Eliminate unnecessary inclusion of ctype.h.
        * glob.c: Ditto.
        * hinfo.cc: Ditto.
        * init.cc: Ditto.
        * strace.cc: Ditto.
        * tty.cc: Ditto.
        * grp.cc (parse_grp): Eliminate atoi.
        * passwd.cc (grab_int): Ditto.
        * grp.cc (getgroups): Eliminate str{n,}casecmp.
        * path.cc (get_raw_device_number): Ditto.
        * path.cc (sort_by_native_name): Ditto.
        * spawn.cc (iscmd): Ditto.
        * uinfo.cc (internal_getlogin): Ditto.
2000-07-01 17:30:35 +00:00
Christopher Faylor 51b2ec5d03 * binmode.c (cygwin_premain0): Fix erroneous clearing of bit.
* textmode.c (cygwin_premain0): Ditto.
2000-07-01 15:45:20 +00:00
Christopher Faylor 44cac41121 Remove asm labelling from _dll_crt0 since it seems to confuse different versions
of gcc differently.
2000-07-01 04:40:20 +00:00
Christopher Faylor 72f8054fad * dcrt0.cc (_dll_crt0): Renamed from dll_crt0 ().
* winsup.h: Accomodate above change.
* cygwin.din: Ditto.
* lib/cygwin_crt0.c: Ditto.
2000-07-01 04:26:45 +00:00
Christopher Faylor 8c6b7d8a15 * Makefile.in: Find getopt.c in cygwin/lib subdirectory. 2000-07-01 04:20:24 +00:00
Christopher Faylor e337fd40cb Forgot perthread.h. 2000-07-01 03:52:33 +00:00
Christopher Faylor 14a3bc2fa1 * Makefile.in: Use variables rather than configure constructs where
appropriate.
(LIBCOS): Find additional stub library stuff in their own subdirectory.
* dcrt0.cc: Convert user_data pointer to static __cygwin_user_data area.
(do_global_ctors): Check magic_bisquit for initialization.
(dll_crt0_1): First group of premain functions prior to fd initialization.  Run
second group before calling main.
(dll_crt0 ()): New function, called from new initialization code.
(dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on
initialization.
* debug.cc (thread_stub): Initialize bottom of stack with per-thread info.
* environ.cc (parse_thing): Use binmode global to control CYGWIN=binmode
behavior.
* fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode to
O_BINARY or O_TEXT to override disk mount settings.
* libcmain.cc: Move to lib subdirectory.
* libccrt0.cc: Ditto.
* dll_main.cc: Ditto.
* dll_entry.cc: Ditto.
* getopt.c: Ditto.
* thread.cc (thread_init_wrapper): Call ExitThread explicitly rather than
returning, as a preliminary step towards placing per thread info at the bottom
of the stack.
* winsup.h: Move per_process class to include/sys/cygwin.h.  Declare new
dll_crt0().
* include/cygwin/version.h: Bump API minor version.
* binmode.c: New file.
* textmode.c: Ditto.
* lib/_cygwin_crt0_common.cc: Ditto.
* lib/crt0.h: Ditto.
* lib/cygwin_attach_dll.c: Ditto.
* lib/cygwin_crt0.c: Ditto.
* lib/dll_entry.cc: Ditto.
* lib/dll_main.cc: Ditto.
* lib/getopt.c: Ditto.
* lib/libcmain.c: Ditto.
* lib/premain0.c: Ditto.
* lib/premain1.c: Ditto.
* lib/premain2.c: Ditto.
* lib/premain3.c: Ditto.
2000-07-01 03:51:55 +00:00
Corinna Vinschen b3cc0634b9 * syscalls.cc (seteuid): Initialize pi.token before calling
internal_getlogin().
        * uinfo.cc (internal_getlogin): Use impersonation token instead
        of process token in case of active impersonation. Add some comments.
        (uinfo_init): Initializing myself->token and myself->impersonated
        before calling internal_getlogin(). Add some comments.
2000-06-28 17:42:28 +00:00
Corinna Vinschen 666b9d7bb8 * include/winbase.h: Add stream ids BACKUP_OBJECT_ID,
BACKUP_REPARSE_DATA and BACKUP_SPARSE_BLOCK.
        Add file open flags FILE_FLAG_OPEN_REPARSE_POINT and
        FILE_FLAG_OPEN_NO_RECALL.
        * winioctl.h: Add device io control codes FSCTL_GET_REPARSE_POINT,
        FSCTL_SET_REPARSE_POINT and FSCTL_DELETE_REPARSE_POINT.
        * winnt.h: Add typedef for GUID.
        Add file attributes FILE_ATTRIBUTE_ENCRYPTED,
        FILE_ATTRIBUTE_SPARSE_FILE, FILE_ATTRIBUTE_REPARSE_POINT and
        FILE_ATTRIBUTE_NOT_CONTENT_INDEXED.
        Add volume attributes FILE_VOLUME_QUOTAS, FILE_SUPPORTS_SPARSE_FILES,
        FILE_SUPPORTS_REPARSE_POINTS, FILE_SUPPORTS_REMOTE_STORAGE,
        FILE_SUPPORTS_OBJECT_IDS and FILE_SUPPORTS_ENCRYPTION.
        Add several reparse point defines and typedefs for REPARSE_DATA_BUFFER,
        REPARSE_GUID_DATA_BUFFER and REPARSE_POINT_INFORMATION.
        * lib/psapi.def: New file.
2000-06-27 18:21:31 +00:00
Christopher Faylor 5b082caa62 * windows.cc (setitimer): Round up when < 1000 usecs. 2000-06-26 22:33:54 +00:00
Christopher Faylor 9cef3cc0d7 * hinfo.cc (hinfo::dup2): Eliminate compiler warning. 2000-06-26 21:36:52 +00:00
Christopher Faylor 5a449743bb * hinfo.cc (hinfo::dup2): Guard against out of bounds newfd. 2000-06-26 15:27:12 +00:00
Christopher Faylor 84a1af74a2 * grp.cc (read_etc_group): Open file in text mode.
* pwd.cc (read_etc_passwd): Ditto.
* shared.h: Bump PROC_MAGIC.
2000-06-25 03:48:10 +00:00
Christopher Faylor 749bdbe92a * cygcheck.cc (cygwin_info): New function. Scans DLL for Cygwin version info.
(dll_info): Add path parameter for checking "cygwin1.dll".
(track_down): Accomodate additional parameter for dll_info.
(ls): Ditto.
(dump_sys_info): Always print cygwin1.dll last.
2000-06-25 03:18:54 +00:00
Corinna Vinschen bb34ad9674 * fork.cc (fork): Fix error in copying SID pointer.
* spawn.cc (_spawnve): Ditto.
        * passwd.cc: Remove static from `passwd_in_memory_p'.
        (read_etc_passwd): Remove static.
        * uinfo.cc: Move global declaration of `read_etc_group' and
        `group_in_memory_p' into `uinfo_init'.
        (internal_getlogin): Try to get SID from current process first.
        (uinfo_init): Don't set uid and gid if `myself' has a valid SID.
        Only load /etc/passwd and /etc/group in that case.
2000-06-24 17:37:52 +00:00
Christopher Faylor 92b3b0a6ad * shared.cc (shared_info::initialize): Improve error message clarity.
* mkvers.sh: Eliminate debugging output.
2000-06-24 16:31:36 +00:00
Christopher Faylor 344a1924d9 * Makefile.in: Add dummy info targets. 2000-06-22 22:28:35 +00:00
Christopher Faylor d69257a1a4 * Makefile.in: Autogenerate cygwin.def when appropriate.
* include/sys/cygwin.h: Correct prototype.
2000-06-22 21:51:48 +00:00
Christopher Faylor d7cea2d3eb Revise previous include/sys/cygwin.h change. 2000-06-22 21:05:46 +00:00
Christopher Faylor f33acdb808 * include/sys/cygwin.h: Don't define parts of this file that rely on Windows
headers unless the Windows header was previously included.
2000-06-22 20:18:17 +00:00
Christopher Faylor 5af1047b41 Revert. 2000-06-22 19:48:10 +00:00
Christopher Faylor b867695801 Remove some files that were added prematurely. 2000-06-22 19:11:32 +00:00
Corinna Vinschen 98a3dc3bc5 * registry.cc (load_registry_hive): Use HKEY_USERS when checking
for existing user hive.
        Use MAX_PATH instead of numerical constant for array size.
        Use return code of RegLoadKeyA instead of GetLastError for error output.
2000-06-22 18:54:26 +00:00
Christopher Faylor 42030c97d7 * rpcdce.h: Protect OPTIONAL definition since it may be (legally) previously
defined.
* windef.h : Ditto.
2000-06-22 18:37:31 +00:00
Christopher Faylor 699dd00b3a * Makefile.in: Add new-libcygwin.a back to all_host target. 2000-06-22 18:28:16 +00:00
Christopher Faylor e282ff799f * Makefile.in: Add *.def to clean operation. 2000-06-21 18:33:19 +00:00
Christopher Faylor 159db33b11 * Makefile.in: Add *.exe to clean operation. 2000-06-21 17:20:47 +00:00
Christopher Faylor b2a2fdbaa7 Display what's going on. 2000-06-21 05:04:56 +00:00
Christopher Faylor 32454a4817 * mkvers.sh: Fix sed usage for older seds. 2000-06-21 05:03:36 +00:00
Christopher Faylor fb84fe4cbb * Makefile.in: Don't touch winver_stamp if mkvers.sh was unsuccessful. 2000-06-21 00:47:06 +00:00
Christopher Faylor 3ce7a5af5a * mkvers.sh: Fix problem with handling of CVS tags causing .rc syntax errors. 2000-06-20 21:42:25 +00:00
Christopher Faylor cfeb2c7d79 * Makefile.in: Change to build the DLL during a cross-compiler build. 2000-06-20 17:38:55 +00:00
Christopher Faylor fa2ba85814 * configure.in: Bow to necessity and build w32api before anything else.
* configure: Regenerate.
2000-06-20 17:37:22 +00:00
Christopher Faylor a7874ee305 * select.cc (socket_cleanup): Shutdown I/O on dummy sockets prior to closing
them.
2000-06-20 00:47:52 +00:00
Corinna Vinschen e219a2bdf0 * dcrt0.cc: Add load statements for `GetSidIdentifierAuthority'
and `RegLoadKeyA'.
        * registry.cc (get_registry_hive_path): New function.
        (load_registry_hive): Ditto.
        * security.cc (convert_sid_to_string_sid): New function.
        (get_ssid): Renamed to `convert_string_sid_to_sid'.
        (get_pw_sid): Call `convert_string_sid_to_sid' instead of `get_ssid'.
        (get_gr_sid): Ditto.
        (get_admin_sid): Ditto.
        (get_system_sid): Ditto.
        (get_creator_owner_sid): Ditto.
        (get_world_sid): Ditto.
        * shared.h: New prototypes for `get_registry_hive_path' and
        `load_registry_hive'.
        * spawn.cc (spawn_guts): Set child->psid to NULL to force calling
        `internal_getlogin' from child process in case of changing user context.
        Call `load_registry_hive' in case of changing user context.
        (_spawnve): Copy user infos only if user context remains the same.
        * uinfo.cc: Add load statement for `NetUserGetInfo'.
        Remove load statement for `NetGetDCName'.
        (internal_getlogin): Rewrite to speed up process startup
        and to correct user environment in case user context changes.
        (uinfo_init): Call internal_getlogin only if myself->psid is NULL,
        that is user context changes.
        * winsup.h: Add prototypes for `convert_sid_to_string_sid',
        `convert_string_sid_to_sid' and `get_pw_sid'.
2000-06-19 17:36:30 +00:00
Christopher Faylor 6d4186757b * fhandler.h (set_name): Don't use 'unix' as name since this is defined by gcc
now.
* fhandler.cc (set_name): Ditto.
2000-06-18 17:43:45 +00:00
Christopher Faylor ce4a7304b8 Add comment. 2000-06-18 01:53:10 +00:00
Christopher Faylor 606264878e Revert. 2000-06-18 01:50:07 +00:00
Christopher Faylor a50bf2842f * Makefile.in (subdirs): Eliminate for loop. 2000-06-18 01:49:23 +00:00
Christopher Faylor 4a7a5a717c * Makefile.in (subdirs): Previous change did not fix problem in broken shells. 2000-06-17 22:28:52 +00:00
Christopher Faylor 42867d69ae * winsup.h (isabspath): Don't report `C:foo' as an absolute path. 2000-06-17 22:05:19 +00:00
Christopher Faylor e94903eb0f * configure.in: Detect "cross-hosting" situation and set appropriate variables
in Makefile to avoid building excess stuff.
* configure: Regenerate.
* Makefile.in: Accomodate above change.
2000-06-17 17:54:05 +00:00
Corinna Vinschen e46892585a * pinfo.cc (pinfo_init): Revert previous patch. 2000-06-17 17:53:08 +00:00
Christopher Faylor 2e6d8441fa * configure.in: Detect "cross-hosting" situation and add a subset of
directories to SUBDIRS.
* configure: Regenerate.
2000-06-17 17:51:31 +00:00
Christopher Faylor 0fa0f12294 Add additional info. 2000-06-17 17:50:04 +00:00
Christopher Faylor 63d4033c06 * Makefile.in: Avoid installing dll if we're cross building and the cross-host
system isn't a Windows system.
2000-06-17 17:48:36 +00:00
Corinna Vinschen 9bbb81a443 * pinfo.cc (pinfo_init): Add missing initializers.
* uinfo.cc (internal_getlogin): Request domain infos only
        when ntsec is ON.
2000-06-17 11:34:33 +00:00
Christopher Faylor e962f3c5f7 * Makefile.in: Just use library files from this tree when building cygrun.exe.
* path.cc (chdir): Don't set cache to offending chdir.  Change comment to
reflect current reality.
2000-06-16 23:39:02 +00:00
Corinna Vinschen 64b3062937 * cygwin.din: Define symbols for `cygwin_logon_user' and
`cygwin_set_impersonation_token'.
        * dcrt0.cc (dll_crt0_1): Eliminate superfluous conditional
        statements.
        Add load statements for `ImpersonateLoggedOnUser', `LogonUserA'
        and `RevertToSelf'.
        * fork.cc (fork): Care for correct impersonation of parent
        and child process.
        * security.cc (cygwin_set_impersonation_token): New function.
        (cygwin_logon_user): Ditto.
        shared.h (class pinfo): New members `orig_uid', `orig_gid',
        `real_uid' nad `real_gid'.
        spawn.cc (spawn_guts): Care for impersonation when starting
        child process in a different user context.
        * syscalls.cc (setgid): Call `setegid' now. Set real_gid.
        (setuid): Call `seteuid' now. Set real_uid.
        (seteuid): Functionality moved from setuid to here. Care for
        correct impersonation.
        (setegid): Functionality moved from setgid to here.
        * uinfo.cc (uinfo_init): Initialization of additional pinfo
        members.
        (getuid): Return real uid.
        (getgid): Return real gid.
        (geteuid): Return effective uid.
        (getegid): Return effective gid.
        include/sys/cygwin.h: Add prototypes for `cygwin_logon_user' and
        `cygwin_set_impersonation_token'.
        include/cygwin/version.h: Bumb API minor version to 22.
2000-06-16 19:36:07 +00:00
Christopher Faylor 3875d9e652 * path.cc (chdir): Don't set cache to offending chdir. Change comment to
reflect current reality.
2000-06-15 22:14:14 +00:00
Christopher Faylor 26cfd048e3 Fix typo. 2000-06-15 20:52:57 +00:00
Christopher Faylor 54ee424711 * path.cc (normalize_posix_path): Convert path to POSIX if it seems to be a
Windows path.
2000-06-15 19:44:50 +00:00
Christopher Faylor 48b1381da1 * environ.cc (conv_envvars): Detect and convert all environment variables used
by libiberty's choose-temp.c
2000-06-15 03:50:03 +00:00
David Starks-Browning fe905b6259 Rewrote "Adding or updating packages",
plus a few other minor changes.
2000-06-14 20:56:56 +00:00
Christopher Faylor df031c83f4 * include/winnt.h: Add some missing defines related to locale identifiers.
Translate values of LANG_* and SUBLANG_* into hexadecimal.
2000-06-14 20:33:31 +00:00
David Starks-Browning a9ba336498 Tidied up formatting a bit.
New entries:
	How do I convert between Windows and UNIX paths?
	Why are compiled executables so huge?!?
2000-06-14 16:34:57 +00:00
David Starks-Browning 3092135d8c Minor changes, also add note about deleting temp dir after setup. 2000-06-14 16:08:03 +00:00
David Starks-Browning 1edefdeb85 Fix simple @-error. 2000-06-13 19:52:51 +00:00
Christopher Faylor 024afd70d6 * path.cc (mount_info::add_item): The previous patch can't handle the case of
overwriting a mount entry.
2000-06-13 16:48:37 +00:00
David Starks-Browning fe871355b5 New entry: "How should I set my PATH?" 2000-06-13 16:30:58 +00:00
David Starks-Browning a15ada7034 Removed a couple of "not yet updated" disclaimers.
New entry: "info error "dir: No such file or directory""
2000-06-13 16:12:44 +00:00
David Starks-Browning 20fe2a85bc "Installation using the setup.exe program": minor note not to mess with
default mounts.
"Adding or updating packages": full instructions now, not just links to ml.
New:
subsection "Problems running setup.exe"
subsubsection "Error message: "Unable to retrieve the list of cygwin mirrors...""
subsubsection "System hangs when unpacking tar archives"
2000-06-13 14:58:35 +00:00
Christopher Faylor 00660f0110 * thread.h: Shorten "current_directory" variables to "cwd_*" throughout.
* path.cc: Ditto.
(normalize_posix_path): Add some extra debugging info.
(chdir): Ditto.  Store chdir'ed posix and MS-DOS directory names in "cache"
here rather than trying to derive them later.
2000-06-13 04:40:36 +00:00
David Starks-Browning a50b13da06 Merge "Installation and Setup" and "Using Cygwin Releases" to simply
"Using Cygwin".  Significant update to "How can I access other drives?".
2000-06-12 21:46:19 +00:00
Corinna Vinschen 7f4b6412be * fhandler_random.cc (read): Call CryptAquireContext with
CRYPT_VERIFYCONTEXT.
2000-06-11 14:01:18 +00:00
Corinna Vinschen af76c2eed1 * path.cc (path_conv::check): Erase two lines checked in
by mistake.
2000-06-08 20:51:11 +00:00
Corinna Vinschen b8a7c23a2a * fhandler.cc (fhandler_disk_file::open): Check for directory
to set O_DIROPEN on directories anyway.
2000-06-08 13:56:28 +00:00
Corinna Vinschen 95bdb4966f path.cc (mount_info::init): Eliminate the mount_slash feature.
(mount_slash): Eliminated.
        (mount_info::read_mounts): Eliminate looking up existing entries. The
        loop for deleting cygpath entries is done only when such entries exist.
        (mount_info::from_registry): Eliminate sorting.
        (mount_info::add_item): Call add_reg_mount if necessary. Check nmounts
        more precisely. Use strcasematch in looking up existing entries.
        (mount_info::del_item): Call del_reg_mount if necessary. Use
        strcasematch. Use memmove instead of memcpy.
        (mount_info::import_v1_registry): Everything is done in this method.
        (mount_info::to_registry): Eliminated.
        (mount_info::from_v1_registry): Eliminated.
        (cygwin_umount): Simply call del_item.
        shared.h: Modify the declaration of add_item and del_item. Remove the
        declaration of from_v1_registry.
2000-06-08 13:24:52 +00:00
Corinna Vinschen 9500a3db90 mount.cc (error): New function to report an error and exit.
umount.cc (error): Ditto.
        (remove_all_automounts): Check return status of cygwin_umount.
        (remove_all_user_mounts): Ditto.
        (remove_all_system_mounts): Ditto.
2000-06-08 12:54:12 +00:00
Christopher Faylor fe73870ce5 * include/cygwin/version.h: Bump DLL minor version number to 3. 2000-06-08 03:58:51 +00:00
DJ Delorie 48b8705360 * cygwin.din: add cygwin_dll_init
* dcrt0.cc (cygwin_dll_init): new
(dll_crt0_1): short circuit if manually loaded
* path.cc (mount_info::init): don't init if manually loaded
2000-06-08 00:55:27 +00:00
Corinna Vinschen a93c19ddcf * include/netinet/in_systm.h: New file.
* include/cygwin/in_systm.h: Ditto.
2000-06-07 11:48:03 +00:00
David Starks-Browning c533072f51 Major update to "Where can I get more information?" section. Now includes:
- Posting guidelines
	- Pointers to User's Guide, API Reference, USENIX paper
	- Pointer to alternate searchable mail archive (www.delorie.com)
	- Addresses for commercial & CD-ROM inquiries
2000-06-07 10:38:47 +00:00
David Starks-Browning 3e4ea2bf5e minor typo correction: GNU not Gnu 2000-06-07 10:28:36 +00:00
DJ Delorie b6e259b12f * mount.cc: add stdlib.h for exit
* umount.cc: ditto
* strace.cc: add #define for alloca
2000-06-05 18:43:54 +00:00
David Starks-Browning 1e04e08737 "Installation Instructions" for FAQ, first update for current net release. 2000-06-02 17:17:53 +00:00
Christopher Faylor 51859b536e * exceptions.cc: Remove unneeded include.
* dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function.
* init.cc: Ditto.
* uinfo.cc: Ditto.
2000-06-01 05:57:54 +00:00
Christopher Faylor b55cc84266 * autoload.h: Put each info block in its own dummy static function. 2000-06-01 05:41:21 +00:00
DJ Delorie fcc4976d26 * include/cygwin/version.h: use decimal, NOT octal 2000-05-31 18:04:00 +00:00
David Starks-Browning 2f32d93f81 Remove broken targets readme.info, faq.info
(at least until we know what to do with them)
2000-05-31 15:19:47 +00:00
Corinna Vinschen c9e2a0ff55 * fhandler.cc (fhandler_disk_file::open): Check for executable
even if ntsec is on if filesystem doesn't support ACLs.
2000-05-31 14:43:23 +00:00
Corinna Vinschen c719f9429a * dcrt0.cc: Use LoadDLLfuncEx for loading Crypto API functions
with parameter `notimp' set to 1.
2000-05-31 12:32:59 +00:00
Christopher Faylor ca8a0f8fb2 * path.cc (mount_info::conv_to_win32_path): Previous patch was too aggressive
in adding a trailing slash.
2000-05-30 21:24:50 +00:00
Christopher Faylor ec50441f4a Needed for previous changes. 2000-05-30 13:45:20 +00:00
Christopher Faylor 75858e8a03 * Makefile.in: Remove libadvapi32.a.
* autoload.h: Add additional field to autoload block for handling unimplemented
functions.
(LoadDLLfuncEx): New function which accepts additional parameter for
controlling unimplemented function behavior.
(LoadDLLfunc): Use LoadDLLfuncEx.
* dcrt0.cc: Use new arguments for LoadDLLfunc.  Add advapi32 routines.
(noload): Rewrite in assembler.  Handle new unimplemented function type.
* exceptions.cc: Eliminate another vestige of StackWalk stuff.
* net.cc: Use new arguments for LoadDLLfunc.
* uinfo.cc: Ditto.

* config.h.in: Remove obsolete define.
* path.h (isdrive): New macro.
* dcrt0.cc (globify): Use new macro to determine if a string refers to an
MS-DOS drive.
* environ.cc (winenv): Ditto.
* spawn.cc (find_exec): Ditto.
* path.cc (get_raw_device_number): Ditto.
(mount_info::conv_to_posix_path): Ditto.
(chdir): Ditto.
(cygwin_posix_path_list_p): Ditto.
(cygwin_split_path): Ditto.
(path_conv::check): Move tmp_buf to beginning of function since it can be used
earlier in the loop.  Use tmp_buf rather than 'root' to hold root information.
(mount_info::conv_to_win32_path): Add trailing slash to end of mount path when
it translates to a drive.  Add defensive code to avoid writing beyond the end
of 'dst'.
2000-05-30 00:38:51 +00:00
Corinna Vinschen cbaa7e69b7 * fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in
call to CryptAcquireContext() to serve users that did not
        log in interactively.
2000-05-27 14:00:20 +00:00
Corinna Vinschen 3a26e0cbed * include/wincrypt.h: Add missing CRYPT_MACHINE_KEYSET define. 2000-05-27 13:59:33 +00:00
Corinna Vinschen 92918f6e4f * errno.cc (errmap): Map ERROR_BAD_NET_NAME to errno ENOSHARE. 2000-05-26 09:17:08 +00:00
Christopher Faylor e1e61b9ae5 * sigproc.h (sigframe::set): Accept a default frame pointer.
* sigproc.cc (sig_send): Use passed in frame pointer, if appropriate.
2000-05-26 06:24:58 +00:00
Christopher Faylor 6880ecefaa * configure.in: Don't assume that cinstall directory exists. 2000-05-25 22:39:48 +00:00