Author: akhaldi
Date: Fri Oct 24 17:51:40 2014
New Revision: 64968
URL:
http://svn.reactos.org/svn/reactos?rev=64968&view=rev
Log:
[ADVAPI32]
* Move some functions from ac.c to security.c.
CORE-8540
Modified:
trunk/reactos/dll/win32/advapi32/sec/ac.c
trunk/reactos/dll/win32/advapi32/wine/security.c
Modified: trunk/reactos/dll/win32/advapi32/sec/ac.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/ac.…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/ac.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/ac.c [iso-8859-1] Fri Oct 24 17:51:40 2014
@@ -8,149 +8,7 @@
#include <advapi32.h>
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
-/* --- ACL --- */
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-GetAclInformation(PACL pAcl,
- LPVOID pAclInformation,
- DWORD nAclInformationLength,
- ACL_INFORMATION_CLASS dwAclInformationClass)
-{
- NTSTATUS Status;
-
- Status = RtlQueryInformationAcl(pAcl,
- pAclInformation,
- nAclInformationLength,
- dwAclInformationClass);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-InitializeAcl(PACL pAcl,
- DWORD nAclLength,
- DWORD dwAclRevision)
-{
- NTSTATUS Status;
-
- Status = RtlCreateAcl(pAcl,
- nAclLength,
- dwAclRevision);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-IsValidAcl(PACL pAcl)
-{
- return RtlValidAcl (pAcl);
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-SetAclInformation(PACL pAcl,
- LPVOID pAclInformation,
- DWORD nAclInformationLength,
- ACL_INFORMATION_CLASS dwAclInformationClass)
-{
- NTSTATUS Status;
-
- Status = RtlSetInformationAcl(pAcl,
- pAclInformation,
- nAclInformationLength,
- dwAclInformationClass);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
/* --- ACE --- */
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-AddAccessAllowedAce(PACL pAcl,
- DWORD dwAceRevision,
- DWORD AccessMask,
- PSID pSid)
-{
- NTSTATUS Status;
-
- Status = RtlAddAccessAllowedAce(pAcl,
- dwAceRevision,
- AccessMask,
- pSid);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL WINAPI
-AddAccessAllowedAceEx(PACL pAcl,
- DWORD dwAceRevision,
- DWORD AceFlags,
- DWORD AccessMask,
- PSID pSid)
-{
- NTSTATUS Status;
-
- Status = RtlAddAccessAllowedAceEx(pAcl,
- dwAceRevision,
- AceFlags,
- AccessMask,
- pSid);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
/*
* @implemented
@@ -183,60 +41,6 @@
return TRUE;
}
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-AddAccessDeniedAce(PACL pAcl,
- DWORD dwAceRevision,
- DWORD AccessMask,
- PSID pSid)
-{
- NTSTATUS Status;
-
- Status = RtlAddAccessDeniedAce(pAcl,
- dwAceRevision,
- AccessMask,
- pSid);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL WINAPI
-AddAccessDeniedAceEx(PACL pAcl,
- DWORD dwAceRevision,
- DWORD AceFlags,
- DWORD AccessMask,
- PSID pSid)
-{
- NTSTATUS Status;
-
- Status = RtlAddAccessDeniedAceEx(pAcl,
- dwAceRevision,
- AceFlags,
- AccessMask,
- pSid);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
/*
* @implemented
*/
@@ -267,96 +71,6 @@
return TRUE;
}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-AddAce(PACL pAcl,
- DWORD dwAceRevision,
- DWORD dwStartingAceIndex,
- LPVOID pAceList,
- DWORD nAceListLength)
-{
- NTSTATUS Status;
-
- Status = RtlAddAce(pAcl,
- dwAceRevision,
- dwStartingAceIndex,
- pAceList,
- nAceListLength);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-AddAuditAccessAce(PACL pAcl,
- DWORD dwAceRevision,
- DWORD dwAccessMask,
- PSID pSid,
- BOOL bAuditSuccess,
- BOOL bAuditFailure)
-{
- NTSTATUS Status;
-
- Status = RtlAddAuditAccessAce(pAcl,
- dwAceRevision,
- dwAccessMask,
- pSid,
- bAuditSuccess,
- bAuditFailure);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL WINAPI
-AddAuditAccessAceEx(PACL pAcl,
- DWORD dwAceRevision,
- DWORD AceFlags,
- DWORD dwAccessMask,
- PSID pSid,
- BOOL bAuditSuccess,
- BOOL bAuditFailure)
-{
- NTSTATUS Status;
-
- Status = RtlAddAuditAccessAceEx(pAcl,
- dwAceRevision,
- AceFlags,
- dwAccessMask,
- pSid,
- bAuditSuccess,
- bAuditFailure);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
/*
* @implemented
@@ -392,65 +106,6 @@
return TRUE;
}
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-DeleteAce(PACL pAcl,
- DWORD dwAceIndex)
-{
- NTSTATUS Status;
-
- Status = RtlDeleteAce(pAcl,
- dwAceIndex);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-FindFirstFreeAce(PACL pAcl,
- LPVOID *pAce)
-{
- return RtlFirstFreeAce(pAcl,
- (PACE*)pAce);
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-GetAce(PACL pAcl,
- DWORD dwAceIndex,
- LPVOID *pAce)
-{
- NTSTATUS Status;
-
- Status = RtlGetAce(pAcl,
- dwAceIndex,
- pAce);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- return TRUE;
-}
-
/*
* @implemented
Modified: trunk/reactos/dll/win32/advapi32/wine/security.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/wine/se…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/wine/security.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/wine/security.c [iso-8859-1] Fri Oct 24 17:51:40
2014
@@ -802,6 +802,250 @@
/*
* @implemented
*/
+BOOL
+WINAPI
+InitializeAcl(PACL pAcl,
+ DWORD nAclLength,
+ DWORD dwAclRevision)
+{
+ NTSTATUS Status;
+
+ Status = RtlCreateAcl(pAcl,
+ nAclLength,
+ dwAclRevision);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+AddAccessAllowedAce(PACL pAcl,
+ DWORD dwAceRevision,
+ DWORD AccessMask,
+ PSID pSid)
+{
+ NTSTATUS Status;
+
+ Status = RtlAddAccessAllowedAce(pAcl,
+ dwAceRevision,
+ AccessMask,
+ pSid);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL WINAPI
+AddAccessAllowedAceEx(PACL pAcl,
+ DWORD dwAceRevision,
+ DWORD AceFlags,
+ DWORD AccessMask,
+ PSID pSid)
+{
+ NTSTATUS Status;
+
+ Status = RtlAddAccessAllowedAceEx(pAcl,
+ dwAceRevision,
+ AceFlags,
+ AccessMask,
+ pSid);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+AddAccessDeniedAce(PACL pAcl,
+ DWORD dwAceRevision,
+ DWORD AccessMask,
+ PSID pSid)
+{
+ NTSTATUS Status;
+
+ Status = RtlAddAccessDeniedAce(pAcl,
+ dwAceRevision,
+ AccessMask,
+ pSid);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL WINAPI
+AddAccessDeniedAceEx(PACL pAcl,
+ DWORD dwAceRevision,
+ DWORD AceFlags,
+ DWORD AccessMask,
+ PSID pSid)
+{
+ NTSTATUS Status;
+
+ Status = RtlAddAccessDeniedAceEx(pAcl,
+ dwAceRevision,
+ AceFlags,
+ AccessMask,
+ pSid);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+AddAce(PACL pAcl,
+ DWORD dwAceRevision,
+ DWORD dwStartingAceIndex,
+ LPVOID pAceList,
+ DWORD nAceListLength)
+{
+ NTSTATUS Status;
+
+ Status = RtlAddAce(pAcl,
+ dwAceRevision,
+ dwStartingAceIndex,
+ pAceList,
+ nAceListLength);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+DeleteAce(PACL pAcl,
+ DWORD dwAceIndex)
+{
+ NTSTATUS Status;
+
+ Status = RtlDeleteAce(pAcl,
+ dwAceIndex);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+FindFirstFreeAce(PACL pAcl,
+ LPVOID *pAce)
+{
+ return RtlFirstFreeAce(pAcl,
+ (PACE*)pAce);
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+GetAce(PACL pAcl,
+ DWORD dwAceIndex,
+ LPVOID *pAce)
+{
+ NTSTATUS Status;
+
+ Status = RtlGetAce(pAcl,
+ dwAceIndex,
+ pAce);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+GetAclInformation(PACL pAcl,
+ LPVOID pAclInformation,
+ DWORD nAclInformationLength,
+ ACL_INFORMATION_CLASS dwAclInformationClass)
+{
+ NTSTATUS Status;
+
+ Status = RtlQueryInformationAcl(pAcl,
+ pAclInformation,
+ nAclInformationLength,
+ dwAclInformationClass);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+IsValidAcl(PACL pAcl)
+{
+ return RtlValidAcl (pAcl);
+}
+
+/*
+ * @implemented
+ */
BOOL WINAPI
AllocateLocallyUniqueId(PLUID Luid)
{
@@ -892,6 +1136,65 @@
return !*AccessStatus;
}
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+AddAuditAccessAce(PACL pAcl,
+ DWORD dwAceRevision,
+ DWORD dwAccessMask,
+ PSID pSid,
+ BOOL bAuditSuccess,
+ BOOL bAuditFailure)
+{
+ NTSTATUS Status;
+
+ Status = RtlAddAuditAccessAce(pAcl,
+ dwAceRevision,
+ dwAccessMask,
+ pSid,
+ bAuditSuccess,
+ bAuditFailure);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL WINAPI
+AddAuditAccessAceEx(PACL pAcl,
+ DWORD dwAceRevision,
+ DWORD AceFlags,
+ DWORD dwAccessMask,
+ PSID pSid,
+ BOOL bAuditSuccess,
+ BOOL bAuditFailure)
+{
+ NTSTATUS Status;
+
+ Status = RtlAddAuditAccessAceEx(pAcl,
+ dwAceRevision,
+ AceFlags,
+ dwAccessMask,
+ pSid,
+ bAuditSuccess,
+ bAuditFailure);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/**********************************************************************
* PrivilegeCheck EXPORTED
*
@@ -915,6 +1218,31 @@
}
*pfResult = (BOOL)Result;
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+SetAclInformation(PACL pAcl,
+ LPVOID pAclInformation,
+ DWORD nAclInformationLength,
+ ACL_INFORMATION_CLASS dwAclInformationClass)
+{
+ NTSTATUS Status;
+
+ Status = RtlSetInformationAcl(pAcl,
+ pAclInformation,
+ nAclInformationLength,
+ dwAclInformationClass);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
return TRUE;
}