- Implement RtlSetControlSecurityDescriptor
- Remove property set functions from ntdll.def because they are not
implemented in Win2K and above.
Modified: trunk/reactos/include/ntos/rtl.h
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
Modified: trunk/reactos/lib/rtl/sd.c
_____
Modified: trunk/reactos/include/ntos/rtl.h
--- trunk/reactos/include/ntos/rtl.h 2005-02-10 22:54:30 UTC (rev
13491)
+++ trunk/reactos/include/ntos/rtl.h 2005-02-11 12:06:29 UTC (rev
13492)
@@ -2295,6 +2295,11 @@
);
NTSTATUS STDCALL
+RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR
SecurityDescriptor,
+ IN SECURITY_DESCRIPTOR_CONTROL
ControlBitsOfInterest,
+ IN SECURITY_DESCRIPTOR_CONTROL
ControlBitsToSet);
+
+NTSTATUS STDCALL
RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
BOOLEAN DaclPresent,
PACL Dacl,
_____
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
--- trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-10 22:54:30 UTC
(rev 13491)
+++ trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-11 12:06:29 UTC
(rev 13492)
@@ -321,7 +321,6 @@
RtlCheckRegistryKey@8
RtlClearAllBits@4
RtlClearBits@12
-;RtlClosePropertySet
RtlCompactHeap@8
RtlCompareMemory@12
RtlCompareMemoryUlong@12
@@ -350,7 +349,6 @@
RtlCreateEnvironment@8
RtlCreateHeap@24
RtlCreateProcessParameters@40
-;RtlCreatePropertySet
RtlCreateQueryDebugBuffer@8
RtlCreateRegistryKey@8
RtlCreateSecurityDescriptor@8
@@ -404,7 +402,6 @@
RtlEnumProcessHeaps@8
;RtlEnumerateGenericTable
;RtlEnumerateGenericTableWithoutSplaying
-;RtlEnumerateProperties
RtlEqualComputerName@8
RtlEqualDomainName@8
RtlEqualLuid@8
@@ -435,7 +432,6 @@
RtlFindSetBits@12
RtlFindSetBitsAndClear@12
RtlFirstFreeAce@8
-;RtlFlushPropertySet
RtlFormatCurrentUserKeyPath@4
RtlFormatMessage@32
RtlFreeAnsiString@4
@@ -468,7 +464,6 @@
RtlGetSaclSecurityDescriptor@16
;RtlGetUserInfoHeap
RtlGetVersion@4
-;RtlGuidToPropertySetName
RtlIdentifierAuthoritySid@4
RtlImageDirectoryEntryToData@16
RtlImageNtHeader@4
@@ -559,7 +554,6 @@
RtlPinAtomInAtomTable@8
RtlPrefixString@12
RtlPrefixUnicodeString@12
-;RtlPropertySetNameToGuid
;RtlProtectHeap
RtlQueryAtomInAtomTable@24
RtlQueryEnvironmentVariable_U@12
@@ -568,9 +562,6 @@
RtlQueryProcessDebugInformation@12
;RtlQueryProcessHeapInformation
;RtlQueryProcessLockInformation
-;RtlQueryProperties
-;RtlQueryPropertyNames
-;RtlQueryPropertySet
RtlQueryRegistryValues@20
;RtlQuerySecurityObject
;RtlQueryTagHeap
@@ -594,6 +585,7 @@
RtlSetAllBits@4
;RtlSetAttributesSecurityDescriptor
RtlSetBits@12
+RtlSetControlSecurityDescriptor@12
RtlSetCurrentDirectory_U@4
RtlSetCurrentEnvironment@8
RtlSetDaclSecurityDescriptor@16
@@ -601,9 +593,6 @@
RtlSetGroupSecurityDescriptor@12
RtlSetInformationAcl@16
RtlSetOwnerSecurityDescriptor@12
-;RtlSetProperties
-;RtlSetPropertyNames
-;RtlSetPropertySetClassId
RtlSetSaclSecurityDescriptor@16
;RtlSetSecurityObject
RtlSetTimeZoneInformation@4
_____
Modified: trunk/reactos/lib/rtl/sd.c
--- trunk/reactos/lib/rtl/sd.c 2005-02-10 22:54:30 UTC (rev 13491)
+++ trunk/reactos/lib/rtl/sd.c 2005-02-11 12:06:29 UTC (rev 13492)
@@ -40,6 +40,7 @@
return STATUS_SUCCESS;
}
+
/*
* @implemented
*/
@@ -278,9 +279,10 @@
SecurityDescriptor->Control = SecurityDescriptor->Control |
SE_OWNER_DEFAULTED;
}
- return(STATUS_SUCCESS);
+ return STATUS_SUCCESS;
}
+
/*
* @implemented
*/
@@ -319,6 +321,7 @@
return STATUS_SUCCESS;
}
+
/*
* @implemented
*/
@@ -347,6 +350,7 @@
return STATUS_SUCCESS;
}
+
/*
* @implemented
*/
@@ -578,8 +582,7 @@
NTSTATUS STDCALL
RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD,
PSECURITY_DESCRIPTOR RelSD,
- PULONG BufferLength
- )
+ PULONG BufferLength)
{
if (AbsSD->Control & SE_SELF_RELATIVE)
{
@@ -615,6 +618,29 @@
* @implemented
*/
NTSTATUS STDCALL
+RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR
SecurityDescriptor,
+ IN SECURITY_DESCRIPTOR_CONTROL
ControlBitsOfInterest,
+ IN SECURITY_DESCRIPTOR_CONTROL
ControlBitsToSet)
+{
+ if (SecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION1)
+ {
+ return STATUS_UNKNOWN_REVISION;
+ }
+
+ /* Zero the 'bits of interest' */
+ SecurityDescriptor->Control &= ~ControlBitsOfInterest;
+
+ /* Set the 'bits to set' */
+ SecurityDescriptor->Control |= (ControlBitsToSet &
ControlBitsOfInterest);
+
+ return STATUS_SUCCESS;
+}
+
+
+/*
+ * @implemented
+ */
+NTSTATUS STDCALL
RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
PBOOLEAN SaclPresent,
PACL *Sacl,
@@ -657,6 +683,7 @@
return STATUS_SUCCESS;
}
+
/*
* @implemented
*/
@@ -694,6 +721,7 @@
return STATUS_SUCCESS;
}
+
/*
* @implemented
*/
@@ -759,6 +787,7 @@
return STATUS_SUCCESS;
}
+
/*
* @unimplemented
*/
@@ -770,9 +799,10 @@
return STATUS_NOT_IMPLEMENTED;
}
+
/*
-* @implemented
-*/
+ * @implemented
+ */
BOOLEAN STDCALL
RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR
SecurityDescriptorInput,
IN ULONG SecurityDescriptorLength,