diff options
author | Zackery Spytz <zspytz@gmail.com> | 2020-02-05 03:13:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 03:13:00 (GMT) |
commit | b439a715cb75e2663df32588fd004c7528b9f83b (patch) | |
tree | 480b47d06b8fe4e870841bf74db3963da1ed8cd8 /Python/dynload_win.c | |
parent | cf5b109dbb39bcff1bc5b5d22036866d11de971b (diff) | |
download | cpython-b439a715cb75e2663df32588fd004c7528b9f83b.zip cpython-b439a715cb75e2663df32588fd004c7528b9f83b.tar.gz cpython-b439a715cb75e2663df32588fd004c7528b9f83b.tar.bz2 |
bpo-39553: Delete HAVE_SXS protected code (GH-18356)
https://bugs.python.org/issue39553
Automerge-Triggered-By: @zooba
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r-- | Python/dynload_win.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c index 6deba11..2bf3384 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -12,12 +12,6 @@ #include "patchlevel.h" #include <windows.h> -// "activation context" magic - see dl_nt.c... -#if HAVE_SXS -extern ULONG_PTR _Py_ActivateActCtx(); -void _Py_DeactivateActCtx(ULONG_PTR cookie); -#endif - #ifdef _DEBUG #define PYD_DEBUG_SUFFIX "_d" #else @@ -187,16 +181,10 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix, { HINSTANCE hDLL = NULL; unsigned int old_mode; -#if HAVE_SXS - ULONG_PTR cookie = 0; -#endif /* Don't display a message box when Python can't load a DLL */ old_mode = SetErrorMode(SEM_FAILCRITICALERRORS); -#if HAVE_SXS - cookie = _Py_ActivateActCtx(); -#endif /* bpo-36085: We use LoadLibraryEx with restricted search paths to avoid DLL preloading attacks and enable use of the AddDllDirectory function. We add SEARCH_DLL_LOAD_DIR to @@ -206,9 +194,6 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); Py_END_ALLOW_THREADS -#if HAVE_SXS - _Py_DeactivateActCtx(cookie); -#endif /* restore old error mode settings */ SetErrorMode(old_mode); |