Mail Archives: cygwin-developers/2001/06/09/17:36:18
On Sat, Jun 09, 2001 at 12:35:51PM +1000, Robert Collins wrote:
>
> ----- Original Message -----
> From: "Corinna Vinschen" <vinschen AT redhat DOT com>
> >
> > I'm in a workgroup either and I have a 2nd box which is a domain
> > member. Both boxes don't have the delay. Could you please debug
> > that further?
>
> Sure. The long delay occurs on security.cc:230, the call to
> NetServerEnum(NULL, 101, (LPBYTE *) &buf, MAX_PREFERRED_LENGTH,
> &cnt, &tot, SV_TYPE_DOMAIN_CTRL, primary, NULL).
>
>
> I have no other MS machines on my LAN, or in the workgroup. Further to
> that MS networking services such as the computer browser and "Server"
> service are not running on my machine. (Funnily enough I like having RAM
> from my use :] ).
>
> I suspect that the NetServerEnum call is forcing the redirector to try
> and find a MS Networking server by broadcasts :[.
>
> I'm not quite sure what assumptions are made in the code about how the
> get_lsa_srv_inf funciton operates ... but I wonder if it's possible to
> optimise out this call if the (username's domain is NULL ) || (the
> username's domain == machine name) ?
I had another problem with LookupAccountSid() which doesn't always
return correct information after an impersonation to another user logon
was performed.
I have partly reverted my previous patch to internal_getlogin() and
added code which should work mostly reliable even when switching
the user context. It's now seteuid()s job to set $USERNAME and
$USERDOMAIN to the correct values since it can set them before the
impersonation, when LookupAccountSid() still returns the correct
information.
Back to your question: The Lsa code is now only called if the
logon server isn't retrieved already from the environment or by
a NetWkstaUserGetInfo() call.
I hope that eliminates the 30sec delay.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin AT cygwin DOT com
Red Hat, Inc.
- Raw text -