"LogonUser()" confusion

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rob Bolton (_nospam_at__nospam.com)
Date: 07/01/04


Date: Thu, 1 Jul 2004 12:31:46 -0400

Hi there,

Can someone explain why "LogonUser()" succeeds even after passing a
non-existent domain name argument? In Keith Brown's book "Programming
Windows Security", he states that passing NULL for this argument means that
Windows will "search for the closest authority (including the local
authority) with a matching account name" (page 96). This behaviour isn't
documented in MSDN though he says otherwise, but even if it's true (can
someone confirm this), why is a non-existent (non-NULL) domain name
accepted? It appears that the closest authority is in fact being sought out
which is not what the programmer is asking for (to log on a user in a
specific domain, not some other). Any assistance will be appreciated. Thanks
(BTW, this same behaviour also manifests itself in "NetUseAdd()").



Relevant Pages

  • "LogonUser()" confusion
    ... non-existent domain name argument? ... In Keith Brown's book "Programming ... Windows Security", he states that passing NULL for this argument means that ...
    (microsoft.public.platformsdk.security)
  • Re: To understand OOP better...
    ... >> Which is tantamount to passing in a vtable. ... >> If structured programming is discipline imposed upon ... >> discipline imposed upon indirect transfer of control. ...
    (comp.object)
  • Re: False
    ... This is not a newsgroup for Windows security issues. ... programming applications using the .NET programming platform. ... Spyware gathers your private information without your consent. ...
    (microsoft.public.dotnet.security)
  • Re: a
    ... >> programming. ... It has to do with passing data references (i.e., ... >> cell array with many cells then your assumption is incorrect. ...
    (comp.soft-sys.matlab)
  • Re: newbie questions
    ... >passing parameters byref that is present in most serious programming ... >that my main function is passing some parameters by reference to subs to ... It isn't a problem with passing by reference. ...
    (comp.lang.python)