diff options
author | Andreas Schneider <asn@samba.org> | 2021-01-13 14:47:01 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-05-28 02:55:31 +0000 |
commit | 06a1861ca86dad4d9acd7301324c1c3267bb60f9 (patch) | |
tree | a7bcd5b038acfe651daf7d8249e99d83cb67549c | |
parent | 8b01db48f430d7e0cc6bac8dc4bd0d913d1cfcc4 (diff) | |
download | samba-06a1861ca86dad4d9acd7301324c1c3267bb60f9.tar.gz |
examples: Pass cli_credentials to connect_one in smb2mount
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | examples/fuse/smb2mount.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/fuse/smb2mount.c b/examples/fuse/smb2mount.c index aefa90c4c78..c27f442ad76 100644 --- a/examples/fuse/smb2mount.c +++ b/examples/fuse/smb2mount.c @@ -25,7 +25,7 @@ #include "libsmb/proto.h" #include "clifuse.h" -static struct cli_state *connect_one(const struct user_auth_info *auth_info, +static struct cli_state *connect_one(struct cli_credentials *creds, const char *server, int port, const char *share) { @@ -36,7 +36,7 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info, nt_status = cli_full_connection_creds(&c, lp_netbios_name(), server, NULL, port, share, "?????", - get_cmdline_auth_info_creds(auth_info), + creds, flags); if (!NT_STATUS_IS_OK(nt_status)) { DBG_ERR("cli_full_connection failed! (%s)\n", @@ -56,6 +56,7 @@ int main(int argc, char *argv[]) int port = 0; char *unc, *mountpoint, *server, *share; struct cli_state *cli; + struct cli_credentials *creds = NULL; struct poptOption long_options[] = { POPT_AUTOHELP @@ -122,7 +123,9 @@ int main(int argc, char *argv[]) *share = 0; share++; - cli = connect_one(popt_get_cmdline_auth_info(), server, port, share); + creds = samba_cmdline_get_creds(); + + cli = connect_one(creds, server, port, share); if (cli == NULL) { return -1; } |