/kernel/linux/linux-6.6/fs/smb/client/ |
H A D | sess.c | 27 cifs_ses_add_channel(struct cifs_ses *ses, 55 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface) in is_ses_using_iface() argument 59 spin_lock(&ses->chan_lock); in is_ses_using_iface() 60 for (i = 0; i < ses->chan_count; i++) { in is_ses_using_iface() 61 if (ses->chans[i].iface == iface) { in is_ses_using_iface() 62 spin_unlock(&ses->chan_lock); in is_ses_using_iface() 66 spin_unlock(&ses->chan_lock); in is_ses_using_iface() 73 cifs_ses_get_chan_index(struct cifs_ses *ses, in cifs_ses_get_chan_index() argument 82 for (i = 0; i < ses->chan_count; i++) { in cifs_ses_get_chan_index() 83 if (ses in cifs_ses_get_chan_index() 95 cifs_chan_set_in_reconnect(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_set_in_reconnect() argument 107 cifs_chan_clear_in_reconnect(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_clear_in_reconnect() argument 118 cifs_chan_in_reconnect(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_in_reconnect() argument 129 cifs_chan_set_need_reconnect(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_set_need_reconnect() argument 142 cifs_chan_clear_need_reconnect(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_clear_need_reconnect() argument 155 cifs_chan_needs_reconnect(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_needs_reconnect() argument 166 cifs_chan_is_iface_active(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_is_iface_active() argument 178 cifs_try_adding_channels(struct cifs_ses *ses) cifs_try_adding_channels() argument 304 cifs_disable_secondary_channels(struct cifs_ses *ses) cifs_disable_secondary_channels() argument 362 cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_chan_update_iface() argument 508 cifs_ses_find_chan(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_ses_find_chan() argument 524 cifs_ses_add_channel(struct cifs_ses *ses, struct cifs_server_iface *iface) cifs_ses_add_channel() argument 679 cifs_ssetup_hdr(struct cifs_ses *ses, struct TCP_Server_Info *server, SESSION_SETUP_ANDX *pSMB) cifs_ssetup_hdr() argument 749 unicode_domain_string(char **pbcc_area, struct cifs_ses *ses, const struct nls_table *nls_cp) unicode_domain_string() argument 771 unicode_ssetup_strings(char **pbcc_area, struct cifs_ses *ses, const struct nls_table *nls_cp) unicode_ssetup_strings() argument 798 ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses, const struct nls_table *nls_cp) ascii_ssetup_strings() argument 842 decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, const struct nls_table *nls_cp) decode_unicode_ssetup() argument 875 decode_ascii_ssetup(char **pbcc_area, __u16 bleft, struct cifs_ses *ses, const struct nls_table *nls_cp) decode_ascii_ssetup() argument 929 decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, struct cifs_ses *ses) decode_ntlmssp_challenge() argument 1005 size_of_ntlmssp_blob(struct cifs_ses *ses, int base_size) size_of_ntlmssp_blob() argument 1065 build_ntlmssp_negotiate_blob(unsigned char **pbuffer, u16 *buflen, struct cifs_ses *ses, struct TCP_Server_Info *server, const struct nls_table *nls_cp) build_ntlmssp_negotiate_blob() argument 1127 build_ntlmssp_smb3_negotiate_blob(unsigned char **pbuffer, u16 *buflen, struct cifs_ses *ses, struct TCP_Server_Info *server, const struct nls_table *nls_cp) build_ntlmssp_smb3_negotiate_blob() argument 1191 build_ntlmssp_auth_blob(unsigned char **pbuffer, u16 *buflen, struct cifs_ses *ses, struct TCP_Server_Info *server, const struct nls_table *nls_cp) build_ntlmssp_auth_blob() argument 1331 struct cifs_ses *ses; global() member 1353 struct cifs_ses *ses = sess_data->ses; sess_alloc_buffer() local 1407 struct cifs_ses *ses = sess_data->ses; sess_establish_session() local 1461 struct cifs_ses *ses = sess_data->ses; sess_auth_ntlmv2() local 1571 struct cifs_ses *ses = sess_data->ses; sess_auth_kerberos() local 1712 struct cifs_ses *ses = sess_data->ses; _sess_auth_rawntlmssp_assemble_req() local 1752 struct cifs_ses *ses = sess_data->ses; sess_auth_rawntlmssp_negotiate() local 1858 struct cifs_ses *ses = sess_data->ses; sess_auth_rawntlmssp_authenticate() local 1964 struct cifs_ses *ses = sess_data->ses; select_sec() local 1997 CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, const struct nls_table *nls_cp) CIFS_SessSetup() argument [all...] |
H A D | smb2transport.c | 81 struct cifs_ses *ses = NULL; in smb2_get_sign_key() local 91 list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) { in smb2_get_sign_key() 92 if (ses->Suid == ses_id) in smb2_get_sign_key() 102 spin_lock(&ses->ses_lock); in smb2_get_sign_key() 103 spin_lock(&ses->chan_lock); in smb2_get_sign_key() 105 is_binding = (cifs_chan_needs_reconnect(ses, server) && in smb2_get_sign_key() 106 ses->ses_status == SES_GOOD); in smb2_get_sign_key() 113 memcpy(key, ses->smb3signingkey, SMB3_SIGN_KEY_SIZE); in smb2_get_sign_key() 114 spin_unlock(&ses->chan_lock); in smb2_get_sign_key() 115 spin_unlock(&ses in smb2_get_sign_key() 149 struct cifs_ses *ses; smb2_find_smb_ses_unlocked() local 174 struct cifs_ses *ses; smb2_find_smb_ses() local 184 smb2_find_smb_sess_tcon_unlocked(struct cifs_ses *ses, __u32 tid) smb2_find_smb_sess_tcon_unlocked() argument 206 struct cifs_ses *ses; smb2_find_smb_tcon() local 237 struct cifs_ses *ses; smb2_calc_signature() local 309 generate_key(struct cifs_ses *ses, struct kvec label, struct kvec context, __u8 *key, unsigned int key_size) generate_key() argument 402 generate_smb3signingkey(struct cifs_ses *ses, struct TCP_Server_Info *server, const struct derivation_triplet *ptriplet) generate_smb3signingkey() argument 501 generate_smb30signingkey(struct cifs_ses *ses, struct TCP_Server_Info *server) generate_smb30signingkey() argument 530 generate_smb311signingkey(struct cifs_ses *ses, struct TCP_Server_Info *server) generate_smb311signingkey() argument 773 smb2_get_mid_entry(struct cifs_ses *ses, struct TCP_Server_Info *server, struct smb2_hdr *shdr, struct mid_q_entry **mid) smb2_get_mid_entry() argument 851 smb2_setup_request(struct cifs_ses *ses, struct TCP_Server_Info *server, struct smb_rqst *rqst) smb2_setup_request() argument [all...] |
H A D | cifsencrypt.c | 387 build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp) in build_avpair_blob() argument 395 if (!ses->domainName) { in build_avpair_blob() 396 ses->domainName = kstrdup(defdmname, GFP_KERNEL); in build_avpair_blob() 397 if (!ses->domainName) in build_avpair_blob() 401 dlen = strlen(ses->domainName); in build_avpair_blob() 409 kfree_sensitive(ses->auth_key.response); in build_avpair_blob() 410 ses->auth_key.len = size + 2 * dlen; in build_avpair_blob() 411 ses->auth_key.response = kzalloc(ses->auth_key.len, GFP_KERNEL); in build_avpair_blob() 412 if (!ses in build_avpair_blob() 443 find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp) find_domain_name() argument 495 find_timestamp(struct cifs_ses *ses) find_timestamp() argument 532 calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash, const struct nls_table *nls_cp) calc_ntlmv2_hash() argument 637 CalcNTLMv2_response(const struct cifs_ses *ses, char *ntlmv2_hash) CalcNTLMv2_response() argument 690 setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp) setup_ntlmv2_rsp() argument 813 calc_seckey(struct cifs_ses *ses) calc_seckey() argument [all...] |
H A D | connect.c | 71 * Resolve hostname and set ip addr in tcp ses. Useful for hostnames that may 148 * @server: the tcp ses for which reconnect is needed 156 struct cifs_ses *ses; in cifs_signal_cifsd_for_reconnect() local 172 list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) { in cifs_signal_cifsd_for_reconnect() 173 spin_lock(&ses->chan_lock); in cifs_signal_cifsd_for_reconnect() 174 for (i = 0; i < ses->chan_count; i++) { in cifs_signal_cifsd_for_reconnect() 175 if (!ses->chans[i].server) in cifs_signal_cifsd_for_reconnect() 178 spin_lock(&ses->chans[i].server->srv_lock); in cifs_signal_cifsd_for_reconnect() 179 if (ses->chans[i].server->tcpStatus != CifsExiting) in cifs_signal_cifsd_for_reconnect() 180 ses in cifs_signal_cifsd_for_reconnect() 203 struct cifs_ses *ses, *nses; cifs_mark_tcp_ses_conns_for_reconnect() local 1844 match_session(struct cifs_ses *ses, struct smb3_fs_context *ctx) match_session() argument 1899 cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx) cifs_setup_ipc() argument 1966 cifs_free_ipc(struct cifs_ses *ses) cifs_free_ipc() argument 1981 struct cifs_ses *ses, *ret = NULL; cifs_find_smb_ses() local 2006 __cifs_put_smb_ses(struct cifs_ses *ses) __cifs_put_smb_ses() argument 2089 cifs_set_cifscreds(struct smb3_fs_context *ctx, struct cifs_ses *ses) cifs_set_cifscreds() argument 2249 struct cifs_ses *ses; cifs_get_smb_ses() local 2417 cifs_find_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) cifs_find_tcon() argument 2441 struct cifs_ses *ses; cifs_put_tcon() local 2517 cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) cifs_get_tcon() argument 2835 struct cifs_ses *ses; cifs_match_super() local 3322 struct cifs_ses *ses = NULL; cifs_mount_get_session() local 3464 mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, struct cifs_tcon *tcon) mount_setup_tlink() argument 3665 CIFSTCon(const unsigned int xid, struct cifs_ses *ses, const char *tree, struct cifs_tcon *tcon, const struct nls_table *nls_codepage) CIFSTCon() argument 3824 cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_negotiate_protocol() argument 3869 cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, struct nls_table *nls_info) cifs_setup_session() argument 3964 cifs_set_vol_auth(struct smb3_fs_context *ctx, struct cifs_ses *ses) cifs_set_vol_auth() argument 3980 struct cifs_ses *ses; cifs_construct_tcon() local [all...] |
H A D | smb2pdu.c | 75 if (!tcon || !tcon->ses) in smb3_encryption_required() 77 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in smb3_encryption_required() 81 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required() 137 if (tcon->ses) in smb2_hdr_assemble() 138 shdr->SessionId = cpu_to_le64(tcon->ses->Suid); in smb2_hdr_assemble() 161 cifs_chan_skip_or_disable(struct cifs_ses *ses, in cifs_chan_skip_or_disable() argument 171 ses->server->hostname); in cifs_chan_skip_or_disable() 173 spin_lock(&ses->chan_lock); in cifs_chan_skip_or_disable() 174 chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_skip_or_disable() 176 spin_unlock(&ses in cifs_chan_skip_or_disable() 215 struct cifs_ses *ses; smb2_reconnect() local 1019 SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server) SMB2_negotiate() argument 1409 struct cifs_ses *ses; global() member 1431 struct cifs_ses *ses = sess_data->ses; SMB2_sess_alloc_buffer() local 1553 struct cifs_ses *ses = sess_data->ses; SMB2_sess_establish_session() local 1581 struct cifs_ses *ses = sess_data->ses; SMB2_auth_kerberos() local 1676 struct cifs_ses *ses = sess_data->ses; SMB2_sess_auth_rawntlmssp_negotiate() local 1768 struct cifs_ses *ses = sess_data->ses; SMB2_sess_auth_rawntlmssp_authenticate() local 1846 struct cifs_ses *ses = sess_data->ses; SMB2_select_sec() local 1872 SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, const struct nls_table *nls_cp) SMB2_sess_setup() argument 1919 SMB2_logoff(const unsigned int xid, struct cifs_ses *ses) SMB2_logoff() argument 1996 SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree, struct cifs_tcon *tcon, const struct nls_table *cp) SMB2_tcon() argument 2145 struct cifs_ses *ses = tcon->ses; SMB2_tdis() local 2774 struct cifs_ses *ses = tcon->ses; smb311_posix_mkdir() local 3123 struct cifs_ses *ses = tcon->ses; SMB2_open() local 3321 struct cifs_ses *ses; SMB2_ioctl() local 3502 struct cifs_ses *ses = tcon->ses; __SMB2_close() local 3694 struct cifs_ses *ses = tcon->ses; query_info() local 3866 struct cifs_ses *ses = tcon->ses; SMB2_change_notify() local 3967 struct cifs_ses *ses, *ses2; smb2_reconnect_server() local 4171 struct cifs_ses *ses = tcon->ses; SMB2_flush() local 4519 struct cifs_ses *ses = io_parms->tcon->ses; SMB2_read() local 5234 struct cifs_ses *ses = tcon->ses; SMB2_query_directory() local 5355 struct cifs_ses *ses = tcon->ses; send_set_info() local 5451 struct cifs_ses *ses = tcon->ses; SMB2_oplock_break() local 5575 struct cifs_ses *ses = tcon->ses; SMB311_posix_qfs_info() local 5626 struct cifs_ses *ses = tcon->ses; SMB2_QFS_info() local 5677 struct cifs_ses *ses = tcon->ses; SMB2_QFS_attr() local 5835 struct cifs_ses *ses = tcon->ses; SMB2_lease_break() local [all...] |
H A D | ioctl.c | 57 if (tcon->ses->server->ops->ioctl_query_info) in cifs_ioctl_query_info() 58 rc = tcon->ses->server->ops->ioctl_query_info( in cifs_ioctl_query_info() 126 tcon_inf.session_id = tcon->ses->Suid; in smb_mnt_get_tcon_info() 145 fsinf->protocol_id = tcon->ses->server->vals->protocol_id; in smb_mnt_get_fsinfo() 222 struct cifs_ses *ses; in cifs_dump_full_key() local 239 /* if ses id is 0, use current user session */ in cifs_dump_full_key() 240 ses = tcon->ses; in cifs_dump_full_key() 250 ses = ses_it; in cifs_dump_full_key() 256 cifs_smb_ses_inc_refcount(ses); in cifs_dump_full_key() [all...] |
H A D | cifs_debug.c | 112 (tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in cifs_debug_tcon() 119 if (tcon->ses->server->ops->dump_share_caps) in cifs_debug_tcon() 120 tcon->ses->server->ops->dump_share_caps(m, tcon); in cifs_debug_tcon() 238 struct cifs_ses *ses; in cifs_debug_files_proc_show() local 244 seq_puts(m, "# <tree id> <ses id> <persistent fid> <flags> <count> <pid> <uid>"); in cifs_debug_files_proc_show() 252 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in cifs_debug_files_proc_show() 253 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in cifs_debug_files_proc_show() 259 ses->Suid, in cifs_debug_files_proc_show() 286 struct cifs_ses *ses; in cifs_debug_data_proc_show() local 463 list_for_each_entry(ses, in cifs_debug_data_proc_show() 626 struct cifs_ses *ses; cifs_stats_proc_write() local 683 struct cifs_ses *ses; cifs_stats_proc_show() local [all...] |
H A D | dfs.c | 78 struct cifs_ses *ses = mnt_ctx->ses; in add_root_smb_session() local 80 if (ses) { in add_root_smb_session() 88 cifs_smb_ses_inc_refcount(ses); in add_root_smb_session() 90 root_ses->ses = ses; in add_root_smb_session() 94 ctx->dfs_root_ses = ses; in add_root_smb_session() 301 ctx->dfs_root_ses = mnt_ctx->ses; in dfs_mount_share() 399 struct cifs_ses *ses) in __tree_connect_ipc() 401 struct TCP_Server_Info *server = ses in __tree_connect_ipc() 397 __tree_connect_ipc(const unsigned int xid, char *tree, struct cifs_sb_info *cifs_sb, struct cifs_ses *ses) __tree_connect_ipc() argument 439 struct cifs_ses *ses = tcon->ses; tree_connect_ipc() local [all...] |
H A D | cifsproto.h | 100 extern struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses); 101 extern int cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, 105 extern int compound_send_recv(const unsigned int xid, struct cifs_ses *ses, 114 extern int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses, 172 struct cifs_ses *ses, 176 extern int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, 317 struct cifs_ses *ses, 319 extern int cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, 324 struct cifs_ses *ses, 327 extern int CIFSTCon(const unsigned int xid, struct cifs_ses *ses, 678 get_dfs_path(const unsigned int xid, struct cifs_ses *ses, const char *old_path, const struct nls_table *nls_codepage, struct dfs_info3_param *referral, int remap) get_dfs_path() argument 720 cifs_put_smb_ses(struct cifs_ses *ses) cifs_put_smb_ses() argument 737 cifs_smb_ses_inc_refcount(struct cifs_ses *ses) cifs_smb_ses_inc_refcount() argument [all...] |
H A D | smb2inode.c | 72 struct cifs_ses *ses = tcon->ses; in smb2_compound_op() local 90 server = cifs_pick_channel(ses); in smb2_compound_op() 166 trace_smb3_query_info_compound_enter(xid, ses->Suid, tcon->tid, in smb2_compound_op() 201 trace_smb3_posix_query_info_compound_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 204 trace_smb3_delete_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 211 trace_smb3_mkdir_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 229 trace_smb3_rmdir_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 264 trace_smb3_set_eof_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 297 trace_smb3_set_info_compound_enter(xid, ses in smb2_compound_op() [all...] |
H A D | cifs_swn.c | 50 if (tcon->ses->user_name != NULL) { in cifs_swn_auth_info_ntlm() 51 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_USER_NAME, tcon->ses->user_name); in cifs_swn_auth_info_ntlm() 56 if (tcon->ses->password != NULL) { in cifs_swn_auth_info_ntlm() 57 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_PASSWORD, tcon->ses->password); in cifs_swn_auth_info_ntlm() 62 if (tcon->ses->domainName != NULL) { in cifs_swn_auth_info_ntlm() 63 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_DOMAIN_NAME, tcon->ses->domainName); in cifs_swn_auth_info_ntlm() 114 if (swnreg->tcon->ses->server->use_swn_dstaddr) in cifs_swn_send_register_message() 115 addr = &swnreg->tcon->ses->server->swn_dstaddr; in cifs_swn_send_register_message() 117 addr = &swnreg->tcon->ses->server->dstaddr; in cifs_swn_send_register_message() 141 authtype = cifs_select_sectype(swnreg->tcon->ses in cifs_swn_send_register_message() [all...] |
H A D | transport.c | 703 static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf, in allocate_mid() argument 706 spin_lock(&ses->ses_lock); in allocate_mid() 707 if (ses->ses_status == SES_NEW) { in allocate_mid() 710 spin_unlock(&ses->ses_lock); in allocate_mid() 716 if (ses->ses_status == SES_EXITING) { in allocate_mid() 719 spin_unlock(&ses->ses_lock); in allocate_mid() 724 spin_unlock(&ses->ses_lock); in allocate_mid() 726 *ppmidQ = alloc_mid(in_buf, ses->server); in allocate_mid() 729 spin_lock(&ses->server->mid_lock); in allocate_mid() 730 list_add_tail(&(*ppmidQ)->qhead, &ses in allocate_mid() 868 SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses, char *in_buf, int flags) SendReceiveNoRsp() argument 962 cifs_setup_request(struct cifs_ses *ses, struct TCP_Server_Info *ignored, struct smb_rqst *rqst) cifs_setup_request() argument 1020 cifs_pick_channel(struct cifs_ses *ses) cifs_pick_channel() argument 1066 compound_send_recv(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, const int flags, const int num_rqst, struct smb_rqst *rqst, int *resp_buf_type, struct kvec *resp_iov) compound_send_recv() argument 1300 cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, struct smb_rqst *rqst, int *resp_buf_type, const int flags, struct kvec *resp_iov) cifs_send_recv() argument 1310 SendReceive2(const unsigned int xid, struct cifs_ses *ses, struct kvec *iov, int n_vec, int *resp_buf_type , const int flags, struct kvec *resp_iov) SendReceive2() argument 1349 SendReceive(const unsigned int xid, struct cifs_ses *ses, struct smb_hdr *in_buf, struct smb_hdr *out_buf, int *pbytes_returned, const int flags) SendReceive() argument 1472 struct cifs_ses *ses = tcon->ses; send_lock_cancel() local 1496 struct cifs_ses *ses; SendReceiveBlockingLock() local [all...] |
H A D | dfs_cache.c | 646 static int get_dfs_referral(const unsigned int xid, struct cifs_ses *ses, const char *path, in get_dfs_referral() argument 655 if (!ses || !ses->server || !ses->server->ops->get_dfs_refer) in get_dfs_referral() 660 cifs_dbg(FYI, "%s: ipc=%s referral=%s\n", __func__, ses->tcon_ipc->tree_name, path); in get_dfs_referral() 661 rc = ses->server->ops->get_dfs_refer(xid, ses, path, refs, numrefs, cache_cp, in get_dfs_referral() 684 struct cifs_ses *ses, in cache_refresh_path() 708 * a new referral. The @ses used for performing the I/O could be in cache_refresh_path() 719 rc = get_dfs_referral(xid, ses, pat in cache_refresh_path() 683 cache_refresh_path(const unsigned int xid, struct cifs_ses *ses, const char *path, bool force_refresh) cache_refresh_path() argument 856 dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, const struct nls_table *cp, int remap, const char *path, struct dfs_info3_param *ref, struct dfs_cache_tgt_list *tgt_list) dfs_cache_find() argument 1159 is_ses_good(struct cifs_ses *ses) is_ses_good() argument 1176 __refresh_tcon(const char *path, struct cifs_ses *ses, bool force_refresh) __refresh_tcon() argument 1227 struct cifs_ses *ses = tcon->ses; refresh_tcon() local 1283 struct cifs_ses *ses; dfs_cache_refresh() local [all...] |
H A D | cifsfs.c | 206 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) in cifs_read_super() 218 if ((tcon->ses->server->vals->protocol_id == SMB10_PROT_ID) && in cifs_read_super() 219 ((tcon->ses->capabilities & in cifs_read_super() 220 tcon->ses->server->vals->cap_nt_find) == 0) && in cifs_read_super() 249 tcon->ses->server->ops->negotiate_rsize(tcon, cifs_sb->ctx); in cifs_read_super() 315 struct TCP_Server_Info *server = tcon->ses->server; in cifs_statfs() 345 struct TCP_Server_Info *server = tcon->ses->server; in cifs_fallocate() 463 cifs_show_security(struct seq_file *s, struct cifs_ses *ses) in cifs_show_security() argument 465 if (ses in cifs_show_security() [all...] |
/kernel/linux/linux-5.10/fs/cifs/ |
H A D | sess.c | 61 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface) in is_ses_using_iface() argument 65 for (i = 0; i < ses->chan_count; i++) { in is_ses_using_iface() 66 if (is_server_using_iface(ses->chans[i].server, iface)) in is_ses_using_iface() 73 int cifs_try_adding_channels(struct cifs_ses *ses) in cifs_try_adding_channels() argument 75 int old_chan_count = ses->chan_count; in cifs_try_adding_channels() 76 int left = ses->chan_max - ses->chan_count; in cifs_try_adding_channels() 85 "ses already at max_channels (%zu), nothing to open\n", in cifs_try_adding_channels() 86 ses->chan_max); in cifs_try_adding_channels() 90 if (ses in cifs_try_adding_channels() 164 cifs_ses_find_chan(struct cifs_ses *ses, struct TCP_Server_Info *server) cifs_ses_find_chan() argument 176 cifs_ses_add_channel(struct cifs_ses *ses, struct cifs_server_iface *iface) cifs_ses_add_channel() argument 313 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB) cifs_ssetup_hdr() argument 381 unicode_domain_string(char **pbcc_area, struct cifs_ses *ses, const struct nls_table *nls_cp) unicode_domain_string() argument 404 unicode_ssetup_strings(char **pbcc_area, struct cifs_ses *ses, const struct nls_table *nls_cp) unicode_ssetup_strings() argument 436 ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses, const struct nls_table *nls_cp) ascii_ssetup_strings() argument 480 decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, const struct nls_table *nls_cp) decode_unicode_ssetup() argument 513 decode_ascii_ssetup(char **pbcc_area, __u16 bleft, struct cifs_ses *ses, const struct nls_table *nls_cp) decode_ascii_ssetup() argument 566 decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, struct cifs_ses *ses) decode_ntlmssp_challenge() argument 620 build_ntlmssp_negotiate_blob(unsigned char *pbuffer, struct cifs_ses *ses) build_ntlmssp_negotiate_blob() argument 653 size_of_ntlmssp_blob(struct cifs_ses *ses) size_of_ntlmssp_blob() argument 671 build_ntlmssp_auth_blob(unsigned char **pbuffer, u16 *buflen, struct cifs_ses *ses, const struct nls_table *nls_cp) build_ntlmssp_auth_blob() argument 845 struct cifs_ses *ses; global() member 865 struct cifs_ses *ses = sess_data->ses; sess_alloc_buffer() local 911 struct cifs_ses *ses = sess_data->ses; sess_establish_session() local 977 struct cifs_ses *ses = sess_data->ses; sess_auth_lanman() local 1083 struct cifs_ses *ses = sess_data->ses; sess_auth_ntlm() local 1193 struct cifs_ses *ses = sess_data->ses; sess_auth_ntlmv2() local 1302 struct cifs_ses *ses = sess_data->ses; sess_auth_kerberos() local 1442 struct cifs_ses *ses = sess_data->ses; _sess_auth_rawntlmssp_assemble_req() local 1481 struct cifs_ses *ses = sess_data->ses; sess_auth_rawntlmssp_negotiate() local 1577 struct cifs_ses *ses = sess_data->ses; sess_auth_rawntlmssp_authenticate() local 1678 select_sec(struct cifs_ses *ses, struct sess_data *sess_data) select_sec() argument 1727 CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, const struct nls_table *nls_cp) CIFS_SessSetup() argument [all...] |
H A D | cifsencrypt.c | 266 int setup_ntlm_response(struct cifs_ses *ses, const struct nls_table *nls_cp) in setup_ntlm_response() argument 272 if (!ses) in setup_ntlm_response() 275 ses->auth_key.response = kmalloc(temp_len, GFP_KERNEL); in setup_ntlm_response() 276 if (!ses->auth_key.response) in setup_ntlm_response() 279 ses->auth_key.len = temp_len; in setup_ntlm_response() 281 rc = SMBNTencrypt(ses->password, ses->server->cryptkey, in setup_ntlm_response() 282 ses->auth_key.response + CIFS_SESS_KEY_SIZE, nls_cp); in setup_ntlm_response() 289 rc = E_md4hash(ses->password, temp_key, nls_cp); in setup_ntlm_response() 296 rc = mdfour(ses in setup_ntlm_response() 352 build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp) build_avpair_blob() argument 407 find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp) find_domain_name() argument 459 find_timestamp(struct cifs_ses *ses) find_timestamp() argument 496 calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash, const struct nls_table *nls_cp) calc_ntlmv2_hash() argument 601 CalcNTLMv2_response(const struct cifs_ses *ses, char *ntlmv2_hash) CalcNTLMv2_response() argument 654 setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp) setup_ntlmv2_rsp() argument 774 calc_seckey(struct cifs_ses *ses) calc_seckey() argument [all...] |
H A D | smb2transport.c | 98 struct cifs_ses *ses = NULL; in smb2_get_sign_key() local 106 list_for_each_entry(ses, &it->smb_ses_list, smb_ses_list) { in smb2_get_sign_key() 107 if (ses->Suid == ses_id) in smb2_get_sign_key() 117 if (ses->binding) { in smb2_get_sign_key() 123 memcpy(key, ses->smb3signingkey, SMB3_SIGN_KEY_SIZE); in smb2_get_sign_key() 131 for (i = 0; i < ses->chan_count; i++) { in smb2_get_sign_key() 132 chan = ses->chans + i; in smb2_get_sign_key() 152 struct cifs_ses *ses; in smb2_find_smb_ses_unlocked() local 154 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in smb2_find_smb_ses_unlocked() 155 if (ses in smb2_find_smb_ses_unlocked() 166 struct cifs_ses *ses; smb2_find_smb_ses() local 176 smb2_find_smb_sess_tcon_unlocked(struct cifs_ses *ses, __u32 tid) smb2_find_smb_sess_tcon_unlocked() argument 198 struct cifs_ses *ses; smb2_find_smb_tcon() local 222 struct cifs_ses *ses; smb2_calc_signature() local 296 generate_key(struct cifs_ses *ses, struct kvec label, struct kvec context, __u8 *key, unsigned int key_size) generate_key() argument 396 generate_smb3signingkey(struct cifs_ses *ses, const struct derivation_triplet *ptriplet) generate_smb3signingkey() argument 476 generate_smb30signingkey(struct cifs_ses *ses) generate_smb30signingkey() argument 504 generate_smb311signingkey(struct cifs_ses *ses) generate_smb311signingkey() argument 743 smb2_get_mid_entry(struct cifs_ses *ses, struct TCP_Server_Info *server, struct smb2_sync_hdr *shdr, struct mid_q_entry **mid) smb2_get_mid_entry() argument 808 smb2_setup_request(struct cifs_ses *ses, struct TCP_Server_Info *server, struct smb_rqst *rqst) smb2_setup_request() argument [all...] |
H A D | smb2pdu.c | 88 if (!tcon || !tcon->ses) in smb3_encryption_required() 90 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in smb3_encryption_required() 94 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required() 133 if (tcon->ses) in smb2_hdr_assemble() 134 shdr->SessionId = tcon->ses->Suid; in smb2_hdr_assemble() 161 struct cifs_ses *ses; in smb2_reconnect() local 189 if ((!tcon->ses) || (tcon->ses->status == CifsExiting) || in smb2_reconnect() 190 (!tcon->ses->server) || !server) in smb2_reconnect() 193 ses in smb2_reconnect() 789 SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses) SMB2_negotiate() argument 1168 struct cifs_ses *ses; global() member 1189 struct cifs_ses *ses = sess_data->ses; SMB2_sess_alloc_buffer() local 1287 struct cifs_ses *ses = sess_data->ses; SMB2_sess_establish_session() local 1323 struct cifs_ses *ses = sess_data->ses; SMB2_auth_kerberos() local 1406 struct cifs_ses *ses = sess_data->ses; SMB2_sess_auth_rawntlmssp_negotiate() local 1497 struct cifs_ses *ses = sess_data->ses; SMB2_sess_auth_rawntlmssp_authenticate() local 1565 SMB2_select_sec(struct cifs_ses *ses, struct SMB2_sess_data *sess_data) SMB2_select_sec() argument 1592 SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, const struct nls_table *nls_cp) SMB2_sess_setup() argument 1637 SMB2_logoff(const unsigned int xid, struct cifs_ses *ses) SMB2_logoff() argument 1710 SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree, struct cifs_tcon *tcon, const struct nls_table *cp) SMB2_tcon() argument 1856 struct cifs_ses *ses = tcon->ses; SMB2_tdis() local 2498 struct cifs_ses *ses = tcon->ses; smb311_posix_mkdir() local 2846 struct cifs_ses *ses = tcon->ses; SMB2_open() local 3039 struct cifs_ses *ses; SMB2_ioctl() local 3210 struct cifs_ses *ses = tcon->ses; __SMB2_close() local 3404 struct cifs_ses *ses = tcon->ses; query_info() local 3570 struct cifs_ses *ses = tcon->ses; SMB2_change_notify() local 3647 struct cifs_ses *ses; smb2_reconnect_server() local 3784 struct cifs_ses *ses = tcon->ses; SMB2_flush() local 4101 struct cifs_ses *ses = io_parms->tcon->ses; SMB2_read() local 4791 struct cifs_ses *ses = tcon->ses; SMB2_query_directory() local 4913 struct cifs_ses *ses = tcon->ses; send_set_info() local 5007 struct cifs_ses *ses = tcon->ses; SMB2_oplock_break() local 5131 struct cifs_ses *ses = tcon->ses; SMB311_posix_qfs_info() local 5182 struct cifs_ses *ses = tcon->ses; SMB2_QFS_info() local 5233 struct cifs_ses *ses = tcon->ses; SMB2_QFS_attr() local 5391 struct cifs_ses *ses = tcon->ses; SMB2_lease_break() local [all...] |
H A D | cifs_debug.c | 109 (tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in cifs_debug_tcon() 116 if (tcon->ses->server->ops->dump_share_caps) in cifs_debug_tcon() 117 tcon->ses->server->ops->dump_share_caps(m, tcon); in cifs_debug_tcon() 168 struct cifs_ses *ses; in cifs_debug_files_proc_show() local 185 ses = list_entry(tmp, struct cifs_ses, smb_ses_list); in cifs_debug_files_proc_show() 186 list_for_each(tmp1, &ses->tcon_list) { in cifs_debug_files_proc_show() 221 struct cifs_ses *ses; in cifs_debug_data_proc_show() local 357 ses = list_entry(tmp2, struct cifs_ses, in cifs_debug_data_proc_show() 359 if ((ses->serverDomain == NULL) || in cifs_debug_data_proc_show() 360 (ses in cifs_debug_data_proc_show() 476 struct cifs_ses *ses; cifs_stats_proc_write() local 541 struct cifs_ses *ses; cifs_stats_proc_show() local [all...] |
H A D | connect.c | 290 * Resolve hostname and set ip addr in tcp ses. Useful for hostnames that may 394 struct cifs_ses *ses; in cifs_reconnect() local 457 ses = list_entry(tmp, struct cifs_ses, smb_ses_list); in cifs_reconnect() 458 ses->need_reconnect = true; in cifs_reconnect() 459 list_for_each(tmp2, &ses->tcon_list) { in cifs_reconnect() 463 if (ses->tcon_ipc) in cifs_reconnect() 464 ses->tcon_ipc->need_reconnect = true; in cifs_reconnect() 2469 * Skip ses channels since they're only handled in lower layers in cifs_find_tcp_session() 2680 static int match_session(struct cifs_ses *ses, struct smb_vol *vol) in match_session() argument 2683 vol->sectype != ses in match_session() 2728 cifs_setup_ipc(struct cifs_ses *ses, struct smb_vol *volume_info) cifs_setup_ipc() argument 2787 cifs_free_ipc(struct cifs_ses *ses) cifs_free_ipc() argument 2812 struct cifs_ses *ses; cifs_find_smb_ses() local 2828 cifs_put_smb_ses(struct cifs_ses *ses) cifs_put_smb_ses() argument 2885 cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses) cifs_set_cifscreds() argument 3043 struct cifs_ses *ses; cifs_get_smb_ses() local 3177 cifs_find_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) cifs_find_tcon() argument 3203 struct cifs_ses *ses; cifs_put_tcon() local 3254 cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) cifs_get_tcon() argument 3513 struct cifs_ses *ses; cifs_match_super() local 4061 mount_put_conns(struct cifs_sb_info *cifs_sb, unsigned int xid, struct TCP_Server_Info *server, struct cifs_ses *ses, struct cifs_tcon *tcon) mount_put_conns() argument 4086 struct cifs_ses *ses; mount_get_conns() local 4166 mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, struct cifs_tcon *tcon) mount_setup_tlink() argument 4240 expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses, struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb, char *ref_path) expand_dfs_referral() argument 4317 setup_dfs_tgt_conn(const char *path, const char *full_path, const struct dfs_cache_tgt_iterator *tgt_it, struct cifs_sb_info *cifs_sb, struct smb_vol *vol, unsigned int *xid, struct TCP_Server_Info **server, struct cifs_ses **ses, struct cifs_tcon **tcon) setup_dfs_tgt_conn() argument 4369 do_dfs_failover(const char *path, const char *full_path, struct cifs_sb_info *cifs_sb, struct smb_vol *vol, struct cifs_ses *root_ses, unsigned int *xid, struct TCP_Server_Info **server, struct cifs_ses **ses, struct cifs_tcon **tcon) do_dfs_failover() argument 4563 set_root_ses(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, struct cifs_ses **root_ses) set_root_ses() argument 4576 put_root_ses(struct cifs_ses *ses) put_root_ses() argument 4658 struct cifs_ses *ses = NULL, *root_ses = NULL; cifs_mount() local 4803 struct cifs_ses *ses; cifs_mount() local 4833 CIFSTCon(const unsigned int xid, struct cifs_ses *ses, const char *tree, struct cifs_tcon *tcon, const struct nls_table *nls_codepage) CIFSTCon() argument 5030 cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses) cifs_negotiate_protocol() argument 5056 cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, struct nls_table *nls_info) cifs_setup_session() argument 5089 cifs_set_vol_auth(struct smb_vol *vol, struct cifs_ses *ses) cifs_set_vol_auth() argument 5105 struct cifs_ses *ses; cifs_construct_tcon() local [all...] |
H A D | ioctl.c | 66 if (tcon->ses->server->ops->ioctl_query_info) in cifs_ioctl_query_info() 67 rc = tcon->ses->server->ops->ioctl_query_info( in cifs_ioctl_query_info() 140 fsinf->protocol_id = tcon->ses->server->vals->protocol_id; in smb_mnt_get_fsinfo() 234 if (tcon->ses->server->ops->set_compression) { in cifs_ioctl() 235 rc = tcon->ses->server->ops->set_compression( in cifs_ioctl() 250 if (tcon->ses->server->ops->set_integrity) in cifs_ioctl() 251 rc = tcon->ses->server->ops->set_integrity(xid, in cifs_ioctl() 270 if (tcon->ses->server->ops->enum_snapshots) in cifs_ioctl() 271 rc = tcon->ses->server->ops->enum_snapshots(xid, tcon, in cifs_ioctl() 290 le16_to_cpu(tcon->ses in cifs_ioctl() [all...] |
H A D | transport.c | 695 static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf, in allocate_mid() argument 698 if (ses->server->tcpStatus == CifsExiting) { in allocate_mid() 702 if (ses->server->tcpStatus == CifsNeedReconnect) { in allocate_mid() 707 if (ses->status == CifsNew) { in allocate_mid() 714 if (ses->status == CifsExiting) { in allocate_mid() 721 *ppmidQ = AllocMidQEntry(in_buf, ses->server); in allocate_mid() 725 list_add_tail(&(*ppmidQ)->qhead, &ses->server->pending_mid_q); in allocate_mid() 861 SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses, in SendReceiveNoRsp() argument 872 rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags, &rsp_iov); in SendReceiveNoRsp() 955 cifs_setup_request(struct cifs_ses *ses, struc argument 1010 cifs_pick_channel(struct cifs_ses *ses) cifs_pick_channel() argument 1030 compound_send_recv(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, const int flags, const int num_rqst, struct smb_rqst *rqst, int *resp_buf_type, struct kvec *resp_iov) compound_send_recv() argument 1250 cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server, struct smb_rqst *rqst, int *resp_buf_type, const int flags, struct kvec *resp_iov) cifs_send_recv() argument 1260 SendReceive2(const unsigned int xid, struct cifs_ses *ses, struct kvec *iov, int n_vec, int *resp_buf_type , const int flags, struct kvec *resp_iov) SendReceive2() argument 1299 SendReceive(const unsigned int xid, struct cifs_ses *ses, struct smb_hdr *in_buf, struct smb_hdr *out_buf, int *pbytes_returned, const int flags) SendReceive() argument 1417 struct cifs_ses *ses = tcon->ses; send_lock_cancel() local 1441 struct cifs_ses *ses; SendReceiveBlockingLock() local [all...] |
H A D | cifsfs.c | 176 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) in cifs_read_super() 188 if ((tcon->ses->server->vals->protocol_id == SMB10_PROT_ID) && in cifs_read_super() 189 ((tcon->ses->capabilities & in cifs_read_super() 190 tcon->ses->server->vals->cap_nt_find) == 0) && in cifs_read_super() 266 struct TCP_Server_Info *server = tcon->ses->server; in cifs_statfs() 296 struct TCP_Server_Info *server = tcon->ses->server; in cifs_fallocate() 404 cifs_show_security(struct seq_file *s, struct cifs_ses *ses) in cifs_show_security() argument 406 if (ses->sectype == Unspecified) { in cifs_show_security() 407 if (ses in cifs_show_security() [all...] |
H A D | smb2inode.c | 76 struct cifs_ses *ses = tcon->ses; in smb2_compound_op() local 93 server = cifs_pick_channel(ses); in smb2_compound_op() 167 trace_smb3_query_info_compound_enter(xid, ses->Suid, tcon->tid, in smb2_compound_op() 202 trace_smb3_posix_query_info_compound_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 205 trace_smb3_delete_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 212 trace_smb3_mkdir_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 230 trace_smb3_rmdir_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 265 trace_smb3_set_eof_enter(xid, ses->Suid, tcon->tid, full_path); in smb2_compound_op() 298 trace_smb3_set_info_compound_enter(xid, ses in smb2_compound_op() [all...] |
H A D | dfs_cache.c | 658 static int get_dfs_referral(const unsigned int xid, struct cifs_ses *ses, in get_dfs_referral() argument 665 if (!ses || !ses->server || !ses->server->ops->get_dfs_refer) in get_dfs_referral() 673 return ses->server->ops->get_dfs_refer(xid, ses, path, refs, numrefs, in get_dfs_referral() 701 static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, in __dfs_cache_find() argument 745 rc = get_dfs_referral(xid, ses, nls_codepage, remap, path, in __dfs_cache_find() 867 * @ses: smb session to issue the request on 877 int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, in dfs_cache_find() argument 986 dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses, const struct nls_table *nls_codepage, int remap, const char *path, const struct dfs_cache_tgt_iterator *it) dfs_cache_update_tgthint() argument 1393 struct cifs_ses *ses; get_tcons() local 1479 struct cifs_ses *ses; find_root_ses() local 1545 struct cifs_ses *root_ses = NULL, *ses; refresh_tcon() local [all...] |