RtlSetOwnerSecurityDescriptor 함수(ntifs.h)

RtlSetOwnerSecurityDescriptor 루틴은 절대 형식 보안 설명자의 소유자 정보를 설정합니다. 보안 설명자에 이미 있는 소유자 정보를 대체합니다.

구문

NTSYSAPI NTSTATUS RtlSetOwnerSecurityDescriptor(
  [in, out]      PSECURITY_DESCRIPTOR SecurityDescriptor,
  [in, optional] PSID                 Owner,
  [in, optional] BOOLEAN              OwnerDefaulted
);

매개 변수

[in, out] SecurityDescriptor

소유자를 설정할 SECURITY_DESCRIPTOR 구조체에 대한 포인터입니다. RtlSetOwnerSecurityDescriptor 는 기존 소유자를 새 소유자로 바꿉니다.

[in, optional] Owner

보안 설명자의 새 주 소유자에 대한 SID(보안 식별자) 구조체에 대한 포인터입니다. SID 구조 자체가 아닌 이 포인터는 보안 설명자로 복사됩니다. 이 매개 변수가 NULL인 경우 RtlSetOwnerSecurityDescriptor 는 보안 설명자의 소유자 정보를 지웁니다. 이렇게 하면 보안 설명자가 소유자가 없는 것으로 표시됩니다.

[in, optional] OwnerDefaulted

소유자 정보가 기본 메커니즘에서 파생된 경우 TRUE 로 설정합니다. 이 값이 TRUE이면 기본 정보입니다. RtlSetOwnerSecurityDescriptor 는 보안 설명자의 SECURITY_DESCRIPTOR_CONTROL 필드에 SE_OWNER_DEFAULTED 플래그를 설정합니다. 이 매개 변수가 FALSE이면 SE_OWNER_DEFAULTED 플래그가 지워집니다.

반환 값

RtlSetOwnerSecurityDescriptor는 다음 상태 코드 중 하나를 반환할 수 있습니다.

반환 코드 설명
STATUS_SUCCESS
소유자가 성공적으로 설정되거나 다시 설정되었습니다.
STATUS_UNKNOWN_REVISION
지정된 보안 설명자의 버전은 이 루틴에서 인식되지 않습니다.
STATUS_INVALID_SECURITY_DESCR
지정된 보안 설명자는 유효한 절대 보안 설명자가 아닙니다.

설명

보안 및 액세스 제어에 대한 자세한 내용은 드라이버 개발자를 위한 Windows 보안 모델 및 Windows SDK의 이러한 topics 대한 설명서를 참조하세요.

요구 사항

요구 사항
대상 플랫폼 유니버설
헤더 ntifs.h(Ntifs.h 포함)
라이브러리 NtosKrnl.lib
DLL NtosKrnl.exe(커널 모드); Ntdll.dll(사용자 모드)
IRQL < DISPATCH_LEVEL

추가 정보

RtlCreateSecurityDescriptor

RtlCreateSecurityDescriptorRelative

RtlLengthSecurityDescriptor

RtlSetDaclSecurityDescriptor

RtlValidSecurityDescriptor

SECURITY_DESCRIPTOR

SECURITY_DESCRIPTOR_CONTROL

SID

SeAssignSecurity