Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
[x86/Linux] Fix dangling CLR_ImpersonateLoggedOnUser reference (#8435)
Browse files Browse the repository at this point in the history
src/vm/securityprincipal.cpp is not included in x86/Linux build, and
thus all the reference to the functions in it will be dangling. (i.e.
COMPrincipal::CLR_ImpersonateLoggedOnUser).

This commit hides COMPrincipal for non-Windows platforms, and marks
COMPlusThrowCallbackHelper as NYI.
  • Loading branch information
parjong authored and janvorli committed Dec 5, 2016
1 parent 55b1bb4 commit 46483e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vm/i386/excepx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2235,6 +2235,7 @@ int COMPlusThrowCallbackHelper(IJitManager *pJitManager,
int iFilt = 0;
BOOL impersonating = FALSE;

#ifndef FEATURE_PAL
EX_TRY
{
GCPROTECT_BEGIN (throwable);
Expand Down Expand Up @@ -2285,6 +2286,10 @@ int COMPlusThrowCallbackHelper(IJitManager *pJitManager,
EX_END_CATCH(SwallowAllExceptions)

return iFilt;
#else // FEATURE_PAL
PORTABILITY_ASSERT("COMPlusThrowCallbackHelper");
return EXCEPTION_CONTINUE_SEARCH;
#endif // FEATURE_PAL
}

//******************************************************************************
Expand Down
4 changes: 4 additions & 0 deletions src/vm/securityprincipal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@



#ifndef FEATURE_PAL
class COMPrincipal
{
public:
#ifndef FEATURE_CORECLR
static
INT32 QCALLTYPE ImpersonateLoggedOnUser(HANDLE hToken);

Expand All @@ -24,6 +26,8 @@ class COMPrincipal

static
INT32 QCALLTYPE SetThreadToken(HANDLE hToken);
#endif // !FEATURE_CORECLR

static void CLR_ImpersonateLoggedOnUser(HANDLE hToken);
};
#endif // FEATURE_PAL

0 comments on commit 46483e1

Please sign in to comment.