Lines Matching refs:sess_data

970 SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)  in SMB2_sess_alloc_buffer()  argument
973 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_alloc_buffer()
987 req->PreviousSessionId = sess_data->previous_session; in SMB2_sess_alloc_buffer()
1005 sess_data->iov[0].iov_base = (char *)req; in SMB2_sess_alloc_buffer()
1007 sess_data->iov[0].iov_len = total_len - 1; in SMB2_sess_alloc_buffer()
1012 sess_data->buf0_type = CIFS_SMALL_BUFFER; in SMB2_sess_alloc_buffer()
1018 SMB2_sess_free_buffer(struct SMB2_sess_data *sess_data) in SMB2_sess_free_buffer() argument
1020 free_rsp_buf(sess_data->buf0_type, sess_data->iov[0].iov_base); in SMB2_sess_free_buffer()
1021 sess_data->buf0_type = CIFS_NO_BUFFER; in SMB2_sess_free_buffer()
1025 SMB2_sess_sendreceive(struct SMB2_sess_data *sess_data) in SMB2_sess_sendreceive() argument
1029 struct smb2_sess_setup_req *req = sess_data->iov[0].iov_base; in SMB2_sess_sendreceive()
1035 req->SecurityBufferLength = cpu_to_le16(sess_data->iov[1].iov_len); in SMB2_sess_sendreceive()
1038 rqst.rq_iov = sess_data->iov; in SMB2_sess_sendreceive()
1042 rc = cifs_send_recv(sess_data->xid, sess_data->ses, in SMB2_sess_sendreceive()
1044 &sess_data->buf0_type, in SMB2_sess_sendreceive()
1046 cifs_small_buf_release(sess_data->iov[0].iov_base); in SMB2_sess_sendreceive()
1047 memcpy(&sess_data->iov[0], &rsp_iov, sizeof(struct kvec)); in SMB2_sess_sendreceive()
1053 SMB2_sess_establish_session(struct SMB2_sess_data *sess_data) in SMB2_sess_establish_session() argument
1056 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_establish_session()
1084 SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) in SMB2_auth_kerberos() argument
1087 struct cifs_ses *ses = sess_data->ses; in SMB2_auth_kerberos()
1092 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_auth_kerberos()
1127 sess_data->iov[1].iov_base = msg->data + msg->sesskey_len; in SMB2_auth_kerberos()
1128 sess_data->iov[1].iov_len = msg->secblob_len; in SMB2_auth_kerberos()
1130 rc = SMB2_sess_sendreceive(sess_data); in SMB2_auth_kerberos()
1134 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_auth_kerberos()
1139 rc = SMB2_sess_establish_session(sess_data); in SMB2_auth_kerberos()
1144 sess_data->result = rc; in SMB2_auth_kerberos()
1145 sess_data->func = NULL; in SMB2_auth_kerberos()
1146 SMB2_sess_free_buffer(sess_data); in SMB2_auth_kerberos()
1150 SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) in SMB2_auth_kerberos() argument
1153 sess_data->result = -EOPNOTSUPP; in SMB2_auth_kerberos()
1154 sess_data->func = NULL; in SMB2_auth_kerberos()
1159 SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data);
1162 SMB2_sess_auth_rawntlmssp_negotiate(struct SMB2_sess_data *sess_data) in SMB2_sess_auth_rawntlmssp_negotiate() argument
1165 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_auth_rawntlmssp_negotiate()
1182 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1203 sess_data->iov[1].iov_base = ntlmssp_blob; in SMB2_sess_auth_rawntlmssp_negotiate()
1204 sess_data->iov[1].iov_len = blob_length; in SMB2_sess_auth_rawntlmssp_negotiate()
1206 rc = SMB2_sess_sendreceive(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1207 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_negotiate()
1210 if (sess_data->buf0_type != CIFS_NO_BUFFER && in SMB2_sess_auth_rawntlmssp_negotiate()
1237 SMB2_sess_free_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_negotiate()
1239 sess_data->result = 0; in SMB2_sess_auth_rawntlmssp_negotiate()
1240 sess_data->func = SMB2_sess_auth_rawntlmssp_authenticate; in SMB2_sess_auth_rawntlmssp_negotiate()
1246 sess_data->result = rc; in SMB2_sess_auth_rawntlmssp_negotiate()
1247 sess_data->func = NULL; in SMB2_sess_auth_rawntlmssp_negotiate()
1251 SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data) in SMB2_sess_auth_rawntlmssp_authenticate() argument
1254 struct cifs_ses *ses = sess_data->ses; in SMB2_sess_auth_rawntlmssp_authenticate()
1261 rc = SMB2_sess_alloc_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1265 req = (struct smb2_sess_setup_req *) sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_authenticate()
1269 sess_data->nls_cp); in SMB2_sess_auth_rawntlmssp_authenticate()
1281 sess_data->iov[1].iov_base = ntlmssp_blob; in SMB2_sess_auth_rawntlmssp_authenticate()
1282 sess_data->iov[1].iov_len = blob_length; in SMB2_sess_auth_rawntlmssp_authenticate()
1284 rc = SMB2_sess_sendreceive(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1288 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_authenticate()
1293 rc = SMB2_sess_establish_session(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1296 SMB2_sess_free_buffer(sess_data); in SMB2_sess_auth_rawntlmssp_authenticate()
1299 sess_data->result = rc; in SMB2_sess_auth_rawntlmssp_authenticate()
1300 sess_data->func = NULL; in SMB2_sess_auth_rawntlmssp_authenticate()
1304 SMB2_select_sec(struct cifs_ses *ses, struct SMB2_sess_data *sess_data) in SMB2_select_sec() argument
1318 sess_data->func = SMB2_auth_kerberos; in SMB2_select_sec()
1321 sess_data->func = SMB2_sess_auth_rawntlmssp_negotiate; in SMB2_select_sec()
1337 struct SMB2_sess_data *sess_data; in SMB2_sess_setup() local
1346 sess_data = kzalloc(sizeof(struct SMB2_sess_data), GFP_KERNEL); in SMB2_sess_setup()
1347 if (!sess_data) in SMB2_sess_setup()
1350 rc = SMB2_select_sec(ses, sess_data); in SMB2_sess_setup()
1353 sess_data->xid = xid; in SMB2_sess_setup()
1354 sess_data->ses = ses; in SMB2_sess_setup()
1355 sess_data->buf0_type = CIFS_NO_BUFFER; in SMB2_sess_setup()
1356 sess_data->nls_cp = (struct nls_table *) nls_cp; in SMB2_sess_setup()
1357 sess_data->previous_session = ses->Suid; in SMB2_sess_setup()
1365 while (sess_data->func) in SMB2_sess_setup()
1366 sess_data->func(sess_data); in SMB2_sess_setup()
1370 rc = sess_data->result; in SMB2_sess_setup()
1372 kfree(sess_data); in SMB2_sess_setup()