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
+10 -1
View File
@@ -47,6 +47,9 @@ pub struct ShareBindings {
/// (Windows always probes IPC$ before mounting an actual share). All
/// downstream ops on an IPC$ tree return `STATUS_NOT_SUPPORTED`.
pub is_ipc: bool,
/// Time Machine support for macOS backups.
pub time_machine: bool,
pub time_machine_max_size: Option<u64>,
}
impl ShareBindings {
@@ -56,12 +59,16 @@ impl ShareBindings {
mode: ShareMode,
users: HashMap<String, Access>,
is_ipc: bool,
time_machine: bool,
time_machine_max_size: Option<u64>,
) -> Arc<Self> {
Arc::new(Self {
name,
backend,
acl: RwLock::new(ShareAcl { mode, users }),
is_ipc,
time_machine,
time_machine_max_size,
})
}
@@ -74,6 +81,8 @@ impl ShareBindings {
ShareMode::PublicReadOnly,
HashMap::new(),
true,
false,
None,
)
}
}
@@ -311,7 +320,7 @@ impl ConfigHandle {
}
}
let binding = ShareBindings::new(share.name, share.backend, share.mode, share.users, false);
let binding = ShareBindings::new(share.name, share.backend, share.mode, share.users, false, share.time_machine, share.time_machine_max_size);
self.state.shares.insert(binding).await
}