From 0a33951e9ef93c8d2904406ce8264952c616a0f3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 22 Oct 2021 08:35:24 +0200 Subject: [PATCH] acme: new_account: prevent replacing existing accounts Signed-off-by: Wolfgang Bumiller --- src/acme/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acme/client.rs b/src/acme/client.rs index ee04edad..8d6cf6bd 100644 --- a/src/acme/client.rs +++ b/src/acme/client.rs @@ -139,7 +139,7 @@ impl AcmeClient { let account_path = account_path(account_name.as_ref()); let file = OpenOptions::new() .write(true) - .create(true) + .create_new(true) .mode(0o600) .open(&account_path) .map_err(|err| format_err!("failed to open {:?} for writing: {}", account_path, err))?;