examples/fuse/smb2mount: make use of get_cmdline_auth_info_creds()
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Nov 2019 13:34:36 +0000 (14:34 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 May 2020 06:43:38 +0000 (06:43 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
examples/fuse/smb2mount.c

index ec4be809f6d274ddbcd8cd78439cfa2fe6796d16..f095b7da337155f8ca244d53bd9d60de397ef0c0 100644 (file)
@@ -38,12 +38,10 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
                         CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS;
        }
 
                         CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS;
        }
 
-       nt_status = cli_full_connection(&c, lp_netbios_name(), server,
+       nt_status = cli_full_connection_creds(&c, lp_netbios_name(), server,
                                NULL, port,
                                share, "?????",
                                NULL, port,
                                share, "?????",
-                               get_cmdline_auth_info_username(auth_info),
-                               lp_workgroup(),
-                               get_cmdline_auth_info_password(auth_info),
+                               get_cmdline_auth_info_creds(auth_info),
                                flags,
                                get_cmdline_auth_info_signing_state(auth_info));
        if (!NT_STATUS_IS_OK(nt_status)) {
                                flags,
                                get_cmdline_auth_info_signing_state(auth_info));
        if (!NT_STATUS_IS_OK(nt_status)) {
@@ -53,11 +51,9 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
        }
 
        if (get_cmdline_auth_info_smb_encrypt(auth_info)) {
        }
 
        if (get_cmdline_auth_info_smb_encrypt(auth_info)) {
-               nt_status = cli_cm_force_encryption(
+               nt_status = cli_cm_force_encryption_creds(
                        c,
                        c,
-                       get_cmdline_auth_info_username(auth_info),
-                       get_cmdline_auth_info_password(auth_info),
-                       lp_workgroup(),
+                       get_cmdline_auth_info_creds(auth_info),
                        share);
                 if (!NT_STATUS_IS_OK(nt_status)) {
                        cli_shutdown(c);
                        share);
                 if (!NT_STATUS_IS_OK(nt_status)) {
                        cli_shutdown(c);