use new fsync parameter to replace_file and atomic_open_or_create
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
@ -28,7 +28,7 @@ tower-service = "0.3.0"
|
||||
xdg = "2.2"
|
||||
|
||||
pathpatterns = "0.1.2"
|
||||
proxmox = "0.14.0"
|
||||
proxmox = "0.15.0"
|
||||
proxmox-fuse = "0.1.1"
|
||||
proxmox-http = { version = "0.5.0", features = [ "client", "http-helpers", "websocket" ] }
|
||||
proxmox-io = { version = "1", features = [ "tokio" ] }
|
||||
|
@ -153,7 +153,7 @@ pub fn delete_ticket_info(prefix: &str, server: &str, username: &Userid) -> Resu
|
||||
map.remove(username.as_str());
|
||||
}
|
||||
|
||||
replace_file(path, data.to_string().as_bytes(), CreateOptions::new().perm(mode))?;
|
||||
replace_file(path, data.to_string().as_bytes(), CreateOptions::new().perm(mode), false)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@ -195,7 +195,7 @@ fn store_fingerprint(prefix: &str, server: &str, fingerprint: &str) -> Result<()
|
||||
result.push_str(fingerprint);
|
||||
result.push('\n');
|
||||
|
||||
replace_file(path, result.as_bytes(), CreateOptions::new())?;
|
||||
replace_file(path, result.as_bytes(), CreateOptions::new(), false)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@ -250,7 +250,7 @@ fn store_ticket_info(prefix: &str, server: &str, username: &str, ticket: &str, t
|
||||
}
|
||||
}
|
||||
|
||||
replace_file(path, new_data.to_string().as_bytes(), CreateOptions::new().perm(mode))?;
|
||||
replace_file(path, new_data.to_string().as_bytes(), CreateOptions::new().perm(mode), false)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -440,8 +440,8 @@ fn test_crypto_parameters_handling() -> Result<(), Error> {
|
||||
mode: CryptMode::SignOnly,
|
||||
};
|
||||
|
||||
replace_file(&keypath, &some_key, CreateOptions::default())?;
|
||||
replace_file(&master_keypath, &some_master_key, CreateOptions::default())?;
|
||||
replace_file(&keypath, &some_key, CreateOptions::default(), false)?;
|
||||
replace_file(&master_keypath, &some_master_key, CreateOptions::default(), false)?;
|
||||
|
||||
// no params, no default key == no key
|
||||
let res = crypto_parameters(&json!({}));
|
||||
|
Reference in New Issue
Block a user