diff --git a/reactos/dll/win32/advapi32/advapi32.spec b/reactos/dll/win32/advapi32/advapi32.spec index 8191196335a..1b3cd09c208 100644 --- a/reactos/dll/win32/advapi32/advapi32.spec +++ b/reactos/dll/win32/advapi32/advapi32.spec @@ -363,29 +363,29 @@ @ stdcall LsaEnumerateTrustedDomainsEx(ptr ptr ptr long ptr) @ stdcall LsaFreeMemory(ptr) @ stdcall LsaGetQuotasForAccount(ptr ptr) -@ stub LsaGetRemoteUserName +@ stdcall LsaGetRemoteUserName(ptr ptr ptr) @ stdcall LsaGetSystemAccessAccount(ptr ptr) @ stdcall LsaGetUserName(ptr ptr) @ stub LsaICLookupNames @ stub LsaICLookupNamesWithCreds @ stub LsaICLookupSids @ stub LsaICLookupSidsWithCreds -@ stdcall LsaLookupNames(long long ptr ptr ptr) +@ stdcall LsaLookupNames(ptr long ptr ptr ptr) @ stdcall LsaLookupNames2(ptr long long ptr ptr ptr) -@ stub LsaLookupPrivilegeDisplayName +@ stdcall LsaLookupPrivilegeDisplayName(ptr ptr ptr ptr) @ stdcall LsaLookupPrivilegeName(ptr ptr ptr) @ stdcall LsaLookupPrivilegeValue(ptr ptr ptr) @ stdcall LsaLookupSids(ptr long ptr ptr ptr) @ stdcall LsaNtStatusToWinError(long) @ stdcall LsaOpenAccount(ptr ptr long ptr) @ stdcall LsaOpenPolicy(ptr ptr long ptr) -@ stub LsaOpenPolicySce +@ stdcall LsaOpenPolicySce(ptr ptr long ptr) @ stdcall LsaOpenSecret(ptr ptr long ptr) @ stdcall LsaOpenTrustedDomain(ptr ptr long ptr) @ stdcall LsaOpenTrustedDomainByName(ptr ptr long ptr) @ stdcall LsaQueryDomainInformationPolicy(ptr long ptr) @ stdcall LsaQueryForestTrustInformation(ptr ptr ptr) -@ stdcall LsaQueryInfoTrustedDomain(long long long) +@ stdcall LsaQueryInfoTrustedDomain(ptr long ptr) @ stdcall LsaQueryInformationPolicy(ptr long ptr) @ stdcall LsaQuerySecret(ptr ptr ptr ptr ptr) @ stdcall LsaQuerySecurityObject(ptr long ptr) @@ -393,12 +393,12 @@ @ stdcall LsaQueryTrustedDomainInfoByName(ptr ptr long ptr) @ stdcall LsaRegisterPolicyChangeNotification(long long) @ stdcall LsaRemoveAccountRights(ptr ptr long ptr long) -@ stub LsaRemovePrivilegesFromAccount +@ stdcall LsaRemovePrivilegesFromAccount(ptr long ptr) @ stdcall LsaRetrievePrivateData(ptr ptr ptr) @ stdcall LsaSetDomainInformationPolicy(ptr long ptr) @ stdcall LsaSetForestTrustInformation(ptr ptr ptr long ptr) -@ stdcall LsaSetInformationPolicy(long long ptr) -@ stub LsaSetInformationTrustedDomain +@ stdcall LsaSetInformationPolicy(ptr long ptr) +@ stdcall LsaSetInformationTrustedDomain(ptr long ptr) @ stdcall LsaSetQuotasForAccount(ptr ptr) @ stdcall LsaSetSecret(ptr ptr ptr) @ stdcall LsaSetSecurityObject(ptr long ptr) diff --git a/reactos/dll/win32/advapi32/sec/lsa.c b/reactos/dll/win32/advapi32/sec/lsa.c index 04cee32314e..7605198e6c2 100644 --- a/reactos/dll/win32/advapi32/sec/lsa.c +++ b/reactos/dll/win32/advapi32/sec/lsa.c @@ -163,7 +163,7 @@ LsaAddPrivilegesToAccount(IN LSA_HANDLE AccountHandle, * @implemented */ NTSTATUS -NTAPI +WINAPI LsaClearAuditLog(IN LSA_HANDLE PolicyHandle) { NTSTATUS Status; @@ -679,6 +679,21 @@ LsaGetQuotasForAccount(IN LSA_HANDLE AccountHandle, } +/* + * @unimplemented + */ +NTSTATUS +WINAPI +LsaGetRemoteUserName(IN PLSA_UNICODE_STRING SystemName OPTIONAL, + OUT PLSA_UNICODE_STRING *UserName, + OUT PLSA_UNICODE_STRING *DomainName OPTIONAL) +{ + FIXME("LsaGetUserName(%p %p %p)\n", + SystemName, UserName, DomainName); + return STATUS_NOT_IMPLEMENTED; +} + + /* * @implemented */ @@ -854,6 +869,22 @@ LsaLookupNames2(IN LSA_HANDLE PolicyHandle, } +/* + * @unimplemented + */ +NTSTATUS +WINAPI +LsaLookupPrivilegeDisplayName(IN LSA_HANDLE PolicyHandle, + IN PLSA_UNICODE_STRING Name, + OUT PLSA_UNICODE_STRING *DisplayName, + OUT PSHORT LanguageReturned) +{ + FIXME("LsaLookupPrivilegeDisplayName(%p %p %p %p)\n", + PolicyHandle, Name, DisplayName, LanguageReturned); + return STATUS_NOT_IMPLEMENTED; +} + + /* * @implemented */ @@ -1078,6 +1109,26 @@ LsaOpenPolicy(IN PLSA_UNICODE_STRING SystemName OPTIONAL, } +/* + * @unimplemented + */ +NTSTATUS +WINAPI +LsaOpenPolicySce(IN PLSA_UNICODE_STRING SystemName OPTIONAL, + IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, + IN ACCESS_MASK DesiredAccess, + OUT PLSA_HANDLE PolicyHandle) +{ + FIXME("LsaOpenPolicySce(%s %p 0x%08lx %p)\n", + SystemName ? debugstr_w(SystemName->Buffer) : "(null)", + ObjectAttributes, DesiredAccess, PolicyHandle); + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @implemented + */ NTSTATUS WINAPI LsaOpenSecret(IN LSA_HANDLE PolicyHandle, @@ -1527,6 +1578,33 @@ LsaRemoveAccountRights(IN LSA_HANDLE PolicyHandle, } +/* + * @implemented + */ +NTSTATUS +WINAPI +LsaRemovePrivilegesFromAccount(IN LSA_HANDLE AccountHandle, + IN BOOLEAN AllPrivileges, + IN PPRIVILEGE_SET Privileges OPTIONAL) +{ + NTSTATUS Status; + + RpcTryExcept + { + Status = LsarRemovePrivilegesFromAccount((LSAPR_HANDLE)AccountHandle, + AllPrivileges, + (PLSAPR_PRIVILEGE_SET)Privileges); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + Status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return Status; +} + + /* * @unimplemented */ @@ -1604,6 +1682,21 @@ LsaSetInformationPolicy(IN LSA_HANDLE PolicyHandle, } +/* + * @unimplemented + */ +NTSTATUS +WINAPI +LsaSetInformationTrustedDomain(IN LSA_HANDLE TrustedDomainHandle, + IN TRUSTED_INFORMATION_CLASS InformationClass, + IN PVOID Buffer) +{ + FIXME("LsaSetInformationTrustedDomain(%p %d %p)\n", + TrustedDomainHandle, InformationClass, Buffer); + return STATUS_NOT_IMPLEMENTED; +} + + /* * @implemented */ diff --git a/reactos/include/psdk/ntsecapi.h b/reactos/include/psdk/ntsecapi.h index a45dd46cd57..8b6d4905ed6 100644 --- a/reactos/include/psdk/ntsecapi.h +++ b/reactos/include/psdk/ntsecapi.h @@ -70,6 +70,7 @@ extern "C" { #define POLICY_AUDIT_LOG_ADMIN 512 #define POLICY_SERVER_ADMIN 1024 #define POLICY_LOOKUP_NAMES 2048 +#define POLICY_NOTIFICATION 4096 #define POLICY_READ (STANDARD_RIGHTS_READ|6) #define POLICY_WRITE (STANDARD_RIGHTS_WRITE|2040) #define POLICY_EXECUTE (STANDARD_RIGHTS_EXECUTE|2049) @@ -690,6 +691,8 @@ NTSTATUS NTAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE, NTSTATUS NTAPI LsaFreeMemory(PVOID); NTSTATUS NTAPI LsaFreeReturnBuffer(PVOID); NTSTATUS NTAPI LsaGetQuotasForAccount(LSA_HANDLE,PQUOTA_LIMITS); +NTSTATUS NTAPI LsaGetRemoteUserName(PLSA_UNICODE_STRING, PLSA_UNICODE_STRING*, + PLSA_UNICODE_STRING*); NTSTATUS NTAPI LsaGetSystemAccessAccount(LSA_HANDLE, PULONG); NTSTATUS NTAPI LsaGetUserName(PUNICODE_STRING*,PUNICODE_STRING*); NTSTATUS NTAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID, @@ -700,6 +703,8 @@ NTSTATUS NTAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING, PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID*); NTSTATUS NTAPI LsaLookupNames2(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING, PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID2*); +NTSTATUS NTAPI LsaLookupPrivilegeDisplayName(LSA_HANDLE,PLSA_UNICODE_STRING, + PLSA_UNICODE_STRING*,PSHORT); NTSTATUS NTAPI LsaLookupPrivilegeName(LSA_HANDLE,PLUID,PLSA_UNICODE_STRING*); NTSTATUS NTAPI LsaLookupPrivilegeValue(LSA_HANDLE,PLSA_UNICODE_STRING,PLUID); NTSTATUS NTAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID*, @@ -708,6 +713,8 @@ ULONG NTAPI LsaNtStatusToWinError(NTSTATUS); NTSTATUS NTAPI LsaOpenAccount(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE); NTSTATUS NTAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES, ACCESS_MASK,PLSA_HANDLE); +NTSTATUS NTAPI LsaOpenPolicySce(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES, + ACCESS_MASK,PLSA_HANDLE); NTSTATUS NTAPI LsaOpenSecret(LSA_HANDLE, PLSA_UNICODE_STRING, ACCESS_MASK, PLSA_HANDLE); NTSTATUS NTAPI LsaQuerySecurityObject(LSA_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR*); NTSTATUS NTAPI LsaOpenTrustedDomain(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE); @@ -725,11 +732,14 @@ NTSTATUS NTAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING, NTSTATUS NTAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE); NTSTATUS NTAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN, PLSA_UNICODE_STRING,ULONG); +NTSTATUS NTAPI LsaRemovePrivilegesFromAccount(LSA_HANDLE,BOOLEAN,PPRIVILEGE_SET); NTSTATUS NTAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING, PLSA_UNICODE_STRING*); NTSTATUS NTAPI LsaSetDomainInformationPolicy(LSA_HANDLE, POLICY_DOMAIN_INFORMATION_CLASS,PVOID); NTSTATUS NTAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID); +NTSTATUS NTAPI LsaSetInformationTrustedDomain(LSA_HANDLE,TRUSTED_INFORMATION_CLASS, + PVOID); NTSTATUS NTAPI LsaSetQuotasForAccount(LSA_HANDLE,PQUOTA_LIMITS); NTSTATUS NTAPI LsaSetSecret(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING); NTSTATUS NTAPI LsaSetSecurityObject(LSA_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);