]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use load_windows_system_library in place of LoadLibrary
authorNick Mathewson <nickm@torproject.org>
Tue, 21 Sep 2010 17:45:36 +0000 (13:45 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 21 Sep 2010 18:40:10 +0000 (14:40 -0400)
changes/bug1954_loadlib [new file with mode: 0644]
src/or/eventdns.c
src/or/ntmain.c

diff --git a/changes/bug1954_loadlib b/changes/bug1954_loadlib
new file mode 100644 (file)
index 0000000..901d9ba
--- /dev/null
@@ -0,0 +1,4 @@
+  o Major bugfixes
+    - Always search the windows system directory for system DLLs, and
+      nowhere else.  Fixes bug 1954.
+
index 8ebfb79353d2b76296c2977e4a53eb2f6db33522..c6fcbd9484850d4698ef350a434f02b0dd4ce3b6 100644 (file)
@@ -3132,7 +3132,7 @@ load_nameservers_with_getnetworkparams(void)
        GetNetworkParams_fn_t fn;
 
        /* XXXX Possibly, we should hardcode the location of this DLL. */
-       if (!(handle = LoadLibrary(TEXT("iphlpapi.dll")))) {
+       if (!(handle = load_windows_system_library(TEXT("iphlpapi.dll")))) {
                log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll");
                /* right now status = 0, doesn't that mean "good" - mikec */
                status = -1;
index 0b611f0bf195ffdf7ce6e28274098d97ef3e8b00..e5855aad8e173529b946fce33e897f6f5d3ae65f 100644 (file)
@@ -139,7 +139,7 @@ nt_service_loadlibrary(void)
     return;
 
   /* XXXX Possibly, we should hardcode the location of this DLL. */
-  if (!(library = LoadLibrary(TEXT("advapi32.dll")))) {
+  if (!(library = load_windows_system_library(TEXT("advapi32.dll")))) {
     log_err(LD_GENERAL, "Couldn't open advapi32.dll.  Are you trying to use "
             "NT services on Windows 98? That doesn't work.");
     goto err;