Changeset 746 for vendor/current/source3/smbd/trans2.c
- Timestamp:
- Nov 27, 2012, 4:56:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/smbd/trans2.c
r740 r746 863 863 reply_outbuf(req, 10, total_sent_thistime + alignment_offset 864 864 + data_alignment_offset); 865 866 /*867 * We might have SMBtrans2s in req which was transferred to868 * the outbuf, fix that.869 */870 SCVAL(req->outbuf, smb_com, SMBtrans2);871 865 872 866 /* Set total params and data to be sent */ … … 1084 1078 } 1085 1079 1086 if (!map_open_params_to_ntcreate(smb_fname, deny_mode, open_ofun, 1080 if (!map_open_params_to_ntcreate(smb_fname->base_name, deny_mode, 1081 open_ofun, 1087 1082 &access_mask, &share_mode, 1088 1083 &create_disposition, … … 2271 2266 struct dptr_struct *dirptr = NULL; 2272 2267 struct smbd_server_connection *sconn = req->sconn; 2268 uint32_t ucf_flags = (UCF_SAVE_LCOMP | UCF_ALWAYS_ALLOW_WCARD_LCOMP); 2273 2269 2274 2270 if (total_params < 13) { … … 2314 2310 goto out; 2315 2311 } 2312 ucf_flags |= UCF_UNIX_NAME_LOOKUP; 2316 2313 break; 2317 2314 default: … … 2331 2328 req->flags2 & FLAGS2_DFS_PATHNAMES, 2332 2329 directory, 2333 (UCF_SAVE_LCOMP | 2334 UCF_ALWAYS_ALLOW_WCARD_LCOMP), 2330 ucf_flags, 2335 2331 &mask_contains_wcard, 2336 2332 &smb_dname); … … 4673 4669 case SMB_QUERY_FILE_STREAM_INFO: 4674 4670 case SMB_FILE_STREAM_INFORMATION: { 4675 unsigned int num_streams ;4676 struct stream_struct *streams ;4671 unsigned int num_streams = 0; 4672 struct stream_struct *streams = NULL; 4677 4673 4678 4674 DEBUG(10,("smbd_do_qfilepathinfo: " … … 4683 4679 } 4684 4680 4685 status = SMB_VFS_STREAMINFO( 4686 conn, fsp, smb_fname->base_name, talloc_tos(), 4687 &num_streams, &streams); 4681 status = vfs_streaminfo(conn, fsp, smb_fname->base_name, 4682 talloc_tos(), &num_streams, &streams); 4688 4683 4689 4684 if (!NT_STATUS_IS_OK(status)) { … … 5104 5099 uint32_t name_hash; 5105 5100 char *fname = NULL; 5101 uint32_t ucf_flags = 0; 5106 5102 5107 5103 /* qpathinfo */ … … 5115 5111 DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = %d\n", info_level)); 5116 5112 5117 if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) { 5118 reply_nterror(req, NT_STATUS_INVALID_LEVEL); 5119 return; 5113 if (INFO_LEVEL_IS_UNIX(info_level)) { 5114 if (!lp_unix_extensions()) { 5115 reply_nterror(req, NT_STATUS_INVALID_LEVEL); 5116 return; 5117 } 5118 if (info_level == SMB_QUERY_FILE_UNIX_BASIC || 5119 info_level == SMB_QUERY_FILE_UNIX_INFO2 || 5120 info_level == SMB_QUERY_FILE_UNIX_LINK) { 5121 ucf_flags |= UCF_UNIX_NAME_LOOKUP; 5122 } 5120 5123 } 5121 5124 … … 5132 5135 req->flags2 & FLAGS2_DFS_PATHNAMES, 5133 5136 fname, 5134 0,5137 ucf_flags, 5135 5138 NULL, 5136 5139 &smb_fname); … … 5819 5822 /* The set is across all open files on this dev/inode pair. */ 5820 5823 if (!set_delete_on_close(fsp, delete_on_close, 5824 conn->session_info->security_token, 5821 5825 &conn->session_info->utok)) { 5822 5826 return NT_STATUS_ACCESS_DENIED; … … 7976 7980 } else { 7977 7981 char *fname = NULL; 7982 uint32_t ucf_flags = 0; 7978 7983 7979 7984 /* set path info */ … … 7992 7997 } 7993 7998 7999 if (info_level == SMB_SET_FILE_UNIX_BASIC || 8000 info_level == SMB_SET_FILE_UNIX_INFO2 || 8001 info_level == SMB_FILE_RENAME_INFORMATION || 8002 info_level == SMB_POSIX_PATH_UNLINK) { 8003 ucf_flags |= UCF_UNIX_NAME_LOOKUP; 8004 } 8005 7994 8006 status = filename_convert(req, conn, 7995 8007 req->flags2 & FLAGS2_DFS_PATHNAMES, 7996 8008 fname, 7997 0,8009 ucf_flags, 7998 8010 NULL, 7999 8011 &smb_fname); … … 8822 8834 show_msg((char *)req->inbuf); 8823 8835 8836 /* Windows clients expect all replies to 8837 a transact secondary (SMBtranss2 0x33) 8838 to have a command code of transact 8839 (SMBtrans2 0x32). See bug #8989 8840 and also [MS-CIFS] section 2.2.4.47.2 8841 for details. 8842 */ 8843 req->cmd = SMBtrans2; 8844 8824 8845 if (req->wct < 8) { 8825 8846 reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
Note:
See TracChangeset
for help on using the changeset viewer.