#include "auth/gensec/gensec.h"
#include "param/param.h"
#include "dynconfig.h"
+#include "libcli/resolve/resolve.h"
static struct cli_credentials *credentials;
static bool showall = false;
/*****************************************************
return a connection to a server
*******************************************************/
-static struct smbcli_state *connect_one(char *share, const char **ports)
+static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx,
+ char *share, const char **ports)
{
struct smbcli_state *c;
fstring server;
server,
ports,
share, NULL,
- credentials, NULL);
+ credentials, resolve_ctx, NULL);
if (!NT_STATUS_IS_OK(status)) {
return NULL;
argc -= optind;
argv += optind;
- cli = connect_one(share, lp_smb_ports(lp_ctx));
+ cli = connect_one(lp_resolve_context(lp_ctx), share, lp_smb_ports(lp_ctx));
if (!cli) {
DEBUG(0,("Failed to connect to %s\n", share));
exit(1);