X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=auth%2Fcredentials%2Fcredentials.c;h=3eaccde25ee8a1672b81a9e0886094507a6f9d04;hb=734e5c521cb06a91e708226e0eb6d003175958c2;hp=ee60220ec7b534fd48d1224a539498d3d473cc95;hpb=f8c6219188fa4ce39a35a8f192c649a6aa9c7ec1;p=obnox%2Fsamba%2Fsamba-obnox.git diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c index ee60220ec7b..3eaccde25ee 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); + } } /**