summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fork.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.
* * cygwin.din: Define symbols for `cygwin_logon_user' andCorinna Vinschen2000-06-161-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* * exceptions.cc (sigsave): Copy on fork so that we can restore correct behaviorChristopher Faylor2000-04-081-1/+2
| | | | | | | | | | | | | in forked process. (interruptible): Flag as interruptible when running in main process module. (interrupt_setup): Save return address and address of return address. (signal_fixup_after_fork): New function. Uses above two values to restore proper behavior to forked process. (interrupt_on_return): Pass return address address to interupt_setup. (interrupt_now): Pass NULL for return address address to interrupt_setup. * fork.cc (fork): Call signal_fixup_after_fork. * shared.h: Lint cleanups. * winsup.h: Ditto.
* * exceptions.cc (interruptible): Change method for determining if something isChristopher Faylor2000-02-241-1/+1
| | | | | | | | | | | | | | interruptible. (call_handler): Avoid suspending a thread if it owns a mutex. Only set signal_arrived if the thread was actually interrupted. (events_init): Initialize module information needed by interruptible(). (sigdelayed): Don't call sig_dispatch_pending since it could screw up * init.cc (dll_entry): Record module handle of main for use by interruptible(). (proc_subproc): Reorganize handling of terminated child so that the bulk of the processing comes from the signal thread. (wait_sig): Force processing of waiting threads if SIGCHLD is not processed. * sync.cc (muto::release): Set tid == 0 after lock is released or signal processor will be confused.
* Respond to more g++ warnings relating to initializing structures.Christopher Faylor2000-02-231-2/+2
|
* Respond to a multitude of g++ warnings.Christopher Faylor2000-02-211-4/+3
|
* import winsup-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+625