summaryrefslogtreecommitdiff
path: root/auth/credentials/credentials.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth/credentials/credentials.c')
-rw-r--r--auth/credentials/credentials.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c
index ee60220ec7..3eaccde25e 100644
--- a/auth/credentials/credentials.c
+++ b/auth/credentials/credentials.c
@@ -681,9 +681,21 @@ _PUBLIC_ void cli_credentials_set_conf(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
cli_credentials_set_username(cred, "", CRED_UNINITIALISED);
- cli_credentials_set_domain(cred, lpcfg_workgroup(lp_ctx), CRED_UNINITIALISED);
- cli_credentials_set_workstation(cred, lpcfg_netbios_name(lp_ctx), CRED_UNINITIALISED);
- cli_credentials_set_realm(cred, lpcfg_realm(lp_ctx), CRED_UNINITIALISED);
+ if (lpcfg_parm_is_cmdline(lp_ctx, "workgroup")) {
+ cli_credentials_set_domain(cred, lpcfg_workgroup(lp_ctx), CRED_SPECIFIED);
+ } else {
+ cli_credentials_set_domain(cred, lpcfg_workgroup(lp_ctx), CRED_UNINITIALISED);
+ }
+ if (lpcfg_parm_is_cmdline(lp_ctx, "netbios name")) {
+ cli_credentials_set_workstation(cred, lpcfg_netbios_name(lp_ctx), CRED_SPECIFIED);
+ } else {
+ cli_credentials_set_workstation(cred, lpcfg_netbios_name(lp_ctx), CRED_UNINITIALISED);
+ }
+ if (lpcfg_parm_is_cmdline(lp_ctx, "realm")) {
+ cli_credentials_set_realm(cred, lpcfg_realm(lp_ctx), CRED_SPECIFIED);
+ } else {
+ cli_credentials_set_realm(cred, lpcfg_realm(lp_ctx), CRED_UNINITIALISED);
+ }
}
/**