Changeset 478 for vendor/current/source3/smbd
- Timestamp:
- Aug 2, 2010, 6:40:21 PM (15 years ago)
- Location:
- vendor/current/source3/smbd
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/smbd/dir.c
r414 r478 556 556 int dptr_CloseDir(struct dptr_struct *dptr) 557 557 { 558 struct smbd_server_connection *sconn = dptr->conn->sconn; 559 DLIST_REMOVE(sconn->smb1.searches.dirptrs, dptr); 560 TALLOC_FREE(dptr->dir_hnd); 558 dptr_close_internal(dptr); 561 559 return 0; 562 560 } -
vendor/current/source3/smbd/filename.c
r414 r478 1126 1126 { 1127 1127 NTSTATUS status; 1128 bool allow_wcards = (ucf_flags & (UCF_COND_ALLOW_WCARD_LCOMP|UCF_ALWAYS_ALLOW_WCARD_LCOMP)); 1128 1129 char *fname = NULL; 1129 1130 … … 1133 1134 dfs_path, 1134 1135 name_in, 1136 allow_wcards, 1135 1137 &fname, 1136 1138 ppath_contains_wcard); -
vendor/current/source3/smbd/msdfs.c
r414 r478 1739 1739 bool dfs_pathnames, 1740 1740 const char *name_in, 1741 bool allow_wcards, 1741 1742 char **pp_name_out, 1742 1743 bool *ppath_contains_wcard) … … 1749 1750 conn, 1750 1751 name_in, 1751 True,1752 allow_wcards, 1752 1753 pp_name_out, 1753 1754 &path_contains_wcard); -
vendor/current/source3/smbd/service.c
r427 r478 1034 1034 goto err_root_exit; 1035 1035 } 1036 conn->base_share_dev = smb_fname_cpath->st.st_ex_dev; 1036 1037 1037 1038 string_set(&conn->origpath,conn->connectpath); -
vendor/current/source3/smbd/smb2_create.c
r414 r478 652 652 if (qfid) { 653 653 uint8_t p[32]; 654 uint64_t file_index = get_FileIndex(result->conn, 655 &result->fsp_name->st); 654 656 DATA_BLOB blob = data_blob_const(p, sizeof(p)); 655 657 656 658 ZERO_STRUCT(p); 657 659 658 /* TODO: maybe use result->file_id */ 659 SIVAL(p, 0, result->fsp_name->st.st_ex_ino);/* FileIndexLow */ 660 SIVAL(p, 4, result->fsp_name->st.st_ex_dev);/* FileIndexHigh */ 660 /* From conversations with Microsoft engineers at 661 the MS plugfest. The first 8 bytes are the "volume index" 662 == inode, the second 8 bytes are the "volume id", 663 == dev. This will be updated in the SMB2 doc. */ 664 SBVAL(p, 0, file_index); 665 SIVAL(p, 8, result->fsp_name->st.st_ex_dev);/* FileIndexHigh */ 661 666 662 667 status = smb2_create_blob_add(state, &out_context_blobs, -
vendor/current/source3/smbd/trans2.c
r414 r478 56 56 } 57 57 return val; 58 } 59 60 /******************************************************************** 61 Create a 64 bit FileIndex. If the file is on the same device as 62 the root of the share, just return the 64-bit inode. If it isn't, 63 mangle as we used to do. 64 ********************************************************************/ 65 66 uint64_t get_FileIndex(connection_struct *conn, const SMB_STRUCT_STAT *psbuf) 67 { 68 uint64_t file_index; 69 if (conn->base_share_dev == psbuf->st_ex_dev) { 70 return (uint64_t)psbuf->st_ex_ino; 71 } 72 file_index = ((psbuf->st_ex_ino) & UINT32_MAX); /* FileIndexLow */ 73 file_index |= ((uint64_t)((psbuf->st_ex_dev) & UINT32_MAX)) << 32; /* FileIndexHigh */ 74 return file_index; 58 75 } 59 76 … … 1061 1078 1062 1079 /* Any data in this call is an EA list. */ 1063 if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) { 1064 reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); 1065 goto out; 1066 } 1067 1068 if (total_data != 4) { 1080 if (total_data && (total_data != 4)) { 1069 1081 if (total_data < 10) { 1070 1082 reply_nterror(req, NT_STATUS_INVALID_PARAMETER); … … 1085 1097 goto out; 1086 1098 } 1087 } else if (IVAL(pdata,0) != 4) { 1088 reply_nterror(req, NT_STATUS_INVALID_PARAMETER); 1089 goto out; 1099 1100 if (!lp_ea_support(SNUM(conn))) { 1101 reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); 1102 goto out; 1103 } 1090 1104 } 1091 1105 … … 1478 1492 uint64_t file_size = 0; 1479 1493 uint64_t allocation_size = 0; 1494 uint64_t file_index = 0; 1480 1495 uint32_t len; 1481 1496 struct timespec mdate_ts, adate_ts, cdate_ts, create_date_ts; … … 1499 1514 } 1500 1515 allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn, NULL, &smb_fname->st); 1516 1517 file_index = get_FileIndex(conn, &smb_fname->st); 1501 1518 1502 1519 mdate_ts = smb_fname->st.st_ex_mtime; … … 1868 1885 } 1869 1886 SIVAL(p,0,0); p += 4; /* Unknown - reserved ? */ 1870 SIVAL(p,0,smb_fname->st.st_ex_ino); p += 4; /* FileIndexLow */ 1871 SIVAL(p,0,smb_fname->st.st_ex_dev); p += 4; /* FileIndexHigh */ 1887 SBVAL(p,0,file_index); p += 8; 1872 1888 len = srvstr_push(base_data, flags2, p, 1873 1889 fname, PTR_DIFF(end_data, p), … … 1939 1955 p += 26; 1940 1956 SSVAL(p,0,0); p += 2; /* Reserved ? */ 1941 SIVAL(p,0,smb_fname->st.st_ex_ino); p += 4; /* FileIndexLow */ 1942 SIVAL(p,0,smb_fname->st.st_ex_dev); p += 4; /* FileIndexHigh */ 1957 SBVAL(p,0,file_index); p += 8; 1943 1958 len = srvstr_push(base_data, flags2, p, 1944 1959 fname, PTR_DIFF(end_data, p), … … 3854 3869 const SMB_STRUCT_STAT *psbuf) 3855 3870 { 3871 uint64_t file_index = get_FileIndex(conn, psbuf); 3872 3856 3873 DEBUG(10,("store_file_unix_basic: SMB_QUERY_FILE_UNIX_BASIC\n")); 3857 3874 DEBUG(4,("store_file_unix_basic: st_mode=%o\n",(int)psbuf->st_ex_mode)); … … 3887 3904 pdata += 8; 3888 3905 3889 SINO_T_VAL(pdata,0,(SMB_INO_T) psbuf->st_ex_ino); /* inode number */3906 SINO_T_VAL(pdata,0,(SMB_INO_T)file_index); /* inode number */ 3890 3907 pdata += 8; 3891 3908 … … 4289 4306 I think this causes us to fail the IFSKIT 4290 4307 BasicFileInformationTest. -tpot */ 4291 file_index = ((psbuf->st_ex_ino) & UINT32_MAX); /* FileIndexLow */ 4292 file_index |= ((uint64_t)((psbuf->st_ex_dev) & UINT32_MAX)) << 32; /* FileIndexHigh */ 4308 file_index = get_FileIndex(conn, psbuf); 4293 4309 4294 4310 switch (info_level) { … … 5934 5950 req->flags2 & FLAGS2_DFS_PATHNAMES, 5935 5951 newname, 5952 true, 5936 5953 &newname, 5937 5954 &dest_has_wcard); … … 7806 7823 } 7807 7824 7808 /* Any data in this call is an EA list. */7809 if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) {7810 reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED);7811 goto out;7812 }7813 7814 7825 /* 7815 7826 * OS/2 workplace shell seems to send SET_EA requests of "null" … … 7818 7829 */ 7819 7830 7820 if (total_data != 4) { 7831 if (total_data && (total_data != 4)) { 7832 /* Any data in this call is an EA list. */ 7821 7833 if (total_data < 10) { 7822 7834 reply_nterror(req, NT_STATUS_INVALID_PARAMETER); … … 7835 7847 if (!ea_list) { 7836 7848 reply_nterror(req, NT_STATUS_INVALID_PARAMETER); 7849 goto out; 7850 } 7851 7852 if (!lp_ea_support(SNUM(conn))) { 7853 reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); 7837 7854 goto out; 7838 7855 }
Note:
See TracChangeset
for help on using the changeset viewer.