]>
git.proxmox.com Git - proxmox-perl-rs.git/commitdiff
projects
/
proxmox-perl-rs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c6a27d
)
pmg: reset tfa failure count on unlock
author
Wolfgang Bumiller
<w.bumiller@proxmox.com>
Wed, 5 Jul 2023 09:01:45 +0000
(11:01 +0200)
committer
Wolfgang Bumiller
<w.bumiller@proxmox.com>
Wed, 5 Jul 2023 09:01:45 +0000
(11:01 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
pmg-rs/src/tfa.rs
patch
|
blob
|
blame
|
history
diff --git
a/pmg-rs/src/tfa.rs
b/pmg-rs/src/tfa.rs
index d4282bc1a878024a6659c9163e63a99a38b2278f..19244887d920b3182daa28f66fb9e9109b9c461b 100644
(file)
--- a/
pmg-rs/src/tfa.rs
+++ b/
pmg-rs/src/tfa.rs
@@
-439,9
+439,11
@@
mod export {
}
#[export]
- fn api_unlock_tfa(#[try_from_ref] this: &Tfa, userid: &str) -> Result<bool, Error> {
- Ok(methods::unlock_tfa(
+ fn api_unlock_tfa(#[raw] raw_this: Value, userid: &str) -> Result<bool, Error> {
+ let this: &Tfa = (&raw_this).try_into()?;
+ Ok(methods::unlock_and_reset_tfa(
&mut this.inner.lock().unwrap(),
+ &UserAccess::new(&raw_this)?,
userid,
)?)
}