-/* $Id: rtl.h,v 1.31 2000/04/14 01:42:07 ekohl Exp $
+/* $Id: rtl.h,v 1.32 2000/04/15 23:12:26 ekohl Exp $
*
*/
ULONG OemSize
);
+BOOLEAN
+STDCALL
+RtlPrefixString (
+ PANSI_STRING String1,
+ PANSI_STRING String2,
+ BOOLEAN CaseInsensitive
+ );
+
+BOOLEAN
+STDCALL
+RtlPrefixUnicodeString (
+ PUNICODE_STRING String1,
+ PUNICODE_STRING String2,
+ BOOLEAN CaseInsensitive
+ );
+
NTSTATUS
STDCALL
RtlQueryRegistryValues (
#ifndef _INCLUDE_DDK_SEFUNCS_H
#define _INCLUDE_DDK_SEFUNCS_H
-/* $Id: sefuncs.h,v 1.9 2000/04/06 02:27:17 ekohl Exp $ */
+/* $Id: sefuncs.h,v 1.10 2000/04/15 23:12:26 ekohl Exp $ */
NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
BOOLEAN STDCALL RtlValidSid (PSID Sid);
+NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
-/* $Id: rtl.h,v 1.14 2000/04/07 12:45:02 ekohl Exp $
+/* $Id: rtl.h,v 1.15 2000/04/15 23:11:42 ekohl Exp $
*
*/
DWORD flags
);
+BOOLEAN
+STDCALL
+RtlEqualComputerName (
+ IN PUNICODE_STRING ComputerName1,
+ IN PUNICODE_STRING ComputerName2
+ );
+
+BOOLEAN
+STDCALL
+RtlEqualDomainName (
+ IN PUNICODE_STRING DomainName1,
+ IN PUNICODE_STRING DomainName2
+ );
+
VOID
STDCALL
RtlEraseUnicodeString (
IN PUNICODE_STRING String
);
+NTSTATUS
+STDCALL
+RtlLargeIntegerToChar (
+ IN PLARGE_INTEGER Value,
+ IN ULONG Base,
+ IN ULONG Length,
+ IN OUT PCHAR String
+ );
+
/* Path functions */
ULONG
-; $Id: ntdll.def,v 1.51 2000/04/14 01:43:20 ekohl Exp $
+; $Id: ntdll.def,v 1.52 2000/04/15 23:10:02 ekohl Exp $
;
; ReactOS Operating System
;
;RtlConvertExclusiveToShared
RtlConvertLongToLargeInteger@4
;RtlConvertSharedToExclusive
-;RtlConvertSidToUnicodeString
+RtlConvertSidToUnicodeString@12
;RtlConvertUiListToApiList
RtlConvertUlongToLargeInteger@4
-;RtlCopyLuid
+RtlCopyLuid@8
;RtlCopyLuidAndAttributesArray
;RtlCopySecurityDescriptor
RtlCopySid@12
;RtlEnumerateGenericTable
;RtlEnumerateGenericTableWithoutSplaying
;RtlEnumerateProperties
-;RtlEqualComputerName
-;RtlEqualDomainName
-;RtlEqualLuid
+RtlEqualComputerName@8
+RtlEqualDomainName@8
+RtlEqualLuid@8
RtlEqualPrefixSid@8
RtlEqualSid@8
RtlEqualString@12
RtlLargeIntegerShiftLeft@12
RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract@16
-;RtlLargeIntegerToChar
+RtlLargeIntegerToChar@16
RtlLeaveCriticalSection@4
RtlLengthRequiredSid@4
RtlLengthSecurityDescriptor@4
;RtlOpenCurrentUser
;RtlPcToFileHeader
;RtlPinAtomInAtomTable
-;RtlPrefixString
-;RtlPrefixUnicodeString
+RtlPrefixString@12
+RtlPrefixUnicodeString@12
;RtlPropertySetNameToGuid
;RtlProtectHeap
;RtlQueryAtomInAtomTable
-; $Id: ntdll.edf,v 1.40 2000/04/14 01:43:20 ekohl Exp $
+; $Id: ntdll.edf,v 1.41 2000/04/15 23:10:02 ekohl Exp $
;
; ReactOS Operating System
;
RtlCompareString=RtlCompareString@12
RtlCompareUnicodeString=RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger=RtlConvertLongToLargeInteger@4
+RtlConvertSidToUnicodeString=RtlConvertSidToUnicodeString@12
RtlConvertUlongToLargeInteger=RtlConvertUlongToLargeInteger@4
+RtlCopyLuid=RtlCopyLuid@8
RtlCopySid=RtlCopySid@12
RtlCopyString=RtlCopyString@8
RtlCopyUnicodeString=RtlCopyUnicodeString@8
RtlEnlargedUnsignedDivide=RtlEnlargedUnsignedDivide@16
RtlEnlargedUnsignedMultiply=RtlEnlargedUnsignedMultiply@8
RtlEnterCriticalSection=RtlEnterCriticalSection@4
+RtlEqualComputerName=RtlEqualComputerName@8
+RtlEqualDomainName=RtlEqualDomainName@8
+RtlEqualLuid=RtlEqualLuid@8
RtlEqualPrefixSid=RtlEqualPrefixSid@8
RtlEqualSid=RtlEqualSid@8
RtlEqualString=RtlEqualString@12
RtlLargeIntegerShiftLeft=RtlLargeIntegerShiftLeft@12
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
+RtlLargeIntegerToChar=RtlLargeIntegerToChar@16
RtlLeaveCriticalSection=RtlLeaveCriticalSection@4
RtlLengthRequiredSid=RtlLengthRequiredSid@4
RtlLengthSecurityDescriptor=RtlLengthSecurityDescriptor@4
RtlOemStringToUnicodeSize=RtlOemStringToUnicodeSize@4
RtlOemStringToUnicodeString=RtlOemStringToUnicodeString@12
RtlOemToUnicodeN=RtlOemToUnicodeN@20
+RtlPrefixString=RtlPrefixString@12
+RtlPrefixUnicodeString=RtlPrefixUnicodeString@12
RtlQueryEnvironmentVariable_U=RtlQueryEnvironmentVariable_U@12
RtlQueryInformationAcl=RtlQueryInformationAcl@16
RtlReAllocateHeap=RtlReAllocateHeap@16
-# $Id: makefile,v 1.44 2000/04/14 01:45:17 ekohl Exp $
+# $Id: makefile,v 1.45 2000/04/15 23:09:39 ekohl Exp $
#
# ReactOS Operating System
#
rtl/math.o rtl/mem.o rtl/nls.o rtl/process.o rtl/sd.o \
rtl/thread.o rtl/unicode.o rtl/env.o rtl/path.o rtl/ppb.o \
rtl/bitmap.o rtl/time.o rtl/acl.o rtl/sid.o rtl/image.o \
- rtl/access.o
+ rtl/access.o rtl/luid.o
STDIO_OBJECTS = stdio/sprintf.o stdio/swprintf.o
--- /dev/null
+/* $Id: luid.c,v 1.1 2000/04/15 23:10:41 ekohl Exp $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Locally unique identifier (LUID) helper functions
+ * FILE: lib/ntdll/rtl/luid.c
+ * PROGRAMER: Eric Kohl <ekohl@zr-online.de>
+ * REVISION HISTORY:
+ * 15/04/2000: Created
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ddk/ntddk.h>
+
+#include <internal/debug.h>
+
+/* FUNCTIONS *****************************************************************/
+
+VOID
+STDCALL
+RtlCopyLuid (
+ PLUID LuidDest,
+ PLUID LuidSrc
+ )
+{
+ LuidDest->QuadPart = LuidSrc->QuadPart;
+}
+
+#if 0
+RtlCopyLuidAndAttributesArray (
+ )
+{
+
+}
+#endif
+
+BOOLEAN
+STDCALL
+RtlEqualLuid (
+ PLUID Luid1,
+ PLUID Luid2
+ )
+{
+ return ((Luid1->QuadPart == Luid2->QuadPart) ? TRUE : FALSE);
+}
+
+/* EOF */
-/* $Id: sid.c,v 1.1 2000/03/12 01:17:59 ekohl Exp $
+/* $Id: sid.c,v 1.2 2000/04/15 23:10:41 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Security manager
- * FILE: kernel/se/sid.c
+ * FILE: lib/ntdll/rtl/sid.c
* PROGRAMER: David Welch <welch@cwcom.net>
* REVISION HISTORY:
* 26/07/98: Added stubs for security functions
}
+NTSTATUS
+STDCALL
+RtlConvertSidToUnicodeString (
+ PUNICODE_STRING String,
+ PSID Sid,
+ BOOLEAN AllocateBuffer
+ )
+{
+ WCHAR Buffer[256];
+ PWSTR wcs;
+ ULONG Length;
+ BYTE i;
+
+ if (RtlValidSid (Sid) == FALSE)
+ return STATUS_INVALID_SID;
+
+ wcs = Buffer;
+ wcs += swprintf (wcs, L"S-%u-", Sid->Revision);
+ if (!Sid->IdentifierAuthority.Value[0] &&
+ !Sid->IdentifierAuthority.Value[1])
+ {
+ wcs += swprintf (wcs,
+ L"%u",
+ (DWORD)Sid->IdentifierAuthority.Value[2] << 24 |
+ (DWORD)Sid->IdentifierAuthority.Value[3] << 16 |
+ (DWORD)Sid->IdentifierAuthority.Value[4] << 8 |
+ (DWORD)Sid->IdentifierAuthority.Value[5]);
+ }
+ else
+ {
+ wcs += swprintf (wcs,
+ L"0x%02hx%02hx%02hx%02hx%02hx%02hx",
+ Sid->IdentifierAuthority.Value[0],
+ Sid->IdentifierAuthority.Value[1],
+ Sid->IdentifierAuthority.Value[2],
+ Sid->IdentifierAuthority.Value[3],
+ Sid->IdentifierAuthority.Value[4],
+ Sid->IdentifierAuthority.Value[5]);
+ }
+
+ for (i = 0; i < Sid->SubAuthorityCount; i++)
+ {
+ wcs += swprintf (wcs,
+ L"-%u",
+ Sid->SubAuthority[0]);
+ }
+
+ Length = (wcs - Buffer) * sizeof(WCHAR);
+ if(AllocateBuffer)
+ {
+ String->Buffer = RtlAllocateHeap (RtlGetProcessHeap (),
+ 0,
+ Length + sizeof(WCHAR));
+ if (String->Buffer == NULL)
+ return STATUS_NO_MEMORY;
+ String->MaximumLength = Length + sizeof(WCHAR);
+ }
+ else
+ {
+ if (Length > String->MaximumLength)
+ return STATUS_BUFFER_TOO_SMALL;
+ }
+
+ String->Length = Length;
+ memmove (String->Buffer,
+ Buffer,
+ Length);
+ if (Length < String->MaximumLength)
+ String->Buffer[Length] = 0;
+
+ return STATUS_SUCCESS;
+}
/* EOF */
-/* $Id: unicode.c,v 1.14 2000/02/19 19:31:41 ekohl Exp $
+/* $Id: unicode.c,v 1.15 2000/04/15 23:10:41 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
*/
#include <ddk/ntddk.h>
+#include <ntdll/rtl.h>
//#include <internal/nls.h>
#include <ctype.h>
}
+BOOLEAN
+STDCALL
+RtlEqualComputerName (
+ IN PUNICODE_STRING ComputerName1,
+ IN PUNICODE_STRING ComputerName2
+ )
+{
+ return RtlEqualDomainName (ComputerName1,
+ ComputerName2);
+}
+
+
+BOOLEAN
+STDCALL
+RtlEqualDomainName (
+ IN PUNICODE_STRING DomainName1,
+ IN PUNICODE_STRING DomainName2
+ )
+{
+ OEM_STRING OemString1;
+ OEM_STRING OemString2;
+ BOOLEAN Result;
+
+ RtlUpcaseUnicodeStringToOemString (&OemString1,
+ DomainName1,
+ TRUE);
+ RtlUpcaseUnicodeStringToOemString (&OemString2,
+ DomainName2,
+ TRUE);
+
+ Result = RtlEqualString (&OemString1,
+ &OemString2,
+ FALSE);
+
+ RtlFreeOemString (&OemString1);
+ RtlFreeOemString (&OemString2);
+
+ return Result;
+}
+
+
BOOLEAN
STDCALL
RtlEqualString (
{
ULONG Radix;
CHAR temp[33];
- ULONG v = 0;
+ ULONG v = Value;
ULONG i;
PCHAR tp;
PCHAR sp;
}
+NTSTATUS
+STDCALL
+RtlLargeIntegerToChar (
+ IN PLARGE_INTEGER Value,
+ IN ULONG Base,
+ IN ULONG Length,
+ IN OUT PCHAR String
+ )
+{
+ ULONG Radix;
+ CHAR temp[65];
+ ULONGLONG v = Value->QuadPart;
+ ULONG i;
+ PCHAR tp;
+ PCHAR sp;
+
+ Radix = Base;
+ if (Radix == 0)
+ Radix = 10;
+
+ if ((Radix != 2) && (Radix != 8) &&
+ (Radix != 10) && (Radix != 16))
+ return STATUS_INVALID_PARAMETER;
+
+ tp = temp;
+ while (v || tp == temp)
+ {
+ i = v % Radix;
+ v = v / Radix;
+ if (i < 10)
+ *tp = i + '0';
+ else
+ *tp = i + 'a' - 10;
+ tp++;
+ }
+
+ if (tp - temp >= Length)
+ return STATUS_BUFFER_TOO_SMALL;
+
+ sp = String;
+ while (tp > temp)
+ *sp++ = *--tp;
+ *sp = 0;
+
+ return STATUS_SUCCESS;
+}
+
+
ULONG
STDCALL
RtlOemStringToUnicodeSize (
}
+BOOLEAN
+STDCALL
+RtlPrefixString (
+ PANSI_STRING String1,
+ PANSI_STRING String2,
+ BOOLEAN CaseInsensitive
+ )
+{
+ PCHAR pc1;
+ PCHAR pc2;
+ ULONG Length;
+
+ if (String2->Length < String1->Length)
+ return FALSE;
+
+ Length = String1->Length;
+ pc1 = String1->Buffer;
+ pc2 = String2->Buffer;
+
+ if (pc1 && pc2)
+ {
+ if (CaseInsensitive)
+ {
+ while (Length--)
+ {
+ if (RtlUpperChar (*pc1++) != RtlUpperChar (*pc2++))
+ return FALSE;
+ }
+ }
+ else
+ {
+ while (Length--)
+ {
+ if (*pc1++ != *pc2++)
+ return FALSE;
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+BOOLEAN
+STDCALL
+RtlPrefixUnicodeString (
+ PUNICODE_STRING String1,
+ PUNICODE_STRING String2,
+ BOOLEAN CaseInsensitive
+ )
+{
+ PWCHAR pc1;
+ PWCHAR pc2;
+ ULONG Length;
+
+ if (String2->Length < String1->Length)
+ return FALSE;
+
+ Length = String1->Length / 2;
+ pc1 = String1->Buffer;
+ pc2 = String2->Buffer;
+
+ if (pc1 && pc2)
+ {
+ if (CaseInsensitive)
+ {
+ while (Length--)
+ {
+ if (RtlUpcaseUnicodeChar (*pc1++)
+ != RtlUpcaseUnicodeChar (*pc2++))
+ return FALSE;
+ }
+ }
+ else
+ {
+ while (Length--)
+ {
+ if( *pc1++ != *pc2++ )
+ return FALSE;
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
ULONG
STDCALL
RtlUnicodeStringToAnsiSize (
-; $Id: ntoskrnl.def,v 1.67 2000/04/08 19:08:05 ekohl Exp $
+; $Id: ntoskrnl.def,v 1.68 2000/04/15 23:13:17 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
RtlCopySid@12
RtlCopyString@8
RtlCopyUnicodeString@8
-;RtlCreateAcl
+RtlCreateAcl@12
;RtlCreateAtomTable
;RtlCreateHeap
;RtlCreateRegistryKey
;RtlInsertUnicodePrefix
RtlIntegerToChar@16
RtlIntegerToUnicodeString@12
-;RtlIsNamelegalDOS8Dot3
+;RtlIsNameLegalDOS8Dot3
RtlLargeIntegerAdd@16
RtlLargeIntegerArithmeticShift@12
RtlLargeIntegerDivide@20
RtlOemStringToUnicodeString@12
RtlOemToUnicodeN@20
;RtlPinAtomInAtomTable
-;RtlPrefixString
-;RtlPrefixUnicodeString
+RtlPrefixString@12
+RtlPrefixUnicodeString@12
;RtlQueryAtomInAtomTable
;RtlQueryRegistryValues
;RtlQueryTimeZoneInformation
RtlSetDaclSecurityDescriptor@16
RtlSetGroupSecurityDescriptor@12
RtlSetOwnerSecurityDescriptor@12
-;RtlSetSaclSecurityDescriptor
+RtlSetSaclSecurityDescriptor@16
;RtlSetTimeZoneInformation
;RtlSplay
RtlSubAuthorityCountSid@4
-; $Id: ntoskrnl.edf,v 1.54 2000/04/08 19:08:05 ekohl Exp $
+; $Id: ntoskrnl.edf,v 1.55 2000/04/15 23:13:17 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
RtlCopySid=RtlCopySid@12
RtlCopyString=RtlCopyString@8
RtlCopyUnicodeString=RtlCopyUnicodeString@8
+RtlCreateAcl=RtlCreateAcl@12
RtlCreateSecurityDescriptor=RtlCreateSecurityDescriptor@8
RtlCreateUnicodeString=RtlCreateUnicodeString@8
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
RtlOemStringToCountedUnicodeString=RtlOemStringToCountedUnicodeString@12
RtlOemStringToUnicodeSize=RtlOemStringToUnicodeSize@4
RtlOemStringToUnicodeString=RtlOemStringToUnicodeString@12
+RtlPrefixString=RtlPrefixString@12
+RtlPrefixUnicodeString=RtlPrefixUnicodeString@12
RtlSecondsSince1970ToTime=RtlSecondsSince1970ToTime@8
RtlSecondsSince1980ToTime=RtlSecondsSince1980ToTime@8
RtlSetAllBits=RtlSetAllBits@4
RtlSetDaclSecurityDescriptor=RtlSetDaclSecurityDescriptor@16
RtlSetGroupSecurityDescriptor=RtlSetGroupSecurityDescriptor@12
RtlSetOwnerSecurityDescriptor=RtlSetOwnerSecurityDescriptor@12
+RtlSetSaclSecurityDescriptor=RtlSetSaclSecurityDescriptor@16
RtlSubAuthorityCountSid=RtlSubAuthorityCountSid@4
RtlSubAuthoritySid=RtlSubAuthoritySid@8
RtlTimeFieldsToTime=RtlTimeFieldsToTime@8
-/* $Id: unicode.c,v 1.14 2000/03/03 00:48:50 ekohl Exp $
+/* $Id: unicode.c,v 1.15 2000/04/15 23:13:48 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
}
+BOOLEAN
+STDCALL
+RtlPrefixString (
+ PANSI_STRING String1,
+ PANSI_STRING String2,
+ BOOLEAN CaseInsensitive
+ )
+{
+ PCHAR pc1;
+ PCHAR pc2;
+ ULONG Length;
+
+ if (String2->Length < String1->Length)
+ return FALSE;
+
+ Length = String1->Length;
+ pc1 = String1->Buffer;
+ pc2 = String2->Buffer;
+
+ if (pc1 && pc2)
+ {
+ if (CaseInsensitive)
+ {
+ while (Length--)
+ {
+ if (RtlUpperChar (*pc1++) != RtlUpperChar (*pc2++))
+ return FALSE;
+ }
+ }
+ else
+ {
+ while (Length--)
+ {
+ if (*pc1++ != *pc2++)
+ return FALSE;
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+BOOLEAN
+STDCALL
+RtlPrefixUnicodeString (
+ PUNICODE_STRING String1,
+ PUNICODE_STRING String2,
+ BOOLEAN CaseInsensitive
+ )
+{
+ PWCHAR pc1;
+ PWCHAR pc2;
+ ULONG Length;
+
+ if (String2->Length < String1->Length)
+ return FALSE;
+
+ Length = String1->Length / 2;
+ pc1 = String1->Buffer;
+ pc2 = String2->Buffer;
+
+ if (pc1 && pc2)
+ {
+ if (CaseInsensitive)
+ {
+ while (Length--)
+ {
+ if (RtlUpcaseUnicodeChar (*pc1++)
+ != RtlUpcaseUnicodeChar (*pc2++))
+ return FALSE;
+ }
+ }
+ else
+ {
+ while (Length--)
+ {
+ if( *pc1++ != *pc2++ )
+ return FALSE;
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
ULONG
STDCALL
RtlUnicodeStringToAnsiSize(IN PUNICODE_STRING UnicodeString)
-/* $Id: sd.c,v 1.2 1999/12/26 17:22:19 ea Exp $
+/* $Id: sd.c,v 1.3 2000/04/15 23:14:32 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
return(STATUS_SUCCESS);
}
+NTSTATUS
+STDCALL
+RtlGetSaclSecurityDescriptor (
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ PBOOLEAN SaclPresent,
+ PACL *Sacl,
+ PBOOLEAN SaclDefaulted)
+{
+ if (SecurityDescriptor->Revision != 1)
+ {
+ return(STATUS_UNSUCCESSFUL);
+ }
+ if (!(SecurityDescriptor->Control & SE_SACL_PRESENT))
+ {
+ *SaclPresent = 0;
+ return(STATUS_SUCCESS);
+ }
+ *SaclPresent = 1;
+ if (SecurityDescriptor->Sacl == NULL)
+ {
+ *Sacl = NULL;
+ }
+ else
+ {
+ if (SecurityDescriptor->Control & SE_SELF_RELATIVE)
+ {
+ *Sacl = (PACL)((ULONG)SecurityDescriptor->Sacl +
+ (PVOID)SecurityDescriptor);
+ }
+ else
+ {
+ *Sacl = SecurityDescriptor->Sacl;
+ }
+ }
+ if (SecurityDescriptor->Control & SE_SACL_DEFAULTED)
+ {
+ *SaclDefaulted = 1;
+ }
+ else
+ {
+ *SaclDefaulted = 0;
+ }
+ return(STATUS_SUCCESS);
+}
+
+NTSTATUS
+STDCALL
+RtlSetSaclSecurityDescriptor (
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ BOOLEAN SaclPresent,
+ PACL Sacl,
+ BOOLEAN SaclDefaulted
+ )
+{
+ if (SecurityDescriptor->Revision != 1)
+ {
+ return(STATUS_UNSUCCESSFUL);
+ }
+ if (SecurityDescriptor->Control & SE_SELF_RELATIVE)
+ {
+ return(STATUS_UNSUCCESSFUL);
+ }
+ if (!SaclPresent)
+ {
+ SecurityDescriptor->Control = SecurityDescriptor->Control & ~(SE_SACL_PRESENT);
+ return(STATUS_SUCCESS);
+ }
+ SecurityDescriptor->Control = SecurityDescriptor->Control | SE_SACL_PRESENT;
+ SecurityDescriptor->Sacl = Sacl;
+ SecurityDescriptor->Control = SecurityDescriptor->Control & ~(SE_SACL_DEFAULTED);
+ if (SaclDefaulted)
+ {
+ SecurityDescriptor->Control = SecurityDescriptor->Control | SE_SACL_DEFAULTED;
+ }
+ return(STATUS_SUCCESS);
+}
+
NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD,
PSECURITY_DESCRIPTOR RelSD,
PULONG BufferLength)
UNIMPLEMENTED;
}
-
/* EOF */
-/* $Id: sid.c,v 1.3 2000/01/05 21:57:00 dwelch Exp $
+/* $Id: sid.c,v 1.4 2000/04/15 23:14:32 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Security manager
- * FILE: kernel/se/sid.c
+ * FILE: ntoskrnl/se/sid.c
* PROGRAMER: David Welch <welch@cwcom.net>
* REVISION HISTORY:
* 26/07/98: Added stubs for security functions
return(STATUS_SUCCESS);
}
-
/* EOF */