Skip to content

Commit

Permalink
a username is not checked first against the AD instead of local SAM
Browse files Browse the repository at this point in the history
- a given username without any appended domain is now verified against the domain the machine is member of
- if the domain is the Local Machine than the user is Local verified
- if the domain is contoso.local a username is verified against contoso.local
- if a domain is appended to the username like username@osotnoc.local than the user id verified against osotnoc.local
  • Loading branch information
MutonUfoAI committed Jan 2, 2017
1 parent 8fc821b commit 92b1e15
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pGina/src/Service/Impl/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,15 @@ private Dictionary<string, string> SplitDomainfromUsername(string username, stri
if (String.IsNullOrEmpty(domain))
{
ret["username"] = username;
ret["domain"] = Environment.MachineName;
string domainmember = Abstractions.WindowsApi.pInvokes.GetMachineDomainMembershipEX();
if (string.IsNullOrEmpty(domainmember))
{
ret["domain"] = Environment.MachineName;
}
else
{
ret["domain"] = domainmember;
}
}
}

Expand Down

0 comments on commit 92b1e15

Please sign in to comment.