NTSTATUS status;
struct NL_AUTH_MESSAGE r;
- /* Use lp_workgroup() if domain not specified */
+ if (!cli->auth->user_name || !cli->auth->user_name[0]) {
+ return NT_STATUS_INVALID_PARAMETER_MIX;
+ }
if (!cli->auth->domain || !cli->auth->domain[0]) {
- cli->auth->domain = talloc_strdup(cli, lp_workgroup());
- if (cli->auth->domain == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
+ return NT_STATUS_INVALID_PARAMETER_MIX;
}
/*
r.Flags = NL_FLAG_OEM_NETBIOS_DOMAIN_NAME |
NL_FLAG_OEM_NETBIOS_COMPUTER_NAME;
r.oem_netbios_domain.a = cli->auth->domain;
- r.oem_netbios_computer.a = lp_netbios_name();
+ r.oem_netbios_computer.a = cli->auth->user_name;
status = dcerpc_push_schannel_bind(cli, &r, auth_token);
if (!NT_STATUS_IS_OK(status)) {
result->auth_type = DCERPC_AUTH_TYPE_SCHANNEL;
result->auth_level = auth_level;
- result->user_name = talloc_strdup(result, "");
+ result->user_name = talloc_strdup(result, creds->computer_name);
result->domain = talloc_strdup(result, domain);
if ((result->user_name == NULL) || (result->domain == NULL)) {
goto fail;