Lines Matching refs:sess_data

1169 SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)  in SMB2_sess_alloc_buffer()  argument
1172 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_alloc_buffer()
1186 req->PreviousSessionId = sess_data->previous_session; in SMB2_sess_alloc_buffer()
1209 sess_data->iov[0].iov_base = (char *)req; in SMB2_sess_alloc_buffer()
1211 sess_data->iov[0].iov_len = total_len - 1; in SMB2_sess_alloc_buffer()
1216 sess_data->buf0_type = CIFS_SMALL_BUFFER; in SMB2_sess_alloc_buffer()
1222 SMB2_sess_free_buffer(struct SMB2_sess_data *sess_data) in SMB2_sess_free_buffer() argument
1224 free_rsp_buf(sess_data->buf0_type, sess_data->iov[0].iov_base); in SMB2_sess_free_buffer()
1225 sess_data->buf0_type = CIFS_NO_BUFFER; in SMB2_sess_free_buffer()
1229 SMB2_sess_sendreceive(struct SMB2_sess_data *sess_data) in SMB2_sess_sendreceive() argument
1233 struct smb2_sess_setup_req *req = sess_data->iov[0].iov_base; in SMB2_sess_sendreceive()
1239 req->SecurityBufferLength = cpu_to_le16(sess_data->iov[1].iov_len); in SMB2_sess_sendreceive()
1242 rqst.rq_iov = sess_data->iov; in SMB2_sess_sendreceive()
1246 rc = cifs_send_recv(sess_data->xid, sess_data->ses, in SMB2_sess_sendreceive()
1248 &sess_data->buf0_type, in SMB2_sess_sendreceive()
1250 cifs_small_buf_release(sess_data->iov[0].iov_base); in SMB2_sess_sendreceive()
1251 memcpy(&sess_data->iov[0], &rsp_iov, sizeof(struct kvec)); in SMB2_sess_sendreceive()
1257 SMB2_sess_establish_session(struct SMB2_sess_data *sess_data) in SMB2_sess_establish_session() argument
1260 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_establish_session()
1288 SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) in SMB2_auth_kerberos() argument
1291 struct cifs_ses *ses = sess_data->ses; in SMB2_auth_kerberos()
1296 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_auth_kerberos()
1331 sess_data->iov[1].iov_base = msg->data + msg->sesskey_len; in SMB2_auth_kerberos()
1332 sess_data->iov[1].iov_len = msg->secblob_len; in SMB2_auth_kerberos()
1334 rc = SMB2_sess_sendreceive(sess_data); in SMB2_auth_kerberos()
1338 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_auth_kerberos()
1343 rc = SMB2_sess_establish_session(sess_data); in SMB2_auth_kerberos()
1348 sess_data->result = rc; in SMB2_auth_kerberos()
1349 sess_data->func = NULL; in SMB2_auth_kerberos()
1350 SMB2_sess_free_buffer(sess_data); in SMB2_auth_kerberos()
1354 SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) in SMB2_auth_kerberos() argument
1357 sess_data->result = -EOPNOTSUPP; in SMB2_auth_kerberos()
1358 sess_data->func = NULL; in SMB2_auth_kerberos()
1363 SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data);
1366 SMB2_sess_auth_rawntlmssp_negotiate(struct SMB2_sess_data *sess_data) in SMB2_sess_auth_rawntlmssp_negotiate() argument
1369 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_auth_rawntlmssp_negotiate()
1386 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1407 sess_data->iov[1].iov_base = ntlmssp_blob; in SMB2_sess_auth_rawntlmssp_negotiate()
1408 sess_data->iov[1].iov_len = blob_length; in SMB2_sess_auth_rawntlmssp_negotiate()
1410 rc = SMB2_sess_sendreceive(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1411 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_negotiate()
1414 if (sess_data->buf0_type != CIFS_NO_BUFFER && in SMB2_sess_auth_rawntlmssp_negotiate()
1441 SMB2_sess_free_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1443 sess_data->result = 0; in SMB2_sess_auth_rawntlmssp_negotiate()
1444 sess_data->func = SMB2_sess_auth_rawntlmssp_authenticate; in SMB2_sess_auth_rawntlmssp_negotiate()
1450 sess_data->result = rc; in SMB2_sess_auth_rawntlmssp_negotiate()
1451 sess_data->func = NULL; in SMB2_sess_auth_rawntlmssp_negotiate()
1455 SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data) in SMB2_sess_auth_rawntlmssp_authenticate() argument
1458 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_auth_rawntlmssp_authenticate()
1465 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1469 req = (struct smb2_sess_setup_req *) sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_authenticate()
1473 sess_data->nls_cp); in SMB2_sess_auth_rawntlmssp_authenticate()
1485 sess_data->iov[1].iov_base = ntlmssp_blob; in SMB2_sess_auth_rawntlmssp_authenticate()
1486 sess_data->iov[1].iov_len = blob_length; in SMB2_sess_auth_rawntlmssp_authenticate()
1488 rc = SMB2_sess_sendreceive(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1492 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_authenticate()
1497 rc = SMB2_sess_establish_session(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1500 SMB2_sess_free_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1503 sess_data->result = rc; in SMB2_sess_auth_rawntlmssp_authenticate()
1504 sess_data->func = NULL; in SMB2_sess_auth_rawntlmssp_authenticate()
1508 SMB2_select_sec(struct cifs_ses *ses, struct SMB2_sess_data *sess_data) in SMB2_select_sec() argument
1522 sess_data->func = SMB2_auth_kerberos; in SMB2_select_sec()
1525 sess_data->func = SMB2_sess_auth_rawntlmssp_negotiate; in SMB2_select_sec()
1541 struct SMB2_sess_data *sess_data; in SMB2_sess_setup() local
1550 sess_data = kzalloc(sizeof(struct SMB2_sess_data), GFP_KERNEL); in SMB2_sess_setup()
1551 if (!sess_data) in SMB2_sess_setup()
1554 rc = SMB2_select_sec(ses, sess_data); in SMB2_sess_setup()
1557 sess_data->xid = xid; in SMB2_sess_setup()
1558 sess_data->ses = ses; in SMB2_sess_setup()
1559 sess_data->buf0_type = CIFS_NO_BUFFER; in SMB2_sess_setup()
1560 sess_data->nls_cp = (struct nls_table *) nls_cp; in SMB2_sess_setup()
1561 sess_data->previous_session = ses->Suid; in SMB2_sess_setup()
1569 while (sess_data->func) in SMB2_sess_setup()
1570 sess_data->func(sess_data); in SMB2_sess_setup()
1574 rc = sess_data->result; in SMB2_sess_setup()
1576 kfree(sess_data); in SMB2_sess_setup()