uwrap: Fix loading the system libraries.
authorAndreas Schneider <asn@samba.org>
Fri, 20 Dec 2013 10:09:15 +0000 (11:09 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 20 Dec 2013 10:09:15 +0000 (11:09 +0100)
Thanks metze!

src/uid_wrapper.c

index ff2639fbd67f8e9112e28eca2e2b81293b963fd8..3c69259bc9f75c33d2e90886573ff0260ead34ca 100644 (file)
@@ -191,6 +191,7 @@ static void *uwrap_load_lib_handle(enum uwrap_lib lib)
        case UWRAP_LIBSOCKET:
                /* FALL TROUGH */
        case UWRAP_LIBC:
+               handle = uwrap.libc.handle;
                if (handle == NULL) {
                        for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) {
                                char soname[256] = {0};
@@ -200,8 +201,6 @@ static void *uwrap_load_lib_handle(enum uwrap_lib lib)
                        }
 
                        uwrap.libc.handle = handle;
-               } else {
-                       handle = uwrap.libc.handle;
                }
                break;
        }