This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: [corinna-cygwin@cygwin.com: Re: ENOTSOCK errors with cygwin dll 1.3.21 and 1.3.22]
On Thu, May 29, 2003 at 09:41:30AM -0400, Pierre A. Humblet wrote:
> I have confirmed the problem stems from access to the current process;
> it disappears when Everyone has access.
It does for you? Since I was curious, I tested that yesterday, too.
I changed the DACL of the current process to allow full control for
Everyone... no change!
> Glad it's over. The only embellishment I see is to move the
> fixup_before_fork_exec() call inside the winsock2_active clause,
> it is useless otherwise. Something like a self contained block.
> Oops, while writing the snippet I noticed a bug. Fixed below.
>
> if (winsock2_active)
> {
> fhs->set_io_handle (get_io_handle ())
> if (cygheap->user.issetuid ())
> RevertToSelf ();
> fhs->fixup_before_fork_exec (GetCurrentProcessId ());
> if (cygheap->user.issetuid ())
> ImpersonateLoggedOnUser (cygheap->user.token);
> fhs->fixup_after_fork (hMainProc);
> if (fhs->get_io_handle() != (HANDLE) INVALID_SOCKET)
> ^^^^^
> return 0;
> debug_printf ("WSADuplicateSocket failed, trying DuplicateHandle");
> }
Yes, that looks better. I've applied it pretty similar.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.