Lines Matching refs:sess_data
1181 SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data) in SMB2_sess_alloc_buffer() argument
1184 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_alloc_buffer()
1195 if (sess_data->ses->binding) { in SMB2_sess_alloc_buffer()
1196 req->sync_hdr.SessionId = sess_data->ses->Suid; in SMB2_sess_alloc_buffer()
1207 req->PreviousSessionId = sess_data->previous_session; in SMB2_sess_alloc_buffer()
1230 sess_data->iov[0].iov_base = (char *)req; in SMB2_sess_alloc_buffer()
1232 sess_data->iov[0].iov_len = total_len - 1; in SMB2_sess_alloc_buffer()
1237 sess_data->buf0_type = CIFS_SMALL_BUFFER; in SMB2_sess_alloc_buffer()
1243 SMB2_sess_free_buffer(struct SMB2_sess_data *sess_data) in SMB2_sess_free_buffer() argument
1245 free_rsp_buf(sess_data->buf0_type, sess_data->iov[0].iov_base); in SMB2_sess_free_buffer()
1246 sess_data->buf0_type = CIFS_NO_BUFFER; in SMB2_sess_free_buffer()
1250 SMB2_sess_sendreceive(struct SMB2_sess_data *sess_data) in SMB2_sess_sendreceive() argument
1254 struct smb2_sess_setup_req *req = sess_data->iov[0].iov_base; in SMB2_sess_sendreceive()
1260 req->SecurityBufferLength = cpu_to_le16(sess_data->iov[1].iov_len); in SMB2_sess_sendreceive()
1263 rqst.rq_iov = sess_data->iov; in SMB2_sess_sendreceive()
1267 rc = cifs_send_recv(sess_data->xid, sess_data->ses, in SMB2_sess_sendreceive()
1268 cifs_ses_server(sess_data->ses), in SMB2_sess_sendreceive()
1270 &sess_data->buf0_type, in SMB2_sess_sendreceive()
1272 cifs_small_buf_release(sess_data->iov[0].iov_base); in SMB2_sess_sendreceive()
1273 memcpy(&sess_data->iov[0], &rsp_iov, sizeof(struct kvec)); in SMB2_sess_sendreceive()
1279 SMB2_sess_establish_session(struct SMB2_sess_data *sess_data) in SMB2_sess_establish_session() argument
1282 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_establish_session()
1315 SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) in SMB2_auth_kerberos() argument
1318 struct cifs_ses *ses = sess_data->ses; in SMB2_auth_kerberos()
1323 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_auth_kerberos()
1361 sess_data->iov[1].iov_base = msg->data + msg->sesskey_len; in SMB2_auth_kerberos()
1362 sess_data->iov[1].iov_len = msg->secblob_len; in SMB2_auth_kerberos()
1364 rc = SMB2_sess_sendreceive(sess_data); in SMB2_auth_kerberos()
1368 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_auth_kerberos()
1375 rc = SMB2_sess_establish_session(sess_data); in SMB2_auth_kerberos()
1380 sess_data->result = rc; in SMB2_auth_kerberos()
1381 sess_data->func = NULL; in SMB2_auth_kerberos()
1382 SMB2_sess_free_buffer(sess_data); in SMB2_auth_kerberos()
1386 SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) in SMB2_auth_kerberos() argument
1389 sess_data->result = -EOPNOTSUPP; in SMB2_auth_kerberos()
1390 sess_data->func = NULL; in SMB2_auth_kerberos()
1395 SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data);
1398 SMB2_sess_auth_rawntlmssp_negotiate(struct SMB2_sess_data *sess_data) in SMB2_sess_auth_rawntlmssp_negotiate() argument
1401 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_auth_rawntlmssp_negotiate()
1418 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1439 sess_data->iov[1].iov_base = ntlmssp_blob; in SMB2_sess_auth_rawntlmssp_negotiate()
1440 sess_data->iov[1].iov_len = blob_length; in SMB2_sess_auth_rawntlmssp_negotiate()
1442 rc = SMB2_sess_sendreceive(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1443 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_negotiate()
1446 if (sess_data->buf0_type != CIFS_NO_BUFFER && in SMB2_sess_auth_rawntlmssp_negotiate()
1475 SMB2_sess_free_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1477 sess_data->result = 0; in SMB2_sess_auth_rawntlmssp_negotiate()
1478 sess_data->func = SMB2_sess_auth_rawntlmssp_authenticate; in SMB2_sess_auth_rawntlmssp_negotiate()
1484 sess_data->result = rc; in SMB2_sess_auth_rawntlmssp_negotiate()
1485 sess_data->func = NULL; in SMB2_sess_auth_rawntlmssp_negotiate()
1489 SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data) in SMB2_sess_auth_rawntlmssp_authenticate() argument
1492 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_auth_rawntlmssp_authenticate()
1499 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1503 req = (struct smb2_sess_setup_req *) sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_authenticate()
1507 sess_data->nls_cp); in SMB2_sess_auth_rawntlmssp_authenticate()
1519 sess_data->iov[1].iov_base = ntlmssp_blob; in SMB2_sess_auth_rawntlmssp_authenticate()
1520 sess_data->iov[1].iov_len = blob_length; in SMB2_sess_auth_rawntlmssp_authenticate()
1522 rc = SMB2_sess_sendreceive(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1526 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_authenticate()
1534 rc = SMB2_sess_establish_session(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1552 SMB2_sess_free_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1555 sess_data->result = rc; in SMB2_sess_auth_rawntlmssp_authenticate()
1556 sess_data->func = NULL; in SMB2_sess_auth_rawntlmssp_authenticate()
1560 SMB2_select_sec(struct cifs_ses *ses, struct SMB2_sess_data *sess_data) in SMB2_select_sec() argument
1573 sess_data->func = SMB2_auth_kerberos; in SMB2_select_sec()
1576 sess_data->func = SMB2_sess_auth_rawntlmssp_negotiate; in SMB2_select_sec()
1592 struct SMB2_sess_data *sess_data; in SMB2_sess_setup() local
1601 sess_data = kzalloc(sizeof(struct SMB2_sess_data), GFP_KERNEL); in SMB2_sess_setup()
1602 if (!sess_data) in SMB2_sess_setup()
1605 rc = SMB2_select_sec(ses, sess_data); in SMB2_sess_setup()
1608 sess_data->xid = xid; in SMB2_sess_setup()
1609 sess_data->ses = ses; in SMB2_sess_setup()
1610 sess_data->buf0_type = CIFS_NO_BUFFER; in SMB2_sess_setup()
1611 sess_data->nls_cp = (struct nls_table *) nls_cp; in SMB2_sess_setup()
1612 sess_data->previous_session = ses->Suid; in SMB2_sess_setup()
1620 while (sess_data->func) in SMB2_sess_setup()
1621 sess_data->func(sess_data); in SMB2_sess_setup()
1625 rc = sess_data->result; in SMB2_sess_setup()
1627 kfree(sess_data); in SMB2_sess_setup()