- Implement RtlSetControlSecurityDescriptor

- Remove property set functions from ntdll.def because they are not implemented in Win2K and above.

svn path=/trunk/; revision=13492
This commit is contained in:
Eric Kohl 2005-02-11 12:06:29 +00:00
parent e37dad5493
commit 5930efc575
3 changed files with 41 additions and 17 deletions

View file

@ -2294,6 +2294,11 @@ RtlSetBits (
ULONG NumberToSet ULONG NumberToSet
); );
NTSTATUS STDCALL
RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet);
NTSTATUS STDCALL NTSTATUS STDCALL
RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
BOOLEAN DaclPresent, BOOLEAN DaclPresent,

View file

@ -321,7 +321,6 @@ RtlCharToInteger@12
RtlCheckRegistryKey@8 RtlCheckRegistryKey@8
RtlClearAllBits@4 RtlClearAllBits@4
RtlClearBits@12 RtlClearBits@12
;RtlClosePropertySet
RtlCompactHeap@8 RtlCompactHeap@8
RtlCompareMemory@12 RtlCompareMemory@12
RtlCompareMemoryUlong@12 RtlCompareMemoryUlong@12
@ -350,7 +349,6 @@ RtlCreateAtomTable@8
RtlCreateEnvironment@8 RtlCreateEnvironment@8
RtlCreateHeap@24 RtlCreateHeap@24
RtlCreateProcessParameters@40 RtlCreateProcessParameters@40
;RtlCreatePropertySet
RtlCreateQueryDebugBuffer@8 RtlCreateQueryDebugBuffer@8
RtlCreateRegistryKey@8 RtlCreateRegistryKey@8
RtlCreateSecurityDescriptor@8 RtlCreateSecurityDescriptor@8
@ -404,7 +402,6 @@ RtlEnterCriticalSection@4
RtlEnumProcessHeaps@8 RtlEnumProcessHeaps@8
;RtlEnumerateGenericTable ;RtlEnumerateGenericTable
;RtlEnumerateGenericTableWithoutSplaying ;RtlEnumerateGenericTableWithoutSplaying
;RtlEnumerateProperties
RtlEqualComputerName@8 RtlEqualComputerName@8
RtlEqualDomainName@8 RtlEqualDomainName@8
RtlEqualLuid@8 RtlEqualLuid@8
@ -435,7 +432,6 @@ RtlFindRange@48
RtlFindSetBits@12 RtlFindSetBits@12
RtlFindSetBitsAndClear@12 RtlFindSetBitsAndClear@12
RtlFirstFreeAce@8 RtlFirstFreeAce@8
;RtlFlushPropertySet
RtlFormatCurrentUserKeyPath@4 RtlFormatCurrentUserKeyPath@4
RtlFormatMessage@32 RtlFormatMessage@32
RtlFreeAnsiString@4 RtlFreeAnsiString@4
@ -468,7 +464,6 @@ RtlGetProcessHeaps@8
RtlGetSaclSecurityDescriptor@16 RtlGetSaclSecurityDescriptor@16
;RtlGetUserInfoHeap ;RtlGetUserInfoHeap
RtlGetVersion@4 RtlGetVersion@4
;RtlGuidToPropertySetName
RtlIdentifierAuthoritySid@4 RtlIdentifierAuthoritySid@4
RtlImageDirectoryEntryToData@16 RtlImageDirectoryEntryToData@16
RtlImageNtHeader@4 RtlImageNtHeader@4
@ -559,7 +554,6 @@ RtlOpenCurrentUser@8
RtlPinAtomInAtomTable@8 RtlPinAtomInAtomTable@8
RtlPrefixString@12 RtlPrefixString@12
RtlPrefixUnicodeString@12 RtlPrefixUnicodeString@12
;RtlPropertySetNameToGuid
;RtlProtectHeap ;RtlProtectHeap
RtlQueryAtomInAtomTable@24 RtlQueryAtomInAtomTable@24
RtlQueryEnvironmentVariable_U@12 RtlQueryEnvironmentVariable_U@12
@ -568,9 +562,6 @@ RtlQueryInformationAcl@16
RtlQueryProcessDebugInformation@12 RtlQueryProcessDebugInformation@12
;RtlQueryProcessHeapInformation ;RtlQueryProcessHeapInformation
;RtlQueryProcessLockInformation ;RtlQueryProcessLockInformation
;RtlQueryProperties
;RtlQueryPropertyNames
;RtlQueryPropertySet
RtlQueryRegistryValues@20 RtlQueryRegistryValues@20
;RtlQuerySecurityObject ;RtlQuerySecurityObject
;RtlQueryTagHeap ;RtlQueryTagHeap
@ -594,6 +585,7 @@ RtlSelfRelativeToAbsoluteSD@44
RtlSetAllBits@4 RtlSetAllBits@4
;RtlSetAttributesSecurityDescriptor ;RtlSetAttributesSecurityDescriptor
RtlSetBits@12 RtlSetBits@12
RtlSetControlSecurityDescriptor@12
RtlSetCurrentDirectory_U@4 RtlSetCurrentDirectory_U@4
RtlSetCurrentEnvironment@8 RtlSetCurrentEnvironment@8
RtlSetDaclSecurityDescriptor@16 RtlSetDaclSecurityDescriptor@16
@ -601,9 +593,6 @@ RtlSetEnvironmentVariable@12
RtlSetGroupSecurityDescriptor@12 RtlSetGroupSecurityDescriptor@12
RtlSetInformationAcl@16 RtlSetInformationAcl@16
RtlSetOwnerSecurityDescriptor@12 RtlSetOwnerSecurityDescriptor@12
;RtlSetProperties
;RtlSetPropertyNames
;RtlSetPropertySetClassId
RtlSetSaclSecurityDescriptor@16 RtlSetSaclSecurityDescriptor@16
;RtlSetSecurityObject ;RtlSetSecurityObject
RtlSetTimeZoneInformation@4 RtlSetTimeZoneInformation@4

View file

@ -40,6 +40,7 @@ RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* /*
* @implemented * @implemented
*/ */
@ -278,9 +279,10 @@ RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
SecurityDescriptor->Control = SecurityDescriptor->Control | SE_OWNER_DEFAULTED; SecurityDescriptor->Control = SecurityDescriptor->Control | SE_OWNER_DEFAULTED;
} }
return(STATUS_SUCCESS); return STATUS_SUCCESS;
} }
/* /*
* @implemented * @implemented
*/ */
@ -319,6 +321,7 @@ RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* /*
* @implemented * @implemented
*/ */
@ -347,6 +350,7 @@ RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* /*
* @implemented * @implemented
*/ */
@ -578,8 +582,7 @@ RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD,
NTSTATUS STDCALL NTSTATUS STDCALL
RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD,
PSECURITY_DESCRIPTOR RelSD, PSECURITY_DESCRIPTOR RelSD,
PULONG BufferLength PULONG BufferLength)
)
{ {
if (AbsSD->Control & SE_SELF_RELATIVE) if (AbsSD->Control & SE_SELF_RELATIVE)
{ {
@ -611,6 +614,29 @@ RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
} }
/*
* @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 * @implemented
*/ */
@ -657,6 +683,7 @@ RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* /*
* @implemented * @implemented
*/ */
@ -694,6 +721,7 @@ RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* /*
* @implemented * @implemented
*/ */
@ -759,6 +787,7 @@ RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR RelSD,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* /*
* @unimplemented * @unimplemented
*/ */
@ -770,9 +799,10 @@ RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* /*
* @implemented * @implemented
*/ */
BOOLEAN STDCALL BOOLEAN STDCALL
RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInput, RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInput,
IN ULONG SecurityDescriptorLength, IN ULONG SecurityDescriptorLength,