본문 바로가기

프로그래밍/미분류

[MSDNArchive|번역] 내 프로세스는 가상화되었나?

반응형
http://blogs.msdn.com/b/vistacompatteam/archive/2007/05/01/is-my-process-virtualized-or-redirected.aspx

내 프로세스는 가상화되었나, 리디렉트되었나?


어떤 시나리오에서는 프로세스가 실제로 리디렉트 되는지 아닌지를 알아내야 할 때가 있다. 예를 들면, 라이브러리가 로딩되었는데, 그 라이브러리에서 호스트 프로세스와 라이브러리가 동일한 가상화를 갖는지 알아야 할 때이다. GetTokenInformation에서 TokenVirtualizationEnabled 인자로 알아낼 수 있다.

이 API에서 TokenElevation 인자를 사용하면 상승된 토큰으로 실행되는지 알 수 있다. 그러나 TokenElevation 이 관리자로 실행되고 있다는 걸 알려주는 건 아니다. 몇가지 권한이 추가된 Backup Operator 나 표준사용자일 수도 있다.

마르텐

Is my Process Virtualized or Redirected?

  MSDNArchive 30 Apr 2007 7:49 PM

In some scenarios it might be necessary to know whether a process is actually being redirected or not. A case in point is for example a library that is loaded and needs to know whether the host process and the library have an identical view of the virtualized world. You can use GetTokenInformation  with TokenVirtualizationEnabled to find that out.

The same API with TokenElevation instead of TokenVirtualizationEnabled will give you whether you run with an elevated token or not. Note that this does not guarantee you are running as administrator. You might very well be Backup Operator or standard user with a couple of manually added privileges.

Maarten
728x90