const char *username,
const char *password,
const char *workstation,
+ const uint64_t logon_id,
enum netr_LogonInfoClass logon_type,
uint8_t *authoritative,
uint32_t *flags,
password_info->identity_info.domain_name.string = domain;
password_info->identity_info.parameter_control = logon_parameters;
- password_info->identity_info.logon_id = 0xbeef0000dead;
+ password_info->identity_info.logon_id = logon_id;
password_info->identity_info.account_name.string = username;
password_info->identity_info.workstation.string = workstation_slash;
network_info->identity_info.domain_name.string = domain;
network_info->identity_info.parameter_control = logon_parameters;
- network_info->identity_info.logon_id = 0xbeef0000dead;
+ network_info->identity_info.logon_id = logon_id;
network_info->identity_info.account_name.string = username;
network_info->identity_info.workstation.string = workstation_slash;
const char *username,
const char *domain,
const char *workstation,
+ const uint64_t logon_id,
const uint8_t chal[8],
DATA_BLOB lm_response,
DATA_BLOB nt_response,
network_info->identity_info.domain_name.string = domain;
network_info->identity_info.parameter_control = logon_parameters;
- network_info->identity_info.logon_id = 0xbeef0000dead;
+ network_info->identity_info.logon_id = logon_id;
network_info->identity_info.account_name.string = username;
network_info->identity_info.workstation.string = workstation_name_slash;
const char *username,
const char *domain,
const char *workstation,
+ const uint64_t logon_id,
DATA_BLOB lm_hash,
DATA_BLOB nt_hash,
enum netr_LogonInfoClass logon_type,
password_info->identity_info.domain_name.string = domain;
password_info->identity_info.parameter_control = logon_parameters;
- password_info->identity_info.logon_id = 0xbeef0000dead;
+ password_info->identity_info.logon_id = logon_id;
password_info->identity_info.account_name.string = username;
password_info->identity_info.workstation.string = workstation_name_slash;
static NTSTATUS winbindd_dual_auth_passdb(TALLOC_CTX *mem_ctx,
uint32_t logon_parameters,
- const char *domain, const char *user,
+ const char *domain,
+ const char *user,
+ const uint64_t logon_id,
const DATA_BLOB *challenge,
const DATA_BLOB *lm_resp,
const DATA_BLOB *nt_resp,
}
user_info->logon_parameters = logon_parameters;
+ user_info->logon_id = logon_id;
/* We don't want any more mapping of the username */
user_info->mapped_state = True;
const char *password,
const char *domainname,
const char *workstation,
+ const uint64_t logon_id,
bool plaintext_given,
const uint8_t chal[8],
DATA_BLOB lm_response,
username,
password,
workstation,
+ logon_id,
logon_type_i,
authoritative,
flags,
username,
domainname,
workstation,
+ logon_id,
lm_response,
nt_response,
logon_type_i,
username,
domainname,
workstation,
+ logon_id,
chal,
lm_response,
nt_response,
struct winbindd_domain *domain,
const char *user,
const char *pass,
+ uint64_t logon_id,
uint32_t request_flags,
uint16_t *_validation_level,
union netr_Validation **_validation)
result = winbindd_dual_auth_passdb(
talloc_tos(), 0, name_domain, name_user,
+ logon_id,
&chal_blob, &lm_resp, &nt_resp,
true, /* interactive */
&authoritative,
pass,
name_domain,
lp_netbios_name(),
+ logon_id,
true, /* plaintext_given */
NULL,
data_blob_null, data_blob_null,
union netr_Validation *validation = NULL;
NTSTATUS name_map_status = NT_STATUS_UNSUCCESSFUL;
bool ok;
+ uint64_t logon_id = 0;
/* Ensure null termination */
state->request->data.auth.user[sizeof(state->request->data.auth.user)-1]='\0';
/* Ensure null termination */
state->request->data.auth.pass[sizeof(state->request->data.auth.pass)-1]='\0';
+ /*
+ * Generate a logon_id for this session.
+ */
+ logon_id = generate_random_u64();
DEBUG(3, ("[%5lu]: dual pam auth %s\n", (unsigned long)state->pid,
state->request->data.auth.user));
state->mem_ctx, domain,
state->request->data.auth.user,
state->request->data.auth.pass,
+ logon_id,
state->request->flags,
&validation_level,
&validation);
const char *name_user,
const char *name_domain,
const char *workstation,
+ const uint64_t logon_id,
const uint8_t chal[8],
DATA_BLOB lm_response,
DATA_BLOB nt_response,
talloc_tos(),
logon_parameters,
name_domain, name_user,
+ logon_id,
&chal_blob, &lm_response, &nt_response,
interactive,
authoritative,
name_domain,
/* Bug #3248 - found by Stefan Burkei. */
workstation, /* We carefully set this above so use it... */
+ logon_id,
false, /* plaintext_given */
chal,
lm_response,
const char *name_user = NULL;
const char *name_domain = NULL;
const char *workstation;
+ uint64_t logon_id = 0;
uint8_t authoritative = 0;
uint32_t flags = 0;
uint16_t validation_level;
name_user = state->request->data.auth_crap.user;
name_domain = state->request->data.auth_crap.domain;
workstation = state->request->data.auth_crap.workstation;
+ logon_id = generate_random_u64();
DEBUG(3, ("[%5lu]: pam auth crap domain: %s user: %s\n", (unsigned long)state->pid,
name_domain, name_user));
name_domain,
/* Bug #3248 - found by Stefan Burkei. */
workstation, /* We carefully set this above so use it... */
+ logon_id,
state->request->data.auth_crap.chal,
lm_resp,
nt_resp,