Commit Graph

1245 Commits

Author SHA1 Message Date
Christopher Faylor ac5561f2ed * path.cc (normalize_posix_path): Revert .. check removed by previous changes.
* cygheap.h: Temporarily declare path_prefix_p here.
2001-06-04 01:28:09 +00:00
Corinna Vinschen 9f13167f77 * net.cc (wsock_event): Add destructor. 2001-06-03 22:18:19 +00:00
Christopher Faylor aa7a61121e * dlfcn.cc (dlclose): Do not call FreeLibrary if the symbol to close was
obtained by dlopen(NULL,...).
2001-06-03 14:13:12 +00:00
Christopher Faylor 77d130214c * syscalls.cc (sleep): Try to be a little more accomodating of signal arrival.
Ensure that the signal handler is called.
2001-06-03 03:13:14 +00:00
Christopher Faylor 7ceb1cac3a * cygheap.cc (cygheap_root::cygheap_rot): Remove constructor.
(cygheap_root::~cygheap_root): Remove destructor.
(cygheap_root::operator =): Remove.
(cygheap_root::set): New method.
* cygheap.h (cygheap_root): Reflect above changes.  Store root info in
mount-like structure.
(cygheap_root:posix_ok): New method.
(cygheap_root::ischroot_native): Ditto.
(cygheap_root::unchroot): Ditto.
(cygheap_root::exists): Ditto.
(cygheap_root::posix_length): Ditto.
(cygheap_root::posix_path): Ditto.
(cygheap_root::native_length): Ditto.
(cygheap_root::native_path): Ditto.
* dir.cc (opendir): Remove special chroot test.
* path.cc (path_prefix_p): Remove front end.
(normalize_posix_path): Reorganize chroot tests to accomodate new convention of
allowing paths using posix chroot prefix.
(path_conv::check): Pass a "already ran normalize" option to
conv_to_win32_path.  Return if there is an error from this function.
(mount_info::conv_to_win32_path): Add extra argument.  Don't call
normalize_posix_path if caller has already done so.  Substitute chroot setting,
if any, for root translation.  Add chroot checking to final output step.
* shared_info (mount_info): Accomodate additional argument to
conv_to_win32_path.
* syscalls.cc (chroot): Store both normalized posix path and native path in
chroot.
2001-06-03 02:31:16 +00:00
Christopher Faylor bb8251474c * path.cc (chdir): Really make sure that isspace gets only an unsigned char. 2001-06-01 14:57:52 +00:00
Corinna Vinschen bc28fe9599 * syscalls.cc (_rename): Handle the case that `foo' is renamed to
`bar' while `bar.lnk' is an existing shortcut-symlink.
2001-06-01 11:53:20 +00:00
Christopher Faylor 9e3b6f5411 revert. 2001-06-01 01:45:53 +00:00
Christopher Faylor 1de197515e * fhandler.cc (fhandler_disk_file::fstat): Avoid clearing S_IFMT bits since
we've already pre-cleared everything anyway.
2001-05-31 19:58:59 +00:00
Christopher Faylor fd047fb9d5 Maintain 80 col line length. 2001-05-31 17:35:32 +00:00
Christopher Faylor ecfb6f11bc * path.cc (chdir): Always send unsigned chars to isspace since newlib's isspace
doesn't deal well with "negative" chars.
* fhandler.cc (fhandler_disk_file::open): Propagate remote status of file
garnered from path_conv.  Move #! checking to fstat.
(fhandler_disk_file::fstat): Reorganize st_mode setting to eliminate
duplication.  Move check for #! here from fhandler::open.
* fhandler.h (fhandler_base::isremote): New method.
(fhandler_base::set_isremote): Ditto.
(fhandler_base::set_execable_p): Also record "don't care if executable state".
(fhandler_base::dont_care_if_execable): New method.
* path.cc (path_conv::check): Clear new flags.  Appropriately set vol_flags,
drive_type, and is_remote_drive.
* path.h: Add new flags and methods for manipulating them.
* syscalls.cc (_unlink): Use isremote() to determine if a path is remote rather
than calling GetDriveType.
(stat_worker): Ditto.
* security.cc (get_file_attribute): Or attribute with result of NTReadEA to be
consistent with get_nt_attribute.
2001-05-31 05:25:46 +00:00
David Starks-Browning b70261ef60 New entry "How do I print under Cygwin?" 2001-05-30 09:42:36 +00:00
David Starks-Browning 389c930097 New entry "Where is Objective C?" 2001-05-30 09:26:59 +00:00
David Starks-Browning 90c0221f27 New entry "How do I contribute to Cygwin?" 2001-05-30 09:17:59 +00:00
Christopher Faylor bd77a6f48d * Makefile.in: Tweak to attempt to accomodate older texi2html. 2001-05-30 01:30:38 +00:00
Corinna Vinschen b2939a814c * sec_helper.cc (cygsid::getfrompw): Change parameter to `const'.
(cygsid::getfromgr): Ditto.
        * security.cc: Use `sys_mbstowcs' and `sys_wcstombs' throughout.
        (extract_nt_dom_user): Try to get user and domain from SID in
        pw->pw_gecos first.
        * security.h (class cygsid): Change parameter of getfrompw() and
        getfromgr() to `const'.
        * uinfo.cc (internal_getlogin): Change order for evaluating user
        information in winNT case. Drop usage of NetWkstaUserGetInfo().
2001-05-29 20:43:40 +00:00
Christopher Faylor 98ae4ae7d5 * Makefile.in: Accomodate newer versions of docbook and openjade. 2001-05-29 20:25:21 +00:00
Christopher Faylor 4c172dcc9d Avoid NAME too long error. 2001-05-29 20:24:51 +00:00
David Starks-Browning 84f6caacfb Expand entry "why doesn't my script work" 2001-05-29 18:11:29 +00:00
David Starks-Browning 5b71b48d0c Update entry about PATH, now done in /etc/profile not cygwin.bat.
Remove entry "Where can I find 'which'" since it's included now.
2001-05-29 15:19:25 +00:00
David Starks-Browning 1d99023da5 Add pointer to google for searching list archives. 2001-05-29 15:00:42 +00:00
David Starks-Browning d3135ef378 Remove distinction between latest and contrib in list of packages. 2001-05-29 14:42:07 +00:00
Corinna Vinschen 792ca1c2fe * shortcut.c (check_shortcut): Treat only Cygwin shortcuts as symlinks. 2001-05-29 08:04:55 +00:00
Christopher Faylor b9ce814089 * path.cc (symlink_info::check): Correctly set 'ext_tacked_on'. Use this to
determine if user specified 'foo.lnk' explicitly.  Reorganize slightly to get
rid of one goto.
2001-05-25 15:07:46 +00:00
Corinna Vinschen fdc5ebe9bf * path.cc (symlink_info::check): Add a check to return correctly
if incoming `*.lnk' file is not a symlink.
2001-05-25 08:31:57 +00:00
Christopher Faylor 86f41a0954 * path.cc (slash_drive_prefix_p): Remove.
(mount_info::slash_drive_to_win32_path): Ditto.
(mount_info::conv_to_win32_path): Remove slash drive prefix check.
(mount_info::add_item): Ditto.
(mount_info::del_item): Ditto.
* shared_info.h (mount_info): Remove slash_drive_to_win32_path declaration.
2001-05-25 03:13:14 +00:00
Christopher Faylor 52cd2f88cd * exceptions.cc (handle_exceptions): Bump repeat count for debugging kick out.
* fhandler.h (fhandler_dev_dsp): Add a fixup_after_exec.
* fhandler_dsp.cc (class Audio): Add TOT_BLOCK_SIZE to enum.
(operator new): New.
(bigwavebuffer): Declare using TOT_BLOCK_SIZE to avoid buffer overruns.
(Audio::Audio): Optimize slightly.
(fhandler_dev_dsp::open): Allocate s_audio using static buffer.
(fhandler_dev_dsp::fixup_after_exec): New function.  Ditto.
2001-05-24 05:20:17 +00:00
Corinna Vinschen 7b9a10a60c * syscalls.cc (seteuid): Restrict overriding external provided
user tokens to ntsec. Don't test external tokens for primary
        group to evaluate if it should be overridden. Restrict creating
        internal tokens to ntsec.
2001-05-23 15:49:22 +00:00
Corinna Vinschen 07d08883d8 * syscalls.cc (chown_worker): Don't check for ENOSYS. 2001-05-23 08:12:49 +00:00
Christopher Faylor 1d0f9ded2e * lib/mapi32.def: Add MAPISendMail. 2001-05-22 23:03:25 +00:00
Earnie Boyd 1f6e71f348 * include/w32api.h: Update version.
* Makefile.in: Ditto.
2001-05-22 20:51:47 +00:00
Christopher Faylor 43a190430b * signal.cc (sleep): Protect with sigframe. 2001-05-22 16:22:36 +00:00
Corinna Vinschen e7e956a7db * security.cc (get_file_attribute): Don't set errno. 2001-05-22 15:59:37 +00:00
Christopher Faylor 7cef8b61c4 * configure.in: Allow --enable-newvfork to turn NEWVFORK on and off.
* configure: Regenerate.
2001-05-21 19:13:48 +00:00
Christopher Faylor f01fb5e796 * include/cygwin/version.h: Bump minor version number. 2001-05-21 15:50:36 +00:00
Corinna Vinschen b62456f42f * winsup.api/mmaptest01.c: Add log output.
* winsup.api/mmaptest02.c: Write log output to stdout.
        * winsup.api/mmaptest03.c: Ditto.
2001-05-21 09:03:38 +00:00
Christopher Faylor 1b72f36e89 * fhandler_dsp.cc: Reformat to GNU standards.
(s_audio): Change to a pointer throughout.
(fhandler_dev_dsp::open): Initialize s_audio, if required.
2001-05-20 17:31:06 +00:00
Corinna Vinschen 1fcc912f13 * autoload.cc: Add load statements for `LookupAccountNameW',
`LsaClose', `LsaEnumerateAccountRights', `LsaFreeMemory',
        `LsaOpenPolicy', `LsaQueryInformationPolicy', `NetLocalGroupEnum',
        `NetLocalGroupGetMembers', `NetServerEnum', `NetUserGetGroups' and
        `NtCreateToken'.
        * ntdll.h: Add declaration for `NtCreateToken'.
        * sec_helper.cc: Add `well_known_local_sid', `well_known_dialup_sid',
        `well_known_network_sid', `well_known_batch_sid',
        `well_known_interactive_sid', `well_known_service_sid' and
        `well_known_authenticated_users_sid'.
        (cygsid::string): Define as const method.
        (cygsid::get_sid): Set psid to NO_SID on error.
        (cygsid::getfromstr): Ditto.
        (cygsid::getfrompw): Simplify.
        (cygsid::getfromgr): Check for gr == NULL.
        (legal_sid_type): Move to security.h.
        (set_process_privilege): Return -1 on error, otherwise 0 or 1 related
        to previous privilege setting.
        * security.cc (extract_nt_dom_user): Remove `static'.
        (lsa2wchar): New function.
        (open_local_policy): Ditto.
        (close_local_policy): Ditto.
        (get_lsa_srv_inf): Ditto.
        (get_logon_server): Ditto.
        (get_logon_server_and_user_domain): Ditto.
        (get_user_groups): Ditto.
        (is_group_member): Ditto.
        (get_user_local_groups): Ditto.
        (sid_in_token_groups): Ditto.
        (get_user_primary_group): Ditto.
        (get_group_sidlist): Ditto.
        (get_system_priv_list): Ditto.
        (get_priv_list): Ditto.
        (get_dacl): Ditto.
        (create_token): Ditto.
        (subauth): Return immediately if SE_TCB_NAME can't be assigned.
        Change all return statements in case of error to jumps to `out'
        label. Add `out' label to support cleanup.
        * security.h: Add extern declarations for `well_known_local_sid',
        `well_known_dialup_sid', `well_known_network_sid',
        `well_known_batch_sid', `well_known_interactive_sid',
        `well_known_service_sid' and `well_known_authenticated_users_sid'.
        Add extern declarations for functions `create_token',
        `extract_nt_dom_user' and `get_logon_server_and_user_domain'.
        (class cygsid): Add method `assign'. Change operator= to call new
        `assign' method. Add `debug_print' method.
        (class cygsidlist): New class.
        (legal_sid_type): Moved from sec_helper.cc to here.
        * spawn.cc (spawn_guts) Revert reversion of previous patch.
        Call `RevertToSelf' and `ImpersonateLoggedOnUser' instead of `seteuid'
        again.
        * syscalls.cc (seteuid): Rearranged. Call `create_token' now when
        needed. Call `subauth' if `create_token' fails. Try setting token
        owner and primary group only if token was not explicitely created
        by `create_token'.
        * uinfo.cc (internal_getlogin): Try harder to generate correct user
        information. Especially don't trust return value of `GetUserName'.
2001-05-20 08:10:47 +00:00
Christopher Faylor df7cd7fb0c * Makefile.in: Use 'rm -f' when cleaning. 2001-05-20 04:25:02 +00:00
Christopher Faylor 975d20834f * fork.cc (fork_parent): Move atforkprepare call here.
(fork): From here.
2001-05-20 01:19:20 +00:00
Corinna Vinschen 69fb3121ce * autoload.cc: Add missing load statement for `CancelIo'. 2001-05-19 16:36:58 +00:00
Christopher Faylor 87f0d5ad99 * grp.cc (read_etc_group): Don't copy mutex on fork.
* pwd.cc (read_etc_passwd): Ditto.
* autoload.cc (LoadDLLfuncEx): Use LoadDLLprime to initialize DLL specific
area.
2001-05-19 05:29:00 +00:00
Corinna Vinschen 0260054a8c * net.cc (wsock_event::wait): Explicitely cancel IO when a signal
arrived to avoid data loss. Fallback to blocking IO when canceling
        fails.
2001-05-18 08:33:33 +00:00
Corinna Vinschen f6b52c79f5 * include/winnt.h: Define SE_GROUP_LOGON_ID as unsigned to avoid
compiler warnings.
2001-05-17 21:13:10 +00:00
Corinna Vinschen a69eb9099b * include/ntdef.h: Protect definition of OBJECT_ATTRIBUTES against
previous definition in include/ntsecapi.h.
        * include/ntsecapi.h: Vice versa.
2001-05-17 15:16:37 +00:00
Corinna Vinschen 4293884185 * security.cc (cygwin_set_impersonation_token): Never destroy
previous token object.
        (subauth): Create token source with well defined identifier.
2001-05-17 13:31:45 +00:00
Corinna Vinschen 990577f0bd Revert accidentally checked in ChangeLog. 2001-05-17 13:28:32 +00:00
Corinna Vinschen f62a57f574 * cygsuba.c: Create token source with well defined identifier. 2001-05-17 13:26:15 +00:00
Corinna Vinschen 554504edd2 Add missing ChangeLog entry. 2001-05-17 08:23:47 +00:00
Corinna Vinschen 1cec72414b * uinfo.cc (uinfo_init): Just set user token to INVALID_HANDLE_VALUE.
Token value is already invalid at that point.
2001-05-16 21:53:18 +00:00
Corinna Vinschen 3065afdb13 * net.cc (errmap): Add missing mapping from WSAEINTR to EINTR. 2001-05-16 19:40:45 +00:00
Corinna Vinschen 631af2e6a3 * include/winnt.h: Add defines for group attributes.
Add define for SYSTEM_LUID.
        Add missing types `PTOKEN_DEFAULT_DACL', `PTOKEN_OWNER' and
        `PTOKEN_PRIMARY_GROUP'.
2001-05-16 16:01:45 +00:00
Corinna Vinschen 486212579e * sec_helper.cc (legal_sid_type): Fix conditional. Change to
inline function.
2001-05-16 07:25:31 +00:00
Christopher Faylor d61b1993b3 * autoload.h: Eliminate.
* autoload.cc: Pull in autoload.h.  Eliminate many macros.  Rewrite to avoid
necessity of initialization routines.  Just use a standard one.
(wsock_init): New function.  Moved from net.cc.
* net.cc (wsock_init): Move to autoload.cc.
(wsadata): Make global.
* dtable.cc (dtable::build_fhandler): Use more reliable method for checking if
net stuff has been loaded.
2001-05-16 05:07:51 +00:00
Corinna Vinschen 2b0a111fcf * fork.cc (fork): Eliminate superfluous call to getuid().
* security.h: New define `NO_SID'. Remove declarations of functions
        moved to methods into class cygsid.
        (class cygsid): Declare new methods `getfromstr', `get_sid',
        `getfrompw', `getfromgr', `get_rid', `get_uid', `get_gid', `string'
        and new constructors and operators =, == and !=.
        Declare new global cygsids `well_known_XXX_sid' substituting the
        corresponding `get_XXX_sid' functions. Remove declarations of
        these functions.
        * sec_helper.cc (well_known_admin_sid): New global variable.
        (well_known_system_sid): Ditto
        (well_known_creator_owner_sid): Ditto
        (well_known_world_sid): Ditto
        (cygsid::string): New method, substituting `convert_sid_to_string_sid'.
        (cygsid::get_sid): New method, substituting `get_sid'.
        (cygsid::getfromstr): New method, substituting
        `convert_string_sid_to_sid'.
        (cygsid::getfrompw): New method, substituting `get_pw_sid'.
        (cygsid::getfromgr): New method, substituting `get_gr_sid'.
        (cygsid::get_id): New method, substituting `get_id_from_sid'.
        (get_admin_sid): Eliminated.
        (get_system_sid): Ditto.
        (get_creator_owner_sid): Ditto.
        (get_world_sid): Ditto.
        * grp.cc: Use new cygsid methods and well known sids throughout.
        * registry.cc: Ditto.
        * sec_acl.cc: Ditto.
        * security.cc: Ditto.
        * shared.cc: Ditto.
        * syscalls.cc (seteuid): Ditto. Eliminate redundant conditional.
        * uinfo.cc (internal_getlogin): Ditto.
        * spawn.cc (spawn_guts) Revert previous patch.
2001-05-15 19:23:31 +00:00
Corinna Vinschen c7ded13728 * winsup.api/winsup.exp: Force linking all tests against binmode.o. 2001-05-15 10:03:01 +00:00
Corinna Vinschen de81c0465d * fhandler_socket.cc (fhandler_socket::ioctl): Convert s_addr
field to host byte order before comparing with INADDR_LOOPBACK.
2001-05-15 08:42:15 +00:00
Corinna Vinschen a2cdb048f6 * autoload.cc: Add autoload statements for ws2_32 functions
`WSACloseEvent', `WSACreateEvent', `WSAGetOverlappedResult',
        `WSARecv', `WSARecvFrom', `WSASend', `WSASendTo' and `WSASetEvent',
        `WSAWaitForMultipleEvents'.
        * net.cc: Define wsock_evt.
        (wsock_event): New class.
        (cygwin_sendto): Use overlapped socket io if available.
        (cygwin_recvfrom): Ditto.
        (cygwin_recv): Ditto.
        (cygwin_send): Ditto.
        * security.cc (subauth): Set Win32 error to 0 to safely ask for the
        error code of dynamically loaded function `LsaRegisterLogonProcess'.
2001-05-15 08:15:54 +00:00
Christopher Faylor f162ad82fc * Makefile.common: Change method for finding current directory. 2001-05-15 05:11:55 +00:00
Christopher Faylor 7ede23a128 * errno.cc (_sys_errlist): Add missing commas. 2001-05-14 19:39:57 +00:00
Corinna Vinschen 5aac6665c7 * security.cc (subauth): Check if Secur32.dll could be loaded. 2001-05-14 14:14:19 +00:00
Christopher Faylor df7320e1ba * path.cc (path_conv::check): Revert allow_ntsec check so that volume info is
always retrieved and isdisk setting is properly set.
2001-05-14 02:52:12 +00:00
Christopher Faylor fb1a9f35e1 Fix formatting. 2001-05-14 02:49:56 +00:00
Christopher Faylor 49a8c92ca3 * fhandler_tty.cc (fhandler_tty_common::dup): Preserve O_NOCTTY when duping a
filehandle.
2001-05-13 18:05:52 +00:00
Corinna Vinschen cbedbdd029 * dir.cc (rmdir): Rearrange slightly to allow removing directories
even when R/O attribute is set.
2001-05-12 16:24:05 +00:00
Christopher Faylor c3a245f5bf * external.cc (fillout_pinfo): Use correct pids.
* path.cc (mount_info::conv_to_win32_path): Correct test for whether to include
a slash.
2001-05-11 21:01:44 +00:00
Christopher Faylor 5bba0cb5a3 * exceptions.cc (handle_exceptions): Don't print message when executing from a
cygwin program.
2001-05-11 05:11:12 +00:00
Christopher Faylor 723190cf71 Christopher Faylor <cgf@redhat.com>
* environ.cc (winenv): Always add SYSTEMDRIVE and SYSYEMROOT to win32-style
environment if they don't already exist.
2001-05-11 03:27:22 +00:00
Christopher Faylor ddf72c8f76 remove erroneous header. 2001-05-09 20:22:35 +00:00
Christopher Faylor cedb00be89 * path.cc (mount_info::conv_to_win32_path): Treat UNC paths the same as paths
including `:' or `\'.
2001-05-09 18:59:10 +00:00
Christopher Faylor cd94b71c1b * fhandler.h (fhandler_termios::echo_erase): Declare new method.
* fhandler_termios.cc (fhandler_termios::echo_erase): New method for echoing
erase characters.
(fhandler_termios::line_edit): Check the echo flag before echoing control
characters (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>).
2001-05-09 18:53:55 +00:00
Christopher Faylor 00b59ce9c9 * include/pthread.h: Remove C++ comment. 2001-05-09 14:45:47 +00:00
Christopher Faylor 792011508a * cygheap.cc (_cfree): Add regparm attribute.
(_crealloc): Ditto.
* dcrt0.cc (dll_crt0_1): Default to always checking for executable for now.
* dtable.cc (dtable::not_open): Move method.
* dtable.h (dtable): Here.
* exceptions.cc (ctrl_c_handler): Don't expect process group leader to handle a
signal if it doesn't exist.
* fhandler.h (fhandler_base): Make openflags protected.
* localtime.c (tzsetwall): Check for __CYGWIN__ as well as __WIN32__.
* path.cc (path_conv::check): Add some comments.  Change strcat to assignment.
* lib/_cygwin_S_IEXEC.cc (_cygwin_bob__): Eliminate.
* fhandler_tty.cc (fhandler_console::dup): Set controlling terminal if
necessary.
* fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
2001-05-08 15:16:49 +00:00
Christopher Faylor ef8b659086 * include/sys/file.h: Revert special X_OK usage. Just make it a constant. 2001-05-08 01:36:50 +00:00
Robert Collins 68ebd3f6e2 Sun May 6 17:05:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.h (pthread_cond): New element cond_access to allow atomic broadcasts.
	* thread.cc (pthread_cond::pthread_cond): Initialise cond_access.
	(pthread_cond::~pthread_cond): Destroy cond_access.
	(pthread_cond::Broadcast): Use cond_access.
	(pthread_cond::Signal): Use cond_access.
	(pthread_cond_wait): Use cond_access.
	(pthread_cond_timedwait): Use cond_access.
2001-05-06 22:23:43 +00:00
Christopher Faylor 2bfb966544 * string.h (cygwin_strchr): Make 'static inline' so that things will still work
when optimized.
2001-05-06 16:00:23 +00:00
Christopher Faylor 11ba5ef4d1 * exceptions.cc (handle_exceptions): Vastly increase test for exception loop
guard variable.
2001-05-05 05:07:20 +00:00
Christopher Faylor dbc0c5fb59 * configure.in: Fix typo.
* configure: Regenerate.
2001-05-05 04:18:16 +00:00
Christopher Faylor f598d941a8 * exceptions.cc (stack_info): Add some controls.
(stack_info::init): Add extra arguments to control method of initialization..
If we have a known good frame, set things up so that this frame is not skipped
the first time through.  Record whether caller cares about arguments or not.
(stack_info::walk): Don't store arguments if they're unwanted.
(stackdump): Add isexception parameter for use when called by exception
handler.
(cygwin_stackdump): Accomodate extra argument to stackdump.
(handle_exceptions): Ditto.
(sig_handle): Ditto.
(interrupt_on_return): Accomodate extra arguments to stack walk initialization.
2001-05-05 02:44:36 +00:00
Christopher Faylor d7490eaa99 * localtime.c: Revert exclusion of windows.h. 2001-05-05 01:07:03 +00:00
Christopher Faylor 1ca62f42d0 oops. 2001-05-04 21:09:47 +00:00
Christopher Faylor 6731c77ee2 * string.h: Fix last-minute typo. 2001-05-04 21:06:13 +00:00
Christopher Faylor 63b61cd19f Revert much of previous erroneous checkin. Add ChangeLog entry.
* pinfo.h: Correctly set __SIGOFFSET.
* path.cc (hash_path_name): Avoid calling library functions for simple copying
of characters.
* shortcut.c: Use WIN32_LEAN_AND_MEAN.
* smallprint.c: Ditto.
* environ.cc (getwinenv): Minor clarity fix.
* localtime.c: No need to include windows.h
* string.h: New file.
2001-05-04 21:02:15 +00:00
Christopher Faylor 17743fbc49 * exceptions.cc (ctrl_c_handler): Always send signal to process if it has no
tty.
2001-05-04 20:39:38 +00:00
Egor Duda 69b218bf24 * fhandler_socket.cc (set_connect_secret): Use /dev/urandom to
generate secret cookie.
2001-05-04 16:30:18 +00:00
Christopher Faylor a1ad23671c * configure.in: Make subauth configuration optional.
* configure: Regenerate.
2001-05-04 15:27:56 +00:00
Corinna Vinschen af16358f88 Initial release of the Cygwin subauthentication DLL.
* ChangeLog: New file.
        * Makefile.in: Ditto.
        * configure: Ditto. Generated from configure.in.
        * configure.in: Ditto.
        * cygsuba.c: Ditto.
        * cygsuba.din: Ditto.
2001-05-04 13:19:37 +00:00
Corinna Vinschen 3c1fb7ac9d * subauth: New subdirectory.
* configure.in: Add subauth to the list of subdirectories.
        * configure: Regenerated from configure.in.
2001-05-04 13:18:51 +00:00
Christopher Faylor 620dd06d15 * include/pthread.h (pthread_cleanup_push): Eliminate space preceding
arguments.
(pthread_cleanup_pop): Ditto.
2001-05-03 20:42:28 +00:00
Corinna Vinschen 6c22ecdd32 * net.cc (wsock_init): Rename `was_in_progress' to `wsock_started'
for clearness.
2001-05-03 16:18:51 +00:00
Christopher Faylor 70c7f359b1 * exceptions.cc (handle_exceptions): Break out of "loop" if the debugger
doesn't seem to be attaching to our process.
2001-05-03 15:00:38 +00:00
Corinna Vinschen a6a0193b2f * autoload.cc: Use new definition of LoadDLLinitfunc throughout.
Redefine wrapper for wsock32.dll and ws2_32.dll.
        (std_dll_init): New function.
        * autoload.h: Rename LoadDLLinitfunc to LoadDLLinitfuncdef.
        Add new defines LoadDLLinitfunc and LoadDLLstdfunc.
        * net.cc (wsock_init): Add guard variable handling. Take care
        to call WSAStartup only once. Load WSAStartup without using
        autoload wrapper to eliminate recursion.  Eliminate FIONBIO
        and srandom stuff.
2001-05-03 09:35:08 +00:00
Christopher Faylor edcd155ce6 * mkpasswd.c (enum_users): Use /bin/bash as the default shell.
(main): Ditto.
2001-05-01 14:50:54 +00:00
Christopher Faylor 4c265f4ab9 * path.cc (mount_info::conv_to_win32_path): More path tweaking. 2001-05-01 05:26:06 +00:00
Christopher Faylor beab320f33 * path.cc (mount_info::conv_to_win32_path): Fix debugging output to avoid a
SIGSEGV.  Avoid double backslashes in middle of filename.
2001-05-01 04:45:19 +00:00
Christopher Faylor d3c7e9de28 * path.cc (mkrelpath): New function.
(mount_info::conv_to_win32_path): Eliminate now-unneeded relative path name arg
and processing.
(path_conv::check): Accomodate relative path names again.  Accomodate one extra
argument in mount_info::conv_to_win32_path.  Tack trailing slash on end of
relative path as a side effect, like before.
* shared_info.h (mount_info::conv_to_win32_path): Reflect new argument
ordering.
2001-05-01 02:03:10 +00:00
Corinna Vinschen 57ff940dd4 * autoload.cc: Add LoadDLLinitfunc for secur32.dll.
Add LoadDLLfuncEx statements for AllocateLocallyUniqueId@4,
        DuplicateTokenEx@24, LsaNtStatusToWinError@4,
        LsaDeregisterLogonProcess@4, LsaFreeReturnBuffer@4,
        LsaLogonUser@56, LsaLookupAuthenticationPackage@12,
        LsaRegisterLogonProcess@12,
        * environ.cc: Add extern declaration for `subauth_id'.
        (subauth_id_init): New function for setting `subauth_id'.
        (struct parse_thing): Add entry for `subauth_id'.
        * fork.cc (fork_parent): Call `RevertToSelf' and
        `ImpersonateLoggedOnUser' instead of `seteuid'.
        * security.cc: Define global variable `subauth_id'.
        (extract_nt_dom_user): New function.
        (cygwin_logon_user): Call `extract_nt_dom_user' now.
        (str2lsa): New static function.
        (str2buf2lsa): Ditto.
        (str2buf2uni): Ditto.
        (subauth): Ditto.
        * security.h: Add prototype for `subauth'.
        * spawn.cc (spawn_guts): Use cygheap->user.token only if impersonated.
        Use `cygsid' type. Remove impersonation before allowing access to
        workstation/desktop to everyone. Call `RevertToSelf' and
        `ImpersonateLoggedOnUser' instead of `seteuid'.
        * syscalls.cc (seteuid): Rearranged to allow using subauthentication
        to retrieve user tokens when needed.
2001-04-30 21:19:42 +00:00
Corinna Vinschen 965cecdfca * uinfo.cc (internal_getlogin): Formatting change. 2001-04-30 18:27:24 +00:00
Corinna Vinschen 17db110558 * grp.cc: Eliminate MAX_DOMAIN_NAME define.
(read_etc_group): Substitute MAX_DOMAIN_NAME by
        INTERNET_MAX_HOST_NAME_LENGTH.
        * passwd.cc (parse_pwd): Don't force pw_name to be lower case.
        * sec_helper.cc: Substitute MAX_USER_NAME by UNLEN,
        MAX_COMPUTERNAME_LENGTH by INTERNET_MAX_HOST_NAME_LENGTH throughout.
        (lookup_name): Slight cleanup.
        * security.cc (alloc_sd): Substitute MAX_USER_NAME by UNLEN.
        * security.h: Define DEFAULT_UID as DOMAIN_USER_RID_ADMIN and
        DEFAULT_GID as DOMAIN_ALIAS_RID_ADMINS.
        * shared.cc (memory_init): Substitute MAX_USER_NAME by UNLEN.
        * thread.h: Ditto.
        * uinfo.cc (internal_getlogin): Substitute MAX_USER_NAME by UNLEN.
        Substitute MAX_COMPUTERNAME_LENGTH and MAX_HOST_NAME by
        INTERNET_MAX_HOST_NAME_LENGTH.
        * winsup.h: Include lmcons.h. Eliminate MAX_USER_NAME and
        MAX_HOST_NAME. Move DEFAULT_UID and DEFAULT_GID to security.h.
2001-04-30 18:21:48 +00:00
Christopher Faylor c0a45b92cc * path.cc (path_conv::check): Don't use path_flags when converting to MS-DOS
syntax unless parsing tail of path component.  Stop parsing path when we reach
the 'root' of the path.  Correctly copy tail to path component.
2001-04-30 16:52:53 +00:00