Fix macOS SMB mount: AAPL caps, credit grant, file_index, QueryDirectory padding

- AAPL: Restore UNIX_BASED+NFS_ACE server_caps, RESOLVE_ID+FULL_SYNC volume_caps (Samba baseline)
- Credit: Grant min 1 credit in dispatch response for smbclient compatibility
- file_index: Assign 1-based index per entry in list_dir (both VFS and local backends)
- smb_match(): Add wildcard pattern filter (*/?) for macOS single-entry QueryDirectory probes
- FILE_ID_BOTH_DIR_INFORMATION: Add 2-byte Reserved2 padding between ShortName and FileId
- macOS Sequoia 15.5 mount_smbfs now succeeds (tested: ls, cat, read)
This commit is contained in:
Warren
2026-06-23 09:44:01 +08:00
parent 8ef1406ed3
commit e7863a3034
6 changed files with 94 additions and 15 deletions
+1
View File
@@ -371,6 +371,7 @@ pub fn encode_dir_entry(class: u8, entry: &DirEntry, file_index: u64) -> Vec<u8>
out.push(0); // ShortNameLength
out.push(0); // Reserved1
out.extend_from_slice(&[0u8; 24]); // ShortName
out.extend_from_slice(&[0u8; 2]); // Reserved2 (alignment padding for FileId)
out.extend_from_slice(&file_index.to_le_bytes()); // FileId (8 bytes)
out.extend_from_slice(&name_u16);
out