This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: {Patch]: Giving access to pinfo after seteuid and exec
- From: Corinna Vinschen <cygwin-patches at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 26 Sep 2003 14:22:20 +0200
- Subject: Re: {Patch]: Giving access to pinfo after seteuid and exec
- References: <3.0.5.32.20030925214748.0081f330@incoming.verizon.net>
On Thu, Sep 25, 2003 at 09:47:48PM -0400, Pierre A. Humblet wrote:
> This patch sets the _pinfo acl in order to allow access after
> seteuid and exec.
>
> While looking at spawn.cc I also noticed oddities in pinfo related
> error handling, and reworked them. I also restored impersonation in
> case of CreateProcessAsUser failure.
Looks ok except for:
> @@ -42,9 +43,9 @@ pinfo_fixup_after_fork ()
> {
> if (hexec_proc)
> CloseHandle (hexec_proc);
> -
> + /* Keeps the cygpid from being reused. No rights required */
> if (!DuplicateHandle (hMainProc, hMainProc, hMainProc, &hexec_proc, 0,
> - TRUE, DUPLICATE_SAME_ACCESS))
> + TRUE, 0))
> {
> system_printf ("couldn't save current process handle %p, %E", hMainProc);
> hexec_proc = NULL;
Somehow I'm missing a description why that's necessary and the
implications.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.