[LSASRV][SECUR32] Fix the naming mess

Rename Untrusted to TrustredCaller in LSA_CONNECTION_INFO and LSAP_LOGON_CONTEXT in order to clarify the meaning of the variable.
This commit is contained in:
Eric Kohl 2021-02-28 11:03:07 +01:00
parent 9e32854998
commit 1fbb295d4a
5 changed files with 16 additions and 15 deletions

View file

@ -585,8 +585,8 @@ LsapCallAuthenticationPackage(PLSA_API_MSG RequestMsg,
} }
} }
if (LogonContext->Untrusted) if (LogonContext->TrustedCaller)
Status = Package->LsaApCallPackageUntrusted((PLSA_CLIENT_REQUEST)LogonContext, Status = Package->LsaApCallPackage((PLSA_CLIENT_REQUEST)LogonContext,
LocalBuffer, LocalBuffer,
RequestMsg->CallAuthenticationPackage.Request.ProtocolSubmitBuffer, RequestMsg->CallAuthenticationPackage.Request.ProtocolSubmitBuffer,
RequestMsg->CallAuthenticationPackage.Request.SubmitBufferLength, RequestMsg->CallAuthenticationPackage.Request.SubmitBufferLength,
@ -594,7 +594,7 @@ LsapCallAuthenticationPackage(PLSA_API_MSG RequestMsg,
&RequestMsg->CallAuthenticationPackage.Reply.ReturnBufferLength, &RequestMsg->CallAuthenticationPackage.Reply.ReturnBufferLength,
&RequestMsg->CallAuthenticationPackage.Reply.ProtocolStatus); &RequestMsg->CallAuthenticationPackage.Reply.ProtocolStatus);
else else
Status = Package->LsaApCallPackage((PLSA_CLIENT_REQUEST)LogonContext, Status = Package->LsaApCallPackageUntrusted((PLSA_CLIENT_REQUEST)LogonContext,
LocalBuffer, LocalBuffer,
RequestMsg->CallAuthenticationPackage.Request.ProtocolSubmitBuffer, RequestMsg->CallAuthenticationPackage.Request.ProtocolSubmitBuffer,
RequestMsg->CallAuthenticationPackage.Request.SubmitBufferLength, RequestMsg->CallAuthenticationPackage.Request.SubmitBufferLength,

View file

@ -135,10 +135,10 @@ LsapCheckLogonProcess(PLSA_API_MSG RequestMsg,
TRACE("New LogonContext: %p\n", Context); TRACE("New LogonContext: %p\n", Context);
Context->ClientProcessHandle = ProcessHandle; Context->ClientProcessHandle = ProcessHandle;
Context->Untrusted = RequestMsg->ConnectInfo.Untrusted; Context->TrustedCaller = RequestMsg->ConnectInfo.TrustedCaller;
if (Context->Untrusted == FALSE) if (Context->TrustedCaller)
Context->Untrusted = !LsapIsTrustedClient(ProcessHandle); Context->TrustedCaller = LsapIsTrustedClient(ProcessHandle);
*LogonContext = Context; *LogonContext = Context;

View file

@ -79,7 +79,7 @@ typedef struct _LSAP_LOGON_CONTEXT
LIST_ENTRY Entry; LIST_ENTRY Entry;
HANDLE ClientProcessHandle; HANDLE ClientProcessHandle;
HANDLE ConnectionHandle; HANDLE ConnectionHandle;
BOOL Untrusted; BOOL TrustedCaller;
} LSAP_LOGON_CONTEXT, *PLSAP_LOGON_CONTEXT; } LSAP_LOGON_CONTEXT, *PLSAP_LOGON_CONTEXT;
typedef struct _SAMPR_ULONG_ARRAY typedef struct _SAMPR_ULONG_ARRAY

View file

@ -74,6 +74,7 @@ LsapOpenLsaPort(VOID)
sizeof(ConnectInfo)); sizeof(ConnectInfo));
ConnectInfo.CreateContext = FALSE; ConnectInfo.CreateContext = FALSE;
ConnectInfo.TrustedCaller = TRUE;
ConnectInfoLength = sizeof(LSA_CONNECTION_INFO); ConnectInfoLength = sizeof(LSA_CONNECTION_INFO);
Status = NtConnectPort(&LsaPortHandle, Status = NtConnectPort(&LsaPortHandle,
@ -174,7 +175,7 @@ LsaConnectUntrusted(
ConnectInfoLength); ConnectInfoLength);
ConnectInfo.CreateContext = TRUE; ConnectInfo.CreateContext = TRUE;
ConnectInfo.Untrusted = TRUE; ConnectInfo.TrustedCaller = FALSE;
Status = NtConnectPort(LsaHandle, Status = NtConnectPort(LsaHandle,
&PortName, &PortName,

View file

@ -35,7 +35,7 @@ typedef struct _LSA_CONNECTION_INFO
ULONG Length; ULONG Length;
CHAR LogonProcessNameBuffer[LSASS_MAX_LOGON_PROCESS_NAME_LENGTH + 1]; CHAR LogonProcessNameBuffer[LSASS_MAX_LOGON_PROCESS_NAME_LENGTH + 1];
BOOL CreateContext; BOOL CreateContext;
BOOL Untrusted; BOOL TrustedCaller;
} LSA_CONNECTION_INFO, *PLSA_CONNECTION_INFO; } LSA_CONNECTION_INFO, *PLSA_CONNECTION_INFO;