Author: ekohl
Date: Fri Sep 28 09:19:37 2012
New Revision: 57410
URL:
http://svn.reactos.org/svn/reactos?rev=57410&view=rev
Log:
[ADVAPI32]
- Implement LsaRemovePrivilegesFromAccount.
- Add stubs for LsaGetRemoteUserName, LsaLookupPrivilegeDisplayName, LsaOpenPolicySce and
LsaSetInformationTrustedDomain.
- Fix some issues in the spec file.
Modified:
trunk/reactos/dll/win32/advapi32/advapi32.spec
trunk/reactos/dll/win32/advapi32/sec/lsa.c
trunk/reactos/include/psdk/ntsecapi.h
Modified: trunk/reactos/dll/win32/advapi32/advapi32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/advapi3…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/advapi32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/advapi32.spec [iso-8859-1] Fri Sep 28 09:19:37 2012
@@ -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)
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] Fri Sep 28 09:19:37 2012
@@ -163,7 +163,7 @@
* @implemented
*/
NTSTATUS
-NTAPI
+WINAPI
LsaClearAuditLog(IN LSA_HANDLE PolicyHandle)
{
NTSTATUS Status;
@@ -676,6 +676,21 @@
RpcEndExcept;
return Status;
+}
+
+
+/*
+ * @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;
}
@@ -855,6 +870,22 @@
/*
+ * @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
*/
NTSTATUS
@@ -1078,6 +1109,26 @@
}
+/*
+ * @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,
@@ -1528,6 +1579,33 @@
/*
+ * @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
*/
NTSTATUS
@@ -1601,6 +1679,21 @@
RpcEndExcept;
return Status;
+}
+
+
+/*
+ * @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;
}
Modified: trunk/reactos/include/psdk/ntsecapi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntsecapi.h?re…
==============================================================================
--- trunk/reactos/include/psdk/ntsecapi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntsecapi.h [iso-8859-1] Fri Sep 28 09:19:37 2012
@@ -70,6 +70,7 @@
#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 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 @@
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*,
@@ -707,6 +712,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*);
@@ -725,11 +732,14 @@
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);