This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: {Patch]: Giving access to pinfo after seteuid and exec


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]