]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbcacls: make use of get_cmdline_auth_info_creds()
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Nov 2019 13:48:12 +0000 (14:48 +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>
source3/utils/smbcacls.c

index 103acdc1d1868882d68ea49f696ec4cf914e6a65..3e91fc8b0253b0755cbfac5e25eb73b99fa0bbf3 100644 (file)
@@ -764,17 +764,10 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
        NTSTATUS nt_status;
        uint32_t flags = 0;
 
-       if (get_cmdline_auth_info_use_kerberos(auth_info)) {
-               flags |= CLI_FULL_CONNECTION_USE_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, 0,
                                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)) {
@@ -783,10 +776,8 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
        }
 
        if (get_cmdline_auth_info_smb_encrypt(auth_info)) {
-               nt_status = cli_cm_force_encryption(c,
-                                       get_cmdline_auth_info_username(auth_info),
-                                       get_cmdline_auth_info_password(auth_info),
-                                       lp_workgroup(),
+               nt_status = cli_cm_force_encryption_creds(c,
+                                       get_cmdline_auth_info_creds(auth_info),
                                        share);
                 if (!NT_STATUS_IS_OK(nt_status)) {
                        cli_shutdown(c);