-/*
+/* $Id$
+ *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/sec/sec.c
- * PURPOSE: Registry functions
+ * PURPOSE: Security descriptor functions
* PROGRAMMER: Ariadne ( ariadne@xs4all.nl)
- * Steven Edwards ( Steven_Ed4153@yahoo.com )
+ * Steven Edwards ( Steven_Ed4153@yahoo.com )
+ * Andrew Greenwood ( silverblade_uk@hotmail.com )
* UPDATE HISTORY:
* Created 01/11/98
- * Added a few new stubs 6/27/03
*/
-#define NTOS_MODE_USER
-#include <ntos.h>
-#include <windows.h>
+#include <advapi32.h>
+#define NDEBUG
+#include <debug.h>
+/*
+ * @implemented
+ */
BOOL
STDCALL
GetSecurityDescriptorControl (
}
+/*
+ * @implemented
+ */
BOOL
STDCALL
GetSecurityDescriptorDacl (
}
+/*
+ * @implemented
+ */
BOOL
STDCALL
GetSecurityDescriptorGroup (
}
-DWORD
-STDCALL
-GetSecurityDescriptorLength (
- PSECURITY_DESCRIPTOR pSecurityDescriptor
- )
-{
- return RtlLengthSecurityDescriptor(pSecurityDescriptor);
-}
-
-
+/*
+ * @implemented
+ */
BOOL
STDCALL
GetSecurityDescriptorOwner (
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID *pOwner,
LPBOOL lpbOwnerDefaulted
-)
+ )
{
BOOLEAN OwnerDefaulted;
NTSTATUS Status;
}
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+GetSecurityDescriptorRMControl (
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ PUCHAR RMControl)
+{
+ if (!RtlGetSecurityDescriptorRMControl(SecurityDescriptor,
+ RMControl))
+ return ERROR_INVALID_DATA;
+
+ return ERROR_SUCCESS;
+}
+
+
+/*
+ * @implemented
+ */
BOOL
STDCALL
GetSecurityDescriptorSacl (
}
+/*
+ * @implemented
+ */
BOOL
STDCALL
InitializeSecurityDescriptor (
return TRUE;
}
+
+/*
+ * @implemented
+ */
BOOL
STDCALL
IsValidSecurityDescriptor (
}
-WINBOOL
+/*
+ * @implemented
+ */
+BOOL
STDCALL
MakeAbsoluteSD (
PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
}
-WINBOOL
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+MakeAbsoluteSD2(IN OUT PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
+ OUT LPDWORD lpdwBufferSize)
+{
+ NTSTATUS Status;
+
+ Status = RtlSelfRelativeToAbsoluteSD2(pSelfRelativeSecurityDescriptor,
+ lpdwBufferSize);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError (RtlNtStatusToDosError (Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
STDCALL
MakeSelfRelativeSD (
PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
}
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+SetSecurityDescriptorControl (
+ PSECURITY_DESCRIPTOR pSecurityDescriptor,
+ SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
+ SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet)
+{
+ NTSTATUS Status;
+
+ Status = RtlSetControlSecurityDescriptor(pSecurityDescriptor,
+ ControlBitsOfInterest,
+ ControlBitsToSet);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError (RtlNtStatusToDosError (Status));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
BOOL
STDCALL
SetSecurityDescriptorDacl (
}
+/*
+ * @implemented
+ */
BOOL
STDCALL
SetSecurityDescriptorGroup (
}
+/*
+ * @implemented
+ */
BOOL
STDCALL
SetSecurityDescriptorOwner (
{
NTSTATUS Status;
- Status = RtlSetGroupSecurityDescriptor (pSecurityDescriptor,
+ Status = RtlSetOwnerSecurityDescriptor (pSecurityDescriptor,
pOwner,
bOwnerDefaulted);
if (!NT_SUCCESS(Status))
}
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+SetSecurityDescriptorRMControl (
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ PUCHAR RMControl)
+{
+ RtlSetSecurityDescriptorRMControl(SecurityDescriptor,
+ RMControl);
+
+ return ERROR_SUCCESS;
+}
+
+
+/*
+ * @implemented
+ */
BOOL
STDCALL
SetSecurityDescriptorSacl (
return TRUE;
}
-BOOL STDCALL
-GetUserNameA(LPSTR lpBuffer, LPDWORD nSize)
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+ConvertToAutoInheritPrivateObjectSecurity(IN PSECURITY_DESCRIPTOR ParentDescriptor,
+ IN PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,
+ OUT PSECURITY_DESCRIPTOR* NewSecurityDescriptor,
+ IN GUID* ObjectType,
+ IN BOOLEAN IsDirectoryObject,
+ IN PGENERIC_MAPPING GenericMapping)
{
- return(FALSE);
+ UNIMPLEMENTED;
+ return FALSE;
}
-BOOL STDCALL
-GetUserNameW(LPWSTR lpBuffer, LPDWORD nSize)
+
+/*
+ * @unimplemented
+ */
+DWORD
+STDCALL
+BuildSecurityDescriptorW(IN PTRUSTEE_W pOwner OPTIONAL,
+ IN PTRUSTEE_W pGroup OPTIONAL,
+ IN ULONG cCountOfAccessEntries,
+ IN PEXPLICIT_ACCESS pListOfAccessEntries OPTIONAL,
+ IN ULONG cCountOfAuditEntries,
+ IN PEXPLICIT_ACCESS pListOfAuditEntries OPTIONAL,
+ IN PSECURITY_DESCRIPTOR pOldSD OPTIONAL,
+ OUT PULONG pSizeNewSD,
+ OUT PSECURITY_DESCRIPTOR* pNewSD)
{
- return(FALSE);
+ UNIMPLEMENTED;
+ return FALSE;
}
-WINBOOL
+
+/*
+ * @unimplemented
+ */
+DWORD
STDCALL
-GetFileSecurityA (
- LPCSTR lpFileName,
- SECURITY_INFORMATION RequestedInformation,
- PSECURITY_DESCRIPTOR pSecurityDescriptor,
- DWORD nLength,
- LPDWORD lpnLengthNeeded
- )
+BuildSecurityDescriptorA(IN PTRUSTEE_A pOwner OPTIONAL,
+ IN PTRUSTEE_A pGroup OPTIONAL,
+ IN ULONG cCountOfAccessEntries,
+ IN PEXPLICIT_ACCESS pListOfAccessEntries OPTIONAL,
+ IN ULONG cCountOfAuditEntries,
+ IN PEXPLICIT_ACCESS pListOfAuditEntries OPTIONAL,
+ IN PSECURITY_DESCRIPTOR pOldSD OPTIONAL,
+ OUT PULONG pSizeNewSD,
+ OUT PSECURITY_DESCRIPTOR* pNewSD)
{
- return(FALSE);
+ UNIMPLEMENTED;
+ return FALSE;
}
-WINBOOL
-STDCALL
-GetFileSecurityW (
- LPCWSTR lpFileName,
- SECURITY_INFORMATION RequestedInformation,
- PSECURITY_DESCRIPTOR pSecurityDescriptor,
- DWORD nLength,
- LPDWORD lpnLengthNeeded
- )
+
+/*
+ * @unimplemented
+ */
+BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved)
{
- return(FALSE);
+ DPRINT1("%s() not implemented!\n", __FUNCTION__);
+ return ERROR_CALL_NOT_IMPLEMENTED;
}
-WINBOOL
-STDCALL
-SetFileSecurityA (
- LPCSTR lpFileName,
- SECURITY_INFORMATION SecurityInformation,
- PSECURITY_DESCRIPTOR pSecurityDescriptor
- )
+/*
+ * @unimplemented
+ */
+BOOL WINAPI DecryptFileA(LPCSTR lpFileName, DWORD dwReserved)
+{
+ DPRINT1("%s() not implemented!\n", __FUNCTION__);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL WINAPI EncryptFileW(LPCWSTR lpFileName)
+{
+ DPRINT1("%s() not implemented!\n", __FUNCTION__);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL WINAPI EncryptFileA(LPCSTR lpFileName)
+{
+ DPRINT1("%s() not implemented!\n", __FUNCTION__);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW(
+ PSECURITY_DESCRIPTOR pSecurityDescriptor,
+ DWORD dword,
+ SECURITY_INFORMATION SecurityInformation,
+ LPWSTR* lpwstr,
+ PULONG pulong)
{
- return(FALSE);
+ DPRINT1("%s() not implemented!\n", __FUNCTION__);
+ return ERROR_CALL_NOT_IMPLEMENTED;
}
+
+BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA(
+ PSECURITY_DESCRIPTOR pSecurityDescriptor,
+ DWORD dword,
+ SECURITY_INFORMATION SecurityInformation,
+ LPSTR* lpstr,
+ PULONG pulong)
+{
+ DPRINT1("%s() not implemented!\n", __FUNCTION__);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
/* EOF */