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: Reorganizing internal_getlogin() patch is in


On Sun, Jun 16, 2002 at 01:15:06AM -0400, Chris Faylor wrote:
> On Sun, Jun 16, 2002 at 12:07:01AM -0400, Pierre A. Humblet wrote:
> >b) NetUserGetInfo() must always be called with the env_logsrv, otherwise
> >name aliasing can occur. Don't call if env_logsrv is NULL, which should
> >be the case only for SYSTEM.
> 
> I seem to recall that Corinna added this code for a reason.

The original reason was to speed up things in domain environments.
The local machine has buffered the user information so it's called
first.  Only if that fails we fallback to calling the logon server
(a PDC probably).  This should avoid unnecessary net access.

I'm curious, too, what you mean by "name aliasing".  Are you talking
about having a local and a domain user of the same name?

> >c) get_logon_server() will fail for SYSTEM. There should be a test
> >"if (strcasematch (Windowname (), "SYSTEM"))" before calling it as it 
> >will looked up repeatedly if plogsrv remains NULL.

That test is ok.

Corinna


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