diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-08-28 15:22:37 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-08-28 15:22:37 +0400 |
commit | 71d8f118da24bb5a31f406e5fba222a324913b05 (patch) | |
tree | 093f51ed610d7333e4a933f68a1ee8900f5438bb /winsup/utils/module_info.cc | |
parent | 893a8b78fca52a5474fbca9a0b881b622afc5044 (diff) |
* loadlib.h: New header implementing safe LoadLibrary calls.
Include throughout files using LoadLibrary function.
* cygcheck.cc (dump_sysinfo): Retrieve kernel32.dll handle via
GetModuleHandle, rather than using LoadLibrary.
* cygpath.cc (get_long_name): Ditto.
(do_sysfolders): Append .dll suffix in LoadLibrary call.
* ldh.cc (WinMain): Use LoadLibraryExW with DONT_RESOLVE_DLL_REFERENCES
to avoid loading malicious library code.
* locale.cc (print_locale_with_codeset): Change way to retrieve
kernel32.dll path.
Diffstat (limited to 'winsup/utils/module_info.cc')
-rw-r--r-- | winsup/utils/module_info.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/utils/module_info.cc b/winsup/utils/module_info.cc index c0e7079cc..1522b50b3 100644 --- a/winsup/utils/module_info.cc +++ b/winsup/utils/module_info.cc @@ -1,6 +1,6 @@ /* module_info.cc - Copyright 1999,2000,2001 Red Hat, Inc. + Copyright 1999,2000,2001,2010 Red Hat, Inc. Written by Egor Duda <deo@logos-m.ru> @@ -13,6 +13,7 @@ details. */ #include <stdlib.h> #include <windows.h> #include <psapi.h> +#include "loadlib.h" static int psapi_loaded = 0; static HMODULE psapi_module_handle = NULL; |