s3:utils: Fix the auth function to print correct values to the user
authorAndreas Schneider <asn@samba.org>
Fri, 15 Dec 2023 07:23:25 +0000 (08:23 +0100)
committerJule Anger <janger@samba.org>
Mon, 8 Jan 2024 12:50:18 +0000 (12:50 +0000)
commit2084a27c9ab27215699ea89a6023cf8bb6bb0429
tree881d8dd8ca8c3688f88d5b17c4d5dbb55e09d8d4
parent98e62c70894f0094b25231b38691bdd62bc0d637
s3:utils: Fix the auth function to print correct values to the user

In order to show correct values in the password prompt displayed by
cli_credentials_get_password*(). We need to set the domain and username
in the credentials system.

The credentials supplied via the SMB URL have a higher priority than the
command line options.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15538

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 1134c4f3a63c9618c3fb79abefb40a798c7c1701)
source3/utils/smbget.c