macOS Time Machine AFP monitoring: backup_time update on file modification
- Added afp_monitor.rs module to track AFP_AfpInfo backup_time - Open struct now has 'modified' flag to track file modifications - write.rs sets modified=true on successful write - close.rs calls AfpMonitor::update_backup_time() on modified files - create.rs calls AfpMonitor::init_afp_info() on new file creation - AFP_AfpInfo stored as xattr com.apple.aapl.AfpInfo - backup_time updated to current epoch time on modification Also includes: - LZ4 compression using lz4_flex crate - Case sensitivity conditional on backend capabilities - LDAP cfg feature gate fix - RAID rebuild reconstruction implementation - DOS attributes xattr persistence - Snapshot disk persistence Tests: 201 smb-server, 452 markbase-core (653 total)
This commit is contained in:
Vendored
+7
-1
@@ -337,7 +337,12 @@ pub fn encode_minimal_security_descriptor() -> Vec<u8> {
|
||||
/// bytes. The caller patches `NextEntryOffset` for chained entries.
|
||||
pub fn encode_dir_entry(class: u8, entry: &DirEntry, file_index: u64) -> Vec<u8> {
|
||||
let info = &entry.info;
|
||||
let name_u16 = utf16le(&info.name);
|
||||
// Apply reverse Catia mapping (ASCII -> Apple private-range chars) so that
|
||||
// filenames containing chars illegal in SMB (e.g. `:`, `*`) roundtrip
|
||||
// correctly for macOS clients.
|
||||
let units: Vec<u16> = info.name.encode_utf16().collect();
|
||||
let mapped = crate::unicode_mapping::map_ascii_to_private(&units);
|
||||
let name_u16: Vec<u8> = mapped.iter().flat_map(|c| c.to_le_bytes()).collect();
|
||||
match class {
|
||||
FILE_DIRECTORY_INFORMATION => {
|
||||
// 64 bytes fixed + name
|
||||
@@ -430,6 +435,7 @@ mod tests {
|
||||
change_time: 0x01D9_0000_0000_0000,
|
||||
is_directory: false,
|
||||
file_index: 1,
|
||||
dos_attributes: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user