[RFD]: uinfo.cc or "all commands start soooooow slow"
Sat Jun 17 05:48:00 GMT 2000
In the same context I have a question to you:
> To get full informations about the user, ntsec needs the name of
> the logon domain and the logon server. To get that information,
> the function `internal_getlogin' calls NetWkstaUserGetInfo() and
> NetGetDCName(). If for some reason the machine has no connection
> to it's PDC, this may take a while.
But why are that functions called? Isn't that information
already found in the users environment?
Yes and no.
Yes, if the user is working in a console window or if s/he is
logged in via a service which runs under a regular users account.
No, if s/he is logged in via a service running under LocalSystem
It would be possible to patch internal_getlogin() to do the
First try to read the environment variables
LOGONSERVER and USERDOMAIN.
If they exist:
If they don't exist:
If nontsec: Call GetUserName().
If ntsec: Call NetWkstaUserGetInfo() and NetGetDCName().
If they succeed and the username is not SYSTEM:
Set environment variables LOGONSERVER and USERDOMAIN.
I'm sure that this algorithm would speed up also ntsec most
of the time. Above all the last part (setting the variables)
would additionally speed up further sub processes.
But the DISADVANTAGE is: If for some reason an application
or a user decides to set those environment variables to some
illegal values, ntsec would suffer a sort of nerveous breakdown.
The question: Should we try the patch, nevertheless?
More information about the Cygwin-patches