Share via


개체 클래스에 대한 defaultSecurityDescriptor 읽기

ADSI를 사용하면 IADs 인터페이스를 사용하여 개체 클래스에 대한 defaultSecurityDescriptor 특성을 가져올 수 있습니다. 개체 클래스에 대한 defaultSecurityDescriptor 특성을 가져오려면 다음 단계를 수행합니다.

  1. 개체 클래스에 대한 classSchema 개체에 대한 IADs 인터페이스 포인터를 가져옵니다.
  2. IADs.Get 메서드를 사용하여 개체의 기본 보안 설명자를 가져옵니다. 보안 설명자를 포함하는 속성의 이름은 "defaultSecurityDescriptor"입니다. 속성은 SDDL 문자열 형식의 기본 보안 설명자가 있는 BSTR을 포함하는 VARIANT 로 반환됩니다.
  3. ConvertStringSecurityDescriptorToSecurityDescriptor 함수를 사용하여 SDDL 문자열 양식을 보안 설명자로 변환합니다.
  4. GetSecurityDescriptorDacl, GetSecurityDescriptorSacl, GetSecurityDescriptorOwnerGetSecurityDescriptorControl 보안 API를 사용하여 보안 설명자의 일부를 읽습니다.

이 작업을 수행하는 방법을 보여 주는 코드 예제는 defaultSecurityDescriptor를 읽기 위한 예제 코드를 참조하세요.