/illumos-gate/usr/src/uts/common/fs/smbsrv/ |
H A D | smb_cmn_rename.c | 157 rc = smb_pathname_reduce(sr, sr->user_cr, path, tnode, tnode, in smb_common_rename() 171 smb_rename_release_src(sr); in smb_common_rename() 177 rc = smb_fsop_lookup(sr, sr->user_cr, 0, tnode, in smb_common_rename() 220 rc = smb_fsop_lookup(sr, sr->user_cr, in smb_common_rename() 304 rc = smb_fsop_rename(sr, sr->user_cr, in smb_common_rename() 326 smb_rename_release_src(sr); in smb_common_rename() 483 rc = smb_pathname_reduce(sr, sr->user_cr, path, tnode, tnode, in smb_make_link() 507 rc = smb_fsop_lookup(sr, sr->user_cr, 0, tnode, in smb_make_link() 519 rc = smb_fsop_link(sr, sr->user_cr, src_fqi->fq_fnode, in smb_make_link() 557 rc = smb_pathname_reduce(sr, sr->user_cr, path, tnode, tnode, in smb_rename_lookup_src() [all …]
|
H A D | smb_echo.c | 64 pid_hi = sr->smb_pid >> 16; in smb_com_echo() 77 nbytes = sr->smb_bcc; in smb_com_echo() 95 sr->first_smb_com, in smb_com_echo() 96 sr->smb_rcls, in smb_com_echo() 97 sr->smb_reh, in smb_com_echo() 98 sr->smb_err, in smb_com_echo() 100 sr->smb_flg2, in smb_com_echo() 102 sr->smb_sig, in smb_com_echo() 103 sr->smb_tid, in smb_com_echo() 105 sr->smb_uid, in smb_com_echo() [all …]
|
H A D | smb2_negotiate.c | 542 sr->smb2_reply_hdr = sr->reply.chain_offset = 0; in smb1_negotiate_smb2() 550 sr->arg.other = smb_srm_zalloc(sr, sizeof (smb2_arg_negotiate_t)); in smb1_negotiate_smb2() 556 smb2sr_put_error(sr, sr->smb2_status); in smb1_negotiate_smb2() 559 smb2_send_reply(sr); in smb1_negotiate_smb2() 602 sr->smb2_cmd_hdr = sr->command.chain_offset; in smb2_newrq_negotiate() 737 smb2sr_put_error(sr, sr->smb2_status); in smb2_newrq_negotiate() 742 if (smb31_preauth_sha512_calc(sr, &sr->reply, in smb2_newrq_negotiate() 749 smb2_send_reply(sr); in smb2_newrq_negotiate() 855 if (smb31_preauth_sha512_calc(sr, &sr->command, in smb2_negotiate_common() 872 &sr->reply, in smb2_negotiate_common() [all …]
|
H A D | smb2_oplock.c | 72 &sr->smb_data, "b5.qq", in smb2_oplock_break_ack() 129 ofile = sr->fid_ofile; in smb2_oplock_break_ack() 171 sr->smb2_status = status; in smb2_oplock_break_ack() 174 smb2sr_put_error(sr, status); in smb2_oplock_break_ack() 205 &sr->reply, "wb5.qq", in smb2_oplock_break_ack() 248 sr->smb_tid = 0; in smb2_oplock_break_notification() 249 sr->smb_pid = 0; in smb2_oplock_break_notification() 250 sr->smb2_ssnid = 0; in smb2_oplock_break_notification() 261 &sr->reply, "wb5.qq", in smb2_oplock_break_notification() 313 sr->reply.max_bytes = MLEN; in smb2_oplock_send_break() [all …]
|
H A D | smb_notify.c | 288 switch (sr->sr_state) { in smb_notify_act2() 296 sr->sr_worker = NULL; in smb_notify_act2() 352 of = sr->fid_ofile; in smb_notify_act3() 361 switch (sr->sr_state) { in smb_notify_act3() 371 cv_wait(&sr->sr_st_cv, &sr->sr_mutex); in smb_notify_act3() 413 of = sr->fid_ofile; in smb_notify_get_events() 539 SMB_REQ_VALID(sr); in smb_notify_wakeup() 647 smb_request_t *sr; in smb_notify_ofile() local 705 while (sr != NULL) { in smb_notify_ofile() 706 smb_notify_wakeup(sr); in smb_notify_ofile() [all …]
|
H A D | smb2_query_info.c | 29 smb2_query_info(smb_request_t *sr) in smb2_query_info() argument 47 &sr->smb_data, "wbblw..lllqq", in smb2_query_info() 85 status = smb2_qinfo_file(sr, qi); in smb2_query_info() 88 status = smb2_qinfo_fs(sr, qi); in smb2_query_info() 91 status = smb2_qinfo_sec(sr, qi); in smb2_query_info() 102 sr->smb2_status = status; in smb2_query_info() 128 smb2sr_put_error_data(sr, status, &sr->raw_data); in smb2_query_info() 130 smb2sr_put_error_ctx0(sr, status, &sr->raw_data); in smb2_query_info() 153 smb2sr_put_error(sr, status); in smb2_query_info() 163 &sr->reply, "wwlC", in smb2_query_info() [all …]
|
H A D | smb_nt_create_andx.c | 202 rc = smbsr_decode_data(sr, "%#u", sr, NameLength, in smb_pre_nt_create_andx() 225 if (sr->arg.open.dir != NULL) { in smb_post_nt_create_andx() 227 sr->arg.open.dir = NULL; in smb_post_nt_create_andx() 279 sr->user_cr = smb_user_getprivcred(sr->uid_user); in smb_com_nt_create_andx() 293 status = smb_common_open(sr); in smb_com_nt_create_andx() 308 of = sr->fid_ofile; in smb_com_nt_create_andx() 358 sr->smb_bcc = 0; in smb_com_nt_create_andx() 362 sr->andx_com, /* (b.) */ in smb_com_nt_create_andx() 365 sr->smb_fid, /* (w) */ in smb_com_nt_create_andx() 386 sr->andx_com, /* (b.) */ in smb_com_nt_create_andx() [all …]
|
H A D | smb_nt_transact_quota.c | 107 if (smb_mbc_decodef(&xa->req_param_mb, "%wbblll", sr, &sr->smb_fid, in smb_nt_transact_query_quota() 118 smbsr_lookup_file(sr); in smb_nt_transact_query_quota() 119 ofile = sr->fid_ofile; in smb_nt_transact_query_quota() 128 smbsr_release_file(sr); in smb_nt_transact_query_quota() 137 smbsr_release_file(sr); in smb_nt_transact_query_quota() 185 smbsr_release_file(sr); in smb_nt_transact_query_quota() 249 &sr->smb_fid)) { in smb_nt_transact_set_quota() 254 smbsr_lookup_file(sr); in smb_nt_transact_set_quota() 255 ofile = sr->fid_ofile; in smb_nt_transact_set_quota() 264 smbsr_release_file(sr); in smb_nt_transact_set_quota() [all …]
|
H A D | smb_oplock.c | 47 ofile = sr->fid_ofile; in smb1_oplock_ack_break() 100 sr->smb_pid = 0xFFFF; in smb1_oplock_break_notification() 101 sr->smb_uid = 0; in smb1_oplock_break_notification() 102 sr->smb_mid = 0xFFFF; in smb1_oplock_break_notification() 109 sr->smb_com, /* b */ in smb1_oplock_break_notification() 111 sr->smb_tid, /* w */ in smb1_oplock_break_notification() 112 sr->smb_pid, /* w */ in smb1_oplock_break_notification() 113 sr->smb_uid, /* w */ in smb1_oplock_break_notification() 114 sr->smb_mid, /* w */ in smb1_oplock_break_notification() 159 sr->reply.max_bytes = MLEN; in smb1_oplock_send_break() [all …]
|
H A D | smb_process_exit.c | 59 smb_pre_process_exit(smb_request_t *sr) in smb_pre_process_exit() argument 72 smb_com_process_exit(smb_request_t *sr) in smb_com_process_exit() argument 76 sr->uid_user = smb_session_lookup_uid(sr->session, sr->smb_uid); in smb_com_process_exit() 77 if (sr->uid_user == NULL) { in smb_com_process_exit() 78 rc = smbsr_encode_empty_result(sr); in smb_com_process_exit() 82 sr->user_cr = smb_user_getcred(sr->uid_user); in smb_com_process_exit() 90 sr->tid_tree = smb_session_lookup_tree(sr->session, sr->smb_tid); in smb_com_process_exit() 91 if (sr->tid_tree != NULL) in smb_com_process_exit() 92 smb_tree_close_pid(sr->tid_tree, sr->smb_pid); in smb_com_process_exit() 94 smb_session_close_pid(sr->session, sr->smb_pid); in smb_com_process_exit() [all …]
|
H A D | smb2_session_setup.c | 31 smb2_session_setup(smb_request_t *sr) in smb2_session_setup() argument 48 sr->sr_ssetup = sinfo; in smb2_session_setup() 51 &sr->smb_data, "wbbllwwq", in smb2_session_setup() 68 sr->smb_data.chain_offset; in smb2_session_setup() 103 !SMB3_CLIENT_ENCRYPTS(sr))) { in smb2_session_setup() 139 smb2_ss_adjust_credits(sr); in smb2_session_setup() 151 PrevSsnId != sr->smb2_ssnid) in smb2_session_setup() 161 sr->smb2_status = status; in smb2_session_setup() 167 sr->smb2_status = status; in smb2_session_setup() 179 &sr->reply, in smb2_session_setup() [all …]
|
H A D | smb2_lock.c | 49 smb2_lock(smb_request_t *sr) in smb2_lock() argument 64 &sr->smb_data, "wwlqq", in smb2_lock() 118 &sr->smb_data, "qqll", in smb2_lock() 136 sr->arg.lock.lvec = lvec; in smb2_lock() 140 status = smb2_unlock(sr); in smb2_lock() 142 status = smb2_locks(sr); in smb2_lock() 146 smb2_dh_update_locks(sr, sr->fid_ofile); in smb2_lock() 150 sr->smb2_status = status; in smb2_lock() 162 &sr->reply, "w..", in smb2_lock() 172 smb2_unlock(smb_request_t *sr) in smb2_unlock() argument [all …]
|
H A D | smb_fsinfo.c | 82 if (smb_fssize(sr, &fssize) != 0) in smb_com_query_information_disk() 171 tree = sr->tid_tree; in smb_com_trans2_query_fs_information() 187 if (smb_fssize(sr, &fssize) != 0) in smb_com_trans2_query_fs_information() 214 tmpbuf = smb_srm_zalloc(sr, buflen); in smb_com_trans2_query_fs_information() 220 "%lb#c", sr, fsid.val[0], in smb_com_trans2_query_fs_information() 258 if (smb_fssize(sr, &fssize) != 0) in smb_com_trans2_query_fs_information() 284 sr->smb_flg2 |= SMB_FLAGS2_UNICODE; in smb_com_trans2_query_fs_information() 335 if (smb_fssize(sr, &fssize) != 0) in smb_com_trans2_query_fs_information() 394 node = sr->tid_tree->t_snode; in smb_fssize() 450 tree = sr->tid_tree; in smb_com_trans2_set_fs_information() [all …]
|
H A D | smb_locking_andx.c | 223 smb_pre_locking_andx(smb_request_t *sr) in smb_pre_locking_andx() argument 243 smb_com_locking_andx(smb_request_t *sr) in smb_com_locking_andx() argument 261 rc = smbsr_decode_vwv(sr, "4.wbblww", &sr->smb_fid, &lock_type, in smb_com_locking_andx() 266 smbsr_lookup_file(sr); in smb_com_locking_andx() 267 if (sr->fid_ofile == NULL) { in smb_com_locking_andx() 271 ofile = sr->fid_ofile; in smb_com_locking_andx() 308 smbsr_error(sr, 0, ERRDOS, in smb_com_locking_andx() 368 smbsr_error(sr, 0, ERRDOS, in smb_com_locking_andx() 400 (void) smb_unlock_range(sr, in smb_com_locking_andx() 403 smb_lock_range_error(sr, result); in smb_com_locking_andx() [all …]
|
H A D | smb_opipe.c | 245 switch (sr->sr_state) { in smb_opipe_send_userinfo() 252 cv_wait(&sr->sr_st_cv, &sr->sr_mutex); in smb_opipe_send_userinfo() 262 sr->cancel_arg2 = NULL; in smb_opipe_send_userinfo() 362 sr->fid_ofile = ofile; in smb_opipe_open() 413 ofile = sr->fid_ofile; in smb_opipe_write() 463 ofile = sr->fid_ofile; in smb_opipe_read() 487 sr->cancel_arg2 = sock; in smb_opipe_read() 513 cv_wait(&sr->sr_st_cv, &sr->sr_mutex); in smb_opipe_read() 550 ofile = sr->fid_ofile; in smb_opipe_ioctl() 651 ofile = sr->fid_ofile; in smb_opipe_transceive() [all …]
|
H A D | smb_alloc.c | 133 smb_srm_init(smb_request_t *sr) in smb_srm_init() argument 207 p = smb_srm_alloc(sr, size); in smb_srm_strdup() 233 smh->smh_sr = sr; in smb_alloc() 236 if (sr != NULL) { in smb_alloc() 237 SMB_REQ_VALID(sr); in smb_alloc() 260 ASSERT(sr == smh->smh_sr); in smb_free() 261 if (sr != NULL) { in smb_free() 262 SMB_REQ_VALID(sr); in smb_free() 295 ASSERT(sr == smh->smh_sr); in smb_realloc() 298 smb_free(sr, ptr, zero); in smb_realloc() [all …]
|
H A D | smb2_qinfo_fs.c | 55 status = smb2_qfs_volume(sr); in smb2_qinfo_fs() 58 status = smb2_qfs_size(sr); in smb2_qinfo_fs() 61 status = smb2_qfs_device(sr); in smb2_qinfo_fs() 64 status = smb2_qfs_attr(sr); in smb2_qinfo_fs() 73 status = smb2_qfs_obj_id(sr); in smb2_qinfo_fs() 117 &sr->raw_data, "Tllb.U", in smb2_qfs_volume() 148 &sr->raw_data, "qqll", in smb2_qfs_size() 177 &sr->raw_data, "qqqll", in smb2_qfs_fullsize() 207 &sr->raw_data, "ll", in smb2_qfs_device() 262 &sr->raw_data, "lllU", in smb2_qfs_attr() [all …]
|
H A D | smb_trans2_find.c | 300 pn = &sr->arg.dirop.fqi.fq_path; in smb_com_trans2_find_first2() 309 if (!smb_pathname_validate(sr, pn)) in smb_com_trans2_find_first2() 319 sr->user_cr = smb_user_getprivcred(sr->uid_user); in smb_com_trans2_find_first2() 330 smbsr_error(sr, status, 0, 0); in smb_com_trans2_find_first2() 457 sr->user_cr = smb_user_getprivcred(sr->uid_user); in smb_com_trans2_find_next2() 464 od = smb_tree_lookup_odir(sr, odid); in smb_com_trans2_find_next2() 902 sr, in smb_trans2_find_mbc_encode() 933 sr, in smb_trans2_find_mbc_encode() 991 smb_pre_find_close2(smb_request_t *sr) in smb_pre_find_close2() argument 1012 od = smb_tree_lookup_odir(sr, odid); in smb_com_find_close2() [all …]
|
H A D | smb_common_open.c | 317 sr->uid_user->u_domain, sr->uid_user->u_name); in smb_common_open() 395 rc = smb_pathname_reduce(sr, sr->user_cr, pn->pn_path, in smb_common_open() 597 status = smb_fsop_access(sr, sr->user_cr, fnode, in smb_common_open() 604 smb_fsop_eaccess(sr, sr->user_cr, fnode, &max_allowed); in smb_common_open() 632 rc = smb_fsop_create_stream(sr, sr->user_cr, dnode, in smb_common_open() 894 rc = smb_fsop_setattr(sr, sr->user_cr, fnode, in smb_common_open() 1020 rc = smb_fsop_create(sr, sr->user_cr, dnode, in smb_common_open() 1028 rc = smb_fsop_mkdir(sr, sr->user_cr, dnode, in smb_common_open() 1048 smb_fsop_eaccess(sr, sr->user_cr, fnode, &max_allowed); in smb_common_open() 1290 (void) smb_fsop_rmdir(sr, sr->user_cr, fqi->fq_dnode, in smb_delete_new_object() [all …]
|
H A D | smb2_setinfo_file.c | 43 smb_ofile_t *of = sr->fid_ofile; in smb2_setinfo_file() 71 status = smb2_setf_link(sr, si); in smb2_setinfo_file() 77 status = smb2_setf_seek(sr, si); in smb2_setinfo_file() 83 status = smb2_setf_mode(sr, si); in smb2_setinfo_file() 92 status = smb2_setf_pipe(sr, si); in smb2_setinfo_file() 127 sr, namelen, &fname); in smb2_setf_rename() 158 sr, namelen, &fname); in smb2_setf_link() 179 smb_ofile_t *of = sr->fid_ofile; in smb2_setf_seek() 214 _NOTE(ARGUNUSED(sr)) in smb2_setf_mode() 238 smb_ofile_t *of = sr->fid_ofile; in smb2_setf_pipe() [all …]
|
H A D | smb_nt_transact_create.c | 67 bzero(op, sizeof (sr->arg.open)); in smb_pre_nt_transact_create() 70 sr, in smb_pre_nt_transact_create() 109 smbsr_error(sr, status, 0, 0); in smb_pre_nt_transact_create() 126 smb_sd_t *sd = sr->arg.open.sd; in smb_post_nt_transact_create() 136 if (sr->arg.open.dir != NULL) { in smb_post_nt_transact_create() 138 sr->arg.open.dir = NULL; in smb_post_nt_transact_create() 190 sr->user_cr = smb_user_getprivcred(sr->uid_user); in smb_nt_transact_create() 204 status = smb_common_open(sr); in smb_nt_transact_create() 219 of = sr->fid_ofile; in smb_nt_transact_create() 251 sr->smb_fid, /* (w) */ in smb_nt_transact_create() [all …]
|
H A D | smb_fsops.c | 216 *ret_snode = smb_node_lookup(sr, &sr->arg.open, cr, vp, in smb_fsop_create_with_sd() 245 *ret_snode = smb_node_lookup(sr, &sr->arg.open, cr, vp, in smb_fsop_create_with_sd() 303 ASSERT(sr); in smb_fsop_create() 385 if (smb_fsop_access(sr, sr->user_cr, fnode, in smb_fsop_create_file_with_stream() 615 ASSERT(sr); in smb_fsop_mkdir() 871 ASSERT(sr); in smb_fsop_remove_streams() 1029 if (sr && sr->fid_ofile) { in smb_fsop_getattr() 1084 ASSERT(sr); in smb_fsop_link() 1172 ASSERT(sr); in smb_fsop_rename() 1239 if (sr && sr->fid_ofile) { in smb_fsop_rename() [all …]
|
H A D | smb_flush.c | 59 smb_pre_flush(smb_request_t *sr) in smb_pre_flush() argument 63 rc = smbsr_decode_vwv(sr, "w", &sr->smb_fid); in smb_pre_flush() 71 smb_post_flush(smb_request_t *sr) in smb_post_flush() argument 77 smb_com_flush(smb_request_t *sr) in smb_com_flush() argument 84 rc = smbsr_encode_empty_result(sr); in smb_com_flush() 88 if (sr->smb_fid != 0xffff) { in smb_com_flush() 89 smbsr_lookup_file(sr); in smb_com_flush() 90 if (sr->fid_ofile == NULL) { in smb_com_flush() 95 smb_ofile_flush(sr, sr->fid_ofile); in smb_com_flush() 102 smb_ofile_flush(sr, file); in smb_com_flush() [all …]
|
H A D | smb_seek.c | 83 smb_pre_seek(smb_request_t *sr) in smb_pre_seek() argument 85 DTRACE_SMB_START(op__Seek, smb_request_t *, sr); in smb_pre_seek() 90 smb_post_seek(smb_request_t *sr) in smb_post_seek() argument 92 DTRACE_SMB_DONE(op__Seek, smb_request_t *, sr); in smb_post_seek() 96 smb_com_seek(smb_request_t *sr) in smb_com_seek() argument 103 if (smbsr_decode_vwv(sr, "wwl", &sr->smb_fid, &mode, &off) != 0) in smb_com_seek() 106 smbsr_lookup_file(sr); in smb_com_seek() 107 if (sr->fid_ofile == NULL) { in smb_com_seek() 112 sr->user_cr = smb_ofile_getcred(sr->fid_ofile); in smb_com_seek() 116 smbsr_error(sr, 0, ERRDOS, ERRbadfunc); in smb_com_seek() [all …]
|
H A D | smb2_lease.c | 294 sr->fid_ofile = o; in lease_find_oplock() 376 ofile = sr->fid_ofile; in smb2_lease_break_ack() 419 sr->smb2_status = status; in smb2_lease_break_ack() 438 &sr->reply, "w6.#cl8.", in smb2_lease_break_ack() 480 sr->smb_tid = 0; in smb2_lease_break_notification() 481 sr->smb_pid = 0; in smb2_lease_break_notification() 482 sr->smb2_ssnid = 0; in smb2_lease_break_notification() 528 rc = smb_session_send(sr->session, 0, &sr->reply); in lease_send_any_cn() 659 sr->reply.max_bytes = MLEN; in smb2_lease_send_break() 719 sr->fid_ofile = NULL; in smb2_lease_send_break() [all …]
|