s3:libsmb: make use of get_cmdline_auth_info_creds() in clidfs.c:do_connect()
authorStefan Metzmacher <metze@samba.org>
Sun, 30 Oct 2016 15:45:39 +0000 (16:45 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 21 Dec 2016 17:35:13 +0000 (18:35 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libsmb/clidfs.c

index d1517ed14f35f20534a7907342423102b7aba53a..62e445dc1645c4675ee7d087b2b5b0b80f712548 100644 (file)
@@ -141,6 +141,7 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
        NTSTATUS status;
        int flags = 0;
        int signing_state = get_cmdline_auth_info_signing_state(auth_info);
+       struct cli_credentials *creds = NULL;
 
        if (force_encrypt) {
                signing_state = SMB_SIGNING_REQUIRED;
@@ -221,9 +222,9 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
                domain = lp_workgroup();
        }
 
-       status = cli_session_setup(c, username,
-                                  password,
-                                  domain);
+       creds = get_cmdline_auth_info_creds(auth_info);
+
+       status = cli_session_setup_creds(c, creds);
        if (!NT_STATUS_IS_OK(status)) {
                /* If a password was not supplied then
                 * try again with a null username. */