Skip to content

Commit

Permalink
log error when cannot delete keyutils credential
Browse files Browse the repository at this point in the history
  • Loading branch information
soywod committed Oct 15, 2024
1 parent df0acf2 commit f6a4b78
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/keyutils_persistent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
TODO
*/
use log::debug;

use super::credential::{
Credential, CredentialApi, CredentialBuilder, CredentialBuilderApi, CredentialPersistence,
};
Expand Down Expand Up @@ -58,10 +60,10 @@ impl CredentialApi for KeyutilsPersistentCredential {
}

fn delete_credential(&self) -> Result<()> {
// TODO: log the error
let _ = self.keyutils.delete_credential();
self.ss.delete_credential()?;
Ok(())
if let Err(err) = self.keyutils.delete_credential() {
debug!("cannot delete keyutils credential: {err}");
}
self.ss.delete_credential()
}

fn as_any(&self) -> &dyn std::any::Any {
Expand Down

0 comments on commit f6a4b78

Please sign in to comment.