#include "includes.h"
#include "libcli/libcli.h"
-#include "libcli/raw/interfaces.h"
-#include "libcli/raw/raw_proto.h"
-#include "torture/torture.h"
#include "torture/util.h"
-#include "torture/basic/proto.h"
+#include "torture/unix/proto.h"
#include "lib/cmdline/popt_common.h"
-#include "auth/credentials/credentials.h"
#include "libcli/resolve/resolve.h"
#include "param/param.h"
struct smbcli_options options;
struct smbcli_session_options session_options;
- lp_smbcli_options(tctx->lp_ctx, &options);
- lp_smbcli_session_options(tctx->lp_ctx, &session_options);
+ lpcfg_smbcli_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &session_options);
status = smbcli_full_connection(tctx, &cli, host,
- lp_smb_ports(tctx->lp_ctx),
- share, NULL,
- cmdline_credentials,
- lp_resolve_context(tctx->lp_ctx),
- tctx->ev, &options, &session_options);
+ lpcfg_smb_ports(tctx->lp_ctx),
+ share, NULL, lpcfg_socket_options(tctx->lp_ctx),
+ popt_get_cmdline_credentials(),
+ lpcfg_resolve_context(tctx->lp_ctx),
+ tctx->ev, &options, &session_options,
+ lpcfg_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
- printf("failed to connect to //%s/%s: %s\n",
- host, share, nt_errstr(status));
+ torture_comment(tctx, "failed to connect to //%s/%s: %s\n",
+ host, share, nt_errstr(status));
+ torture_fail(tctx, "Failed to connect to server");
return NULL;
}
-1, fname, info2);
}
-static bool search_callback(void *private, const union smb_search_data *fdata)
+static bool search_callback(void *private_data, const union smb_search_data *fdata)
{
- struct unix_info2 *info2 = (struct unix_info2 *)private;
+ struct unix_info2 *info2 = (struct unix_info2 *)private_data;
info2->end_of_file = fdata->unix_info2.end_of_file;
info2->num_bytes = fdata->unix_info2.num_bytes;