uint16_t *vwv;
uint8_t *bytes;
char *tmp;
+ uint16_t sec_mode = cli_state_security_mode(cli);
req = tevent_req_create(mem_ctx, &state,
struct cli_session_setup_lanman2_state);
/*
* if in share level security then don't send a password now
*/
- if (!(cli->sec_mode & NEGOTIATE_SECURITY_USER_LEVEL)) {
+ if (!(sec_mode & NEGOTIATE_SECURITY_USER_LEVEL)) {
passlen = 0;
}
if (passlen > 0
- && (cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE)
+ && (sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE)
&& passlen != 24) {
/*
* Encrypted mode needed, and non encrypted password
tevent_req_nterror(req, NT_STATUS_ACCESS_DENIED);
return tevent_req_post(req, ev);
}
- } else if ((cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE)
+ } else if ((sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE)
&& passlen == 24) {
/*
* Encrypted mode needed, and encrypted password
{
char *p;
char *user2;
+ uint16_t sec_mode = cli_state_security_mode(cli);
if (user) {
user2 = talloc_strdup(talloc_tos(), user);
return NT_STATUS_ACCESS_DENIED;
}
- if ((cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0 &&
+ if ((sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0 &&
!lp_client_plaintext_auth() && (*pass)) {
DEBUG(1, ("Server requested LM password but 'client plaintext auth = no'"
" or 'client ntlmv2 auth = yes'\n"));
password at this point. The password is sent in the tree
connect */
- if ((cli->sec_mode & NEGOTIATE_SECURITY_USER_LEVEL) == 0)
+ if ((sec_mode & NEGOTIATE_SECURITY_USER_LEVEL) == 0)
return cli_session_setup_plain(cli, user, "", workgroup);
/* if the server doesn't support encryption then we have to use
plaintext. The second password is ignored */
- if ((cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0) {
+ if ((sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0) {
if (!lp_client_plaintext_auth() && (*pass)) {
DEBUG(1, ("Server requested LM password but 'client plaintext auth = no'"
" or 'client ntlmv2 auth = yes'\n"));
uint16_t *vwv;
char *tmp = NULL;
uint8_t *bytes;
+ uint16_t sec_mode = cli_state_security_mode(cli);
*psmbreq = NULL;
}
/* in user level security don't send a password now */
- if (cli->sec_mode & NEGOTIATE_SECURITY_USER_LEVEL) {
+ if (sec_mode & NEGOTIATE_SECURITY_USER_LEVEL) {
passlen = 1;
pass = "";
} else if (pass == NULL) {
goto access_denied;
}
- if ((cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) &&
+ if ((sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) &&
*pass && passlen != 24) {
if (!lp_client_lanman_auth()) {
DEBUG(1, ("Server requested LANMAN password "
passlen = 24;
pass = (const char *)p24;
} else {
- if((cli->sec_mode & (NEGOTIATE_SECURITY_USER_LEVEL
+ if((sec_mode & (NEGOTIATE_SECURITY_USER_LEVEL
|NEGOTIATE_SECURITY_CHALLENGE_RESPONSE))
== 0) {
uint8_t *tmp_pass;