Skip to content

Commit

Permalink
Issue 6490 - Adjust rust pwchan error severity level
Browse files Browse the repository at this point in the history
Description:

We log an info message about the pbkdf2 iterations, but the severity level is
ERR, when it should be INFO.

Relates: 389ds#6490

Reviewed by: ?
  • Loading branch information
mreynolds389 committed Jan 9, 2025
1 parent 6935548 commit ad7ac49
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/plugins/pwdchan/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ macro_rules! ab64_to_b64 {
// Create a module for each plugin type to avoid name conflicts
mod pbkdf2 {
use super::*;

pub struct PwdChanPbkdf2;
slapi_r_plugin_hooks!(pwdchan_pbkdf2, PwdChanPbkdf2);

impl super::Pbkdf2Plugin for PwdChanPbkdf2 {
fn digest_type() -> MessageDigest { MessageDigest::sha1() }
fn scheme_name() -> &'static str { "PBKDF2" }
Expand All @@ -65,10 +65,10 @@ mod pbkdf2 {

mod pbkdf2_sha1 {
use super::*;

pub struct PwdChanPbkdf2Sha1;
slapi_r_plugin_hooks!(pwdchan_pbkdf2_sha1, PwdChanPbkdf2Sha1);

impl super::Pbkdf2Plugin for PwdChanPbkdf2Sha1 {
fn digest_type() -> MessageDigest { MessageDigest::sha1() }
fn scheme_name() -> &'static str { "PBKDF2-SHA1" }
Expand All @@ -77,10 +77,10 @@ mod pbkdf2_sha1 {

mod pbkdf2_sha256 {
use super::*;

pub struct PwdChanPbkdf2Sha256;
slapi_r_plugin_hooks!(pwdchan_pbkdf2_sha256, PwdChanPbkdf2Sha256);

impl super::Pbkdf2Plugin for PwdChanPbkdf2Sha256 {
fn digest_type() -> MessageDigest { MessageDigest::sha256() }
fn scheme_name() -> &'static str { "PBKDF2-SHA256" }
Expand All @@ -89,10 +89,10 @@ mod pbkdf2_sha256 {

mod pbkdf2_sha512 {
use super::*;

pub struct PwdChanPbkdf2Sha512;
slapi_r_plugin_hooks!(pwdchan_pbkdf2_sha512, PwdChanPbkdf2Sha512);

impl super::Pbkdf2Plugin for PwdChanPbkdf2Sha512 {
fn digest_type() -> MessageDigest { MessageDigest::sha512() }
fn scheme_name() -> &'static str { "PBKDF2-SHA512" }
Expand Down Expand Up @@ -122,8 +122,8 @@ macro_rules! impl_slapi_pbkdf2_plugin {
Ok(())
}

fn has_pwd_storage() -> bool {
true
fn has_pwd_storage() -> bool {
true
}

fn pwd_scheme_name() -> &'static str {
Expand Down Expand Up @@ -365,7 +365,7 @@ impl PwdChanCrypto {
};

log_error!(
ErrorLevel::Error,
ErrorLevel::Info,
"get_pbkdf2_rounds -> PBKDF2 rounds for {} is {}",
digest_name,
rounds
Expand Down

0 comments on commit ad7ac49

Please sign in to comment.