From a9bc2ee5763928683567ea5db6c0a27b4d90bc03 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Mon, 1 May 2023 13:59:31 +0100 Subject: [PATCH] remove_secure_session(): Return-On-Success Only Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 03777620a..938dea054 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -655,14 +655,15 @@ remove_secure_session() { [ -d "$secured_session" ] then # Always remove temp-session - rm -rf "$secured_session" + if rm -rf "$secured_session"; then verbose "\ remove_secure_session: DELETED: $secured_session" unset -v working_safe_ssl_conf mktemp_counter \ secured_session - else - die "remove_secure_session: $secured_session" + return 0 fi + + die "remove_secure_session: $secured_session" } # => remove_secure_session() # Create temp-file atomically or fail