s3:torture: Fix size types in make_nonstd_fd()
[samba.git] / source3 / torture / wbc_async.c
index 9252b58bc98a93ecccf778093bfdab1ed99dc66e..a9020ddcda5a85cdf29ad9d12ed7eec3d9207b13 100644 (file)
@@ -98,10 +98,10 @@ struct wb_context {
 
 static int make_nonstd_fd(int fd)
 {
-       int i;
+       size_t i;
        int sys_errno = 0;
        int fds[3];
-       int num_fds = 0;
+       size_t num_fds = 0;
 
        if (fd == -1) {
                return -1;
@@ -288,7 +288,7 @@ static struct tevent_req *wb_connect_send(TALLOC_CTX *mem_ctx,
 
        subreq = async_connect_send(mem_ctx, ev, wb_ctx->fd,
                                    (struct sockaddr *)(void *)&sunaddr,
-                                   sizeof(sunaddr));
+                                   sizeof(sunaddr), NULL, NULL, NULL);
        if (subreq == NULL) {
                goto nomem;
        }
@@ -325,14 +325,14 @@ static wbcErr wb_connect_recv(struct tevent_req *req)
 
 static const char *winbindd_socket_dir(void)
 {
-#ifdef SOCKET_WRAPPER
-       const char *env_dir;
+       if (nss_wrapper_enabled()) {
+               const char *env_dir;
 
-       env_dir = getenv(WINBINDD_SOCKET_DIR_ENVVAR);
-       if (env_dir) {
-               return env_dir;
+               env_dir = getenv("SELFTEST_WINBINDD_SOCKET_DIR");
+               if (env_dir != NULL) {
+                       return env_dir;
+               }
        }
-#endif
 
        return WINBINDD_SOCKET_DIR;
 }