Author: ekohl
Date: Sun Oct 26 17:53:30 2008
New Revision: 37006
URL:
http://svn.reactos.org/svn/reactos?rev=37006&view=rev
Log:
LSA: Get rid of the globally created binding handle and use the WIDL-generated custom
binding handles and context handles instead.
Modified:
trunk/reactos/dll/win32/advapi32/sec/lsa.c
trunk/reactos/dll/win32/lsasrv/lsarpc.c
trunk/reactos/include/reactos/idl/lsa.idl
Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/lsa…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] Sun Oct 26 17:53:30 2008
@@ -16,34 +16,17 @@
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
-static handle_t LSABindingHandle = NULL;
-
-static VOID
-LSAHandleUnbind(handle_t *Handle)
-{
- RPC_STATUS status;
-
- if (*Handle == NULL)
- return;
-
- status = RpcBindingFree(Handle);
- if (status)
- {
- TRACE("RpcBindingFree returned 0x%x\n", status);
- }
-}
-
-static VOID
-LSAHandleBind(VOID)
-{
+
+handle_t __RPC_USER
+PLSAPR_SERVER_NAME_bind(PLSAPR_SERVER_NAME pszSystemName)
+{
+ handle_t hBinding = NULL;
LPWSTR pszStringBinding;
RPC_STATUS status;
- handle_t Handle;
-
- if (LSABindingHandle != NULL)
- return;
-
- status = RpcStringBindingComposeW(NULL,
+
+ TRACE("PLSAPR_SERVER_NAME_bind() called\n");
+
+ status = RpcStringBindingComposeW(pszSystemName,
L"ncacn_np",
NULL,
L"\\pipe\\lsarpc",
@@ -52,12 +35,12 @@
if (status)
{
TRACE("RpcStringBindingCompose returned 0x%x\n", status);
- return;
+ return NULL;
}
/* Set the binding handle that will be used to bind to the server. */
status = RpcBindingFromStringBindingW(pszStringBinding,
- &Handle);
+ &hBinding);
if (status)
{
TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
@@ -69,11 +52,22 @@
TRACE("RpcStringFree returned 0x%x\n", status);
}
- if (InterlockedCompareExchangePointer(&LSABindingHandle,
- (PVOID)Handle,
- NULL) != NULL)
- {
- LSAHandleUnbind(&Handle);
+ return hBinding;
+}
+
+
+void __RPC_USER
+PLSAPR_SERVER_NAME_unbind(PLSAPR_SERVER_NAME pszSystemName,
+ handle_t hBinding)
+{
+ RPC_STATUS status;
+
+ TRACE("PLSAPR_SERVER_NAME_unbind() called\n");
+
+ status = RpcBindingFree(&hBinding);
+ if (status)
+ {
+ TRACE("RpcBindingFree returned 0x%x\n", status);
}
}
@@ -90,10 +84,7 @@
if (ObjectHandle == (LSA_HANDLE)0xcafe)
return STATUS_SUCCESS;
- LSAHandleBind();
-
- return LsarClose(LSABindingHandle,
- (unsigned long *)&ObjectHandle);
+ return LsarClose((PLSAPR_HANDLE)&ObjectHandle);
}
@@ -105,10 +96,7 @@
{
TRACE("LsaDelete(0x%p) called\n", ObjectHandle);
- LSAHandleBind();
-
- return LsarDelete(LSABindingHandle,
- (unsigned long)ObjectHandle);
+ return LsarDelete((LSAPR_HANDLE)ObjectHandle);
}
Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsarpc.c?…
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] Sun Oct 26 17:53:30 2008
@@ -123,9 +123,14 @@
}
+void __RPC_USER LSAPR_HANDLE_rundown(LSAPR_HANDLE hHandle)
+{
+
+}
+
+
/* Function 0 */
NTSTATUS LsarClose(
- handle_t hBinding,
LSAPR_HANDLE *ObjectHandle)
{
#if 0
@@ -153,7 +158,6 @@
/* Function 1 */
NTSTATUS LsarDelete(
- handle_t hBinding,
LSAPR_HANDLE ObjectHandle)
{
/* Deprecated */
@@ -163,7 +167,6 @@
/* Function 2 */
NTSTATUS LsarEnumeratePrivileges(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
DWORD *EnumerationContext,
PLSAPR_PRIVILEGE_ENUM_BUFFER EnumerationBuffer,
@@ -176,7 +179,6 @@
/* Function 3 */
NTSTATUS LsarQuerySecurityObject(
- handle_t hBinding,
LSAPR_HANDLE ObjectHandle,
SECURITY_INFORMATION SecurityInformation,
PLSAPR_SR_SECURITY_DESCRIPTOR *SecurityDescriptor)
@@ -188,7 +190,6 @@
/* Function 4 */
NTSTATUS LsarSetSecurityObject(
- handle_t hBinding,
LSAPR_HANDLE ObjectHandle,
SECURITY_INFORMATION SecurityInformation,
PLSAPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor)
@@ -200,7 +201,7 @@
/* Function 5 */
NTSTATUS LsarChangePassword(
- handle_t hBinding,
+ handle_t hBinding, /* FIXME */
PRPC_UNICODE_STRING String1,
PRPC_UNICODE_STRING String2,
PRPC_UNICODE_STRING String3,
@@ -214,7 +215,6 @@
/* Function 6 */
NTSTATUS LsarOpenPolicy(
- handle_t hBinding,
LPWSTR SystemName,
PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes,
ACCESS_MASK DesiredAccess,
@@ -227,7 +227,6 @@
/* Function 7 */
NTSTATUS LsarQueryInformationPolicy(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
POLICY_INFORMATION_CLASS InformationClass,
unsigned long PolicyInformation)
@@ -239,7 +238,6 @@
/* Function 8 */
NTSTATUS LsarSetInformationPolicy(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
POLICY_INFORMATION_CLASS InformationClass,
unsigned long *PolicyInformation)
@@ -251,7 +249,6 @@
/* Function 9 */
NTSTATUS LsarClearAuditLog(
- handle_t hBinding,
LSAPR_HANDLE ObjectHandle)
{
/* Deprecated */
@@ -261,7 +258,7 @@
/* Function 10 */
NTSTATUS LsarCreateAccount(
- handle_t hBinding,
+ LSAPR_HANDLE PolicyHandle,
PRPC_SID AccountSid,
ACCESS_MASK DesiredAccess,
LSAPR_HANDLE *AccountHandle)
@@ -273,7 +270,6 @@
/* Function 11 */
NTSTATUS LsarEnumerateAccounts(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
DWORD *EnumerationContext,
PLSAPR_ACCOUNT_ENUM_BUFFER EnumerationBuffer,
@@ -286,7 +282,6 @@
/* Function 12 */
NTSTATUS LsarCreateTrustedDomain(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLSAPR_TRUST_INFORMATION TrustedDomainInformation,
ACCESS_MASK DesiredAccess,
@@ -299,7 +294,6 @@
/* Function 13 */
NTSTATUS LsarEnumerateTrustedDomains(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
DWORD *EnumerationContext,
PLSAPR_TRUSTED_ENUM_BUFFER EnumerationBuffer,
@@ -312,7 +306,6 @@
/* Function 14 */
NTSTATUS LsarLookupNames(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
DWORD Count,
PRPC_UNICODE_STRING Names,
@@ -328,7 +321,6 @@
/* Function 15 */
NTSTATUS LsarLookupSids(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains,
@@ -343,7 +335,6 @@
/* Function 16 */
NTSTATUS LsarCreateSecret(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING SecretName,
ACCESS_MASK DesiredAccess,
@@ -356,7 +347,6 @@
/* Function 17 */
NTSTATUS LsarOpenAccount(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID AccountSid,
ACCESS_MASK DesiredAccess,
@@ -369,7 +359,6 @@
/* Function 18 */
NTSTATUS LsarEnumeratePrivilegesAccount(
- handle_t hBinding,
LSAPR_HANDLE AccountHandle,
PLSAPR_PRIVILEGE_SET *Privileges)
{
@@ -380,7 +369,6 @@
/* Function 19 */
NTSTATUS LsarAddPrivilegesToAccount(
- handle_t hBinding,
LSAPR_HANDLE AccountHandle,
PLSAPR_PRIVILEGE_SET Privileges)
{
@@ -391,7 +379,6 @@
/* Function 20 */
NTSTATUS LsarRemovePrivilegesFromAccount(
- handle_t hBinding,
LSAPR_HANDLE AccountHandle,
BOOL AllPrivileges,
PLSAPR_PRIVILEGE_SET Privileges)
@@ -403,7 +390,6 @@
/* Function 21 */
NTSTATUS LsarGetQuotasForAccount(
- handle_t hBinding,
LSAPR_HANDLE AccountHandle,
PQUOTA_LIMITS QuotaLimits)
{
@@ -414,7 +400,6 @@
/* Function 22 */
NTSTATUS LsarSetQuotasForAccount(
- handle_t hBinding,
LSAPR_HANDLE AccountHandle,
PQUOTA_LIMITS QuotaLimits)
{
@@ -425,7 +410,6 @@
/* Function 23 */
NTSTATUS LsarGetSystemAccessAccount(
- handle_t hBinding,
LSAPR_HANDLE AccountHandle,
ACCESS_MASK *SystemAccess)
{
@@ -436,7 +420,6 @@
/* Function 24 */
NTSTATUS LsarSetSystemAccessAccount(
- handle_t hBinding,
LSAPR_HANDLE AccountHandle,
ACCESS_MASK SystemAccess)
{
@@ -447,7 +430,6 @@
/* Function 25 */
NTSTATUS LsarOpenTrustedDomain(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID TrustedDomainSid,
ACCESS_MASK DesiredAccess,
@@ -460,7 +442,6 @@
/* Function 26 */
NTSTATUS LsarQueryInfoTrustedDomain(
- handle_t hBinding,
LSAPR_HANDLE TrustedDomainHandle,
TRUSTED_INFORMATION_CLASS InformationClass,
PLSAPR_TRUSTED_DOMAIN_INFO *TrustedDomainInformation)
@@ -472,7 +453,6 @@
/* Function 27 */
NTSTATUS LsarSetInformationTrustedDomain(
- handle_t hBinding,
LSAPR_HANDLE TrustedDomainHandle,
TRUSTED_INFORMATION_CLASS InformationClass,
PLSAPR_TRUSTED_DOMAIN_INFO TrustedDomainInformation)
@@ -484,7 +464,6 @@
/* Function 28 */
NTSTATUS LsarOpenSecret(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING SecretName,
ACCESS_MASK DesiredAccess,
@@ -497,7 +476,6 @@
/* Function 29 */
NTSTATUS LsarSetSecret(
- handle_t hBinding,
LSAPR_HANDLE *SecretHandle,
PLSAPR_CR_CIPHER_VALUE EncryptedCurrentValue,
PLSAPR_CR_CIPHER_VALUE EncryptedOldValue)
@@ -509,7 +487,6 @@
/* Function 30 */
NTSTATUS LsarQuerySecret(
- handle_t hBinding,
LSAPR_HANDLE SecretHandle,
PLSAPR_CR_CIPHER_VALUE *EncryptedCurrentValue,
PLARGE_INTEGER CurrentValueSetTime,
@@ -523,7 +500,6 @@
/* Function 31 */
NTSTATUS LsarLookupPrivilegeValue(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING Name,
PLUID Value)
@@ -535,7 +511,6 @@
/* Function 32 */
NTSTATUS LsarLookupPrivilegeName(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLUID Value,
PRPC_UNICODE_STRING *Name)
@@ -547,7 +522,7 @@
/* Function 33 */
NTSTATUS LsarLookupPrivilegeDisplayName(
- handle_t hBinding,
+ LSAPR_HANDLE PolicyHandle, /* FIXME */
USHORT *LanguageReturned)
{
UNIMPLEMENTED;
@@ -557,7 +532,6 @@
/* Function 34 */
NTSTATUS LsarDeleteObject(
- handle_t hBinding,
LSAPR_HANDLE *ObjectHandle)
{
UNIMPLEMENTED;
@@ -567,7 +541,6 @@
/* Function 35 */
NTSTATUS LsarEnumerateAccountsWithUserRight(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING UserRight,
PLSAPR_ACCOUNT_ENUM_BUFFER EnumerationBuffer)
@@ -579,7 +552,6 @@
/* Function 36 */
NTSTATUS LsarEnmuerateAccountRights(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID AccountSid,
PLSAPR_USER_RIGHT_SET UserRights)
@@ -591,7 +563,6 @@
/* Function 37 */
NTSTATUS LsarAddAccountRights(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID AccountSid,
PLSAPR_USER_RIGHT_SET UserRights)
@@ -603,7 +574,6 @@
/* Function 38 */
NTSTATUS LsarRemoveAccountRights(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID AccountSid,
BOOL AllRights,
@@ -616,7 +586,6 @@
/* Function 39 */
NTSTATUS LsarQueryTrustedDomainInfo(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID TrustedDomainSid,
TRUSTED_INFORMATION_CLASS InformationClass,
@@ -629,7 +598,6 @@
/* Function 40 */
NTSTATUS LsarSetTrustedDomainInfo(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID TrustedDomainSid,
TRUSTED_INFORMATION_CLASS InformationClass,
@@ -642,7 +610,6 @@
/* Function 41 */
NTSTATUS LsarDeleteTrustedDomain(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_SID TrustedDomainSid)
{
@@ -653,7 +620,6 @@
/* Function 42 */
NTSTATUS LsarStorePrivateData(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING KeyName,
PLSAPR_CR_CIPHER_VALUE EncryptedData)
@@ -665,7 +631,6 @@
/* Function 43 */
NTSTATUS LsarRetrievePrivateData(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING KeyName,
PLSAPR_CR_CIPHER_VALUE *EncryptedData)
@@ -677,7 +642,6 @@
/* Function 44 */
NTSTATUS LsarOpenPolicy2(
- handle_t hBinding,
LPWSTR SystemName,
PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes,
ACCESS_MASK DesiredAccess,
@@ -690,7 +654,6 @@
/* Function 45 */
NTSTATUS LsarGetUserName(
- handle_t hBinding,
LPWSTR SystemName,
PRPC_UNICODE_STRING *UserName,
PRPC_UNICODE_STRING *DomainName)
@@ -702,7 +665,6 @@
/* Function 46 */
NTSTATUS LsarQueryInformationPolicy2(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
POLICY_INFORMATION_CLASS InformationClass,
unsigned long *PolicyInformation)
@@ -714,7 +676,6 @@
/* Function 47 */
NTSTATUS LsarSetInformationPolicy2(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
POLICY_INFORMATION_CLASS InformationClass,
unsigned long PolicyInformation)
@@ -726,7 +687,6 @@
/* Function 48 */
NTSTATUS LsarQueryTrustedDomainInfoByName(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING TrustedDomainName,
POLICY_INFORMATION_CLASS InformationClass,
@@ -739,7 +699,6 @@
/* Function 49 */
NTSTATUS LsarSetTrustedDomainInfoByName(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING TrustedDomainName,
POLICY_INFORMATION_CLASS InformationClass,
@@ -752,7 +711,6 @@
/* Function 50 */
NTSTATUS LsarEnumerateTrustedDomainsEx(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
DWORD *EnumerationContext,
PLSAPR_TRUSTED_ENUM_BUFFER_EX EnumerationBuffer,
@@ -765,7 +723,6 @@
/* Function 51 */
NTSTATUS LsarCreateTrustedDomainEx(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLSAPR_TRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation,
PLSAPR_TRUSTED_DOMAIN_AUTH_INFORMATION AuthentificationInformation,
@@ -779,7 +736,6 @@
/* Function 52 */
NTSTATUS LsarSetPolicyReplicationHandle(
- handle_t hBinding,
PLSAPR_HANDLE PolicyHandle)
{
/* Deprecated */
@@ -789,7 +745,6 @@
/* Function 53 */
NTSTATUS LsarQueryDomainInformationPolicy(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
POLICY_INFORMATION_CLASS InformationClass,
unsigned long *PolicyInformation)
@@ -801,7 +756,6 @@
/* Function 54 */
NTSTATUS LsarSetDomainInformationPolicy(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
POLICY_INFORMATION_CLASS InformationClass,
unsigned long PolicyInformation)
@@ -813,7 +767,6 @@
/* Function 55 */
NTSTATUS LsarOpenTrustedDomainByName(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PRPC_UNICODE_STRING TrustedDomainName,
ACCESS_MASK DesiredAccess,
@@ -835,7 +788,6 @@
/* Function 57 */
NTSTATUS LsarLookupSids2(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains,
@@ -852,7 +804,6 @@
/* Function 58 */
NTSTATUS LsarLookupNames2(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
DWORD Count,
PRPC_UNICODE_STRING Names,
@@ -870,7 +821,6 @@
/* Function 59 */
NTSTATUS LsarCreateTrustedDomainEx2(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLSAPR_TRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation,
PLSAPR_TRUSTED_DOMAIN_AUTH_INFORMATION_INTERNAL AuthentificationInformation,
@@ -956,7 +906,6 @@
/* Function 68 */
NTSTATUS LsarLookupNames3(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
DWORD Count,
PRPC_UNICODE_STRING Names,
@@ -1010,7 +959,6 @@
/* Function 73 */
NTSTATUS LsarQueryForestTrustInformation(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLSA_UNICODE_STRING TrustedDomainName,
LSA_FOREST_TRUST_RECORD_TYPE HighestRecordType,
@@ -1023,7 +971,6 @@
/* Function 74 */
NTSTATUS LsarSetForestTrustInformation(
- handle_t hBinding,
LSAPR_HANDLE PolicyHandle,
PLSA_UNICODE_STRING TrustedDomainName,
LSA_FOREST_TRUST_RECORD_TYPE HighestRecordType,
@@ -1114,5 +1061,4 @@
return STATUS_NOT_IMPLEMENTED;
}
-
/* EOF */
Modified: trunk/reactos/include/reactos/idl/lsa.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/lsa.id…
==============================================================================
--- trunk/reactos/include/reactos/idl/lsa.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/lsa.idl [iso-8859-1] Sun Oct 26 17:53:30 2008
@@ -4,7 +4,9 @@
#include <ms-dtyp.idl>
-typedef /*[context_handle]*/ unsigned long LSAPR_HANDLE;
+typedef [handle] LPWSTR PLSAPR_SERVER_NAME;
+
+typedef [context_handle] PVOID LSAPR_HANDLE;
typedef LSAPR_HANDLE *PLSAPR_HANDLE;
cpp_quote("#ifndef _WINNT_H")
@@ -599,17 +601,14 @@
{
/* Function 0 */
NTSTATUS LsarClose(
- [in] handle_t hBinding,
[in, out] LSAPR_HANDLE *ObjectHandle);
/* Function 1 */
NTSTATUS LsarDelete(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE ObjectHandle);
/* Function 2 */
NTSTATUS LsarEnumeratePrivileges(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in, out] DWORD *EnumerationContext,
[out] PLSAPR_PRIVILEGE_ENUM_BUFFER EnumerationBuffer,
@@ -617,21 +616,19 @@
/* Function 3 */
NTSTATUS LsarQuerySecurityObject(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE ObjectHandle,
[in] SECURITY_INFORMATION SecurityInformation,
[out] PLSAPR_SR_SECURITY_DESCRIPTOR *SecurityDescriptor);
/* Function 4 */
NTSTATUS LsarSetSecurityObject(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE ObjectHandle,
[in] SECURITY_INFORMATION SecurityInformation,
[in] PLSAPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor);
/* Function 5 */
NTSTATUS LsarChangePassword(
- [in] handle_t hBinding,
+ [in] handle_t hBinding, /* FIXME */
[in] PRPC_UNICODE_STRING String1,
[in] PRPC_UNICODE_STRING String2,
[in] PRPC_UNICODE_STRING String3,
@@ -640,15 +637,13 @@
/* Function 6 */
NTSTATUS LsarOpenPolicy(
- [in] handle_t hBinding,
- [in, unique] LPWSTR SystemName,
+ [in, unique] PLSAPR_SERVER_NAME SystemName,
[in] PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes,
[in] ACCESS_MASK DesiredAccess,
[out] LSAPR_HANDLE *PolicyHandle);
/* Function 7 */
NTSTATUS LsarQueryInformationPolicy(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] POLICY_INFORMATION_CLASS InformationClass,
[in] unsigned long PolicyInformation);
@@ -656,7 +651,6 @@
/* Function 8 */
NTSTATUS LsarSetInformationPolicy(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] POLICY_INFORMATION_CLASS InformationClass,
[out] unsigned long *PolicyInformation);
@@ -664,19 +658,17 @@
/* Function 9 */
NTSTATUS LsarClearAuditLog(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE ObjectHandle);
/* Function 10 */
NTSTATUS LsarCreateAccount(
- [in] handle_t hBinding,
+ [in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID AccountSid,
[in] ACCESS_MASK DesiredAccess,
[out] LSAPR_HANDLE *AccountHandle);
/* Function 11 */
NTSTATUS LsarEnumerateAccounts(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in, out] DWORD *EnumerationContext,
[out] PLSAPR_ACCOUNT_ENUM_BUFFER EnumerationBuffer,
@@ -684,7 +676,6 @@
/* Function 12 */
NTSTATUS LsarCreateTrustedDomain(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLSAPR_TRUST_INFORMATION TrustedDomainInformation,
[in] ACCESS_MASK DesiredAccess,
@@ -692,7 +683,6 @@
/* Function 13 */
NTSTATUS LsarEnumerateTrustedDomains(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in, out] DWORD *EnumerationContext,
[out] PLSAPR_TRUSTED_ENUM_BUFFER EnumerationBuffer,
@@ -700,7 +690,6 @@
/* Function 14 */
NTSTATUS LsarLookupNames(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] DWORD Count,
[in, size_is(Count)] PRPC_UNICODE_STRING Names,
@@ -711,7 +700,6 @@
/* Function 15 */
NTSTATUS LsarLookupSids(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
[out] PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains,
@@ -721,7 +709,6 @@
/* Function 16 */
NTSTATUS LsarCreateSecret(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING SecretName,
[in] ACCESS_MASK DesiredAccess,
@@ -729,7 +716,6 @@
/* Function 17 */
NTSTATUS LsarOpenAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID AccountSid,
[in] ACCESS_MASK DesiredAccess,
@@ -737,50 +723,42 @@
/* Function 18 */
NTSTATUS LsarEnumeratePrivilegesAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE AccountHandle,
[out] PLSAPR_PRIVILEGE_SET *Privileges);
/* Function 19 */
NTSTATUS LsarAddPrivilegesToAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE AccountHandle,
[in] PLSAPR_PRIVILEGE_SET Privileges);
/* Function 20 */
NTSTATUS LsarRemovePrivilegesFromAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE AccountHandle,
[in] BOOL AllPrivileges,
[in, unique] PLSAPR_PRIVILEGE_SET Privileges);
/* Function 21 */
NTSTATUS LsarGetQuotasForAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE AccountHandle,
[out] PQUOTA_LIMITS QuotaLimits);
/* Function 22 */
NTSTATUS LsarSetQuotasForAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE AccountHandle,
[in] PQUOTA_LIMITS QuotaLimits);
/* Function 23 */
NTSTATUS LsarGetSystemAccessAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE AccountHandle,
[out] ACCESS_MASK *SystemAccess);
/* Function 24 */
NTSTATUS LsarSetSystemAccessAccount(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE AccountHandle,
[in] ACCESS_MASK SystemAccess);
/* Function 25 */
NTSTATUS LsarOpenTrustedDomain(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID TrustedDomainSid,
[in] ACCESS_MASK DesiredAccess,
@@ -788,21 +766,18 @@
/* Function 26 */
NTSTATUS LsarQueryInfoTrustedDomain(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE TrustedDomainHandle,
[in] TRUSTED_INFORMATION_CLASS InformationClass,
[out, switch_is(InformationClass)] PLSAPR_TRUSTED_DOMAIN_INFO
*TrustedDomainInformation);
/* Function 27 */
NTSTATUS LsarSetInformationTrustedDomain(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE TrustedDomainHandle,
[in] TRUSTED_INFORMATION_CLASS InformationClass,
[in, switch_is(InformationClass)] PLSAPR_TRUSTED_DOMAIN_INFO
TrustedDomainInformation);
/* Function 28 */
NTSTATUS LsarOpenSecret(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING SecretName,
[in] ACCESS_MASK DesiredAccess,
@@ -810,14 +785,12 @@
/* Function 29 */
NTSTATUS LsarSetSecret(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE *SecretHandle,
[in, unique] PLSAPR_CR_CIPHER_VALUE EncryptedCurrentValue,
[in, unique] PLSAPR_CR_CIPHER_VALUE EncryptedOldValue);
/* Function 30 */
NTSTATUS LsarQuerySecret(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE SecretHandle,
[in, out, unique] PLSAPR_CR_CIPHER_VALUE *EncryptedCurrentValue,
[in, out, unique] PLARGE_INTEGER CurrentValueSetTime,
@@ -826,23 +799,20 @@
/* Function 31 */
NTSTATUS LsarLookupPrivilegeValue(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING Name,
[out] PLUID Value);
/* Function 32 */
NTSTATUS LsarLookupPrivilegeName(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLUID Value,
[out] PRPC_UNICODE_STRING *Name);
/* Function 33 */
NTSTATUS LsarLookupPrivilegeDisplayName(
- [in] handle_t hBinding,
- /*[in] LSAPR_HANDLE PolicyHandle,
- [in] PRPC_UNICODE_STRING Name,
+ [in] LSAPR_HANDLE PolicyHandle, /* FIXME */
+ /*[in] PRPC_UNICODE_STRING Name,
[in] USHORT ClientLanguage,
[in] USHORT ClientSystemDefaultLanguage,
[out] PRPC_UNICODE_STRING *DisplayName,*/
@@ -850,35 +820,30 @@
/* Function 34 */
NTSTATUS LsarDeleteObject(
- [in] handle_t hBinding,
[in, out] LSAPR_HANDLE *ObjectHandle);
cpp_quote("#if _WIN32_WINNT >= 0x0351")
/* Function 35 */
NTSTATUS LsarEnumerateAccountsWithUserRight(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in, unique] PRPC_UNICODE_STRING UserRight,
[out] PLSAPR_ACCOUNT_ENUM_BUFFER EnumerationBuffer);
/* Function 36 */
NTSTATUS LsarEnmuerateAccountRights(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID AccountSid,
[out] PLSAPR_USER_RIGHT_SET UserRights);
/* Function 37 */
NTSTATUS LsarAddAccountRights(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID AccountSid,
[in] PLSAPR_USER_RIGHT_SET UserRights);
/* Function 38 */
NTSTATUS LsarRemoveAccountRights(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID AccountSid,
[in] BOOL AllRights,
@@ -886,7 +851,6 @@
/* Function 39 */
NTSTATUS LsarQueryTrustedDomainInfo(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID TrustedDomainSid,
[in] TRUSTED_INFORMATION_CLASS InformationClass,
@@ -894,7 +858,6 @@
/* Function 40 */
NTSTATUS LsarSetTrustedDomainInfo(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID TrustedDomainSid,
[in] TRUSTED_INFORMATION_CLASS InformationClass,
@@ -902,36 +865,31 @@
/* Function 41 */
NTSTATUS LsarDeleteTrustedDomain(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_SID TrustedDomainSid);
/* Function 42 */
NTSTATUS LsarStorePrivateData(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING KeyName,
[in, unique] PLSAPR_CR_CIPHER_VALUE EncryptedData);
/* Function 43 */
NTSTATUS LsarRetrievePrivateData(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING KeyName,
[in, out] PLSAPR_CR_CIPHER_VALUE *EncryptedData);
/* Function 44 */
NTSTATUS LsarOpenPolicy2(
- [in] handle_t hBinding,
- [in, unique, string] LPWSTR SystemName,
+ [in, unique, string] PLSAPR_SERVER_NAME SystemName,
[in] PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes,
[in] ACCESS_MASK DesiredAccess,
[out] LSAPR_HANDLE *PolicyHandle);
/* Function 45 */
NTSTATUS LsarGetUserName(
- [in] handle_t hBinding,
- [in, unique, string] LPWSTR SystemName,
+ [in, unique, string] PLSAPR_SERVER_NAME SystemName,
[in, out] PRPC_UNICODE_STRING *UserName,
[in, out, unique] PRPC_UNICODE_STRING *DomainName);
@@ -939,7 +897,6 @@
/* Function 46 */
NTSTATUS LsarQueryInformationPolicy2(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] POLICY_INFORMATION_CLASS InformationClass,
[out] unsigned long *PolicyInformation);
@@ -947,7 +904,6 @@
/* Function 47 */
NTSTATUS LsarSetInformationPolicy2(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] POLICY_INFORMATION_CLASS InformationClass,
[in] unsigned long PolicyInformation);
@@ -955,7 +911,6 @@
/* Function 48 */
NTSTATUS LsarQueryTrustedDomainInfoByName(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING TrustedDomainName,
[in] POLICY_INFORMATION_CLASS InformationClass,
@@ -964,7 +919,6 @@
/* Function 49 */
NTSTATUS LsarSetTrustedDomainInfoByName(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING TrustedDomainName,
[in] POLICY_INFORMATION_CLASS InformationClass,
@@ -973,7 +927,6 @@
/* Function 50 */
NTSTATUS LsarEnumerateTrustedDomainsEx(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in, out] DWORD *EnumerationContext,
[out] PLSAPR_TRUSTED_ENUM_BUFFER_EX EnumerationBuffer,
@@ -981,7 +934,6 @@
/* Function 51 */
NTSTATUS LsarCreateTrustedDomainEx(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLSAPR_TRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation,
[in] PLSAPR_TRUSTED_DOMAIN_AUTH_INFORMATION AuthentificationInformation,
@@ -990,12 +942,10 @@
/* Function 52 */
NTSTATUS LsarSetPolicyReplicationHandle(
- [in] handle_t hBinding,
[in, out] PLSAPR_HANDLE PolicyHandle);
/* Function 53 */
NTSTATUS LsarQueryDomainInformationPolicy(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] POLICY_INFORMATION_CLASS InformationClass,
[out] unsigned long *PolicyInformation);
@@ -1003,7 +953,6 @@
/* Function 54 */
NTSTATUS LsarSetDomainInformationPolicy(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] POLICY_INFORMATION_CLASS InformationClass,
[in] unsigned long PolicyInformation);
@@ -1011,7 +960,6 @@
/* Function 55 */
NTSTATUS LsarOpenTrustedDomainByName(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PRPC_UNICODE_STRING TrustedDomainName,
[in] ACCESS_MASK DesiredAccess,
@@ -1023,7 +971,6 @@
/* Function 57 */
NTSTATUS LsarLookupSids2(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
[out] PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains,
@@ -1035,7 +982,6 @@
/* Function 58 */
NTSTATUS LsarLookupNames2(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] DWORD Count,
[in, size_is(Count)] PRPC_UNICODE_STRING Names,
@@ -1048,7 +994,6 @@
/* Function 59 */
NTSTATUS LsarCreateTrustedDomainEx2(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLSAPR_TRUSTED_DOMAIN_INFORMATION_EX TrustedDomainInformation,
[in] PLSAPR_TRUSTED_DOMAIN_AUTH_INFORMATION_INTERNAL
AuthentificationInformation,
@@ -1091,7 +1036,6 @@
/* Function 68 */
NTSTATUS LsarLookupNames3(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] DWORD Count,
[in, size_is(Count)] PRPC_UNICODE_STRING Names,
@@ -1120,7 +1064,6 @@
/* Function 73 */
NTSTATUS LsarQueryForestTrustInformation(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLSA_UNICODE_STRING TrustedDomainName,
[in] LSA_FOREST_TRUST_RECORD_TYPE HighestRecordType,
@@ -1128,7 +1071,6 @@
/* Function 74 */
NTSTATUS LsarSetForestTrustInformation(
- [in] handle_t hBinding,
[in] LSAPR_HANDLE PolicyHandle,
[in] PLSA_UNICODE_STRING TrustedDomainName,
[in] LSA_FOREST_TRUST_RECORD_TYPE HighestRecordType,
@@ -1142,7 +1084,7 @@
/* Function 76 */
NTSTATUS LsarLookupSids3(
- [in] handle_t hBinding,
+ [in] handle_t hBinding, /* FIXME */
[in] PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
[out] PLSAPR_REFERENCED_DOMAIN_LIST *ReferencedDomains,
[in, out] PLSAPR_TRANSLATED_NAMES_EX TranslatedNames,
@@ -1153,7 +1095,7 @@
/* Function 77 */
NTSTATUS LsarLookupNames4(
- [in] handle_t hBinding,
+ [in] handle_t hBinding, /* FIXME */
[in] handle_t RpcHandle,
[in] DWORD Count,
[in, size_is(Count)] PRPC_UNICODE_STRING Names,