Add SMB AAPL Extensions Phase 1-6 + VFS xattr support

Phase 1: AAPL Create Context negotiation
Phase 2: AFP_AfpInfo Stream structure (Finder info + creation time)
Phase 2.5: SMB Named Stream Backend (NamedStreamPath)
Phase 2.6: Backend Named Stream Support in handlers
Phase 2.7: VFS Extended Attributes (get/set/remove/list_xattr)
Phase 4: Time Machine share config (time_machine field)
Phase 5: Server/Volume Capabilities
Phase 6: macOS Unicode mapping (private range ↔ ASCII)

Tests: 174 smb-server tests pass, 52 VFS tests pass
This commit is contained in:
Warren
2026-06-22 14:21:53 +08:00
parent 64709ec529
commit 866d0536c8
14 changed files with 906 additions and 5 deletions

View File

@@ -327,6 +327,28 @@ pub trait VfsBackend: Send + Sync {
fn remove_ace(&self, _path: &Path, _ace_index: usize) -> Result<(), VfsError> {
Err(VfsError::Unsupported("remove_ace".to_string()))
}
// ===== Extended Attributes (xattr) support =====
/// 获取扩展属性
fn get_xattr(&self, _path: &Path, _name: &str) -> Result<Vec<u8>, VfsError> {
Err(VfsError::Unsupported("get_xattr".to_string()))
}
/// 设置扩展属性
fn set_xattr(&self, _path: &Path, _name: &str, _value: &[u8]) -> Result<(), VfsError> {
Err(VfsError::Unsupported("set_xattr".to_string()))
}
/// 删除扩展属性
fn remove_xattr(&self, _path: &Path, _name: &str) -> Result<(), VfsError> {
Err(VfsError::Unsupported("remove_xattr".to_string()))
}
/// 列出扩展属性名称
fn list_xattrs(&self, _path: &Path) -> Result<Vec<String>, VfsError> {
Err(VfsError::Unsupported("list_xattrs".to_string()))
}
}
/// 快照信息