advapi32: Add stub implementations for a bunch of documented Lsa APIs.

This commit is contained in:
Hans Leidekker 2006-03-11 11:54:54 +01:00 committed by Alexandre Julliard
parent 034a030d37
commit 93676b10c6
3 changed files with 302 additions and 14 deletions

View File

@ -341,23 +341,23 @@
@ stdcall LookupPrivilegeValueW(ptr ptr ptr)
# @ stub LookupSecurityDescriptorPartsA
# @ stub LookupSecurityDescriptorPartsW
# @ stub LsaAddAccountRights
@ stdcall LsaAddAccountRights(ptr ptr ptr long)
@ stub LsaAddPrivilegesToAccount
# @ stub LsaClearAuditLog
@ stdcall LsaClose(ptr)
@ stub LsaCreateAccount
@ stub LsaCreateSecret
@ stub LsaCreateTrustedDomain
# @ stub LsaCreateTrustedDomainEx
@ stdcall LsaCreateTrustedDomainEx(ptr ptr ptr long ptr)
@ stub LsaDelete
# @ stub LsaDeleteTrustedDomain
# @ stub LsaEnumerateAccountRights
@ stdcall LsaDeleteTrustedDomain(ptr ptr)
@ stdcall LsaEnumerateAccountRights(ptr ptr long ptr long)
@ stub LsaEnumerateAccounts
# @ stub LsaEnumerateAccountsWithUserRight
@ stdcall LsaEnumerateAccountsWithUserRight(ptr ptr ptr ptr)
@ stub LsaEnumeratePrivileges
@ stub LsaEnumeratePrivilegesOfAccount
@ stdcall LsaEnumerateTrustedDomains(long ptr ptr long ptr)
# @ stub LsaEnumerateTrustedDomainsEx
@ stdcall LsaEnumerateTrustedDomains(ptr ptr ptr long ptr)
@ stdcall LsaEnumerateTrustedDomainsEx(ptr ptr ptr long ptr)
@ stdcall LsaFreeMemory(ptr)
# @ stub LsaGetQuotasForAccount
# @ stub LsaGetRemoteUserName
@ -367,7 +367,7 @@
# @ stub LsaICLookupNamesWithCreds
@ stub LsaICLookupSids
# @ stub LsaICLookupSidsWithCreds
# @ stub LsaLookupNames2
@ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
@ stdcall LsaLookupNames(long long ptr ptr ptr)
@ stub LsaLookupPrivilegeDisplayName
# @ stub LsaLookupPrivilegeName
@ -379,16 +379,17 @@
# @ stub LsaOpenPolicySce
@ stub LsaOpenSecret
@ stub LsaOpenTrustedDomain
# @ stub LsaOpenTrustedDomainByName
@ stdcall LsaOpenTrustedDomainByName(ptr ptr long ptr)
# @ stub LsaQueryDomainInformationPolicy
# @ stub LsaQueryForestTrustInformation
@ stub LsaQueryInfoTrustedDomain
@ stdcall LsaQueryInformationPolicy(ptr long ptr)
@ stub LsaQuerySecret
# @ stub LsaQuerySecurityObject
# @ stub LsaQueryTrustedDomainInfo
# @ stub LsaQueryTrustedDomainInfoByName
# @ stub LsaRemoveAccountRights
@ stdcall LsaQueryTrustedDomainInfo(ptr ptr long ptr)
@ stdcall LsaQueryTrustedDomainInfoByName(ptr ptr long ptr)
@ stdcall LsaRegisterPolicyChangeNotification(long long)
@ stdcall LsaRemoveAccountRights(ptr ptr long ptr long)
@ stub LsaRemovePrivilegesFromAccount
@ stdcall LsaRetrievePrivateData(ptr ptr ptr)
# @ stub LsaSetDomainInformationPolicy
@ -399,9 +400,10 @@
@ stub LsaSetSecret
# @ stub LsaSetSecurityObject
@ stub LsaSetSystemAccessAccount
# @ stub LsaSetTrustedDomainInfoByName
# @ stub LsaSetTrustedDomainInformation
@ stdcall LsaSetTrustedDomainInfoByName(ptr ptr long ptr)
@ stdcall LsaSetTrustedDomainInformation(ptr ptr long ptr)
@ stdcall LsaStorePrivateData(ptr ptr ptr)
@ stdcall LsaUnregisterPolicyChangeNotification(long long)
@ stdcall MD4Final(ptr)
@ stdcall MD4Init(ptr)
@ stdcall MD4Update(ptr ptr long)

View File

@ -78,6 +78,20 @@ static BOOL ADVAPI_IsLocalComputer(LPCWSTR ServerName)
return Result;
}
/******************************************************************************
* LsaAddAccountRights [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaAddAccountRights(
LSA_HANDLE policy,
PSID sid,
PLSA_UNICODE_STRING rights,
ULONG count)
{
FIXME("(%p,%p,%p,0x%08lx) stub\n", policy, sid, rights, count);
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/******************************************************************************
* LsaClose [ADVAPI32.@]
*
@ -96,6 +110,60 @@ NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
return 0xc0000000;
}
/******************************************************************************
* LsaCreateTrustedDomainEx [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaCreateTrustedDomainEx(
LSA_HANDLE policy,
PTRUSTED_DOMAIN_INFORMATION_EX domain_info,
PTRUSTED_DOMAIN_AUTH_INFORMATION auth_info,
ACCESS_MASK access,
PLSA_HANDLE domain)
{
FIXME("(%p,%p,%p,0x%08lx,%p) stub\n", policy, domain_info, auth_info,
access, domain);
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaDeleteTrustedDomain [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaDeleteTrustedDomain(LSA_HANDLE policy, PSID sid)
{
FIXME("(%p,%p) stub\n", policy, sid);
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaEnumerateAccountRights [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaEnumerateAccountRights(
LSA_HANDLE policy,
PSID sid,
PLSA_UNICODE_STRING *rights,
PULONG count)
{
FIXME("(%p,%p,%p,%p) stub\n", policy, sid, rights, count);
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/******************************************************************************
* LsaEnumerateAccountsWithUserRight [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaEnumerateAccountsWithUserRight(
LSA_HANDLE policy,
PLSA_UNICODE_STRING rights,
PVOID *buffer,
PULONG count)
{
FIXME("(%p,%p,%p,%p) stub\n", policy, rights, buffer, count);
return STATUS_NO_MORE_ENTRIES;
}
/******************************************************************************
* LsaEnumerateTrustedDomains [ADVAPI32.@]
*
@ -132,6 +200,23 @@ NTSTATUS WINAPI LsaEnumerateTrustedDomains(
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaEnumerateTrustedDomainsEx [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(
LSA_HANDLE policy,
PLSA_ENUMERATION_HANDLE context,
PVOID *buffer,
ULONG length,
PULONG count)
{
FIXME("(%p,%p,%p,0x%08lx,%p) stub\n", policy, context, buffer, length, count);
if (count) *count = 0;
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaFreeMemory [ADVAPI32.@]
*
@ -180,6 +265,22 @@ NTSTATUS WINAPI LsaLookupNames(
return STATUS_NONE_MAPPED;
}
/******************************************************************************
* LsaLookupNames2 [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaLookupNames2(
LSA_HANDLE policy,
ULONG flags,
ULONG count,
PLSA_UNICODE_STRING names,
PLSA_REFERENCED_DOMAIN_LIST *domains,
PLSA_TRANSLATED_SID2 *sids)
{
FIXME("(%p,0x%08lx,0x%08lx,%p,%p,%p) stub\n", policy, flags, count, names, domains, sids);
return STATUS_NONE_MAPPED;
}
/******************************************************************************
* LsaLookupSids [ADVAPI32.@]
*
@ -263,6 +364,20 @@ NTSTATUS WINAPI LsaOpenPolicy(
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaOpenTrustedDomainByName [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaOpenTrustedDomainByName(
LSA_HANDLE policy,
PLSA_UNICODE_STRING name,
ACCESS_MASK access,
PLSA_HANDLE handle)
{
FIXME("(%p,%p,0x%08lx,%p) stub\n", policy, name, access, handle);
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/******************************************************************************
* LsaQueryInformationPolicy [ADVAPI32.@]
*
@ -368,6 +483,61 @@ NTSTATUS WINAPI LsaQueryInformationPolicy(
return TRUE;
}
/******************************************************************************
* LsaQueryTrustedDomainInfo [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaQueryTrustedDomainInfo(
LSA_HANDLE policy,
PSID sid,
TRUSTED_INFORMATION_CLASS class,
PVOID *buffer)
{
FIXME("(%p,%p,%d,%p) stub\n", policy, sid, class, buffer);
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/******************************************************************************
* LsaQueryTrustedDomainInfoByName [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaQueryTrustedDomainInfoByName(
LSA_HANDLE policy,
PLSA_UNICODE_STRING name,
TRUSTED_INFORMATION_CLASS class,
PVOID *buffer)
{
FIXME("(%p,%p,%d,%p) stub\n", policy, name, class, buffer);
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/******************************************************************************
* LsaRegisterPolicyChangeNotification [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaRegisterPolicyChangeNotification(
POLICY_NOTIFICATION_INFORMATION_CLASS class,
HANDLE event)
{
FIXME("(%d,%p) stub\n", class, event);
return STATUS_UNSUCCESSFUL;
}
/******************************************************************************
* LsaRemoveAccountRights [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaRemoveAccountRights(
LSA_HANDLE policy,
PSID sid,
BOOLEAN all,
PLSA_UNICODE_STRING rights,
ULONG count)
{
FIXME("(%p,%p,%d,%p,0x%08lx) stub\n", policy, sid, all, rights, count);
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaRetrievePrivateData [ADVAPI32.@]
*
@ -415,6 +585,34 @@ NTSTATUS WINAPI LsaSetInformationPolicy(
return STATUS_UNSUCCESSFUL;
}
/******************************************************************************
* LsaSetTrustedDomainInfoByName [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaSetTrustedDomainInfoByName(
LSA_HANDLE policy,
PLSA_UNICODE_STRING name,
TRUSTED_INFORMATION_CLASS class,
PVOID buffer)
{
FIXME("(%p,%p,%d,%p) stub\n", policy, name, class, buffer);
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaSetTrustedDomainInformation [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaSetTrustedDomainInformation(
LSA_HANDLE policy,
PSID sid,
TRUSTED_INFORMATION_CLASS class,
PVOID buffer)
{
FIXME("(%p,%p,%d,%p) stub\n", policy, sid, class, buffer);
return STATUS_SUCCESS;
}
/******************************************************************************
* LsaStorePrivateData [ADVAPI32.@]
*
@ -437,3 +635,15 @@ NTSTATUS WINAPI LsaStorePrivateData(
FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/******************************************************************************
* LsaUnregisterPolicyChangeNotification [ADVAPI32.@]
*
*/
NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(
POLICY_NOTIFICATION_INFORMATION_CLASS class,
HANDLE event)
{
FIXME("(%d,%p) stub\n", class, event);
return STATUS_SUCCESS;
}

View File

@ -205,21 +205,97 @@ typedef struct _LSA_TRANSLATED_SID
LONG DomainIndex;
} LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
typedef struct _TRUSTED_DOMAIN_INFORMATION_EX
{
LSA_UNICODE_STRING Name;
LSA_UNICODE_STRING FlatName;
PSID Sid;
ULONG TrustDirection;
ULONG TrustType;
ULONG TrustAttributes;
} TRUSTED_DOMAIN_INFORMATION_EX, *PTRUSTED_DOMAIN_INFORMATION_EX;
typedef struct _LSA_AUTH_INFORMATION
{
LARGE_INTEGER LastUpdateTime;
ULONG AuthType;
ULONG AuthInfoLength;
PUCHAR AuthInfo;
} LSA_AUTH_INFORMATION, *PLSA_AUTH_INFORMATION;
typedef struct _TRUSTED_DOMAIN_AUTH_INFORMATION
{
ULONG IncomingAuthInfos;
PLSA_AUTH_INFORMATION IncomingAuthenticationInformation;
PLSA_AUTH_INFORMATION IncomingPreviousAuthenticationInformation;
ULONG OutgoingAuthInfos;
PLSA_AUTH_INFORMATION OutgoingAuthenticationInformation;
PLSA_AUTH_INFORMATION OutgoingPreviousAuthenticationInformation;
} TRUSTED_DOMAIN_AUTH_INFORMATION, *PTRUSTED_DOMAIN_AUTH_INFORMATION;
typedef struct _LSA_TRANSLATED_SID2
{
SID_NAME_USE Use;
PSID Sid;
LONG DomainIndex;
ULONG Flags;
} LSA_TRANSLATED_SID2, *PLSA_TRANSLATED_SID2;
typedef enum _TRUSTED_INFORMATION_CLASS
{
TrustedDomainNameInformation = 1,
TrustedControllersInformation,
TrustedPosixOffsetInformation,
TrustedPasswordInformation,
TrustedDomainInformationBasic,
TrustedDomainInformationEx,
TrustedDomainAuthInformation,
TrustedDomainFullInformation
} TRUSTED_INFORMATION_CLASS, *PTRUSTED_INFORMATION_CLASS;
typedef enum _POLICY_NOTIFICATION_INFORMATION_CLASS
{
PolicyNotifyAuditEventsInformation = 1,
PolicyNotifyAccountDomainInformation,
PolicyNotifyServerRoleInformation,
PolicyNotifyDnsDomainInformation,
PolicyNotifyDomainEfsInformation,
PolicyNotifyDomainKerberosTicketInformation,
PolicyNotifyMachineAccountPasswordInformation
} POLICY_NOTIFICATION_INFORMATION_CLASS, *PPOLICY_NOTIFICATION_INFORMATION_CLASS;
NTSTATUS WINAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,PULONG,PNTSTATUS);
NTSTATUS WINAPI LsaClose(LSA_HANDLE);
NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE);
NTSTATUS WINAPI LsaCreateTrustedDomainEx(LSA_HANDLE,PTRUSTED_DOMAIN_INFORMATION_EX,
PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,PLSA_HANDLE);
NTSTATUS WINAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE);
NTSTATUS WINAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
NTSTATUS WINAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,PVOID*,PULONG);
NTSTATUS WINAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
NTSTATUS WINAPI LsaFreeMemory(PVOID);
NTSTATUS WINAPI LsaLookupNames(LSA_HANDLE,ULONG Count,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
PLSA_TRANSLATED_SID*);
NTSTATUS WINAPI LsaLookupNames2(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
PLSA_TRANSLATED_SID2*);
NTSTATUS WINAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID *,PLSA_REFERENCED_DOMAIN_LIST *,PLSA_TRANSLATED_NAME *);
ULONG WINAPI LsaNtStatusToWinError(NTSTATUS);
NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
NTSTATUS WINAPI LsaOpenTrustedDomainByName(LSA_HANDLE,PLSA_UNICODE_STRING,ACCESS_MASK,PLSA_HANDLE);
NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
NTSTATUS WINAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID*);
NTSTATUS WINAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID*);
NTSTATUS WINAPI LsaRegisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
NTSTATUS WINAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,PLSA_UNICODE_STRING,ULONG);
NTSTATUS WINAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING*);
NTSTATUS WINAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID);
NTSTATUS WINAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID);
NTSTATUS WINAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID);
NTSTATUS WINAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING);
NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
#ifdef __cplusplus
} /* extern "C" */