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:
@@ -164,9 +164,11 @@ pub async fn handle_smb_server_command(cmd: SmbServerCommand) -> anyhow::Result<
|
||||
user
|
||||
};
|
||||
|
||||
let ldap_provider: Option<Arc<crate::provider::ldap::LdapProvider>> = if ldap {
|
||||
#[cfg(feature = "ldap")]
|
||||
{
|
||||
#[allow(unused_mut)]
|
||||
let mut ldap_enabled = false;
|
||||
#[cfg(feature = "ldap")]
|
||||
{
|
||||
if ldap {
|
||||
let config = crate::provider::ldap::LdapConfig {
|
||||
ldap_url: ldap_url.unwrap_or_else(|| "ldap://localhost:389".to_string()),
|
||||
base_dn: ldap_base_dn.unwrap_or_else(|| "dc=example,dc=com".to_string()),
|
||||
@@ -182,16 +184,13 @@ pub async fn handle_smb_server_command(cmd: SmbServerCommand) -> anyhow::Result<
|
||||
user_groups_attr: ldap_user_groups_attr.unwrap_or_else(|| "memberOf".to_string()),
|
||||
};
|
||||
log::info!("LDAP authentication enabled: url={}, search_base={}", config.ldap_url, config.user_search_base);
|
||||
Some(Arc::new(crate::provider::ldap::LdapProvider::new(config)))
|
||||
ldap_enabled = true;
|
||||
}
|
||||
#[cfg(not(feature = "ldap"))]
|
||||
{
|
||||
log::warn!("LDAP authentication requested but ldap feature not enabled");
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
}
|
||||
#[cfg(not(feature = "ldap"))]
|
||||
if ldap {
|
||||
log::warn!("LDAP authentication requested but ldap feature not enabled");
|
||||
}
|
||||
|
||||
let mut builder = SmbServer::builder().listen(addr);
|
||||
|
||||
@@ -210,7 +209,7 @@ pub async fn handle_smb_server_command(cmd: SmbServerCommand) -> anyhow::Result<
|
||||
log::info!("SMB server listening on {}", addr);
|
||||
log::info!("Share '{}' at root: {}", share_name, root);
|
||||
log::info!("Users: {}", user_list.join(", "));
|
||||
if ldap_provider.is_some() {
|
||||
if ldap_enabled {
|
||||
log::info!("LDAP authentication: enabled");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user