summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/spawn.cc
Commit message (Collapse)AuthorAgeFilesLines
* * fork.cc (fork): Fix error in copying SID pointer.Corinna Vinschen2000-06-241-1/+2
| | | | | | | | | | | * 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.
* * dcrt0.cc: Add load statements for `GetSidIdentifierAuthority'Corinna Vinschen2000-06-191-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* * cygwin.din: Define symbols for `cygwin_logon_user' andCorinna Vinschen2000-06-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* * Makefile.in: Remove libadvapi32.a.Christopher Faylor2000-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* * exceptions.cc (interruptible): Allocate slightly more space for directoryChristopher Faylor2000-04-261-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | name check. Windows 95 seems to null-terminate the directory otherwise. (interrupt_on_return): Issue a fatal error if we can't find the caller's stack. * spawn.cc (find_exec): Accept a path_conv argument rather than a buffer so that the caller can find things out about a translated path. (perhaps_suffix): Ditto. (spawn_guts): Allocate path_conv stuff here so that we can find out stuff about the translated path (this is work in progress). * environ.cc (environ_init): Accept an as-yet unused argument indicating whether we were invoked from a cygwin parent or not. (winenv): Ditto. (posify): Accept an argument indicating whether the path has already been translated. * dlfcn.cc (check_access): Provide a path_conv buffer to find_exec. * exec.cc (sexecvpe): Ditto. * path.cc (path_conv::check): Rename from path_conv::path_conv. (mount_item::getmntent): Recognize "Cygwin executable" bit. (symlink_info::check): Remove debugging statements. * path.h (class path_conv): Add iscygexec method. Rewrite constructor to call "check" method to allow multiple operations on a path_conv variable. * pinfo.cc (pinfo_init): Pass argument to environ_init. * shared.h: Bump PROC_MAGIC. * winsup.h: Reflect above changes to function arguments. * include/sys/mount.h: Add MOUNT_CYGWIN_EXEC type.
* * spawn.cc (spawn_guts): Restore dependency on signal_arrived. It's needed toChristopher Faylor2000-03-151-2/+6
| | | | wake up the WaitForSingleObject.
* Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>Christopher Faylor2000-03-151-53/+52
| | | | | | | | | | | | | | | | | | | | | * debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto. * malloc.cc (malloc_init): Ditto. * sigproc.cc (sigproc_init): Ditto. * exceptions.cc (events_init): Ditto. (call_handler): Eliminate special case for hExeced. Report locked thread in debugging output. * fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to base class. * fhandler.h (fhandler_pipe): Ditto. * hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to constructor. * spawn.cc (spawn_guts): Eliminate dependency on signal when waiting for subprocess. * strace.cc: Remove obsolete #ifdef. * sync.cc (muto::muto): Save the name of the muto. (muto:~muto): Also release the muto. * sync.h: Add a muto name field. * select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end of a pipe.
* Respond to more g++ warnings relating to initializing structures.Christopher Faylor2000-02-231-3/+2
|
* import winsup-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+980